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.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
119
121
theorem isBounded_convexHull {s : Set E} : Bornology.IsBounded (convexHull ℝ s) ↔ Bornology.IsBounded s := by
simp only [Metric.isBounded_iff_ediam_ne_top, convexHull_ediam]
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
import Mathlib.Algebra.Group.Pi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.IsomorphismClasses import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects #align_import category_theory.limits.shapes.zero_morphisms from "leanpr...
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
140
142
theorem zero_of_comp_mono {X Y Z : C} {f : X ⟶ Y} (g : Y ⟶ Z) [Mono g] (h : f ≫ g = 0) : f = 0 := by
rw [← zero_comp, cancel_mono] at h exact h
[]
[]
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_lim...
Mathlib/Analysis/SpecificLimits/Normed.lean
62
68
theorem tendsto_norm_zpow_nhdsWithin_0_atTop {𝕜 : Type*} [NormedDivisionRing 𝕜] {m : ℤ} (hm : m < 0) : Tendsto (fun x : 𝕜 ↦ ‖x ^ m‖) (𝓝[≠] 0) atTop := by
rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to ℕ using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop
[ " Summable f", " ∀ (i : ℕ), 0 ≤ ‖f i‖", " Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)", " Tendsto (fun x => ‖x ^ m‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[≠] 0) atTop" ]
[ " Summable f", " ∀ (i : ℕ), 0 ≤ ‖f i‖", " Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)" ]
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
106
107
theorem taylor_mul {R} [CommSemiring R] (r : R) (p q : R[X]) : taylor r (p * q) = taylor r p * taylor r q := by
simp only [taylor_apply, mul_comp]
[ " { 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.Group.Semiconj.Defs import Mathlib.Algebra.Group.Units #align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open scoped Int variable {M G : Type*} namespace Sem...
Mathlib/Algebra/Group/Semiconj/Units.lean
64
67
theorem units_inv_symm_left {a : Mˣ} {x y : M} (h : SemiconjBy (↑a) x y) : SemiconjBy (↑a⁻¹) y x := calc ↑a⁻¹ * y = ↑a⁻¹ * (y * a * ↑a⁻¹) := by
rw [Units.mul_inv_cancel_right] _ = x * ↑a⁻¹ := by rw [← h.eq, ← mul_assoc, Units.inv_mul_cancel_left]
[ " a * ↑x⁻¹ = ↑y⁻¹ * (↑y * a) * ↑x⁻¹", " ↑y⁻¹ * (↑y * a) * ↑x⁻¹ = ↑y⁻¹ * a", " ↑a⁻¹ * y = ↑a⁻¹ * (y * ↑a * ↑a⁻¹)", " ↑a⁻¹ * (y * ↑a * ↑a⁻¹) = x * ↑a⁻¹" ]
[ " a * ↑x⁻¹ = ↑y⁻¹ * (↑y * a) * ↑x⁻¹", " ↑y⁻¹ * (↑y * a) * ↑x⁻¹ = ↑y⁻¹ * a" ]
import Mathlib.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68ab8cf7dd83d549eb78a68a1" open Finset variable {α : Type*} theorem sup_sdiff_injOn [GeneralizedBooleanAlgebra α] (u v : α) : { x | Disjoint u x ∧ v ≤ x }....
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
115
120
theorem compress_idem (u v a : α) : compress u v (compress u v a) = compress u v a := by
unfold compress split_ifs with h h' · rw [le_sdiff_iff.1 h'.2, sdiff_bot, sdiff_bot, sup_assoc, sup_idem] · rfl · rfl
[ " Set.InjOn (fun x => (x ⊔ u) \\ v) {x | Disjoint u x ∧ v ≤ x}", " a = b", " ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v", " compress u v ((a ⊔ v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≤ a then (a ⊔ u) \\ u else a) = a", " (a ⊔ u) \\ u = a", " a = a", " compress (a \\ b) (b...
[ " Set.InjOn (fun x => (x ⊔ u) \\ v) {x | Disjoint u x ∧ v ≤ x}", " a = b", " ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v", " compress u v ((a ⊔ v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≤ a then (a ⊔ u) \\ u else a) = a", " (a ⊔ u) \\ u = a", " a = a", " compress (a \\ b) (b...
import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.Factors import Mathlib.Order.Interval.Finset.Nat #align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped Classical open Finset namespace Nat variable (n : ℕ) d...
Mathlib/NumberTheory/Divisors.lean
84
86
theorem insert_self_properDivisors (h : n ≠ 0) : insert n (properDivisors n) = divisors n := by
rw [divisors, properDivisors, Ico_succ_right_eq_insert_Ico (one_le_iff_ne_zero.2 h), Finset.filter_insert, if_pos (dvd_refl n)]
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n → a✝ < n.succ → 1 ≤ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n → a✝ < n → 1 ≤ a✝...
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
121
123
theorem coeff_expand_mul {p : ℕ} (hp : 0 < p) (f : R[X]) (n : ℕ) : (expand R p f).coeff (n * p) = f.coeff n := by
rw [coeff_expand hp, if_pos (dvd_mul_left _ _), Nat.mul_div_cancel _ hp]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
import Mathlib.LinearAlgebra.Dual import Mathlib.LinearAlgebra.Matrix.ToLin #align_import linear_algebra.contraction from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec" suppress_compilation -- Porting note: universe metavariables behave oddly universe w u v₁ v₂ v₃ v₄ variable {ι : Type...
Mathlib/LinearAlgebra/Contraction.lean
85
92
theorem transpose_dualTensorHom (f : Module.Dual R M) (m : M) : Dual.transpose (R := R) (dualTensorHom R M M (f ⊗ₜ m)) = dualTensorHom R _ _ (Dual.eval R M m ⊗ₜ f) := by
ext f' m' simp only [Dual.transpose_apply, coe_comp, Function.comp_apply, dualTensorHom_apply, LinearMap.map_smulₛₗ, RingHom.id_apply, Algebra.id.smul_eq_mul, Dual.eval_apply, LinearMap.smul_apply] exact mul_comm _ _
[ " Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)", " ((Dual.transpose ((dualTensorHom R M M) (f ⊗ₜ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ⊗ₜ[R] f)) f') m'", " f m' * f' m = f' m * f m'" ]
[]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.DMatrix import Mathlib.RingTheory.MatrixAlgebra #align_import ring_theory.polynomial_algebra from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" universe u v w open Polynomial Tensor...
Mathlib/RingTheory/PolynomialAlgebra.lean
85
91
theorem toFunLinear_mul_tmul_mul_aux_2 (k : ℕ) (a₁ a₂ : A) (p₁ p₂ : R[X]) : a₁ * a₂ * (algebraMap R A) ((p₁ * p₂).coeff k) = (Finset.antidiagonal k).sum fun x => a₁ * (algebraMap R A) (coeff p₁ x.1) * (a₂ * (algebraMap R A) (coeff p₂ x.2)) := by
simp_rw [mul_assoc, Algebra.commutes, ← Finset.mul_sum, mul_assoc, ← Finset.mul_sum] congr simp_rw [Algebra.commutes (coeff p₂ _), coeff_mul, map_sum, RingHom.map_mul]
[ " ((toFunBilinear R A) a) p = p.sum fun n r => (monomial n) (a * (algebraMap R A) r)", " ∑ x ∈ p.support, a • ((algebraMap R A[X]) (p.coeff x) * X ^ x) =\n ∑ x ∈ p.support, (monomial x) (a * (algebraMap R A) (p.coeff x))", " a • ((algebraMap R A[X]) (p.coeff i) * X ^ i) = (monomial i) (a * (algebraMap R A) (...
[ " ((toFunBilinear R A) a) p = p.sum fun n r => (monomial n) (a * (algebraMap R A) r)", " ∑ x ∈ p.support, a • ((algebraMap R A[X]) (p.coeff x) * X ^ x) =\n ∑ x ∈ p.support, (monomial x) (a * (algebraMap R A) (p.coeff x))", " a • ((algebraMap R A[X]) (p.coeff i) * X ^ i) = (monomial i) (a * (algebraMap R A) (...
import Mathlib.Data.Matrix.Basis import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.Pi #align_import linear_algebra.std_basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" open Function Set Submodule namespace LinearMap variable (R : Type*) {ι : Type*} [Semiring R] ...
Mathlib/LinearAlgebra/StdBasis.lean
132
137
theorem iSup_range_stdBasis [Finite ι] : ⨆ i, range (stdBasis R φ i) = ⊤ := by
cases nonempty_fintype ι convert top_unique (iInf_emptyset.ge.trans <| iInf_ker_proj_le_iSup_range_stdBasis R φ _) · rename_i i exact ((@iSup_pos _ _ _ fun _ => range <| stdBasis R φ i) <| Finset.mem_univ i).symm · rw [Finset.coe_univ, Set.union_empty]
[ " (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0", " (if i' = i then 1 else 0) = if i = i' then 1 else 0", " (i' = i) = (i = i')", " stdBasis R φ i = pi (diag i)", " (stdBasis R φ i) x j = (pi (diag i)) x j", " x = id x", " proj i ∘ₗ stdBasis R φ j = diag j i", " ⨆ i ∈ I, range (stdBasis ...
[ " (stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0", " (if i' = i then 1 else 0) = if i = i' then 1 else 0", " (i' = i) = (i = i')", " stdBasis R φ i = pi (diag i)", " (stdBasis R φ i) x j = (pi (diag i)) x j", " x = id x", " proj i ∘ₗ stdBasis R φ j = diag j i", " ⨆ i ∈ I, range (stdBasis ...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Shift import Mathlib.Analysis.Calculus.IteratedDeriv.Defs variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {R : Type*} [Semi...
Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean
30
38
theorem iteratedDerivWithin_congr (hfg : Set.EqOn f g s) : Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s := by
induction n generalizing f g with | zero => rwa [iteratedDerivWithin_zero] | succ n IH => intro y hy have : UniqueDiffWithinAt 𝕜 s y := h.uniqueDiffWithinAt hy rw [iteratedDerivWithin_succ this, iteratedDerivWithin_succ this] exact derivWithin_congr (IH hfg) (IH hfg hy)
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x", " Set.EqOn (iteratedDerivWithin n f s) (iteratedDerivWithin n g s) s", " Set.EqOn (iteratedDerivWithin 0 f s) (iteratedDerivWithin 0 g s) s", " Set.EqOn (iteratedDerivWithin (n + 1) f s) (iteratedDerivWithin (n +...
[ " iteratedDerivWithin n (f + g) s x = iteratedDerivWithin n f s x + iteratedDerivWithin n g s x" ]
import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold #align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" namespace Multiset variable {α : Type*} section Inf -- can be defined with just `[Top α]` where some lemmas hold with...
Mathlib/Data/Multiset/Lattice.lean
168
169
theorem inf_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).inf = s₁.inf ⊓ s₂.inf := by
rw [← inf_dedup, dedup_ext.2, inf_dedup, inf_add]; simp
[ " (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)", " a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b", " ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)", " (s₁.ndunion s₂).inf = s₁.inf ⊓ s₂.inf", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂", " (s₁ ∪ ...
[ " (s₁ + s₂).inf = fold (fun x x_1 => x ⊓ x_1) (⊤ ⊓ ⊤) (s₁ + s₂)", " a ≤ inf 0 ↔ ∀ b ∈ 0, a ≤ b", " ∀ (a_1 : α) (s : Multiset α), (a ≤ s.inf ↔ ∀ b ∈ s, a ≤ b) → (a ≤ (a_1 ::ₘ s).inf ↔ ∀ b ∈ a_1 ::ₘ s, a ≤ b)", " (s₁.ndunion s₂).inf = s₁.inf ⊓ s₂.inf", " ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂" ]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2...
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
91
101
theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesOnBall (fderiv 𝕜 f) p.derivSeries x r := by
refine .congr (f := fun z ↦ continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin (z - x) 1)) ?_ fun z hz ↦ ?_ · refine continuousMultilinearCurryFin1 𝕜 E F |>.toContinuousLinearEquiv.toContinuousLinearMap.comp_hasFPowerSeriesOnBall ?_ simpa using ((p.hasFPowerSeriesOnBall_changeOrigin 1 (h.r_...
[ " HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x", " (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖", " Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)", " ‖id (x, x) - (x, x)‖ = 0", " HasFPowerSeriesOnBall (_root_.fderiv 𝕜 f) p.derivSeries x r", ...
[ " HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x", " (fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖) =o[nhds (x, x)] fun x => ‖x.1 - x.2‖", " Tendsto (fun y => ‖y - (x, x)‖) (nhds (x, x)) (nhds 0)", " ‖id (x, x) - (x, x)‖ = 0" ]
import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Int.LeastGreatest import Mathlib.Data.Rat.Floor import Mathlib.Data.NNRat.Defs #align_import algebra.order.archimedean from "leanprover-community/mathlib"@"6f413f3f7330b94c92a5a27488fdc74e6d483a78" open Int Set variable {α : Type*} class Archimedean (...
Mathlib/Algebra/Order/Archimedean.lean
84
87
theorem existsUnique_zsmul_near_of_pos' {a : α} (ha : 0 < a) (g : α) : ∃! k : ℤ, 0 ≤ g - k • a ∧ g - k • a < a := by
simpa only [sub_nonneg, add_zsmul, one_zsmul, sub_lt_iff_lt_add'] using existsUnique_zsmul_near_of_pos ha g
[ " x ≤ n • y", " ∃! k, k • a ≤ g ∧ g < (k + 1) • a", " -↑k ∈ s", " ∀ n ∈ s, n ≤ ↑k", " n ≤ ↑k", " n • a ≤ ↑k • a", " g < (m + 1) • a", " ∃ z ∈ s, m < z", " m < n + 1", " m • a < (n + 1) • a", " ∃! k, 0 ≤ g - k • a ∧ g - k • a < a" ]
[ " x ≤ n • y", " ∃! k, k • a ≤ g ∧ g < (k + 1) • a", " -↑k ∈ s", " ∀ n ∈ s, n ≤ ↑k", " n ≤ ↑k", " n • a ≤ ↑k • a", " g < (m + 1) • a", " ∃ z ∈ s, m < z", " m < n + 1", " m • a < (n + 1) • a" ]
import Mathlib.Analysis.InnerProductSpace.Rayleigh import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Algebra.DirectSum.Decomposition import Mathlib.LinearAlgebra.Eigenspace.Minpoly #align_import analysis.inner_product_space.spectrum from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da...
Mathlib/Analysis/InnerProductSpace/Spectrum.lean
102
105
theorem orthogonalComplement_iSup_eigenspaces_invariant ⦃v : E⦄ (hv : v ∈ (⨆ μ, eigenspace T μ)ᗮ) : T v ∈ (⨆ μ, eigenspace T μ)ᗮ := by
rw [← Submodule.iInf_orthogonal] at hv ⊢ exact T.iInf_invariant hT.invariant_orthogonalComplement_eigenspace v hv
[ " T v ∈ (eigenspace T μ)ᗮ", " ⟪w, T v⟫_𝕜 = 0", " T w = μ • w", " (starRingEnd 𝕜) μ = μ", " OrthogonalFamily 𝕜 (fun μ => ↥(eigenspace T μ)) fun μ => (eigenspace T μ).subtypeₗᵢ", " ⟪((fun μ => (eigenspace T μ).subtypeₗᵢ) μ) ⟨v, hv⟩, ((fun μ => (eigenspace T μ).subtypeₗᵢ) ν) ⟨w, hw⟩⟫_𝕜 = 0", " ⟪((fun μ...
[ " T v ∈ (eigenspace T μ)ᗮ", " ⟪w, T v⟫_𝕜 = 0", " T w = μ • w", " (starRingEnd 𝕜) μ = μ", " OrthogonalFamily 𝕜 (fun μ => ↥(eigenspace T μ)) fun μ => (eigenspace T μ).subtypeₗᵢ", " ⟪((fun μ => (eigenspace T μ).subtypeₗᵢ) μ) ⟨v, hv⟩, ((fun μ => (eigenspace T μ).subtypeₗᵢ) ν) ⟨w, hw⟩⟫_𝕜 = 0", " ⟪((fun μ...
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284...
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
291
302
theorem ae_nonneg_of_forall_setIntegral_nonneg (hf : Integrable f μ) (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
rcases hf.1 with ⟨f', hf'_meas, hf_ae⟩ have hf'_integrable : Integrable f' μ := Integrable.congr hf hf_ae have hf'_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f' x ∂μ := by intro s hs h's rw [setIntegral_congr_ae hs (hf_ae.mono fun x hx _ => hx.symm)] exact hf_zero s hs h's exact (ae_...
[ " (∀ᵐ (x : α) ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | ¬c ≤ f a} = 0 ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | f a < c} = 0 ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | f a < c} = 0 → ∀ b < c, μ {x | f x ≤ b} = 0", " μ {x | f x ≤ b} = 0", " (∀ b < c, μ {x | f x ≤ b} = 0) → μ {a | f a < c} = 0",...
[ " (∀ᵐ (x : α) ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | ¬c ≤ f a} = 0 ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | f a < c} = 0 ↔ ∀ b < c, μ {x | f x ≤ b} = 0", " μ {a | f a < c} = 0 → ∀ b < c, μ {x | f x ≤ b} = 0", " μ {x | f x ≤ b} = 0", " (∀ b < c, μ {x | f x ≤ b} = 0) → μ {a | f a < c} = 0",...
import Mathlib.Data.ENNReal.Operations #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal namespace ENNReal noncomputable section Inv variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} protected theorem div_eq_inv_mul : a / b = b⁻¹ * a := by rw [...
Mathlib/Data/ENNReal/Inv.lean
133
133
theorem inv_ne_top : a⁻¹ ≠ ∞ ↔ a ≠ 0 := by
simp
[ " a / b = b⁻¹ * a", " sInf {b | 1 ≤ 0 * b} = ⊤", " a ∈ {b | 1 ≤ ⊤ * b}", " ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p", " r⁻¹ ≤ b", " 1 ≤ r * b", " 1 ≤ ↑r * ↑r⁻¹", " ↑2⁻¹ = 2⁻¹", " ↑(p / r) = ↑p / ↑r", " ↑(p / r) ≤ ↑p / ↑r", " a / 0 = ⊤", " 1⁻¹ = 1", " (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0", " (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ ...
[ " a / b = b⁻¹ * a", " sInf {b | 1 ≤ 0 * b} = ⊤", " a ∈ {b | 1 ≤ ⊤ * b}", " ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p", " r⁻¹ ≤ b", " 1 ≤ r * b", " 1 ≤ ↑r * ↑r⁻¹", " ↑2⁻¹ = 2⁻¹", " ↑(p / r) = ↑p / ↑r", " ↑(p / r) ≤ ↑p / ↑r", " a / 0 = ⊤", " 1⁻¹ = 1", " (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0", " (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ ...
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
121
135
theorem normSq_exp (q : ℍ[ℝ]) : normSq (exp ℝ q) = exp ℝ q.re ^ 2 := calc normSq (exp ℝ q) = normSq (exp ℝ q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im)) := by
rw [exp_eq] _ = exp ℝ q.re ^ 2 * normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) := by rw [normSq_smul] _ = exp ℝ q.re ^ 2 * (Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2) := by congr 1 obtain hv | hv := eq_or_ne ‖q.im‖ 0 · simp [hv] rw [normSq_add, normSq_smul,...
[ " ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)", " (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)", " k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n", " k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))", " (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖...
[ " ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)", " (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)", " k⁻¹ • q ^ (2 * n) = k⁻¹ • (-↑(normSq q)) ^ n", " k⁻¹ • (-↑(normSq q)) ^ n = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))", " (-↑(normSq q)) ^ n = ↑((-1) ^ n * ‖...
import Mathlib.Algebra.Group.Support import Mathlib.Algebra.Order.Monoid.WithTop import Mathlib.Data.Nat.Cast.Field #align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" open Function Set section AddMonoidWithOne variable {α M : Type*} [AddMonoidWith...
Mathlib/Algebra/CharZero/Lemmas.lean
161
162
theorem bit1_eq_one {a : R} : bit1 a = 1 ↔ a = 0 := by
rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
[ " 2 ≠ 0", " a + a = 0 ↔ a = 0", " 0 = bit0 a ↔ a = 0", " bit0 a = 0 ↔ a = 0", " n = 0 ∨ a = b", " a = b", " ↑2 * a = ↑2 * b", " bit1 a = 1 ↔ a = 0", " 1 = bit1 0" ]
[ " 2 ≠ 0", " a + a = 0 ↔ a = 0", " 0 = bit0 a ↔ a = 0", " bit0 a = 0 ↔ a = 0", " n = 0 ∨ a = b", " a = b", " ↑2 * a = ↑2 * b" ]
import Mathlib.Algebra.Algebra.Equiv import Mathlib.LinearAlgebra.Span #align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212" open Pointwise universe u v w u₁ v₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁) namespace IsS...
Mathlib/Algebra/Algebra/Tower.lean
94
96
theorem of_algebraMap_smul [SMul R M] (h : ∀ (r : R) (x : M), algebraMap R A r • x = r • x) : IsScalarTower R A M where smul_assoc r a x := by
rw [Algebra.smul_def, mul_smul, h]
[ " (algebraMap R A) r • x = r • x", " (r • a) • x = r • a • x" ]
[ " (algebraMap R A) r • x = r • x" ]
import Mathlib.RingTheory.Adjoin.FG #align_import ring_theory.adjoin.tower from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open Pointwise universe u v w u₁ variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) namespace Algebra theorem adjoin_restrictScalars (C D E : Typ...
Mathlib/RingTheory/Adjoin/Tower.lean
49
58
theorem adjoin_res_eq_adjoin_res (C D E F : Type*) [CommSemiring C] [CommSemiring D] [CommSemiring E] [CommSemiring F] [Algebra C D] [Algebra C E] [Algebra C F] [Algebra D F] [Algebra E F] [IsScalarTower C D F] [IsScalarTower C E F] {S : Set D} {T : Set E} (hS : Algebra.adjoin C S = ⊤) (hT : Algebra.adjoin ...
rw [adjoin_restrictScalars C E, adjoin_restrictScalars C D, ← hS, ← hT, ← Algebra.adjoin_image, ← Algebra.adjoin_image, ← AlgHom.coe_toRingHom, ← AlgHom.coe_toRingHom, IsScalarTower.coe_toAlgHom, IsScalarTower.coe_toAlgHom, ← adjoin_union_eq_adjoin_adjoin, ← adjoin_union_eq_adjoin_adjoin, Set.union_comm]...
[ " Subalgebra.restrictScalars C (adjoin D S) =\n Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)", " x ∈ Subalgebra.restrictScalars C (adjoin D S) ↔\n x ∈ Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)", " x ∈ Subsem...
[ " Subalgebra.restrictScalars C (adjoin D S) =\n Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)", " x ∈ Subalgebra.restrictScalars C (adjoin D S) ↔\n x ∈ Subalgebra.restrictScalars C (adjoin (↥(Subalgebra.map (IsScalarTower.toAlgHom C D E) ⊤)) S)", " x ∈ Subsem...
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set...
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
135
137
theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) : μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
[ " (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x", " μ (s ∪ t) + μ (s ∩ t) = μ s + μ t", " μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t" ]
[ " (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x", " μ (s ∪ t) + μ (s ∩ t) = μ s + μ t", " μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t" ]
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
80
87
theorem Icc_eq_image_powerset (h : s ⊆ t) : Icc s t = (t \ s).powerset.image (s ∪ ·) := by
ext u simp_rw [mem_Icc, mem_image, mem_powerset] constructor · rintro ⟨hs, ht⟩ exact ⟨u \ s, sdiff_le_sdiff_right ht, sup_sdiff_cancel_right hs⟩ · rintro ⟨v, hv, rfl⟩ exact ⟨le_sup_left, union_subset h <| hv.trans sdiff_subset⟩
[ " 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 Mathlib.Algebra.Order.Field.Basic import Mathlib.Data.Finset.Lattice import Mathlib.Data.Fintype.Card #align_import algebra.order.field.pi from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" variable {α ι : Type*} [LinearOrderedSemifield α]
Mathlib/Algebra/Order/Field/Pi.lean
21
31
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α} (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
cases nonempty_fintype ι cases isEmpty_or_nonempty ι · exact ⟨1, zero_lt_one, isEmptyElim⟩ choose ε hε hxε using fun i => exists_pos_add_of_lt' (h i) obtain rfl : x + ε = y := funext hxε have hε : 0 < Finset.univ.inf' Finset.univ_nonempty ε := (Finset.lt_inf'_iff _).2 fun i _ => hε _ exact ⟨_, half_p...
[ " ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i", " ∃ ε_1, 0 < ε_1 ∧ ∀ (i : ι), x i + ε_1 < (x + ε) i" ]
[]
import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal #align_import set_theory.surreal.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" universe u namespace SetTheory open scoped PGame namespace PGame def Numeric : PGame → Prop | ⟨_, _, L, R⟩ => (...
Mathlib/SetTheory/Surreal/Basic.lean
85
86
theorem left_lt_right {x : PGame} (o : Numeric x) (i : x.LeftMoves) (j : x.RightMoves) : x.moveLeft i < x.moveRight j := by
cases x; exact o.1 i j
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
[ " x.Numeric ↔\n (∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j) ∧\n (∀ (i : x.LeftMoves), (x.moveLeft i).Numeric) ∧ ∀ (j : x.RightMoves), (x.moveRight j).Numeric", " (mk α✝ β✝ a✝¹ a✝).Numeric ↔\n (∀ (i : (mk α✝ β✝ a✝¹ a✝).LeftMoves) (j : (mk α✝ β✝ a✝¹ a✝).RightMoves),\n (m...
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Topology.Algebra.OpenSubgroup import Mathlib.Topology.Algebra.Ring.Basic #align_import topology.algebra.nonarchimedean.basic from "leanprover-community/mathlib"@"83f81aea33931a1edb94ce0f32b9a5d484de6978" open scoped Pointwise Topology class Nonarchimede...
Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean
84
93
theorem prod_subset {U} (hU : U ∈ 𝓝 (1 : G × K)) : ∃ (V : OpenSubgroup G) (W : OpenSubgroup K), (V : Set G) ×ˢ (W : Set K) ⊆ U := by
erw [nhds_prod_eq, Filter.mem_prod_iff] at hU rcases hU with ⟨U₁, hU₁, U₂, hU₂, h⟩ cases' is_nonarchimedean _ hU₁ with V hV cases' is_nonarchimedean _ hU₂ with W hW use V; use W rw [Set.prod_subset_iff] intro x hX y hY exact Set.Subset.trans (Set.prod_mono hV hW) h (Set.mem_sep hX hY)
[ " ⇑f ⁻¹' U ∈ 𝓝 1", " U ∈ 𝓝 (f 1)", " ∃ V W, ↑V ×ˢ ↑W ⊆ U", " ∃ W, ↑V ×ˢ ↑W ⊆ U", " ↑V ×ˢ ↑W ⊆ U", " ∀ x ∈ ↑V, ∀ y ∈ ↑W, (x, y) ∈ U", " (x, y) ∈ U" ]
[ " ⇑f ⁻¹' U ∈ 𝓝 1", " U ∈ 𝓝 (f 1)" ]
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
58
60
theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c" ]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠" ]
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.LinearAlgebra.Matrix.SesquilinearForm import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845" universe u v w variable {S T : ...
Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
126
129
theorem polar_comp {F : Type*} [CommRing S] [FunLike F R S] [AddMonoidHomClass F R S] (f : M → R) (g : F) (x y : M) : polar (g ∘ f) x y = g (polar f x y) := by
simp only [polar, Pi.smul_apply, Function.comp_apply, map_sub]
[ " polar (f + g) x y = polar f x y + polar g x y", " f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)", " polar (-f) x y = -polar f x y", " polar (s • f) x y = s • polar f x y", " polar f x y = polar f y x", " polar f (x + x') y = polar f x y + polar f x' ...
[ " polar (f + g) x y = polar f x y + polar g x y", " f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)", " polar (-f) x y = -polar f x y", " polar (s • f) x y = s • polar f x y", " polar f x y = polar f y x", " polar f (x + x') y = polar f x y + polar f x' ...
import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Order.Hom.CompleteLattice namespace Submodule variable (S : Type*) {R M : Type*} [Semiring R] [AddCommMonoid M] [Semiring S] [Module S M] [Module R M] [SMul S R] [IsScalarTower S R M] def restrictScalars (V : Submodule R M) : Submodule S M where ...
Mathlib/Algebra/Module/Submodule/RestrictScalars.lean
106
107
theorem restrictScalars_eq_bot_iff {p : Submodule R M} : restrictScalars S p = ⊥ ↔ p = ⊥ := by
simp [SetLike.ext_iff]
[ " Module R ↥p", " ∀ {a b : Submodule R M},\n { toFun := restrictScalars S, inj' := ⋯ } a ≤ { toFun := restrictScalars S, inj' := ⋯ } b ↔ a ≤ b", " restrictScalars S p = ⊥ ↔ p = ⊥" ]
[ " Module R ↥p", " ∀ {a b : Submodule R M},\n { toFun := restrictScalars S, inj' := ⋯ } a ≤ { toFun := restrictScalars S, inj' := ⋯ } b ↔ a ≤ b" ]
import Batteries.Data.DList import Mathlib.Mathport.Rename import Mathlib.Tactic.Cases #align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" universe u #align dlist Batteries.DList namespace Batteries.DList open Function variable {α : Type u} #align dlist.of_list...
Mathlib/Data/DList/Defs.lean
72
72
theorem toList_singleton (x : α) : toList (singleton x) = [x] := by
simp
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
import Batteries.Data.List.Lemmas import Batteries.Data.Array.Basic import Batteries.Tactic.SeqFocus import Batteries.Util.ProofWanted namespace Array
.lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
14
29
theorem forIn_eq_data_forIn [Monad m] (as : Array α) (b : β) (f : α → β → m (ForInStep β)) : forIn as b f = forIn as.data b f := by
let rec loop : ∀ {i h b j}, j + i = as.size → Array.forIn.loop as f i h b = forIn (as.data.drop j) b f | 0, _, _, _, rfl => by rw [List.drop_length]; rfl | i+1, _, _, j, ij => by simp only [forIn.loop, Nat.add] have j_eq : j = size as - 1 - i := by simp [← ij, ← Nat.add_assoc] have : ...
[ " forIn as b f = forIn as.data b f", " forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f", " forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f", " forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f", " (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi...
[]
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" namespace Nat theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd ...
Mathlib/Data/Nat/GCD/Basic.lean
106
112
theorem gcd_self_sub_left {m n : ℕ} (h : m ≤ n) : gcd (n - m) n = gcd m n := by
have := Nat.sub_add_cancel h rw [gcd_comm m n, ← this, gcd_add_self_left (n - m) m] have : gcd (n - m) n = gcd (n - m) m := by nth_rw 2 [← Nat.add_sub_cancel' h] rw [gcd_add_self_right, gcd_comm] convert this
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)", " (m...
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)", " (m...
import Mathlib.Algebra.Group.Equiv.TypeTags import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.LinearAlgebra.Dual import Mathlib.LinearAlgebra.Contraction import Mathlib.RingTheory.TensorProduct.Basic #align_import representation_...
Mathlib/RepresentationTheory/Basic.lean
159
162
theorem asModuleEquiv_symm_map_smul (r : k) (x : V) : ρ.asModuleEquiv.symm (r • x) = algebraMap k (MonoidAlgebra k G) r • ρ.asModuleEquiv.symm x := by
apply_fun ρ.asModuleEquiv simp
[ " ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g", " ρ.asAlgebraHom (Finsupp.single g 1) = ρ g", " ρ.asAlgebraHom ((of k G) g) = ρ g", " ρ.asModuleEquiv.symm (r • x) = (algebraMap k (MonoidAlgebra k G)) r • ρ.asModuleEquiv.symm x", " ρ.asModuleEquiv (ρ.asModuleEquiv.symm (r • x)) =\n ρ.asModuleEquiv ((alg...
[ " ρ.asAlgebraHom (Finsupp.single g r) = r • ρ g", " ρ.asAlgebraHom (Finsupp.single g 1) = ρ g", " ρ.asAlgebraHom ((of k G) g) = ρ g" ]
import Mathlib.Data.List.Forall2 #align_import data.list.sections from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" open Nat Function namespace List variable {α β : Type*}
Mathlib/Data/List/Sections.lean
23
34
theorem mem_sections {L : List (List α)} {f} : f ∈ sections L ↔ Forall₂ (· ∈ ·) f L := by
refine ⟨fun h => ?_, fun h => ?_⟩ · induction L generalizing f · cases mem_singleton.1 h exact Forall₂.nil simp only [sections, bind_eq_bind, mem_bind, mem_map] at h rcases h with ⟨_, _, _, _, rfl⟩ simp only [*, forall₂_cons, true_and_iff] · induction' h with a l f L al fL fs · simp onl...
[ " f ∈ L.sections ↔ Forall₂ (fun x x_1 => x ∈ x_1) f L", " Forall₂ (fun x x_1 => x ∈ x_1) f L", " Forall₂ (fun x x_1 => x ∈ x_1) f []", " Forall₂ (fun x x_1 => x ∈ x_1) [] []", " Forall₂ (fun x x_1 => x ∈ x_1) f (head✝ :: tail✝)", " Forall₂ (fun x x_1 => x ∈ x_1) (w✝ :: w✝¹) (head✝ :: tail✝)", " f ∈ L.se...
[]
import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Combinatorics.SimpleGraph.AdjMatrix import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Set.Finite #align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd5389208...
Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean
137
140
theorem IsSRGWith.compl_is_regular (h : G.IsSRGWith n k ℓ μ) : Gᶜ.IsRegularOfDegree (n - k - 1) := by
rw [← h.card, Nat.sub_sub, add_comm, ← Nat.sub_sub] exact h.regular.compl
[ " (fun v w => ¬⊥.Adj v w → Fintype.card ↑(⊥.commonNeighbors v w) = 0) v w", " filter (fun x => x ∈ ⊥.commonNeighbors v w) univ = ∅", " a✝ ∈ filter (fun x => x ∈ ⊥.commonNeighbors v w) univ ↔ a✝ ∈ ∅", " Fintype.card ↑(⊤.commonNeighbors v w) = Fintype.card V - 2", " v ≠ w", " (G.neighborFinset v ∪ G.neighbo...
[ " (fun v w => ¬⊥.Adj v w → Fintype.card ↑(⊥.commonNeighbors v w) = 0) v w", " filter (fun x => x ∈ ⊥.commonNeighbors v w) univ = ∅", " a✝ ∈ filter (fun x => x ∈ ⊥.commonNeighbors v w) univ ↔ a✝ ∈ ∅", " Fintype.card ↑(⊤.commonNeighbors v w) = Fintype.card V - 2", " v ≠ w", " (G.neighborFinset v ∪ G.neighbo...
import Mathlib.CategoryTheory.Monoidal.Free.Coherence import Mathlib.CategoryTheory.Monoidal.Discrete import Mathlib.CategoryTheory.Monoidal.NaturalTransformation import Mathlib.CategoryTheory.Monoidal.Opposite import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.CommSq #align_import category_...
Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
125
128
theorem braiding_naturality {X X' Y Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y') : (f ⊗ g) ≫ (braiding Y Y').hom = (braiding X X').hom ≫ (g ⊗ f) := by
rw [tensorHom_def' f g, tensorHom_def g f] simp_rw [Category.assoc, braiding_naturality_left, braiding_naturality_right_assoc]
[ " (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X...
[ " (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X...
import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.Polynomial.Eval import Mathlib.RingTheory.Adjoin.Basic #align_import data.polynomial.algebra_map from "leanprover-community/mathlib"@"e064a7bf82ad94c3c17b5128bbd860d1ec34874e" noncomputable section open Finset open Polynomial namespace Polynomial univer...
Mathlib/Algebra/Polynomial/AlgebraMap.lean
131
136
theorem eval₂_algebraMap_X {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] (p : R[X]) (f : R[X] →ₐ[R] A) : eval₂ (algebraMap R A) (f X) p = f p := by
conv_rhs => rw [← Polynomial.sum_C_mul_X_pow_eq p] simp only [eval₂_eq_sum, sum_def] simp only [f.map_sum, f.map_mul, f.map_pow, eq_intCast, map_intCast] simp [Polynomial.C_eq_algebraMap]
[ " ((C.comp (algebraMap R A)) r * p).toFinsupp = (p * (C.comp (algebraMap R A)) r).toFinsupp", " (C ((algebraMap R A) r) * p).toFinsupp = (p * C ((algebraMap R A) r)).toFinsupp", " AddMonoidAlgebra.single 0 ((algebraMap R A) r) * p.toFinsupp =\n p.toFinsupp * AddMonoidAlgebra.single 0 ((algebraMap R A) r)", ...
[ " ((C.comp (algebraMap R A)) r * p).toFinsupp = (p * (C.comp (algebraMap R A)) r).toFinsupp", " (C ((algebraMap R A) r) * p).toFinsupp = (p * C ((algebraMap R A) r)).toFinsupp", " AddMonoidAlgebra.single 0 ((algebraMap R A) r) * p.toFinsupp =\n p.toFinsupp * AddMonoidAlgebra.single 0 ((algebraMap R A) r)", ...
import Mathlib.Data.Fin.Tuple.Sort import Mathlib.Order.WellFounded #align_import data.fin.tuple.bubble_sort_induction from "leanprover-community/mathlib"@"bf2428c9486c407ca38b5b3fb10b87dad0bc99fa" namespace Tuple
Mathlib/Data/Fin/Tuple/BubbleSortInduction.lean
34
44
theorem bubble_sort_induction' {n : ℕ} {α : Type*} [LinearOrder α] {f : Fin n → α} {P : (Fin n → α) → Prop} (hf : P f) (h : ∀ (σ : Equiv.Perm (Fin n)) (i j : Fin n), i < j → (f ∘ σ) j < (f ∘ σ) i → P (f ∘ σ) → P (f ∘ σ ∘ Equiv.swap i j)) : P (f ∘ sort f) := by
letI := @Preorder.lift _ (Lex (Fin n → α)) _ fun σ : Equiv.Perm (Fin n) => toLex (f ∘ σ) refine @WellFounded.induction_bot' _ _ _ (IsWellFounded.wf : WellFounded (· < ·)) (Equiv.refl _) (sort f) P (fun σ => f ∘ σ) (fun σ hσ hfσ => ?_) hf obtain ⟨i, j, hij₁, hij₂⟩ := antitone_pair_of_not_sorted' hσ ex...
[ " P (f ∘ ⇑(sort f))", " ∃ c < σ, P ((fun σ => f ∘ ⇑σ) c)" ]
[]
import Mathlib.Topology.Sets.Closeds #align_import topology.noetherian_space from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" variable (α β : Type*) [TopologicalSpace α] [TopologicalSpace β] namespace TopologicalSpace @[mk_iff] class NoetherianSpace : Prop where wellFounded_open...
Mathlib/Topology/NoetherianSpace.lean
139
142
theorem noetherianSpace_set_iff (s : Set α) : NoetherianSpace s ↔ ∀ t, t ⊆ s → IsCompact t := by
simp only [noetherianSpace_iff_isCompact, embedding_subtype_val.isCompact_iff, Subtype.forall_set_subtype]
[ " NoetherianSpace α ↔ ∀ (s : Opens α), IsCompact ↑s", " (∀ (k : Opens α), CompleteLattice.IsCompactElement k) ↔ ∀ (s : Opens α), IsCompact ↑s", " IsCompact s", " ∃ t, s ⊆ ⋃ i ∈ t, U i", " [NoetherianSpace α, WellFounded fun s t => s < t, ∀ (s : Set α), IsCompact s, ∀ (s : Opens α), IsCompact ↑s].TFAE", " ...
[ " NoetherianSpace α ↔ ∀ (s : Opens α), IsCompact ↑s", " (∀ (k : Opens α), CompleteLattice.IsCompactElement k) ↔ ∀ (s : Opens α), IsCompact ↑s", " IsCompact s", " ∃ t, s ⊆ ⋃ i ∈ t, U i", " [NoetherianSpace α, WellFounded fun s t => s < t, ∀ (s : Set α), IsCompact s, ∀ (s : Opens α), IsCompact ↑s].TFAE", " ...
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
75
76
theorem volume_val (s) : volume s = StieltjesFunction.id.measure s := by
simp [volume_eq_stieltjes_id]
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.TensorProduct.Tower import Mathlib.RingTheory.Adjoin.Basic import Mathlib.LinearAlgebra.DirectSum.Finsupp #align_import ring_theory.tensor_product from "leanprover-community/mathlib"@"88fcdc3da43943f5b01925deddaa5bf0c0e85e4e" suppress_comp...
Mathlib/RingTheory/TensorProduct/Basic.lean
90
92
theorem baseChange_zero : baseChange A (0 : M →ₗ[R] N) = 0 := by
ext simp [baseChange_eq_ltensor]
[ " baseChange A (f + g) = baseChange A f + baseChange A g", " ((AlgebraTensorModule.curry (baseChange A (f + g))) 1) x✝ =\n ((AlgebraTensorModule.curry (baseChange A f + baseChange A g)) 1) x✝", " baseChange A 0 = 0", " ((AlgebraTensorModule.curry (baseChange A 0)) 1) x✝ = ((AlgebraTensorModule.curry 0) 1) ...
[ " baseChange A (f + g) = baseChange A f + baseChange A g", " ((AlgebraTensorModule.curry (baseChange A (f + g))) 1) x✝ =\n ((AlgebraTensorModule.curry (baseChange A f + baseChange A g)) 1) x✝" ]
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [Topologic...
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
124
132
theorem tprod_iSup_decode₂ [CompleteLattice α] (m : α → M) (m0 : m ⊥ = 1) (s : β → α) : ∏' i : ℕ, m (⨆ b ∈ decode₂ β i, s b) = ∏' b : β, m (s b) := by
rw [← tprod_extend_one (@encode_injective β _)] refine tprod_congr fun n ↦ ?_ rcases em (n ∈ Set.range (encode : β → ℕ)) with ⟨a, rfl⟩ | hn · simp [encode_injective.extend_apply] · rw [extend_apply' _ _ _ hn] rw [← decode₂_ne_none_iff, ne_eq, not_not] at hn simp [hn, m0]
[ " ∏' (i : ℕ), m (⨆ b ∈ decode₂ β i, s b) = ∏' (b : β), m (s b)", " ∏' (i : ℕ), m (⨆ b ∈ decode₂ β i, s b) = ∏' (y : ℕ), extend encode (fun b => m (s b)) 1 y", " m (⨆ b ∈ decode₂ β n, s b) = extend encode (fun b => m (s b)) 1 n", " m (⨆ b ∈ decode₂ β (encode a), s b) = extend encode (fun b => m (s b)) 1 (encod...
[]
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n α : Type*} namespace Matrix ...
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
406
413
theorem det_fromBlocks₂₂ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α) (D : Matrix n n α) [Invertible D] : (Matrix.fromBlocks A B C D).det = det D * det (A - B * ⅟ D * C) := by
have : fromBlocks A B C D = (fromBlocks D C B A).submatrix (Equiv.sumComm _ _) (Equiv.sumComm _ _) := by ext (i j) cases i <;> cases j <;> rfl rw [this, det_submatrix_equiv_self, det_fromBlocks₁₁]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D...
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.euclidean_domain.defs from "leanprover-community/mathlib"@"ee7b9f9a9ac2a8d9f04ea39bbfe6b1a3be053b38" universe u class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R ...
Mathlib/Algebra/EuclideanDomain/Defs.lean
209
211
theorem gcd_zero_left (a : R) : gcd 0 a = a := by
rw [gcd] exact if_pos rfl
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m", " b * (a / b) + a % b - b * (a / b) = a - b * (a / b)", " ¬a * b ≺ b", " ¬b * a ≺ b", " a % 0 = a", " ¬a ≺ 1", " d = 0 → b * d = 0", " b * 0 = 0", " P a b", " gcd 0 a = a", " (if a0 ...
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m", " b * (a / b) + a % b - b * (a / b) = a - b * (a / b)", " ¬a * b ≺ b", " ¬b * a ≺ b", " a % 0 = a", " ¬a ≺ 1", " d = 0 → b * d = 0", " b * 0 = 0", " P a b" ]
import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Trace import Mathlib.RingTheory.Norm #align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" universe u v w z open scoped Matrix open Matrix FiniteDimensional Fintype Polynomial Fin...
Mathlib/RingTheory/Discriminant.lean
136
139
theorem discr_not_zero_of_basis [IsSeparable K L] (b : Basis ι K L) : discr K b ≠ 0 := by
rw [discr_def, traceMatrix_of_basis, ← LinearMap.BilinForm.nondegenerate_iff_det_ne_zero] exact traceForm_nondegenerate _ _
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝", " discr K ⇑b ≠ 0", " (traceForm K L).Nondegenerate" ]
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝" ]
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Range #align_import data.list.fin_range from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" universe u namespace List variable {α : Type u} @[simp] theorem map_coe_finRange (n : ℕ) : ((finRange n) : List (Fin n)).map (Fin.val) = ...
Mathlib/Data/List/FinRange.lean
54
55
theorem ofFn_eq_map {n} {f : Fin n → α} : ofFn f = (finRange n).map f := by
rw [← ofFn_id, map_ofFn, Function.comp_id]
[ " map Fin.val (finRange n) = range n", " map (fun a => a) (range n) = range n", " finRange n.succ = 0 :: map Fin.succ (finRange n)", " map Fin.val (finRange n.succ) = map Fin.val (0 :: map Fin.succ (finRange n))", " 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)", ...
[ " map Fin.val (finRange n) = range n", " map (fun a => a) (range n) = range n", " finRange n.succ = 0 :: map Fin.succ (finRange n)", " map Fin.val (finRange n.succ) = map Fin.val (0 :: map Fin.succ (finRange n))", " 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)", ...
import Mathlib.LinearAlgebra.Finsupp import Mathlib.RingTheory.Ideal.Over import Mathlib.RingTheory.Ideal.Prod import Mathlib.RingTheory.Ideal.MinimalPrime import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Nilpotent.Lemmas import Mathlib.Topology.Sets.Closeds import Mathlib.Topology.Sober #a...
Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
116
119
theorem primeSpectrumProd_symm_inl_asIdeal (x : PrimeSpectrum R) : ((primeSpectrumProd R S).symm <| Sum.inl x).asIdeal = Ideal.prod x.asIdeal ⊤ := by
cases x rfl
[ " Function.Bijective (primeSpectrumProdOfSum R S)", " Function.Injective (primeSpectrumProdOfSum R S)", " Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inl { asIdeal := I', IsPrime := hI' }", " Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inr { asIdeal := J', IsPrime := hJ' }", " Sum.inr { asIdeal := J, Is...
[ " Function.Bijective (primeSpectrumProdOfSum R S)", " Function.Injective (primeSpectrumProdOfSum R S)", " Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inl { asIdeal := I', IsPrime := hI' }", " Sum.inl { asIdeal := I, IsPrime := hI } = Sum.inr { asIdeal := J', IsPrime := hJ' }", " Sum.inr { asIdeal := J, Is...
import Mathlib.Data.Set.Image import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Clopen import Mathlib.Topology.Irreducible #align_import topology.connected from "leanprover-community/mathlib"@"d101e93197bb5f6ea89bd7ba386b7f7dff1f3903" open Set Function Topology TopologicalSpace Relation open scoped C...
Mathlib/Topology/Connected/Basic.lean
142
145
theorem IsPreconnected.union' {s t : Set α} (H : (s ∩ t).Nonempty) (hs : IsPreconnected s) (ht : IsPreconnected t) : IsPreconnected (s ∪ t) := by
rcases H with ⟨x, hxs, hxt⟩ exact hs.union x hxs hxt ht
[ " IsPreconnected s", " (s ∩ (u ∩ v)).Nonempty", " x ∈ s", " s ⊆ v ∪ u", " IsPreconnected (⋃₀ c)", " ∀ y ∈ ⋃₀ c, ∃ t ⊆ ⋃₀ c, x ∈ t ∧ y ∈ t ∧ IsPreconnected t", " ∃ t ⊆ ⋃₀ c, x ∈ t ∧ y ∈ t ∧ IsPreconnected t", " ∀ s_1 ∈ {s, t}, x ∈ s_1", " x ∈ r", " x ∈ t", " ∀ s_1 ∈ {s, t}, IsPreconnected s_1", ...
[ " IsPreconnected s", " (s ∩ (u ∩ v)).Nonempty", " x ∈ s", " s ⊆ v ∪ u", " IsPreconnected (⋃₀ c)", " ∀ y ∈ ⋃₀ c, ∃ t ⊆ ⋃₀ c, x ∈ t ∧ y ∈ t ∧ IsPreconnected t", " ∃ t ⊆ ⋃₀ c, x ∈ t ∧ y ∈ t ∧ IsPreconnected t", " ∀ s_1 ∈ {s, t}, x ∈ s_1", " x ∈ r", " x ∈ t", " ∀ s_1 ∈ {s, t}, IsPreconnected s_1", ...
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Range #align_import data.list.fin_range from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" universe u namespace List variable {α : Type u} @[simp] theorem map_coe_finRange (n : ℕ) : ((finRange n) : List (Fin n)).map (Fin.val) = ...
Mathlib/Data/List/FinRange.lean
30
34
theorem finRange_succ_eq_map (n : ℕ) : finRange n.succ = 0 :: (finRange n).map Fin.succ := by
apply map_injective_iff.mpr Fin.val_injective rw [map_cons, map_coe_finRange, range_succ_eq_map, Fin.val_zero, ← map_coe_finRange, map_map, map_map] simp only [Function.comp, Fin.val_succ]
[ " map Fin.val (finRange n) = range n", " map (fun a => a) (range n) = range n", " finRange n.succ = 0 :: map Fin.succ (finRange n)", " map Fin.val (finRange n.succ) = map Fin.val (0 :: map Fin.succ (finRange n))", " 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)" ]
[ " map Fin.val (finRange n) = range n", " map (fun a => a) (range n) = range n" ]
import Mathlib.Data.List.Nodup import Mathlib.Data.List.Zip import Mathlib.Data.Nat.Defs import Mathlib.Data.List.Infix #align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" universe u variable {α : Type u} open Nat Function namespace List theorem rotate...
Mathlib/Data/List/Rotate.lean
53
53
theorem rotate'_zero (l : List α) : l.rotate' 0 = l := by
cases l <;> rfl
[ " l.rotate (n % l.length) = l.rotate n", " [].rotate n = []", " l.rotate 0 = l", " [].rotate' n = []", " [].rotate' 0 = []", " [].rotate' (n✝ + 1) = []", " l.rotate' 0 = l", " (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝" ]
[ " l.rotate (n % l.length) = l.rotate n", " [].rotate n = []", " l.rotate 0 = l", " [].rotate' n = []", " [].rotate' 0 = []", " [].rotate' (n✝ + 1) = []" ]
import Batteries.Data.List.Lemmas import Batteries.Tactic.Classical import Mathlib.Tactic.TypeStar import Mathlib.Mathport.Rename #align_import data.list.tfae from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" namespace List def TFAE (l : List Prop) : Prop := ∀ x ∈ l, ∀ y ∈ l, x ↔ ...
Mathlib/Data/List/TFAE.lean
63
71
theorem tfae_of_cycle {a b} {l : List Prop} (h_chain : List.Chain (· → ·) a (b :: l)) (h_last : getLastD l b → a) : TFAE (a :: b :: l) := by
induction l generalizing a b with | nil => simp_all [tfae_cons_cons, iff_def] | cons c l IH => simp only [tfae_cons_cons, getLastD_cons, tfae_singleton, and_true, chain_cons, Chain.nil] at * rcases h_chain with ⟨ab, ⟨bc, ch⟩⟩ have := IH ⟨bc, ch⟩ (ab ∘ h_last) exact ⟨⟨ab, h_last ∘ (this.2 c (.head...
[ " [p].TFAE", " a ∈ a :: l", " (a ↔ b) ∧ l.TFAE → (a :: l).TFAE", " a ↔ a", " a ↔ q", " p ↔ a", " p ↔ q", " (a :: a :: l).TFAE ↔ (a :: l).TFAE", " (a :: b :: l).TFAE", " [a, b].TFAE", " (a :: b :: c :: l).TFAE", " (a ↔ b) ∧ (b ↔ c) ∧ (c :: l).TFAE" ]
[ " [p].TFAE", " a ∈ a :: l", " (a ↔ b) ∧ l.TFAE → (a :: l).TFAE", " a ↔ a", " a ↔ q", " p ↔ a", " p ↔ q", " (a :: a :: l).TFAE ↔ (a :: l).TFAE" ]
import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Localization.NumDen import Mathlib.RingTheory.Polynomial.ScaleRoots #align_import ring_theory.polynomial.rational_root from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c" open scoped Polynomial section ScaleRoots var...
Mathlib/RingTheory/Polynomial/RationalRoot.lean
49
54
theorem num_isRoot_scaleRoots_of_aeval_eq_zero [UniqueFactorizationMonoid A] {p : A[X]} {x : K} (hr : aeval x p = 0) : IsRoot (scaleRoots p (den A x)) (num A x) := by
apply isRoot_of_eval₂_map_eq_zero (IsFractionRing.injective A K) refine scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero ?_ rw [mk'_num_den] exact hr
[ " (aeval ((algebraMap A S) r)) (p.scaleRoots ↑s) = 0", " ⇑(aeval ((algebraMap A S) r)) = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s)", " (aeval ((algebraMap A S) r)) x✝ = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s) x✝", " (p.scaleRoots ↑(den A x)).IsRoot (num A x)", " eval₂ (algebr...
[ " (aeval ((algebraMap A S) r)) (p.scaleRoots ↑s) = 0", " ⇑(aeval ((algebraMap A S) r)) = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s)", " (aeval ((algebraMap A S) r)) x✝ = eval₂ (algebraMap A S) ((algebraMap A S) ↑s * mk' S r s) x✝" ]
import Mathlib.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68ab8cf7dd83d549eb78a68a1" open Finset variable {α : Type*} theorem sup_sdiff_injOn [GeneralizedBooleanAlgebra α] (u v : α) : { x | Disjoint u x ∧ v ≤ x }....
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
165
173
theorem compression_self (u : α) (s : Finset α) : 𝓒 u u s = s := by
unfold compression convert union_empty s · ext a rw [mem_filter, compress_self, and_self_iff] · refine eq_empty_of_forall_not_mem fun a ha ↦ ?_ simp_rw [mem_filter, mem_image, compress_self] at ha obtain ⟨⟨b, hb, rfl⟩, hb'⟩ := ha exact hb' hb
[ " Set.InjOn (fun x => (x ⊔ u) \\ v) {x | Disjoint u x ∧ v ≤ x}", " a = b", " ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v", " compress u v ((a ⊔ v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≤ a then (a ⊔ u) \\ u else a) = a", " (a ⊔ u) \\ u = a", " a = a", " compress (a \\ b) (b...
[ " Set.InjOn (fun x => (x ⊔ u) \\ v) {x | Disjoint u x ∧ v ≤ x}", " a = b", " ((a ⊔ u) \\ v) \\ u ⊔ v = ((b ⊔ u) \\ v) \\ u ⊔ v", " compress u v ((a ⊔ v) \\ u) = a", " compress u u a = a", " (if Disjoint u a ∧ u ≤ a then (a ⊔ u) \\ u else a) = a", " (a ⊔ u) \\ u = a", " a = a", " compress (a \\ b) (b...
import Mathlib.Topology.ContinuousFunction.Bounded import Mathlib.Topology.UniformSpace.Compact import Mathlib.Topology.CompactOpen import Mathlib.Topology.Sets.Compacts import Mathlib.Analysis.Normed.Group.InfiniteSum #align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6d...
Mathlib/Topology/ContinuousFunction/Compact.lean
146
147
theorem dist_lt_iff_of_nonempty [Nonempty α] : dist f g < C ↔ ∀ x : α, dist (f x) (g x) < C := by
simp only [← dist_mkOfCompact, dist_lt_iff_of_nonempty_compact, mkOfCompact_apply]
[ " (mkOfCompact f).toContinuousMap = f", " (mkOfCompact f).toContinuousMap a✝ = f a✝", " mkOfCompact f.toContinuousMap = f", " (mkOfCompact f.toContinuousMap) x✝ = f x✝", " ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun...
[ " (mkOfCompact f).toContinuousMap = f", " (mkOfCompact f).toContinuousMap a✝ = f a✝", " mkOfCompact f.toContinuousMap = f", " (mkOfCompact f.toContinuousMap) x✝ = f x✝", " ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun...
import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.congruence_subgroups from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f...
Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean
56
66
theorem Gamma_mem (N : ℕ) (γ : SL(2, ℤ)) : γ ∈ Gamma N ↔ ((↑ₘγ 0 0 : ℤ) : ZMod N) = 1 ∧ ((↑ₘγ 0 1 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 0 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 1 : ℤ) : ZMod N) = 1 := by
rw [Gamma_mem'] constructor · intro h simp [← SL_reduction_mod_hom_val N γ, h] · intro h ext i j rw [SL_reduction_mod_hom_val N γ] fin_cases i <;> fin_cases j <;> simp only [h] exacts [h.1, h.2.1, h.2.2.1, h.2.2.2]
[ " γ ∈ Gamma N ↔ ↑(↑γ 0 0) = 1 ∧ ↑(↑γ 0 1) = 0 ∧ ↑(↑γ 1 0) = 0 ∧ ↑(↑γ 1 1) = 1", " (SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ = 1 ↔\n ↑(↑γ 0 0) = 1 ∧ ↑(↑γ 0 1) = 0 ∧ ↑(↑γ 1 0) = 0 ∧ ↑(↑γ 1 1) = 1", " (SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ = 1 →\n ↑(↑γ 0 0) = 1 ∧ ↑(↑γ 0 1) = 0 ∧ ↑(...
[]
import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.Ring #align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Finset namespace Nat variable (p : ℕ → Prop) section Count variable [DecidablePred p] def count (n : ℕ) : ℕ := (List.range n)....
Mathlib/Data/Nat/Count.lean
91
91
theorem count_one : count p 1 = if p 0 then 1 else 0 := by
simp [count_succ]
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " ∀ (x : ℕ), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Order.Hom.CompleteLattice namespace Submodule variable (S : Type*) {R M : Type*} [Semiring R] [AddCommMonoid M] [Semiring S] [Module S M] [Module R M] [SMul S R] [IsScalarTower S R M] def restrictScalars (V : Submodule R M) : Submodule S M where ...
Mathlib/Algebra/Module/Submodule/RestrictScalars.lean
116
117
theorem restrictScalars_eq_top_iff {p : Submodule R M} : restrictScalars S p = ⊤ ↔ p = ⊤ := by
simp [SetLike.ext_iff]
[ " Module R ↥p", " ∀ {a b : Submodule R M},\n { toFun := restrictScalars S, inj' := ⋯ } a ≤ { toFun := restrictScalars S, inj' := ⋯ } b ↔ a ≤ b", " restrictScalars S p = ⊥ ↔ p = ⊥", " restrictScalars S p = ⊤ ↔ p = ⊤" ]
[ " Module R ↥p", " ∀ {a b : Submodule R M},\n { toFun := restrictScalars S, inj' := ⋯ } a ≤ { toFun := restrictScalars S, inj' := ⋯ } b ↔ a ≤ b", " restrictScalars S p = ⊥ ↔ p = ⊥" ]
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.UniformConvergence import Mathlib.Analysis.Complex.UpperHalfPlane.Manifold import Mathlib.Analysis.Complex.LocallyUniformLimit import Mathlib.Geometry.Manifold.MFDeriv.FDeriv noncomputable section open ModularForm EisensteinSeries UpperHalfPlane Set Filter...
Mathlib/NumberTheory/ModularForms/EisensteinSeries/MDifferentiable.lean
54
65
theorem eisensteinSeries_SIF_MDifferentiable {k : ℤ} {N : ℕ} (hk : 3 ≤ k) (a : Fin 2 → ZMod N) : MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (eisensteinSeries_SIF a k) := by
intro τ suffices DifferentiableAt ℂ (↑ₕeisensteinSeries_SIF a k) τ.1 by convert MDifferentiableAt.comp τ (DifferentiableAt.mdifferentiableAt this) τ.mdifferentiable_coe exact funext fun z ↦ (comp_ofComplex (eisensteinSeries_SIF a k) z).symm refine DifferentiableOn.differentiableAt ?_ ((isOpen_lt cont...
[ " DifferentiableOn ℂ (fun z => 1 / (↑(a 0) * z + ↑(a 1)) ^ k) {z | 0 < z.im}", " DifferentiableOn ℂ (fun x => (↑(a 0) * x + ↑(a 1)) ^ k) {z | 0 < z.im}", " DifferentiableOn ℂ (fun x => ↑(a 0) * x + ↑(a 1)) {z | 0 < z.im}", " (∀ x ∈ {z | 0 < z.im}, ↑(a 0) * x + ↑(a 1) ≠ 0) ∨ 0 ≤ k", " ∀ x ∈ {z | 0 < z.im}, ↑...
[ " DifferentiableOn ℂ (fun z => 1 / (↑(a 0) * z + ↑(a 1)) ^ k) {z | 0 < z.im}", " DifferentiableOn ℂ (fun x => (↑(a 0) * x + ↑(a 1)) ^ k) {z | 0 < z.im}", " DifferentiableOn ℂ (fun x => ↑(a 0) * x + ↑(a 1)) {z | 0 < z.im}", " (∀ x ∈ {z | 0 < z.im}, ↑(a 0) * x + ↑(a 1) ≠ 0) ∨ 0 ≤ k", " ∀ x ∈ {z | 0 < z.im}, ↑...
import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.Transfer #align_import group_theory.schreier from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6" open scoped Pointwise namespace Subgroup open MemRightTransversals variable {G : T...
Mathlib/GroupTheory/Schreier.lean
85
89
theorem closure_mul_image_eq_top (hR : R ∈ rightTransversals (H : Set G)) (hR1 : (1 : G) ∈ R) (hS : closure S = ⊤) : closure ((R * S).image fun g => ⟨g * (toFun hR g : G)⁻¹, mul_inv_toFun_mem hR g⟩ : Set H) = ⊤ := by
rw [eq_top_iff, ← map_subtype_le_map_subtype, MonoidHom.map_closure, Set.image_image] exact (map_subtype_le ⊤).trans (ge_of_eq (closure_mul_image_eq hR hR1 hS))
[ " ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤", " ↑(closure U) * R = ⊤", " g ∈ ↑(closure U) * R", " 1 ∈ ↑(closure U) * R", " ∀ x ∈ closure S, ∀ y ∈ S, x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R", " (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R", " u * r * s = u * (r * s * (...
[ " ↑(closure ((fun g => g * (↑(toFun hR g))⁻¹) '' (R * S))) * R = ⊤", " ↑(closure U) * R = ⊤", " g ∈ ↑(closure U) * R", " 1 ∈ ↑(closure U) * R", " ∀ x ∈ closure S, ∀ y ∈ S, x ∈ ↑(closure U) * R → x * y ∈ ↑(closure U) * R", " (fun x x_1 => x * x_1) u r * s ∈ ↑(closure U) * R", " u * r * s = u * (r * s * (...
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Covering.Besicovitch import Mathlib.Tactic.AdaptationNote #align_import measure_theory.covering.besicovitch_vector_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" universe u open Metric Set Fini...
Mathlib/MeasureTheory/Covering/BesicovitchVectorSpace.lean
174
246
theorem exists_goodδ : ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ ∀ s : Finset E, (∀ c ∈ s, ‖c‖ ≤ 2) → (∀ c ∈ s, ∀ d ∈ s, c ≠ d → 1 - δ ≤ ‖c - d‖) → s.card ≤ multiplicity E := by
classical /- This follows from a compactness argument: otherwise, one could extract a converging subsequence, to obtain a `1`-separated set in the ball of radius `2` with cardinality `N = multiplicity E + 1`. To formalize this, we work with functions `Fin N → E`. -/ by_contra! h set N := multiplic...
[ " s.card ≤ 5 ^ finrank ℝ E", " 0 < ρ", " (↑s).Pairwise (Disjoint on fun c => ball c δ)", " (Disjoint on fun c => ball c δ) c d", " δ + δ ≤ dist c d", " δ + δ ≤ ‖c - d‖", " δ + δ = 1", " A ⊆ ball 0 ρ", " ball x δ ⊆ ball 0 ρ", " δ + dist x 0 ≤ ρ", " δ + dist x 0 ≤ δ + 2", " δ + ‖x‖ ≤ δ + 2", "...
[ " s.card ≤ 5 ^ finrank ℝ E", " 0 < ρ", " (↑s).Pairwise (Disjoint on fun c => ball c δ)", " (Disjoint on fun c => ball c δ) c d", " δ + δ ≤ dist c d", " δ + δ ≤ ‖c - d‖", " δ + δ = 1", " A ⊆ ball 0 ρ", " ball x δ ⊆ ball 0 ρ", " δ + dist x 0 ≤ ρ", " δ + dist x 0 ≤ δ + 2", " δ + ‖x‖ ≤ δ + 2", "...
import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.Limits.Cones #align_import category_theory.limits.is_limit from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Functor Opposite ...
Mathlib/CategoryTheory/Limits/IsLimit.lean
101
104
theorem uniq_cone_morphism {s t : Cone F} (h : IsLimit t) {f f' : s ⟶ t} : f = f' := have : ∀ {g : s ⟶ t}, g = h.liftConeMorphism s := by
intro g; apply ConeMorphism.ext; exact h.uniq _ _ g.w this.trans this.symm
[ " ∀ (a b : IsLimit t), a = b", " P = Q", " { lift := lift✝, fac := fac✝, uniq := uniq✝ } = Q", " { lift := lift✝¹, fac := fac✝¹, uniq := uniq✝¹ } = { lift := lift✝, fac := fac✝, uniq := uniq✝ }", " lift✝¹ = lift✝", " ∀ {g : s ⟶ t}, g = h.liftConeMorphism s", " g = h.liftConeMorphism s", " g.hom = (h.l...
[ " ∀ (a b : IsLimit t), a = b", " P = Q", " { lift := lift✝, fac := fac✝, uniq := uniq✝ } = Q", " { lift := lift✝¹, fac := fac✝¹, uniq := uniq✝¹ } = { lift := lift✝, fac := fac✝, uniq := uniq✝ }", " lift✝¹ = lift✝" ]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL2 #align_import measure_theory.function.conditional_expectation.condexp_L1 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" noncomputable section open TopologicalSpace MeasureTheory.Lp Filter ContinuousLinearMap o...
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
128
143
theorem norm_condexpIndL1Fin_le (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (x : G) : ‖condexpIndL1Fin hm hs hμs x‖ ≤ (μ s).toReal * ‖x‖ := by
have : 0 ≤ ∫ a : α, ‖condexpIndL1Fin hm hs hμs x a‖ ∂μ := by positivity rw [L1.norm_eq_integral_norm, ← ENNReal.toReal_ofReal (norm_nonneg x), ← ENNReal.toReal_mul, ← ENNReal.toReal_ofReal this, ENNReal.toReal_le_toReal ENNReal.ofReal_ne_top (ENNReal.mul_ne_top hμs ENNReal.ofReal_ne_top), ofReal_integr...
[ " Memℒp (↑↑(condexpIndSMul hm hs hμs x)) 1 μ", " Integrable (↑↑(condexpIndSMul hm hs hμs x)) μ", " condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y", " ↑↑(condexpIndL1Fin hm hs hμs (x + y)) =ᶠ[ae μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)", ...
[ " Memℒp (↑↑(condexpIndSMul hm hs hμs x)) 1 μ", " Integrable (↑↑(condexpIndSMul hm hs hμs x)) μ", " condexpIndL1Fin hm hs hμs (x + y) = condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y", " ↑↑(condexpIndL1Fin hm hs hμs (x + y)) =ᶠ[ae μ] ↑↑(condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm hs hμs y)", ...
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ι : Type*} theorem coprime_list_prod_left_iff {l : List ℕ} {k : ℕ} : Coprime l.prod k ↔ ∀ n ∈ l, Coprime n k := by ...
Mathlib/Data/Nat/GCD/BigOperators.lean
24
26
theorem coprime_list_prod_right_iff {k : ℕ} {l : List ℕ} : Coprime k l.prod ↔ ∀ n ∈ l, Coprime k n := by
simp_rw [coprime_comm (n := k), coprime_list_prod_left_iff]
[ " l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k", " [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k", " (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k", " k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n" ]
[ " l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k", " [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k", " (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k" ]
import Mathlib.Data.Set.Image import Mathlib.Data.List.GetD #align_import data.set.list from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4" open List variable {α β : Type*} (l : List α) namespace Set
Mathlib/Data/Set/List.lean
24
30
theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x ∈ range f } := by
refine antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _) fun l hl => ?_ induction' l with a l ihl; · exact ⟨[], rfl⟩ rcases ihl fun x hx => hl x <| subset_cons _ _ hx with ⟨l, rfl⟩ rcases hl a (mem_cons_self _ _) with ⟨a, rfl⟩ exact ⟨a :: l, map_cons _ _ _⟩
[ " range (map f) = {l | ∀ x ∈ l, x ∈ range f}", " l ∈ range (map f)", " [] ∈ range (map f)", " a :: l ∈ range (map f)", " a :: map f l ∈ range (map f)", " f a :: map f l ∈ range (map f)" ]
[]
import Mathlib.Algebra.Polynomial.Splits #align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222" noncomputable section @[ext] structure Cubic (R : Type*) where (a b c d : R) #align cubic Cubic namespace Cubic open Cubic Polynomial open Polynom...
Mathlib/Algebra/CubicDiscriminant.lean
124
124
theorem b_of_eq (h : P.toPoly = Q.toPoly) : P.b = Q.b := by
rw [← coeff_eq_b, h, coeff_eq_b]
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Div #align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8" noncomputable ...
Mathlib/Algebra/Polynomial/RingDivision.lean
293
316
theorem Monic.not_irreducible_iff_exists_add_mul_eq_coeff (hm : p.Monic) (hnd : p.natDegree = 2) : ¬Irreducible p ↔ ∃ c₁ c₂, p.coeff 0 = c₁ * c₂ ∧ p.coeff 1 = c₁ + c₂ := by
cases subsingleton_or_nontrivial R · simp [natDegree_of_subsingleton] at hnd rw [hm.irreducible_iff_natDegree', and_iff_right, hnd] · push_neg constructor · rintro ⟨a, b, ha, hb, rfl, hdb⟩ simp only [zero_lt_two, Nat.div_self, ge_iff_le, Nat.Ioc_succ_singleton, zero_add, mem_singleton] at...
[ " Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1", " (g * C f.leadingCoeff).Monic", " (f * C g.leadingCoeff).Monic", " g * C f.leadingCoeff * (f * C g.leadingCoeff) = p", " Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = ...
[ " Irreducible p ↔ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1", " (g * C f.leadingCoeff).Monic", " (f * C g.leadingCoeff).Monic", " g * C f.leadingCoeff * (f * C g.leadingCoeff) = p", " Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = ...
import Mathlib.Algebra.Order.CauSeq.Basic #align_import data.real.cau_seq_completion from "leanprover-community/mathlib"@"cf4c49c445991489058260d75dae0ff2b1abca28" namespace CauSeq.Completion open CauSeq section variable {α : Type*} [LinearOrderedField α] variable {β : Type*} [Ring β] (abv : β → α) [IsAbsolute...
Mathlib/Algebra/Order/CauSeq/Completion.lean
73
75
theorem mk_eq_zero {f : CauSeq _ abv} : mk f = 0 ↔ LimZero f := by
have : mk f = 0 ↔ LimZero (f - 0) := Quotient.eq rwa [sub_zero] at this
[ " mk f = 0 ↔ f.LimZero" ]
[]
import Mathlib.Algebra.Quaternion import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Topology.Algebra.Algebra #align_import analysis.quaternion from "leanprover-community/mathlib"@"07992a1d1f7a4176c6d3f160209608be4e198566" @[inherit_doc] scoped[Quaternion...
Mathlib/Analysis/Quaternion.lean
83
84
theorem norm_star (a : ℍ) : ‖star a‖ = ‖a‖ := by
simp_rw [norm_eq_sqrt_real_inner, inner_self, normSq_star]
[ " (starRingEnd ℝ) ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ", " ⟪x + y, z⟫_ℝ = ⟪x, z⟫_ℝ + ⟪y, z⟫_ℝ", " ⟪r • x, y⟫_ℝ = (starRingEnd ℝ) r * ⟪x, y⟫_ℝ", " normSq a = ‖a‖ * ‖a‖", " ‖1‖ = 1", " ‖↑a‖ = ‖a‖", " ‖star a‖ = ‖a‖" ]
[ " (starRingEnd ℝ) ⟪y, x⟫_ℝ = ⟪x, y⟫_ℝ", " ⟪x + y, z⟫_ℝ = ⟪x, z⟫_ℝ + ⟪y, z⟫_ℝ", " ⟪r • x, y⟫_ℝ = (starRingEnd ℝ) r * ⟪x, y⟫_ℝ", " normSq a = ‖a‖ * ‖a‖", " ‖1‖ = 1", " ‖↑a‖ = ‖a‖" ]
import Mathlib.Data.List.Chain #align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" variable {α : Type*} (l : List α) (R : α → α → Prop) [DecidableRel R] {a b : α} namespace List @[simp] theorem destutter'_nil : destutter' R a [] = [a] := rfl #align ...
Mathlib/Data/List/Destutter.lean
73
79
theorem mem_destutter' (a) : a ∈ l.destutter' R a := by
induction' l with b l hl · simp rw [destutter'] split_ifs · simp · assumption
[ " destutter' R b (a :: l) = b :: destutter' R a l", " destutter' R b (a :: l) = destutter' R b l", " destutter' R a [b] = if R a b then [a, b] else [a]", " destutter' R a [b] = [a, b]", " destutter' R a [b] = [a]", " destutter' R a l <+ a :: l", " destutter' R a [] <+ [a]", " destutter' R a (b :: l) <...
[ " destutter' R b (a :: l) = b :: destutter' R a l", " destutter' R b (a :: l) = destutter' R b l", " destutter' R a [b] = if R a b then [a, b] else [a]", " destutter' R a [b] = [a, b]", " destutter' R a [b] = [a]", " destutter' R a l <+ a :: l", " destutter' R a [] <+ [a]", " destutter' R a (b :: l) <...
import Mathlib.Data.Opposite import Mathlib.Data.Set.Defs #align_import data.set.opposite from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" variable {α : Type*} open Opposite namespace Set protected def op (s : Set α) : Set αᵒᵖ := unop ⁻¹' s #align set.op Set.op protected def u...
Mathlib/Data/Set/Opposite.lean
39
39
theorem op_mem_op {s : Set α} {a : α} : op a ∈ s.op ↔ a ∈ s := by
rfl
[ " { unop := a } ∈ s.op ↔ a ∈ s" ]
[]
import Mathlib.Data.Finsupp.Defs #align_import data.list.to_finsupp from "leanprover-community/mathlib"@"06a655b5fcfbda03502f9158bbf6c0f1400886f9" namespace List variable {M : Type*} [Zero M] (l : List M) [DecidablePred (getD l · 0 ≠ 0)] (n : ℕ) def toFinsupp : ℕ →₀ M where toFun i := getD l i 0 support := ...
Mathlib/Data/List/ToFinsupp.lean
139
143
theorem toFinsupp_concat_eq_toFinsupp_add_single {R : Type*} [AddZeroClass R] (x : R) (xs : List R) [DecidablePred fun i => getD (xs ++ [x]) i 0 ≠ 0] [DecidablePred fun i => getD xs i 0 ≠ 0] : toFinsupp (xs ++ [x]) = toFinsupp xs + Finsupp.single xs.length x := by
classical rw [toFinsupp_append, toFinsupp_singleton, Finsupp.embDomain_single, addLeftEmbedding_apply, add_zero]
[ " n ∈ Finset.filter (fun i => l.getD i 0 ≠ 0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n ≠ 0", " ¬l.getD n 0 = 0 → n < l.length", " l.length ≤ n → l.getD n 0 = 0", " [].toFinsupp = 0", " [].toFinsupp a✝ = 0 a✝", " [x].toFinsupp = Finsupp.single 0 x", " [x].toFinsupp 0 = (Finsupp.single 0 x) 0", ...
[ " n ∈ Finset.filter (fun i => l.getD i 0 ≠ 0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n ≠ 0", " ¬l.getD n 0 = 0 → n < l.length", " l.length ≤ n → l.getD n 0 = 0", " [].toFinsupp = 0", " [].toFinsupp a✝ = 0 a✝", " [x].toFinsupp = Finsupp.single 0 x", " [x].toFinsupp 0 = (Finsupp.single 0 x) 0", ...
import Mathlib.Algebra.Group.Nat import Mathlib.Algebra.Order.Sub.Canonical import Mathlib.Data.List.Perm import Mathlib.Data.Set.List import Mathlib.Init.Quot import Mathlib.Order.Hom.Basic #align_import data.multiset.basic from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" universe v ...
Mathlib/Data/Multiset/Basic.lean
157
158
theorem cons_inj_right (a : α) : ∀ {s t : Multiset α}, a ::ₘ s = a ::ₘ t ↔ s = t := by
rintro ⟨l₁⟩ ⟨l₂⟩; simp
[ " ∀ (a : Multiset α), a = default", " Quot.mk Setoid.r (a :: l) = default", " ∀ {s t : Multiset α}, a ::ₘ s = a ::ₘ t ↔ s = t", " a ::ₘ Quot.mk Setoid.r l₁ = a ::ₘ Quot.mk Setoid.r l₂ ↔ Quot.mk Setoid.r l₁ = Quot.mk Setoid.r l₂" ]
[ " ∀ (a : Multiset α), a = default", " Quot.mk Setoid.r (a :: l) = default" ]
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : ℕ) : List ℕ := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
130
132
theorem eq_cons {n m : ℕ} (h : n < m) : Ico n m = n :: Ico (n + 1) m := by
rw [← append_consecutive (Nat.le_succ n) h, succ_singleton] rfl
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≤ l ∧ l < m", " n ≤ l ∧ l < n + (m - n) ↔ n...
import Mathlib.Data.Set.Card import Mathlib.Order.Minimal import Mathlib.Data.Matroid.Init set_option autoImplicit true open Set def Matroid.ExchangeProperty {α : Type _} (P : Set α → Prop) : Prop := ∀ X Y, P X → P Y → ∀ a ∈ X \ Y, ∃ b ∈ Y \ X, P (insert b (X \ {a})) def Matroid.ExistsMaximalSubsetProperty {...
Mathlib/Data/Matroid/Basic.lean
268
286
theorem encard_diff_le_aux (exch : ExchangeProperty Base) (hB₁ : Base B₁) (hB₂ : Base B₂) : (B₁ \ B₂).encard ≤ (B₂ \ B₁).encard := by
obtain (he | hinf | ⟨e, he, hcard⟩) := (B₂ \ B₁).eq_empty_or_encard_eq_top_or_encard_diff_singleton_lt · rw [exch.antichain hB₂ hB₁ (diff_eq_empty.mp he)] · exact le_top.trans_eq hinf.symm obtain ⟨f, hf, hB'⟩ := exch B₂ B₁ hB₂ hB₁ e he have : encard (insert f (B₂ \ {e}) \ B₁) < encard (B₂ \ B₁) := by ...
[ " (B₁ \\ B₂).encard ≤ (B₂ \\ B₁).encard", " (insert f (B₂ \\ {e}) \\ B₁).encard < (B₂ \\ B₁).encard", " ((B₂ \\ B₁) \\ {e}).encard < (B₂ \\ B₁).encard", " ((B₁ \\ B₂) \\ {f}).encard + 1 ≤ ((B₂ \\ B₁) \\ {e}).encard + 1" ]
[]
import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Limits.Constructions.EpiMono import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import category_theory.glue_data from "l...
Mathlib/CategoryTheory/GlueData.lean
108
111
theorem t'_inv (i j k : D.J) : D.t' i j k ≫ (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom = 𝟙 _ := by
rw [← cancel_mono (pullback.fst : pullback (D.f i j) (D.f i k) ⟶ _)] simp [t_fac, t_fac_assoc]
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd", " D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd", " D.t' i j i = (D.t' i j i ≫ pullback.snd) ≫ inv pullback.snd", ...
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd", " D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd", " D.t' i j i = (D.t' i j i ≫ pullback.snd) ≫ inv pullback.snd", ...
import Mathlib.Data.Int.Bitwise import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb" open Matrix namespace Matrix variable {n' : Type*} [Decidab...
Mathlib/LinearAlgebra/Matrix/ZPow.lean
92
95
theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0 := by
split_ifs with h · rw [h, zpow_zero] · rw [zero_zpow _ h]
[ " Monoid M", " Inv M", " 1 ^ ↑n = 1", " 1 ^ -[n+1] = 1", " 0 ^ ↑n = 0", " n ≠ 0", " 0 ^ -[n+1] = 0", " 0 ^ n = if n = 0 then 1 else 0", " 0 ^ n = 1", " 0 ^ n = 0" ]
[ " Monoid M", " Inv M", " 1 ^ ↑n = 1", " 1 ^ -[n+1] = 1", " 0 ^ ↑n = 0", " n ≠ 0", " 0 ^ -[n+1] = 0" ]
import Mathlib.Topology.Category.TopCat.Opens import Mathlib.Data.Set.Subsingleton #align_import topology.category.Top.open_nhds from "leanprover-community/mathlib"@"1ec4876214bf9f1ddfbf97ae4b0d777ebd5d6938" open CategoryTheory TopologicalSpace Opposite universe u variable {X Y : TopCat.{u}} (f : X ⟶ Y) namesp...
Mathlib/Topology/Category/TopCat/OpenNhds.lean
124
125
theorem map_id_obj_unop (x : X) (U : (OpenNhds x)ᵒᵖ) : (map (𝟙 X) x).obj (unop U) = unop U := by
simp
[ " x✝ ≤ x✝", " x✝.obj ≤ x✝.obj", " x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝", " x✝².obj ≤ x✝¹.obj → x✝¹.obj ≤ x✝.obj → x✝².obj ≤ x✝.obj", " x✝ ≤ ⊤", " x✝.obj ≤ ⊤", " (map (𝟙 X) x).obj U.unop = U.unop" ]
[ " x✝ ≤ x✝", " x✝.obj ≤ x✝.obj", " x✝² ≤ x✝¹ → x✝¹ ≤ x✝ → x✝² ≤ x✝", " x✝².obj ≤ x✝¹.obj → x✝¹.obj ≤ x✝.obj → x✝².obj ≤ x✝.obj", " x✝ ≤ ⊤", " x✝.obj ≤ ⊤" ]
import Mathlib.Algebra.Group.Even import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.Algebra.Group.Commute.Units import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Ring.Units #align_import algebra.asso...
Mathlib/Algebra/Associated.lean
77
86
theorem dvd_of_dvd_pow (hp : Prime p) {a : α} {n : ℕ} (h : p ∣ a ^ n) : p ∣ a := by
induction' n with n ih · rw [pow_zero] at h have := isUnit_of_dvd_one h have := not_unit hp contradiction rw [pow_succ'] at h cases' dvd_or_dvd hp h with dvd_a dvd_pow · assumption exact ih dvd_pow
[ " p ∣ a" ]
[]
import Mathlib.Topology.Algebra.InfiniteSum.Defs import Mathlib.Data.Fintype.BigOperators import Mathlib.Topology.Algebra.Monoid noncomputable section open Filter Finset Function open scoped Topology variable {α β γ δ : Type*} section HasProd variable [CommMonoid α] [TopologicalSpace α] variable {f g : β → α} ...
Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
101
104
theorem hasProd_subtype_iff_mulIndicator {s : Set β} : HasProd (f ∘ (↑) : s → α) a ↔ HasProd (s.mulIndicator f) a := by
rw [← Set.mulIndicator_range_comp, Subtype.range_coe, hasProd_subtype_iff_of_mulSupport_subset Set.mulSupport_mulIndicator_subset]
[ " HasProd (fun x => 1) 1", " HasProd f 1", " HasProd (extend g f 1) a ↔ HasProd f a", " ∀ x ∉ Set.range g, extend g f 1 x = 1", " HasProd (f ∘ Subtype.val) a ↔ HasProd (s.mulIndicator f) a" ]
[ " HasProd (fun x => 1) 1", " HasProd f 1", " HasProd (extend g f 1) a ↔ HasProd f a", " ∀ x ∉ Set.range g, extend g f 1 x = 1" ]
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
146
154
theorem vars_prod {ι : Type*} [DecidableEq σ] {s : Finset ι} (f : ι → MvPolynomial σ R) : (∏ i ∈ s, f i).vars ⊆ s.biUnion fun i => (f i).vars := by
classical induction s using Finset.induction_on with | empty => simp | insert hs hsub => simp only [hs, Finset.biUnion_insert, Finset.prod_insert, not_false_iff] apply Finset.Subset.trans (vars_mul _ _) exact Finset.union_subset_union (Finset.Subset.refl _) hsub
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
import Mathlib.Algebra.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
101
103
theorem prod_univ_get' [CommMonoid β] (l : List α) (f : α → β) : ∏ i, f (l.get i) = (l.map f).prod := by
simp [Finset.prod_eq_multiset_prod]
[ " (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.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
373
380
theorem average_add_measure [IsFiniteMeasure μ] {ν : Measure α} [IsFiniteMeasure ν] {f : α → E} (hμ : Integrable f μ) (hν : Integrable f ν) : ⨍ x, f x ∂(μ + ν) = ((μ univ).toReal / ((μ univ).toReal + (ν univ).toReal)) • ⨍ x, f x ∂μ + ((ν univ).toReal / ((μ univ).toReal + (ν univ).toReal)) • ⨍ x, f...
simp only [div_eq_inv_mul, mul_smul, measure_smul_average, ← smul_add, ← integral_add_measure hμ hν, ← ENNReal.toReal_add (measure_ne_top μ _) (measure_ne_top ν _)] rw [average_eq, Measure.add_apply]
[ " ⨍ (x : α), 0 ∂μ = 0", " ⨍ (x : α), f x ∂0 = 0", " ⨍ (x : α), f x ∂μ = (μ univ).toReal⁻¹ • ∫ (x : α), f x ∂μ", " ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ", " (μ univ).toReal • ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ", " (μ univ).toReal ≠ 0", " μ univ ≠ 0", " ⨍ (x : α) in s, f x ∂μ = (μ s).toReal⁻¹ • ∫ (x ...
[ " ⨍ (x : α), 0 ∂μ = 0", " ⨍ (x : α), f x ∂0 = 0", " ⨍ (x : α), f x ∂μ = (μ univ).toReal⁻¹ • ∫ (x : α), f x ∂μ", " ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ", " (μ univ).toReal • ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ", " (μ univ).toReal ≠ 0", " μ univ ≠ 0", " ⨍ (x : α) in s, f x ∂μ = (μ s).toReal⁻¹ • ∫ (x ...
import Mathlib.Data.Multiset.Nodup #align_import data.multiset.sum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Sum namespace Multiset variable {α β : Type*} (s : Multiset α) (t : Multiset β) def disjSum : Multiset (Sum α β) := s.map inl + t.map inr #align multiset.dis...
Mathlib/Data/Multiset/Sum.lean
44
45
theorem card_disjSum : Multiset.card (s.disjSum t) = Multiset.card s + Multiset.card t := by
rw [disjSum, card_add, card_map, card_map]
[ " card (s.disjSum t) = card s + card t" ]
[]
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
131
132
theorem T_natAbs (n : ℤ) : T R n.natAbs = T R n := by
obtain h | h := Int.natAbs_eq n <;> nth_rw 2 [h]; simp
[ " 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.ModelTheory.Substructures #align_import model_theory.finitely_generated from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398" open FirstOrder Set namespace FirstOrder namespace Language open Structure variable {L : Language} {M : Type*} [L.Structure M] namespace Substru...
Mathlib/ModelTheory/FinitelyGenerated.lean
87
98
theorem FG.of_map_embedding {N : Type*} [L.Structure N] (f : M ↪[L] N) {s : L.Substructure M} (hs : (s.map f.toHom).FG) : s.FG := by
rcases hs with ⟨t, h⟩ rw [fg_def] refine ⟨f ⁻¹' t, t.finite_toSet.preimage f.injective.injOn, ?_⟩ have hf : Function.Injective f.toHom := f.injective refine map_injective_of_injective hf ?_ rw [← h, map_closure, Embedding.coe_toHom, image_preimage_eq_of_subset] intro x hx have h' := subset_closure (L :...
[ " (∃ S, S.Finite ∧ (closure L).toFun S = N) → N.FG", " ((closure L).toFun t').FG", " ((closure L).toFun ↑t).FG", " N.FG ↔ ∃ n s, (closure L).toFun (range s) = N", " (∃ S, S.Finite ∧ (closure L).toFun S = N) ↔ ∃ n s, (closure L).toFun (range s) = N", " (∃ S, S.Finite ∧ (closure L).toFun S = N) → ∃ n s, (cl...
[ " (∃ S, S.Finite ∧ (closure L).toFun S = N) → N.FG", " ((closure L).toFun t').FG", " ((closure L).toFun ↑t).FG", " N.FG ↔ ∃ n s, (closure L).toFun (range s) = N", " (∃ S, S.Finite ∧ (closure L).toFun S = N) ↔ ∃ n s, (closure L).toFun (range s) = N", " (∃ S, S.Finite ∧ (closure L).toFun S = N) → ∃ n s, (cl...
import Mathlib.Algebra.DirectLimit import Mathlib.Algebra.CharP.Algebra import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.FieldTheory.SplittingField.Construction #align_import field_theory.is_alg_closed.algebraic_closure from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87" univ...
Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean
77
81
theorem toSplittingField_evalXSelf {s : Finset (MonicIrreducible k)} {f} (hf : f ∈ s) : toSplittingField k s (evalXSelf k f) = 0 := by
rw [toSplittingField, evalXSelf, ← AlgHom.coe_toRingHom, hom_eval₂, AlgHom.coe_toRingHom, MvPolynomial.aeval_X, dif_pos hf, ← MvPolynomial.algebraMap_eq, AlgHom.comp_algebraMap] exact map_rootOfSplits _ _ _
[ " (toSplittingField k s) (evalXSelf k f) = 0", " Polynomial.eval₂ (algebraMap k (∏ x ∈ s, ↑x).SplittingField)\n (rootOfSplits (algebraMap k (∏ x ∈ s, ↑x).SplittingField) ⋯ ⋯) ↑f =\n 0" ]
[]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
53
55
theorem convexOn_dist (z : E) (hs : Convex ℝ s) : ConvexOn ℝ s fun z' => dist z' z := by
simpa [dist_eq_norm, preimage_preimage] using (convexOn_norm (hs.translate (-z))).comp_affineMap (AffineMap.id ℝ E - AffineMap.const ℝ E z)
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z" ]
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖" ]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Analysis.InnerProductSpace.l2Space import Mathlib.MeasureTheory.Function.ContinuousMapDense import Mathlib.MeasureTheory.Function.L2Space import Mathlib.MeasureTheory.Group.Integral import Mathlib.M...
Mathlib/Analysis/Fourier/AddCircle.lean
172
174
theorem fourier_add' {m n : ℤ} {x : AddCircle T} : toCircle ((m + n) • x :) = fourier m x * fourier n x := by
rw [← fourier_apply]; exact fourier_add
[ " (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑...
[ " (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑...
import Mathlib.Topology.IsLocalHomeomorph import Mathlib.Topology.FiberBundle.Basic #align_import topology.covering from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Bundle variable {E X : Type*} [TopologicalSpace E] [TopologicalSpace X] (f : E → X) (s : Set X) def IsEvenlyCov...
Mathlib/Topology/Covering.lean
140
141
theorem isCoveringMap_iff_isCoveringMapOn_univ : IsCoveringMap f ↔ IsCoveringMapOn f Set.univ := by
simp only [IsCoveringMap, IsCoveringMapOn, Set.mem_univ, forall_true_left]
[ " IsCoveringMap f ↔ IsCoveringMapOn f Set.univ" ]
[]
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.MvPolynomial.Rename import Mathlib.Algebra.Order.BigOperators.Ring.Finset #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp Ad...
Mathlib/Algebra/MvPolynomial/Degrees.lean
358
362
theorem totalDegree_eq (p : MvPolynomial σ R) : p.totalDegree = p.support.sup fun m => Multiset.card (toMultiset m) := by
rw [totalDegree] congr; funext m exact (Finsupp.card_toMultiset _).symm
[ " p.totalDegree = p.support.sup fun m => Multiset.card (toMultiset m)", " (p.support.sup fun s => s.sum fun x e => e) = p.support.sup fun m => Multiset.card (toMultiset m)", " (fun s => s.sum fun x e => e) = fun m => Multiset.card (toMultiset m)", " (m.sum fun x e => e) = Multiset.card (toMultiset m)" ]
[]
import Mathlib.NumberTheory.LegendreSymbol.Basic import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum #align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Nat section Values variable {p : ℕ} [Fact p.Pri...
Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean
66
68
theorem at_neg_two : legendreSym p (-2) = χ₈' p := by
have : (-2 : ZMod p) = (-2 : ℤ) := by norm_cast rw [legendreSym, ← this, quadraticChar_neg_two ((ringChar_zmod_n p).substr hp), card p]
[ " legendreSym p 2 = χ₈ ↑p", " 2 = ↑2", " legendreSym p (-2) = χ₈' ↑p", " -2 = ↑(-2)" ]
[ " legendreSym p 2 = χ₈ ↑p", " 2 = ↑2" ]
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.euclidean_domain.defs from "leanprover-community/mathlib"@"ee7b9f9a9ac2a8d9f04ea39bbfe6b1a3be053b38" universe u class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R ...
Mathlib/Algebra/EuclideanDomain/Defs.lean
141
144
theorem mod_eq_sub_mul_div {R : Type*} [EuclideanDomain R] (a b : R) : a % b = a - b * (a / b) := calc a % b = b * (a / b) + a % b - b * (a / b) := (add_sub_cancel_left _ _).symm _ = a - b * (a / b) := by
rw [div_add_mod]
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m", " b * (a / b) + a % b - b * (a / b) = a - b * (a / b)" ]
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m" ]
import Mathlib.CategoryTheory.EffectiveEpi.Comp import Mathlib.Data.Fintype.Card universe u namespace CategoryTheory open Limits variable {C : Type*} [Category C] noncomputable section Equivalence variable {D : Type*} [Category D] (e : C ≌ D) {B : C} variable {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) [...
Mathlib/CategoryTheory/EffectiveEpi/Preserves.lean
34
42
theorem effectiveEpiFamilyStructOfEquivalence_aux {W : D} (ε : (a : α) → e.functor.obj (X a) ⟶ W) (h : ∀ {Z : D} (a₁ a₂ : α) (g₁ : Z ⟶ e.functor.obj (X a₁)) (g₂ : Z ⟶ e.functor.obj (X a₂)), g₁ ≫ e.functor.map (π a₁) = g₂ ≫ e.functor.map (π a₂) → g₁ ≫ ε a₁ = g₂ ≫ ε a₂) {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (...
have := h a₁ a₂ (e.functor.map g₁) (e.functor.map g₂) simp only [← Functor.map_comp, hg] at this simpa using congrArg e.inverse.map (this (by trivial))
[ " g₁ ≫ (fun a => e.unit.app (X a) ≫ e.inverse.map (ε a)) a₁ = g₂ ≫ (fun a => e.unit.app (X a) ≫ e.inverse.map (ε a)) a₂", " True" ]
[]
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.LinearAlgebra.PiTensorProduct universe uι u𝕜 uE uF variable {ι : Type uι} [Fintype ι] variable {𝕜 : Type u𝕜} [NontriviallyNormedField 𝕜] variable {E : ι → Type uE} [∀ i, SeminormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] variable {F : ...
Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean
73
82
theorem projectiveSeminormAux_smul (p : FreeAddMonoid (𝕜 × Π i, E i)) (a : 𝕜) : projectiveSeminormAux (List.map (fun (y : 𝕜 × Π i, E i) ↦ (a * y.1, y.2)) p) = ‖a‖ * projectiveSeminormAux p := by
simp only [projectiveSeminormAux, Function.comp_apply, Multiset.map_coe, List.map_map, Multiset.sum_coe] rw [← smul_eq_mul, List.smul_sum, ← List.comp_map] congr 2 ext x simp only [Function.comp_apply, norm_mul, smul_eq_mul] rw [mul_assoc]
[ " 0 ≤ projectiveSeminormAux p", " 0 ≤ (List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p).sum", " ∀ x ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p, 0 ≤ x", " a ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p → 0 ≤ a", " ∀ (x : 𝕜) (x_1 : (i : ι) → E i), (x, x_1) ∈ p → ‖x‖ * ∏ x : ι, ‖x_1 x‖ = a → 0 ≤ a", ...
[ " 0 ≤ projectiveSeminormAux p", " 0 ≤ (List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p).sum", " ∀ x ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p, 0 ≤ x", " a ∈ List.map (fun p => ‖p.1‖ * ∏ x : ι, ‖p.2 x‖) p → 0 ≤ a", " ∀ (x : 𝕜) (x_1 : (i : ι) → E i), (x, x_1) ∈ p → ‖x‖ * ∏ x : ι, ‖x_1 x‖ = a → 0 ≤ a", ...
import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.add_torsor from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P, VSub G P where [nonempty : Nonempty P] vsub_vadd' : ∀ p₁ p₂ : P, (p₁ ...
Mathlib/Algebra/AddTorsor.lean
98
100
theorem vadd_right_cancel {g₁ g₂ : G} (p : P) (h : g₁ +ᵥ p = g₂ +ᵥ p) : g₁ = g₂ := by
-- Porting note: vadd_vsub g₁ → vadd_vsub g₁ p rw [← vadd_vsub g₁ p, h, vadd_vsub]
[ " g₁ = g₂" ]
[]
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {α β γ δ : Type*} {f : α → β → γ} {a : Option α} {b : Option β} {c : Option γ} def map₂ (f : α → β → γ) (a : Option α) ...
Mathlib/Data/Option/NAry.lean
73
74
theorem map₂_coe_right (f : α → β → γ) (a : Option α) (b : β) : map₂ f a b = a.map fun a => f a b := by
cases a <;> rfl
[ " map₂ f a b = Seq.seq (f <$> a) fun x => b", " map₂ f none b = Seq.seq (f <$> none) fun x => b", " map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " map₂ f a none = none", " map₂ f none none = none", " map₂ f (some val✝) none = none", " map₂ f a (some b) = Option.map (fun a => f a b) a", ...
[ " map₂ f a b = Seq.seq (f <$> a) fun x => b", " map₂ f none b = Seq.seq (f <$> none) fun x => b", " map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " map₂ f a none = none", " map₂ f none none = none", " map₂ f (some val✝) none = none" ]
import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.projective_space.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" variable (K V : Type*) [DivisionRing K] [AddCommGroup V] [Module K V] def projectivizationSetoid : Setoid { v : V // v ≠ 0 } := (MulA...
Mathlib/LinearAlgebra/Projectivization/Basic.lean
142
144
theorem finrank_submodule (v : ℙ K V) : finrank K v.submodule = 1 := by
rw [submodule_eq] exact finrank_span_singleton v.rep_nonzero
[ " ∀ (a b : { v // v ≠ 0 }), Setoid.r a b → Submodule.span K {↑a} = Submodule.span K {↑b}", " Submodule.span K {↑⟨x • b, ha⟩} = Submodule.span K {↑⟨b, hb⟩}", " mk K v hv = mk K w hw ↔ ∃ a, a • w = v", " (∃ a, a • w = v) ↔ ∃ a, a • w = v", " (∃ a, a • w = v) → ∃ a, a • w = v", " ∃ a, a • w = v", " 0 = v",...
[ " ∀ (a b : { v // v ≠ 0 }), Setoid.r a b → Submodule.span K {↑a} = Submodule.span K {↑b}", " Submodule.span K {↑⟨x • b, ha⟩} = Submodule.span K {↑⟨b, hb⟩}", " mk K v hv = mk K w hw ↔ ∃ a, a • w = v", " (∃ a, a • w = v) ↔ ∃ a, a • w = v", " (∃ a, a • w = v) → ∃ a, a • w = v", " ∃ a, a • w = v", " 0 = v",...
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_lim...
Mathlib/Analysis/SpecificLimits/Normed.lean
90
92
theorem continuousAt_inv {𝕜 : Type*} [NontriviallyNormedField 𝕜] {x : 𝕜} : ContinuousAt Inv.inv x ↔ x ≠ 0 := by
simpa [(zero_lt_one' ℤ).not_le] using @continuousAt_zpow _ _ (-1) x
[ " Summable f", " ∀ (i : ℕ), 0 ≤ ‖f i‖", " Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)", " Tendsto (fun x => ‖x ^ m‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[≠] 0) atTop", "...
[ " Summable f", " ∀ (i : ℕ), 0 ≤ ‖f i‖", " Tendsto (fun n => ∑ i ∈ Finset.range n, ‖f i‖) atTop (𝓝 r)", " Tendsto (fun x => ‖x ^ m‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x ^ (-↑m)‖) (𝓝[≠] 0) atTop", " Tendsto (fun x => ‖x⁻¹‖ ^ m) (𝓝[≠] 0) atTop", "...
import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.MvPolynomial.Supported import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.Algebraic import Mathlib.RingTheory.MvPolynomial.Basic #align_import ring_theory.algebraic_independent from "leanprove...
Mathlib/RingTheory/AlgebraicIndependent.lean
90
96
theorem algebraicIndependent_empty_type_iff [IsEmpty ι] : AlgebraicIndependent R x ↔ Injective (algebraMap R A) := by
have : aeval x = (Algebra.ofId R A).comp (@isEmptyAlgEquiv R ι _ _).toAlgHom := by ext i exact IsEmpty.elim' ‹IsEmpty ι› i rw [AlgebraicIndependent, this, ← Injective.of_comp_iff' _ (@isEmptyAlgEquiv R ι _ _).bijective] rfl
[ " AlgebraicIndependent R x ↔ Injective ⇑(algebraMap R A)", " aeval x = (ofId R A).comp ↑(isEmptyAlgEquiv R ι)", " (aeval x) (X i) = ((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) (X i)", " Injective ⇑((ofId R A).comp ↑(isEmptyAlgEquiv R ι)) ↔ Injective (⇑(algebraMap R A) ∘ ⇑(isEmptyAlgEquiv R ι))" ]
[]