Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.Data.Bundle import Mathlib.Data.Set.Image import Mathlib.Topology.PartialHomeomorph import Mathlib.Topology.Order.Basic #align_import topology.fiber_bundle.trivialization from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open TopologicalSpace Filter Set Bundle Function ...
Mathlib/Topology/FiberBundle/Trivialization.lean
145
147
theorem proj_symm_apply {x : B × F} (hx : x ∈ e.target) : proj (e.toPartialEquiv.symm x) = x.1 := by
have := (e.coe_fst (e.map_target hx)).symm rwa [← e.coe_coe, e.right_inv hx] at this
[ " e = e'", " { toPartialEquiv := toPartialEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ } =\n e'", " { toPartialEquiv := toPartialEquiv✝¹, open_target := open_target✝¹, baseSet := bas...
[ " e = e'", " { toPartialEquiv := toPartialEquiv✝, open_target := open_target✝, baseSet := baseSet✝, open_baseSet := open_baseSet✝,\n source_eq := source_eq✝, target_eq := target_eq✝, proj_toFun := proj_toFun✝ } =\n e'", " { toPartialEquiv := toPartialEquiv✝¹, open_target := open_target✝¹, baseSet := bas...
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
128
132
theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl
[ " (∀ᵐ (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" ]
import Mathlib.Algebra.MvPolynomial.Rename #align_import data.mv_polynomial.comap from "leanprover-community/mathlib"@"aba31c938d3243cc671be7091b28a1e0814647ee" namespace MvPolynomial variable {σ : Type*} {τ : Type*} {υ : Type*} {R : Type*} [CommSemiring R] noncomputable def comap (f : MvPolynomial σ R →ₐ[R] M...
Mathlib/Algebra/MvPolynomial/Comap.lean
62
74
theorem comap_comp_apply (f : MvPolynomial σ R →ₐ[R] MvPolynomial τ R) (g : MvPolynomial τ R →ₐ[R] MvPolynomial υ R) (x : υ → R) : comap (g.comp f) x = comap f (comap g x) := by
funext i trans aeval x (aeval (fun i => g (X i)) (f (X i))) · apply eval₂Hom_congr rfl rfl rw [AlgHom.comp_apply] suffices g = aeval fun i => g (X i) by rw [← this] exact aeval_unique g · simp only [comap, aeval_eq_eval₂Hom, map_eval₂Hom, AlgHom.comp_apply] refine eval₂Hom_congr ?_ rfl rfl ...
[ " comap (AlgHom.id R (MvPolynomial σ R)) x = x", " comap (AlgHom.id R (MvPolynomial σ R)) x i = x i", " comap (AlgHom.id R (MvPolynomial σ R)) = id", " comap (AlgHom.id R (MvPolynomial σ R)) x = id x", " comap (g.comp f) x = comap f (comap g x)", " comap (g.comp f) x i = comap f (comap g x) i", " comap ...
[ " comap (AlgHom.id R (MvPolynomial σ R)) x = x", " comap (AlgHom.id R (MvPolynomial σ R)) x i = x i", " comap (AlgHom.id R (MvPolynomial σ R)) = id", " comap (AlgHom.id R (MvPolynomial σ R)) x = id x" ]
import Mathlib.Order.Filter.Basic import Mathlib.Order.Filter.CountableInter import Mathlib.SetTheory.Cardinal.Ordinal import Mathlib.SetTheory.Cardinal.Cofinality open Set Filter Cardinal universe u variable {ι : Type u} {α β : Type u} {c : Cardinal.{u}} class CardinalInterFilter (l : Filter α) (c : Cardinal.{...
Mathlib/Order/Filter/CardinalInter.lean
123
127
theorem EventuallyLE.cardinal_bUnion {S : Set ι} (hS : #S < c) {s t : ∀ i ∈ S, Set α} (h : ∀ i hi, s i hi ≤ᶠ[l] t i hi) : ⋃ i ∈ S, s i ‹_› ≤ᶠ[l] ⋃ i ∈ S, t i ‹_› := by
simp only [biUnion_eq_iUnion] exact EventuallyLE.cardinal_iUnion hS fun i => h i i.2
[ " ∀ (S : Set (Set α)), #↑S < ℵ₀ → (∀ s ∈ S, s ∈ l) → ⋂₀ S ∈ l", " ⋂ i, s i ∈ l ↔ ∀ (i : ι), s i ∈ l", " (⋂₀ range fun i => s i) ∈ l ↔ ∀ (i : ι), s i ∈ l", " (∀ s_1 ∈ range fun i => s i, s_1 ∈ l) ↔ ∀ (i : ι), s i ∈ l", " ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l", " ⋂ x, s ↑x ⋯ ∈...
[ " ∀ (S : Set (Set α)), #↑S < ℵ₀ → (∀ s ∈ S, s ∈ l) → ⋂₀ S ∈ l", " ⋂ i, s i ∈ l ↔ ∀ (i : ι), s i ∈ l", " (⋂₀ range fun i => s i) ∈ l ↔ ∀ (i : ι), s i ∈ l", " (∀ s_1 ∈ range fun i => s i, s_1 ∈ l) ↔ ∀ (i : ι), s i ∈ l", " ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l", " ⋂ x, s ↑x ⋯ ∈...
import Mathlib.GroupTheory.QuotientGroup import Mathlib.RingTheory.DedekindDomain.Ideal #align_import ring_theory.class_group from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" variable {R K L : Type*} [CommRing R] variable [Field K] [Field L] [DecidableEq L] variable [Algebra R K] [Is...
Mathlib/RingTheory/ClassGroup.lean
111
117
theorem ClassGroup.Quot_mk_eq_mk (I : (FractionalIdeal R⁰ (FractionRing R))ˣ) : Quot.mk _ I = ClassGroup.mk I := by
rw [ClassGroup.mk, canonicalEquiv_self, RingEquiv.coe_monoidHom_refl, Units.map_id] -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644 erw [MonoidHom.comp_apply] rw [MonoidHom.id_apply, QuotientGroup.mk'_apply] rfl
[ " spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1", " spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1", " ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1", " ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ...
[ " spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1", " spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1", " ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1", " ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ...
import Mathlib.LinearAlgebra.Matrix.BilinearForm import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Vandermonde import Mathlib.LinearAlgebra.Trace import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosu...
Mathlib/RingTheory/Trace.lean
149
153
theorem trace_comp_trace_of_basis [Algebra S T] [IsScalarTower R S T] {ι κ : Type*} [Finite ι] [Finite κ] (b : Basis ι R S) (c : Basis κ S T) : (trace R S).comp ((trace S T).restrictScalars R) = trace R T := by
ext rw [LinearMap.comp_apply, LinearMap.restrictScalars_apply, trace_trace_of_basis b c]
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.MvPolynomial.Degrees import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.LinearAlgebra.FinsuppVectorSpace import Mathlib.LinearAlgebra.FreeModule.Finite.Basic #align_import ring_theory.mv_polynomial.basic from "leanprover-community/mathlib"@"2f5b500a507...
Mathlib/RingTheory/MvPolynomial/Basic.lean
68
72
theorem mapRange_eq_map {R S : Type*} [CommSemiring R] [CommSemiring S] (p : MvPolynomial σ R) (f : R →+* S) : Finsupp.mapRange f f.map_zero p = map f p := by
rw [p.as_sum, Finsupp.mapRange_finset_sum, map_sum (map f)] refine Finset.sum_congr rfl fun n _ => ?_ rw [map_monomial, ← single_eq_monomial, Finsupp.mapRange_single, single_eq_monomial]
[ " Finsupp.mapRange ⇑f ⋯ p = (map f) p", " ∑ x ∈ p.support, Finsupp.mapRange ⇑f ⋯ ((monomial x) (coeff x p)) =\n ∑ x ∈ p.support, (map f) ((monomial x) (coeff x p))", " Finsupp.mapRange ⇑f ⋯ ((monomial n) (coeff n p)) = (map f) ((monomial n) (coeff n p))" ]
[]
import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Valuation.PrimeMultiplicity import Mathlib.RingTheory.AdicCompletion.Basic #align_import ring_theory.discrete_valuation_ring.basic from "leanprover-community/mathlib"@"c163ec99dfc664628ca15d215fce0a5b9c2...
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
75
88
theorem irreducible_of_span_eq_maximalIdeal {R : Type*} [CommRing R] [LocalRing R] [IsDomain R] (ϖ : R) (hϖ : ϖ ≠ 0) (h : maximalIdeal R = Ideal.span {ϖ}) : Irreducible ϖ := by
have h2 : ¬IsUnit ϖ := show ϖ ∈ maximalIdeal R from h.symm ▸ Submodule.mem_span_singleton_self ϖ refine ⟨h2, ?_⟩ intro a b hab by_contra! h obtain ⟨ha : a ∈ maximalIdeal R, hb : b ∈ maximalIdeal R⟩ := h rw [h, mem_span_singleton'] at ha hb rcases ha with ⟨a, rfl⟩ rcases hb with ⟨b, rfl⟩ rw [show a * ...
[ " Irreducible ϖ", " ∀ (a b : R), ϖ = a * b → IsUnit a ∨ IsUnit b", " IsUnit a ∨ IsUnit b", " False", " a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b))", " ϖ = 0", " ϖ * (a * b) ≠ 1" ]
[]
import Mathlib.RingTheory.WittVector.Frobenius import Mathlib.RingTheory.WittVector.Verschiebung import Mathlib.RingTheory.WittVector.MulP #align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" namespace WittVector variable {p : ℕ} {R : Typ...
Mathlib/RingTheory/WittVector/Identities.lean
114
116
theorem mul_charP_coeff_zero [CharP R p] (x : 𝕎 R) : (x * p).coeff 0 = 0 := by
rw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_zero, zero_pow hp.out.ne_zero]
[ " frobenius (verschiebung x) = x * ↑p", " ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)", " verschiebung x = x * ↑p", " (↑p ^ i).coeff i = 1", " (↑p ^ 0).coeff 0 = 1", " (↑p ^ (i + 1)).coeff (i + 1) = 1", " (↑p ^ i).coeff j = 0", " (↑p ^ 0).coeff j = 0", " ...
[ " frobenius (verschiebung x) = x * ↑p", " ∀ (n : ℕ), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)", " verschiebung x = x * ↑p", " (↑p ^ i).coeff i = 1", " (↑p ^ 0).coeff 0 = 1", " (↑p ^ (i + 1)).coeff (i + 1) = 1", " (↑p ^ i).coeff j = 0", " (↑p ^ 0).coeff j = 0", " ...
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polyn...
Mathlib/Algebra/Polynomial/Eval.lean
95
95
theorem eval₂_one : (1 : R[X]).eval₂ f x = 1 := by
rw [← C_1, eval₂_C, f.map_one]
[ " eval₂ f x p = p.sum fun e a => f a * x ^ e", " f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ", " eval₂ f s φ = eval₂ f s φ", " eval₂ f 0 p = f (p.coeff 0)", " eval₂ f x 0 = 0", " eval₂ f x (C a) = f a", " eval₂ f x X = x", " eval₂ f x ((monomial n) r) = f r * x ^ n", " eval₂ f x (X ^ n) = x ^ ...
[ " eval₂ f x p = p.sum fun e a => f a * x ^ e", " f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ", " eval₂ f s φ = eval₂ f s φ", " eval₂ f 0 p = f (p.coeff 0)", " eval₂ f x 0 = 0", " eval₂ f x (C a) = f a", " eval₂ f x X = x", " eval₂ f x ((monomial n) r) = f r * x ^ n", " eval₂ f x (X ^ n) = x ^ ...
import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.PolynomialExp #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9...
Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean
101
117
theorem hasDerivAt_polynomial_eval_inv_mul (p : ℝ[X]) (x : ℝ) : HasDerivAt (fun x ↦ p.eval x⁻¹ * expNegInvGlue x) ((X ^ 2 * (p - derivative (R := ℝ) p)).eval x⁻¹ * expNegInvGlue x) x := by
rcases lt_trichotomy x 0 with hx | rfl | hx · rw [zero_of_nonpos hx.le, mul_zero] refine (hasDerivAt_const _ 0).congr_of_eventuallyEq ?_ filter_upwards [gt_mem_nhds hx] with y hy rw [zero_of_nonpos hy.le, mul_zero] · rw [expNegInvGlue.zero, mul_zero, hasDerivAt_iff_tendsto_slope] refine ((tendsto...
[ " expNegInvGlue x = 0", " 0 < expNegInvGlue x", " 0 ≤ expNegInvGlue x", " Tendsto (fun x => Polynomial.eval x⁻¹ p * expNegInvGlue x) (𝓝 0) (𝓝 0)", " Tendsto (fun x => if x ≤ 0 then 0 else Polynomial.eval x⁻¹ p * rexp (-x⁻¹)) (𝓝 0) (𝓝 0)", " Tendsto (fun x => Polynomial.eval x⁻¹ p * rexp (-x⁻¹)) (𝓝 0 ...
[ " expNegInvGlue x = 0", " 0 < expNegInvGlue x", " 0 ≤ expNegInvGlue x", " Tendsto (fun x => Polynomial.eval x⁻¹ p * expNegInvGlue x) (𝓝 0) (𝓝 0)", " Tendsto (fun x => if x ≤ 0 then 0 else Polynomial.eval x⁻¹ p * rexp (-x⁻¹)) (𝓝 0) (𝓝 0)", " Tendsto (fun x => Polynomial.eval x⁻¹ p * rexp (-x⁻¹)) (𝓝 0 ...
import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.RowCol import Mathlib.Data.Fin.VecNotation import Mathlib.Tactic.FinCases #align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matrix universe u uₘ uₙ uₒ variable {α : Type u} {o n m...
Mathlib/Data/Matrix/Notation.lean
393
396
theorem submatrix_cons_row (A : Matrix m' n' α) (i : m') (row : Fin m → m') (col : o' → n') : submatrix A (vecCons i row) col = vecCons (fun j => A i (col j)) (submatrix A row col) := by
ext i j refine Fin.cases ?_ ?_ i <;> simp [submatrix]
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ", " A.submatrix (vecCons i row) col = vecCons (fun j => A i (col j)) (A.submatrix row col)", " A.submatrix (vecCons i✝ r...
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv import Mathlib.Analysis.Calculus.FDeriv.Extend import Mathlib.Analysis.Calculus.Deriv.Prod import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv #...
Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
52
60
theorem hasStrictDerivAt_const_cpow {x y : ℂ} (h : x ≠ 0 ∨ y ≠ 0) : HasStrictDerivAt (fun y => x ^ y) (x ^ y * log x) y := by
rcases em (x = 0) with (rfl | hx) · replace h := h.neg_resolve_left rfl rw [log_zero, mul_zero] refine (hasStrictDerivAt_const _ 0).congr_of_eventuallyEq ?_ exact (isOpen_ne.eventually_mem h).mono fun y hy => (zero_cpow hy).symm · simpa only [cpow_def_of_ne_zero hx, mul_one] using ((hasStrictDe...
[ " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ + (p.1 ^ p.2 * p.1.log) • ContinuousLinearMap.snd ℂ ℂ ℂ) p", " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n (p.1 ^ p.2 • (p.2 / p.1) • ContinuousLinearMap.fst ℂ ℂ ℂ + p.1 ^ p.2 • p.1.log • ContinuousLinearMap.snd...
[ " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ + (p.1 ^ p.2 * p.1.log) • ContinuousLinearMap.snd ℂ ℂ ℂ) p", " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n (p.1 ^ p.2 • (p.2 / p.1) • ContinuousLinearMap.fst ℂ ℂ ℂ + p.1 ^ p.2 • p.1.log • ContinuousLinearMap.snd...
import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.weighted_homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Fins...
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
180
192
theorem weightedHomogeneousSubmodule_mul (w : σ → M) (m n : M) : weightedHomogeneousSubmodule R w m * weightedHomogeneousSubmodule R w n ≤ weightedHomogeneousSubmodule R w (m + n) := by
classical rw [Submodule.mul_le] intro φ hφ ψ hψ c hc rw [coeff_mul] at hc obtain ⟨⟨d, e⟩, hde, H⟩ := Finset.exists_ne_zero_of_sum_ne_zero hc have aux : coeff d φ ≠ 0 ∧ coeff e ψ ≠ 0 := by contrapose! H by_cases h : coeff d φ = 0 <;> simp_all only [Ne, not_false_iff, zero_mul, mul_zero] rw [...
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0", " (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0", " weightedTotalDegree' w 0 = ⊥", " (weightedDegree w) c = m", " coeff c a ≠ 0 ∨ coeff c b ≠ 0", " coeff c a + coeff c b = 0", " weigh...
[ " (weightedDegree w) f = f.sum fun i c => c • w i", " weightedTotalDegree' w p = ⊥ ↔ p = 0", " (∀ (s : σ →₀ ℕ), coeff s p ≠ 0 → False) ↔ ∀ (d : σ →₀ ℕ), coeff d p = 0", " weightedTotalDegree' w 0 = ⊥", " (weightedDegree w) c = m", " coeff c a ≠ 0 ∨ coeff c b ≠ 0", " coeff c a + coeff c b = 0", " weigh...
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine import Mathlib.Tactic.IntervalCases #align_import geometry.euclidean.triangle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped Classica...
Mathlib/Geometry/Euclidean/Triangle.lean
109
143
theorem cos_angle_sub_add_angle_sub_rev_eq_neg_cos_angle {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) : Real.cos (angle x (x - y) + angle y (y - x)) = -Real.cos (angle x y) := by
by_cases hxy : x = y · rw [hxy, angle_self hy] simp · rw [Real.cos_add, cos_angle, cos_angle, cos_angle] have hxn : ‖x‖ ≠ 0 := fun h => hx (norm_eq_zero.1 h) have hyn : ‖y‖ ≠ 0 := fun h => hy (norm_eq_zero.1 h) have hxyn : ‖x - y‖ ≠ 0 := fun h => hxy (eq_of_sub_eq_zero (norm_eq_zero.1 h)) app...
[ " ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - 2 * ‖x‖ * ‖y‖ * (angle x y).cos", " 2 * ‖x‖ * ‖y‖ * (angle x y).cos = 2 * ((angle x y).cos * (‖x‖ * ‖y‖))", " angle x (x - y) = angle y (y - x)", " (angle x (x - y)).cos = (angle y (y - x)).cos", " ‖x‖ = ‖y‖", " ‖y‖ = ‖x‖", " False", " (angle x (x - y) + a...
[ " ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ - 2 * ‖x‖ * ‖y‖ * (angle x y).cos", " 2 * ‖x‖ * ‖y‖ * (angle x y).cos = 2 * ((angle x y).cos * (‖x‖ * ‖y‖))", " angle x (x - y) = angle y (y - x)", " (angle x (x - y)).cos = (angle y (y - x)).cos", " ‖x‖ = ‖y‖", " ‖y‖ = ‖x‖", " False" ]
import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.Data.Finsupp.Interval noncomputable section open Finset (antidiagonal mem_antidiagonal) namespace MvPowerSeries open Finsupp variable {σ R : Type*} section Trunc variable [CommSemiring R] (n : σ →₀ ℕ) def truncFun (φ : MvPowerSeries σ R) : MvPol...
Mathlib/RingTheory/MvPowerSeries/Trunc.lean
71
73
theorem coeff_trunc (m : σ →₀ ℕ) (φ : MvPowerSeries σ R) : (trunc R n φ).coeff m = if m < n then coeff R m φ else 0 := by
classical simp [trunc, coeff_truncFun]
[ " MvPolynomial.coeff m (truncFun n φ) = if m < n then (coeff R m) φ else 0", " truncFun n 0 = 0", " MvPolynomial.coeff m✝ (truncFun n 0) = MvPolynomial.coeff m✝ 0", " ∀ (x y : MvPowerSeries σ R),\n { toFun := truncFun n, map_zero' := ⋯ }.toFun (x + y) =\n { toFun := truncFun n, map_zero' := ⋯ }.toFun ...
[ " MvPolynomial.coeff m (truncFun n φ) = if m < n then (coeff R m) φ else 0", " truncFun n 0 = 0", " MvPolynomial.coeff m✝ (truncFun n 0) = MvPolynomial.coeff m✝ 0", " ∀ (x y : MvPowerSeries σ R),\n { toFun := truncFun n, map_zero' := ⋯ }.toFun (x + y) =\n { toFun := truncFun n, map_zero' := ⋯ }.toFun ...
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
64
78
theorem lt_birthday_iff {x : PGame} {o : Ordinal} : o < x.birthday ↔ (∃ i : x.LeftMoves, o ≤ (x.moveLeft i).birthday) ∨ ∃ i : x.RightMoves, o ≤ (x.moveRight i).birthday := by
constructor · rw [birthday_def] intro h cases' lt_max_iff.1 h with h' h' · left rwa [lt_lsub_iff] at h' · right rwa [lt_lsub_iff] at h' · rintro (⟨i, hi⟩ | ⟨i, hi⟩) · exact hi.trans_lt (birthday_moveLeft_lt i) · exact hi.trans_lt (birthday_moveRight_lt i)
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
import Mathlib.RingTheory.Algebraic import Mathlib.RingTheory.Localization.AtPrime import Mathlib.RingTheory.Localization.Integral #align_import ring_theory.ideal.over from "leanprover-community/mathlib"@"198cb64d5c961e1a8d0d3e219feb7058d5353861" variable {R : Type*} [CommRing R] namespace Ideal open Polynomial...
Mathlib/RingTheory/Ideal/Over.lean
139
149
theorem comap_eq_of_scalar_tower_quotient [Algebra R S] [Algebra (R ⧸ p) (S ⧸ P)] [IsScalarTower R (R ⧸ p) (S ⧸ P)] (h : Function.Injective (algebraMap (R ⧸ p) (S ⧸ P))) : comap (algebraMap R S) P = p := by
ext x rw [mem_comap, ← Quotient.eq_zero_iff_mem, ← Quotient.eq_zero_iff_mem, Quotient.mk_algebraMap, IsScalarTower.algebraMap_apply R (R ⧸ p) (S ⧸ P), Quotient.algebraMap_eq] constructor · intro hx exact (injective_iff_map_eq_zero (algebraMap (R ⧸ p) (S ⧸ P))).mp h _ hx · intro hx rw [hx, RingHom...
[ " p.coeff 0 ∈ comap f I", " eval₂ f r p.divX * r ∈ I", " p ≠ 0 → eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ comap f I", " 0 ≠ 0 → eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I", " eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I", " ∀ (p : R[X]) (a : R),\n p.coeff 0 =...
[ " p.coeff 0 ∈ comap f I", " eval₂ f r p.divX * r ∈ I", " p ≠ 0 → eval₂ f r p = 0 → ∃ i, p.coeff i ≠ 0 ∧ p.coeff i ∈ comap f I", " 0 ≠ 0 → eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I", " eval₂ f r 0 = 0 → ∃ i, coeff 0 i ≠ 0 ∧ coeff 0 i ∈ comap f I", " ∀ (p : R[X]) (a : R),\n p.coeff 0 =...
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory.Invariants universe v u noncomputable section open CategoryTheory Limits Representation variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G) namespace grou...
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
405
407
theorem map_one_fst_of_isTwoCocycle {f : G × G → A} (hf : IsTwoCocycle f) (g : G) : f (1, g) = f (1, 1) := by
simpa only [one_smul, one_mul, mul_one, add_right_inj] using (hf 1 1 g).symm
[ " f 1 = 0", " f (1, g) = f (1, 1)" ]
[ " f 1 = 0" ]
import Mathlib.Data.Set.Prod import Mathlib.Logic.Function.Conjugate #align_import data.set.function from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207" variable {α β γ : Type*} {ι : Sort*} {π : α → Type*} open Equiv Equiv.Perm Function namespace Set section restrict def restrict (...
Mathlib/Data/Set/Function.lean
117
120
theorem restrict_extend_range (f : α → β) (g : α → γ) (g' : β → γ) : (range f).restrict (extend f g g') = fun x => g x.coe_prop.choose := by
classical exact restrict_dite _ _
[ " s.restrict f '' (Subtype.val ⁻¹' t) = f '' (t ∩ s)", " (range f).restrict (extend f g g') = fun x => g (Exists.choose ⋯)" ]
[ " s.restrict f '' (Subtype.val ⁻¹' t) = f '' (t ∩ s)" ]
import Mathlib.LinearAlgebra.Ray import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.ray from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Real variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSp...
Mathlib/Analysis/NormedSpace/Ray.lean
68
69
theorem norm_injOn_ray_right (hy : y ≠ 0) : { x | SameRay ℝ x y }.InjOn norm := by
simpa only [SameRay.sameRay_comm] using norm_injOn_ray_left hy
[ " Set.InjOn Norm.norm {y | SameRay ℝ x y}", " y = z", " r • x = z", " r • x = s • x", " Set.InjOn Norm.norm {x | SameRay ℝ x y}" ]
[ " Set.InjOn Norm.norm {y | SameRay ℝ x y}", " y = z", " r • x = z", " r • x = s • x" ]
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
56
59
theorem taylor_zero' : taylor (0 : R) = LinearMap.id := by
ext simp only [taylor_apply, add_zero, comp_X, _root_.map_zero, LinearMap.id_comp, Function.comp_apply, LinearMap.coe_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" ]
import Mathlib.Analysis.NormedSpace.HahnBanach.Extension import Mathlib.Analysis.NormedSpace.RCLike import Mathlib.Analysis.LocallyConvex.Polar #align_import analysis.normed_space.dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open ...
Mathlib/Analysis/NormedSpace/Dual.lean
82
84
theorem inclusionInDoubleDual_norm_le : ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1 := by
rw [inclusionInDoubleDual_norm_eq] exact ContinuousLinearMap.norm_id_le
[ " ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1", " ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖ ≤ 1" ]
[]
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
127
132
theorem volume_emetric_closedBall (a : ℝ) (r : ℝ≥0∞) : volume (EMetric.closedBall a r) = 2 * r := by
rcases eq_or_ne r ∞ with (rfl | hr) · rw [EMetric.closedBall_top, volume_univ, two_mul, _root_.top_add] · lift r to ℝ≥0 using hr rw [Metric.emetric_closedBall_nnreal, volume_closedBall, two_mul, ← NNReal.coe_add, ENNReal.ofReal_coe_nnreal, ENNReal.coe_add, two_mul]
[ " 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.Data.List.Infix #align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" -- Make sure we don't import algebra assert_not_exists Monoid variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ) namespace List def rdrop : List α := l.take (l.leng...
Mathlib/Data/List/DropRight.lean
51
51
theorem rdrop_zero : rdrop l 0 = l := by
simp [rdrop]
[ " [].rdrop n = []", " l.rdrop 0 = l" ]
[ " [].rdrop n = []" ]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toReal_add (ha : a ≠ ∞) (hb : b ≠ ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
114
117
theorem toReal_le_add' (hle : a ≤ b + c) (hb : b = ∞ → a = ∞) (hc : c = ∞ → a = ∞) : a.toReal ≤ b.toReal + c.toReal := by
refine le_trans (toReal_mono' hle ?_) toReal_add_le simpa only [add_eq_top, or_imp] using And.intro hb hc
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal", " a.toReal - b.toReal ≤ (a - b).to...
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : ℕ) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
124
125
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 := by
rw [← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1" ]
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.RingTheory.Coprime.Basic import Mathlib.Tactic.AdaptationNote #align_import ring_theory.polynomial.scale_roots from "leanprover-community/mathlib"@"40ac1b258344e0c2b4568dc37bfad937ec35a727" variable {R...
Mathlib/RingTheory/Polynomial/ScaleRoots.lean
53
59
theorem scaleRoots_ne_zero {p : R[X]} (hp : p ≠ 0) (s : R) : scaleRoots p s ≠ 0 := by
intro h have : p.coeff p.natDegree ≠ 0 := mt leadingCoeff_eq_zero.mp hp have : (scaleRoots p s).coeff p.natDegree = 0 := congr_fun (congr_arg (coeff : R[X] → ℕ → R) h) p.natDegree rw [coeff_scaleRoots_natDegree] at this contradiction
[ " (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)", " (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff", " scaleRoots 0 s = 0", " (scaleRoots 0 s).coeff n✝ = coeff 0 n✝", " p.scaleRoots s ≠ 0", " False" ]
[ " (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)", " (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff", " scaleRoots 0 s = 0", " (scaleRoots 0 s).coeff n✝ = coeff 0 n✝" ]
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
150
150
theorem coe_real_complex_mul (r : ℝ) (z : ℂ) : (r • z : ℍ) = ↑r * ↑z := by
ext <;> simp
[ " (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‖", " ‖a * b‖ = ‖a‖ * ‖b‖", " √(normSq a * normSq b) = √(normSq a) * √(normSq b)", " ↑(z + w) = ↑z + ↑w"...
[ " (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‖", " ‖a * b‖ = ‖a‖ * ‖b‖", " √(normSq a * normSq b) = √(normSq a) * √(normSq b)", " ↑(z + w) = ↑z + ↑w"...
import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Nat.Choose.Vandermonde import Mathlib.Tactic.FieldSimp #align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358...
Mathlib/Algebra/Polynomial/HasseDeriv.lean
100
102
theorem hasseDeriv_one' : hasseDeriv 1 f = derivative f := by
simp only [hasseDeriv_apply, derivative_apply, ← C_mul_X_pow_eq_monomial, Nat.choose_one_right, (Nat.cast_commute _ _).eq]
[ " (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)", "...
[ " (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)", " (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)", "...
import Mathlib.Analysis.Convex.Combination import Mathlib.LinearAlgebra.AffineSpace.Independent import Mathlib.Tactic.FieldSimp #align_import analysis.convex.caratheodory from "leanprover-community/mathlib"@"e6fab1dc073396d45da082c644642c4f8bff2264" open Set Finset universe u variable {𝕜 : Type*} {E : Type u} ...
Mathlib/Analysis/Convex/Caratheodory.lean
52
98
theorem mem_convexHull_erase [DecidableEq E] {t : Finset E} (h : ¬AffineIndependent 𝕜 ((↑) : t → E)) {x : E} (m : x ∈ convexHull 𝕜 (↑t : Set E)) : ∃ y : (↑t : Set E), x ∈ convexHull 𝕜 (↑(t.erase y) : Set E) := by
simp only [Finset.convexHull_eq, mem_setOf_eq] at m ⊢ obtain ⟨f, fpos, fsum, rfl⟩ := m obtain ⟨g, gcombo, gsum, gpos⟩ := exists_nontrivial_relation_sum_zero_of_not_affine_ind h replace gpos := exists_pos_of_sum_zero_of_exists_nonzero g gsum gpos clear h let s := @Finset.filter _ (fun z => 0 < g z) (fun _ =...
[ " ∃ y, x ∈ (convexHull 𝕜) ↑(t.erase ↑y)", " ∃ y w, (∀ y_1 ∈ t.erase ↑y, 0 ≤ w y_1) ∧ ∑ y ∈ t.erase ↑y, w y = 1 ∧ (t.erase ↑y).centerMass w id = x", " ∃ y w, (∀ y_1 ∈ t.erase ↑y, 0 ≤ w y_1) ∧ ∑ y ∈ t.erase ↑y, w y = 1 ∧ (t.erase ↑y).centerMass w id = t.centerMass f id", " ∃ i₀ ∈ s, ∀ i ∈ s, f i₀ / g i₀ ≤ f i ...
[]
import Mathlib.AlgebraicTopology.DoldKan.Projections import Mathlib.CategoryTheory.Idempotents.FunctorCategories import Mathlib.CategoryTheory.Idempotents.FunctorExtension #align_import algebraic_topology.dold_kan.p_infty from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open Category...
Mathlib/AlgebraicTopology/DoldKan/PInfty.lean
110
112
theorem PInfty_idem : (PInfty : K[X] ⟶ _) ≫ PInfty = PInfty := by
ext n exact PInfty_f_idem n
[ " (P (q + 1)).f n = (P q).f n", " (P (q + 1)).f 0 = (P q).f 0", " (P (q + 1)).f (n + 1) = (P q).f (n + 1)", " (P q).f (n + 1) ≫ (Hσ q).f (n + 1) = 0", " (Q (q + 1)).f n = (Q q).f n", " (fun n => (P n).f n) (n + 1) ≫ AlternatingFaceMapComplex.objD X n =\n AlternatingFaceMapComplex.objD X n ≫ (fun n => (...
[ " (P (q + 1)).f n = (P q).f n", " (P (q + 1)).f 0 = (P q).f 0", " (P (q + 1)).f (n + 1) = (P q).f (n + 1)", " (P q).f (n + 1) ≫ (Hσ q).f (n + 1) = 0", " (Q (q + 1)).f n = (Q q).f n", " (fun n => (P n).f n) (n + 1) ≫ AlternatingFaceMapComplex.objD X n =\n AlternatingFaceMapComplex.objD X n ≫ (fun n => (...
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Multiset.Powerset #align_import data.finset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Finset open Function Multiset variable {α : Type*} {s t : Finset α} section Powerset def powerset (s : Finset...
Mathlib/Data/Finset/Powerset.lean
41
44
theorem coe_powerset (s : Finset α) : (s.powerset : Set (Finset α)) = ((↑) : Finset α → Set α) ⁻¹' (s : Set α).powerset := by
ext simp
[ " s ∈ t.powerset ↔ s ⊆ t", " { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } ⊆ t", " ↑s.powerset = toSet ⁻¹' 𝒫↑s", " x✝ ∈ ↑s.powerset ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s" ]
[ " s ∈ t.powerset ↔ s ⊆ t", " { val := val✝, nodup := nodup✝ } ∈ t.powerset ↔ { val := val✝, nodup := nodup✝ } ⊆ t" ]
import Mathlib.Algebra.DualNumber import Mathlib.Algebra.QuaternionBasis import Mathlib.Data.Complex.Module import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.CliffordAlgebra.Star import Mathlib.LinearAlgebra.QuadraticForm.Prod #align_import linear_algebra.clifford_algebra.equivs fr...
Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
90
96
theorem reverse_apply (x : CliffordAlgebra (0 : QuadraticForm R Unit)) : reverse (R := R) x = x := by
induction x using CliffordAlgebra.induction with | algebraMap r => exact reverse.commutes _ | ι x => rw [ι_eq_zero, LinearMap.zero_apply, reverse.map_zero] | mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂] | add x₁ x₂ hx₁ hx₂ => rw [reverse.map_add, hx₁, hx₂]
[ " x * y = y * x", " (algebraMap R (CliffordAlgebra 0)) r * y = y * (algebraMap R (CliffordAlgebra 0)) r", " (ι 0) x * y = y * (ι 0) x", " (x₁ + x₂) * y = y * (x₁ + x₂)", " x₁ * x₂ * y = y * (x₁ * x₂)", " reverse x = x", " reverse ((algebraMap R (CliffordAlgebra 0)) r) = (algebraMap R (CliffordAlgebra 0)...
[ " x * y = y * x", " (algebraMap R (CliffordAlgebra 0)) r * y = y * (algebraMap R (CliffordAlgebra 0)) r", " (ι 0) x * y = y * (ι 0) x", " (x₁ + x₂) * y = y * (x₁ + x₂)", " x₁ * x₂ * y = y * (x₁ * x₂)" ]
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic #align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Nat section Euler namespace ZMod variable (p : ℕ) [Fact p.Prime] theorem euler_criterion_units (x : (ZMod p)ˣ) :...
Mathlib/NumberTheory/LegendreSymbol/Basic.lean
74
81
theorem pow_div_two_eq_neg_one_or_one {a : ZMod p} (ha : a ≠ 0) : a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1 := by
cases' Prime.eq_two_or_odd (@Fact.out p.Prime _) with hp2 hp_odd · subst p; revert a ha; intro a; fin_cases a · tauto · simp rw [← mul_self_eq_one_iff, ← pow_add, ← two_mul, two_mul_odd_div_two hp_odd] exact pow_card_sub_one_eq_one ha
[ " (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1", " (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1", " ringChar (ZMod p) ≠ 2", " (∃ y, y ^ 2 = x) ↔ IsSquare x", " (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2", " IsSquare x ↔ x ^ (p / 2) = 1", " IsSquare a ↔ a ^ (p / 2) = 1", " Units.mk0 a ha ^ (p / 2) = 1 ↔ a ^ (p / 2) = 1", " (∃ y,...
[ " (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1", " (∃ y, y ^ 2 = x) ↔ x ^ (2 / 2) = 1", " ringChar (ZMod p) ≠ 2", " (∃ y, y ^ 2 = x) ↔ IsSquare x", " (∃ y, y ^ 2 = x) ↔ ∃ c, x = c ^ 2", " IsSquare x ↔ x ^ (p / 2) = 1", " IsSquare a ↔ a ^ (p / 2) = 1", " Units.mk0 a ha ^ (p / 2) = 1 ↔ a ^ (p / 2) = 1", " (∃ y,...
import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.Data.Finsupp.Interval noncomputable section open Finset (antidiagonal mem_antidiagonal) namespace MvPowerSeries open Finsupp variable {σ R : Type*} section Trunc variable [CommSemiring R] (n : σ →₀ ℕ) def truncFun (φ : MvPowerSeries σ R) : MvPol...
Mathlib/RingTheory/MvPowerSeries/Trunc.lean
43
46
theorem coeff_truncFun (m : σ →₀ ℕ) (φ : MvPowerSeries σ R) : (truncFun n φ).coeff m = if m < n then coeff R m φ else 0 := by
classical simp [truncFun, MvPolynomial.coeff_sum]
[ " MvPolynomial.coeff m (truncFun n φ) = if m < n then (coeff R m) φ else 0" ]
[]
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ι : Sort*} {f g : ι → ℝ≥0∞} variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toNNReal_iInf (hf : ∀ i, f ...
Mathlib/Data/ENNReal/Real.lean
606
606
theorem sInf_add {s : Set ℝ≥0∞} : sInf s + a = ⨅ b ∈ s, b + a := by
simp [sInf_eq_iInf, iInf_add]
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal", " (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)", " (iSup f).toNNReal = ⨆ i, (f i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i...
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal", " (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)", " (iSup f).toNNReal = ⨆ i, (f i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Pi import Mathlib.Data.Fintype.Sum #align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" open scoped Classical universe u v namespace ...
Mathlib/Combinatorics/HalesJewett.lean
175
176
theorem apply_none {α ι} (l : Line α ι) (x : α) (i : ι) (h : l.idxFun i = none) : l x i = x := by
simp only [Option.getD_none, h, l.apply]
[ " Inhabited (ColorFocused C)", " h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none", " (fun i => Option.map f (l.idxFun i)) ⋯.choose = none", " (fun x i => (l.idxFun i).getD x) x i = x" ]
[ " Inhabited (ColorFocused C)", " h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none", " (fun i => Option.map f (l.idxFun i)) ⋯.choose = none" ]
import Mathlib.Data.List.Basic #align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" -- Make sure we don't import algebra assert_not_exists Monoid variable {α β : Type*} namespace List attribute [simp] join -- Porting note (#10618): simp can prove this -- @...
Mathlib/Data/List/Join.lean
123
129
theorem drop_take_succ_eq_cons_get (L : List α) (i : Fin L.length) : (L.take (i + 1)).drop i = [get L i] := by
induction' L with head tail ih · exact (Nat.not_succ_le_zero i i.isLt).elim rcases i with ⟨_ | i, hi⟩ · simp · simpa using ih ⟨i, Nat.lt_of_succ_lt_succ hi⟩
[ " [l].join = l", " (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []", " (L₁ ++ L₂).join = L₁.join ++ L₂.join", " ([] ++ L₂).join = [].join ++ L₂.join", " (head✝ :: tail✝ ++ L₂).join = (head✝ :: tail✝).join ++ L₂.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
[ " [l].join = l", " (l :: L).join = [] ↔ ∀ (l_1 : List α), l_1 ∈ l :: L → l_1 = []", " (L₁ ++ L₂).join = L₁.join ++ L₂.join", " ([] ++ L₂).join = [].join ++ L₂.join", " (head✝ :: tail✝ ++ L₂).join = (head✝ :: tail✝).join ++ L₂.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
import Mathlib.Algebra.Ring.Int import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Size #align_import data.int.bitwise from "leanprover-community/mathlib"@"0743cc5d9d86bcd1bba10f480e948a257d65056f" #align_import init.data.int.bitwise from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" ...
Mathlib/Data/Int/Bitwise.lean
153
155
theorem bodd_negOfNat (n : ℕ) : bodd (negOfNat n) = n.bodd := by
cases n <;> simp (config := {decide := true}) rfl
[ " (subNatNat m n).bodd = xor m.bodd n.bodd", " ∀ (i n : ℕ), (↑i).bodd = xor (n + i).bodd n.bodd", " ∀ (i m : ℕ), -[i+1].bodd = xor m.bodd (m + i + 1).bodd", " (↑i).bodd = xor (j + i).bodd j.bodd", " -[i+1].bodd = xor j.bodd (j + i + 1).bodd", " i.bodd = xor (xor j.bodd i.bodd) j.bodd", " (!i.bodd) = xor...
[ " (subNatNat m n).bodd = xor m.bodd n.bodd", " ∀ (i n : ℕ), (↑i).bodd = xor (n + i).bodd n.bodd", " ∀ (i m : ℕ), -[i+1].bodd = xor m.bodd (m + i + 1).bodd", " (↑i).bodd = xor (j + i).bodd j.bodd", " -[i+1].bodd = xor j.bodd (j + i + 1).bodd", " i.bodd = xor (xor j.bodd i.bodd) j.bodd", " (!i.bodd) = xor...
import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.LinearAlgebra.Matrix.Trace import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import combinatorics.simple_graph.adj_matrix from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1...
Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean
74
75
theorem apply_ne_zero_iff [MulZeroOneClass α] [Nontrivial α] (h : IsAdjMatrix A) (i j : V) : ¬A i j = 0 ↔ A i j = 1 := by
rw [← apply_ne_one_iff h, Classical.not_not]
[ " ¬A i i = 1", " ¬A i j = 1 ↔ A i j = 0", " ¬A i j = 0 ↔ A i j = 1" ]
[ " ¬A i i = 1", " ¬A i j = 1 ↔ A i j = 0" ]
import Mathlib.Topology.MetricSpace.PiNat #align_import topology.metric_space.cantor_scheme from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993" namespace CantorScheme open List Function Filter Set PiNat open scoped Classical open Topology variable {β α : Type*} (A : List β → Set α) ...
Mathlib/Topology/MetricSpace/CantorScheme.lean
83
86
theorem map_mem (x : (inducedMap A).1) (n : ℕ) : (inducedMap A).2 x ∈ A (res x n) := by
have := x.property.some_mem rw [mem_iInter] at this exact this n
[ " (inducedMap A).snd x ∈ A (res (↑x) n)" ]
[]
import Mathlib.MeasureTheory.Function.L1Space import Mathlib.Analysis.NormedSpace.IndicatorFunction #align_import measure_theory.integral.integrable_on from "leanprover-community/mathlib"@"8b8ba04e2f326f3f7cf24ad129beda58531ada61" noncomputable section open Set Filter TopologicalSpace MeasureTheory Function ope...
Mathlib/MeasureTheory/Integral/IntegrableOn.lean
103
104
theorem integrableOn_univ : IntegrableOn f univ μ ↔ Integrable f μ := by
rw [IntegrableOn, Measure.restrict_univ]
[ " AEStronglyMeasurable f (μ.restrict ∅)", " AEStronglyMeasurable f (μ.restrict univ)", " (μ.restrict s) univ < ⊤", " IntegrableOn f ∅ μ", " IntegrableOn f univ μ ↔ Integrable f μ" ]
[ " AEStronglyMeasurable f (μ.restrict ∅)", " AEStronglyMeasurable f (μ.restrict univ)", " (μ.restrict s) univ < ⊤", " IntegrableOn f ∅ μ" ]
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
62
66
theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by
cases' l with app inv simp only [ofList, toList, mk.injEq] funext x rw [(inv 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...
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝" ]
import Mathlib.Data.Set.Equitable import Mathlib.Logic.Equiv.Fin import Mathlib.Order.Partition.Finpartition #align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" open Finset Fintype namespace Finpartition variable {α : Type*} [DecidableEq α] ...
Mathlib/Order/Partition/Equipartition.lean
89
100
theorem IsEquipartition.card_large_parts_eq_mod (hP : P.IsEquipartition) : (P.parts.filter fun p ↦ p.card = s.card / P.parts.card + 1).card = s.card % P.parts.card := by
have z := P.sum_card_parts rw [← sum_filter_add_sum_filter_not (s := P.parts) (p := fun x ↦ x.card = s.card / P.parts.card + 1), hP.filter_ne_average_add_one_eq_average, sum_const_nat (m := s.card / P.parts.card + 1) (by simp), sum_const_nat (m := s.card / P.parts.card) (by simp), ← hP.filter...
[ " P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1", " t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1", " ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)", " False", " s.card / P.parts.card ≤ t.card", " (∑ i ...
[ " P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1", " t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1", " ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)", " False", " s.card / P.parts.card ≤ t.card", " (∑ i ...
import Mathlib.Data.Set.Image import Mathlib.Data.Set.Lattice #align_import data.set.sigma from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f" namespace Set variable {ι ι' : Type*} {α β : ι → Type*} {s s₁ s₂ : Set ι} {t t₁ t₂ : ∀ i, Set (α i)} {u : Set (Σ i, α i)} {x : Σ i, α i} {i j ...
Mathlib/Data/Set/Sigma.lean
23
28
theorem range_sigmaMk (i : ι) : range (Sigma.mk i : α i → Sigma α) = Sigma.fst ⁻¹' {i} := by
apply Subset.antisymm · rintro _ ⟨b, rfl⟩ simp · rintro ⟨x, y⟩ (rfl | _) exact mem_range_self y
[ " range (Sigma.mk i) = Sigma.fst ⁻¹' {i}", " range (Sigma.mk i) ⊆ Sigma.fst ⁻¹' {i}", " ⟨i, b⟩ ∈ Sigma.fst ⁻¹' {i}", " Sigma.fst ⁻¹' {i} ⊆ range (Sigma.mk i)", " ⟨x, y⟩ ∈ range (Sigma.mk ⟨x, y⟩.fst)" ]
[]
import Mathlib.Analysis.Calculus.LineDeriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Measurable open MeasureTheory variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E] {F : Type*} [Norm...
Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean
92
99
theorem stronglyMeasurable_lineDeriv_uncurry (hf : Continuous f) : StronglyMeasurable (fun (p : E × E) ↦ lineDeriv 𝕜 f p.1 p.2) := by
borelize 𝕜 let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2) have : Continuous g.uncurry := hf.comp <| (continuous_fst.comp continuous_fst).add <| continuous_snd.smul (continuous_snd.comp continuous_fst) exact (stronglyMeasurable_deriv_with_param this).comp_measurable measurable_prod_mk_right
[ " MeasurableSet {x | LineDifferentiableAt 𝕜 f x v}", " Continuous (Function.uncurry g)", " Continuous fun x => x.1 + x.2 • v", " Measurable fun x => lineDeriv 𝕜 f x v", " StronglyMeasurable fun x => lineDeriv 𝕜 f x v", " MeasurableSet {p | LineDifferentiableAt 𝕜 f p.1 p.2}", " Measurable fun p => li...
[ " MeasurableSet {x | LineDifferentiableAt 𝕜 f x v}", " Continuous (Function.uncurry g)", " Continuous fun x => x.1 + x.2 • v", " Measurable fun x => lineDeriv 𝕜 f x v", " StronglyMeasurable fun x => lineDeriv 𝕜 f x v", " MeasurableSet {p | LineDifferentiableAt 𝕜 f p.1 p.2}", " Measurable fun p => li...
import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.pow.complex from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open scoped Classical open Real Topology Filter ComplexConjugate Finset Set namespace Complex noncomputable def cpow (x y : ℂ) ...
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
107
108
theorem cpow_sub {x : ℂ} (y z : ℂ) (hx : x ≠ 0) : x ^ (y - z) = x ^ y / x ^ z := by
rw [sub_eq_add_neg, cpow_add _ _ hx, cpow_neg, div_eq_mul_inv]
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
[ " x ^ 0 = 1", " x ^ y = 0 ↔ x = 0 ∧ y ≠ 0", " (if x = 0 then if y = 0 then 1 else 0 else cexp (x.log * y)) = 0 ↔ x = 0 ∧ y ≠ 0", " 1 = 0 ↔ x = 0 ∧ y ≠ 0", " 0 = 0 ↔ x = 0 ∧ y ≠ 0", " cexp (x.log * y) = 0 ↔ x = 0 ∧ y ≠ 0", " 0 ^ x = 0", " 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1", " 0 ^ x = a → x ≠ ...
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityT...
Mathlib/Probability/CondCount.lean
65
67
theorem finite_of_condCount_ne_zero {s t : Set Ω} (h : condCount s t ≠ 0) : s.Finite := by
by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h
[ " condCount ∅ = 0", " (condCount s) ∅ = 0", " s.Finite", " False" ]
[ " condCount ∅ = 0", " (condCount s) ∅ = 0" ]
import Mathlib.CategoryTheory.Generator import Mathlib.CategoryTheory.Preadditive.Yoneda.Basic #align_import category_theory.preadditive.generator from "leanprover-community/mathlib"@"09f981f72d43749f1fa072deade828d9c1e185bb" universe v u open CategoryTheory Opposite namespace CategoryTheory variable {C : Type...
Mathlib/CategoryTheory/Preadditive/Generator.lean
62
66
theorem isSeparator_iff_faithful_preadditiveCoyonedaObj (G : C) : IsSeparator G ↔ (preadditiveCoyonedaObj (op G)).Faithful := by
rw [isSeparator_iff_faithful_preadditiveCoyoneda, preadditiveCoyoneda_obj] exact ⟨fun h => Functor.Faithful.of_comp _ (forget₂ _ AddCommGroupCat.{v}), fun h => Functor.Faithful.comp _ _⟩
[ " ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = h ≫ 0", " ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ (f - g) = 0", " ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), f ≫ h = 0 ≫ h", " ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), (f - g) ≫ h = 0", " ∀ (h : G ⟶ X), h ≫ f = h ≫ 0", " ∀ (h : G ⟶ X), h ≫ (f - g) = 0", " ∀ (h : Y ⟶ G), f ≫ h = 0 ≫ h", " ∀ (h : Y ⟶ G), (f - g) ...
[ " ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = h ≫ 0", " ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ (f - g) = 0", " ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), f ≫ h = 0 ≫ h", " ∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), (f - g) ≫ h = 0", " ∀ (h : G ⟶ X), h ≫ f = h ≫ 0", " ∀ (h : G ⟶ X), h ≫ (f - g) = 0", " ∀ (h : Y ⟶ G), f ≫ h = 0 ≫ h", " ∀ (h : Y ⟶ G), (f - g) ...
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce" open Set Filter MeasureTheory MeasurableSpace open scoped Classical Topology NNReal ENNReal MeasureTheory univers...
Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
84
88
theorem isPiSystem_Ioo_rat : IsPiSystem (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) (b : ℝ)}) := by
convert isPiSystem_Ioo ((↑) : ℚ → ℝ) ((↑) : ℚ → ℝ) ext x simp [eq_comm]
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
[ " borel ℝ = generateFrom (⋃ a, {Iio ↑a})", " generateFrom (range Iio) = generateFrom (⋃ a, {Iio ↑a})", " ∀ t ∈ range Iio, MeasurableSet t", " MeasurableSet (Iio a)", " IsLUB (range Rat.cast ∩ Iio a) a", " MeasurableSet (⋃ y ∈ Rat.cast ⁻¹' Iio a, Iio ↑y)", " Iio ↑b ∈ ⋃ a, {Iio ↑a}", " borel ℝ = generat...
import Mathlib.Data.Real.Pi.Bounds import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody -- TODO. Rewrite some of the FLT results on the disciminant using the definitions and results of -- this file namespace NumberField open FiniteDimensional NumberField NumberField.InfinitePlace Matrix open sco...
Mathlib/NumberTheory/NumberField/Discriminant.lean
105
151
theorem exists_ne_zero_mem_ideal_of_norm_le_mul_sqrt_discr (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ) : ∃ a ∈ (I : FractionalIdeal (𝓞 K)⁰ K), a ≠ 0 ∧ |Algebra.norm ℚ (a:K)| ≤ FractionalIdeal.absNorm I.1 * (4 / π) ^ NrComplexPlaces K * (finrank ℚ K).factorial / (finrank ℚ K) ^ (finrank ℚ K) * Real.sqrt |discr...
-- The smallest possible value for `exists_ne_zero_mem_ideal_of_norm_le` let B := (minkowskiBound K I * (convexBodySumFactor K)⁻¹).toReal ^ (1 / (finrank ℚ K : ℝ)) have h_le : (minkowskiBound K I) ≤ volume (convexBodySum K B) := by refine le_of_eq ?_ rw [convexBodySum_volume, ← ENNReal.ofReal_pow (by pos...
[ " discr K ≠ 0", " Algebra.discr ℚ ⇑(integralBasis K) ≠ ↑0", " Algebra.discr ℤ ⇑b = discr K", " discr K = discr L", " Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = ↑(Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))", " Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = (algebraMap ℤ ℚ) (Algebra.discr ℤ ⇑((RingOf...
[ " discr K ≠ 0", " Algebra.discr ℚ ⇑(integralBasis K) ≠ ↑0", " Algebra.discr ℤ ⇑b = discr K", " discr K = discr L", " Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = ↑(Algebra.discr ℤ ⇑((RingOfIntegers.basis K).map f₀))", " Algebra.discr ℚ (⇑f ∘ ⇑(integralBasis K)) = (algebraMap ℤ ℚ) (Algebra.discr ℤ ⇑((RingOf...
import Mathlib.Data.Finset.Card #align_import data.finset.prod from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" assert_not_exists MonoidWithZero open Multiset variable {α β γ : Type*} namespace Finset section Prod variable {s s' : Finset α} {t t' : Finset β} {a : α} {b : β} ...
Mathlib/Data/Finset/Prod.lean
81
83
theorem product_image_snd [DecidableEq β] (ht : s.Nonempty) : (s ×ˢ t).image Prod.snd = t := by
ext i simp [mem_image, ht.exists_mem]
[ " i ∈ image Prod.fst (s ×ˢ t) → i ∈ s", " i ∈ image Prod.snd (s ×ˢ t) → i ∈ t", " image Prod.fst (s ×ˢ t) = s", " i ∈ image Prod.fst (s ×ˢ t) ↔ i ∈ s", " image Prod.snd (s ×ˢ t) = t", " i ∈ image Prod.snd (s ×ˢ t) ↔ i ∈ t" ]
[ " i ∈ image Prod.fst (s ×ˢ t) → i ∈ s", " i ∈ image Prod.snd (s ×ˢ t) → i ∈ t", " image Prod.fst (s ×ˢ t) = s", " i ∈ image Prod.fst (s ×ˢ t) ↔ i ∈ s" ]
import Mathlib.RingTheory.DedekindDomain.Ideal #align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87" noncomputable section open scoped Classical nonZeroDivisors open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind...
Mathlib/RingTheory/DedekindDomain/Factorization.lean
112
117
theorem finite_mulSupport_coe {I : Ideal R} (hI : I ≠ 0) : (mulSupport fun v : HeightOneSpectrum R => (v.asIdeal : FractionalIdeal R⁰ K) ^ ((Associates.mk v.asIdeal).count (Associates.mk I).factors : ℤ)).Finite := by
rw [mulSupport] simp_rw [Ne, zpow_natCast, ← FractionalIdeal.coeIdeal_pow, FractionalIdeal.coeIdeal_eq_one] exact finite_mulSupport hI
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w", " ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0", " {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0...
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w", " ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0", " {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0...
import Mathlib.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
86
88
theorem count_add' (a b : ℕ) : count p (a + b) = count (fun k ↦ p (k + b)) a + count p b := by
rw [add_comm, count_add, add_comm] simp_rw [add_comm b]
[ " 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.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
108
109
theorem volume_ball (a r : ℝ) : volume (Metric.ball a r) = ofReal (2 * r) := by
rw [ball_eq_Ioo, volume_Ioo, ← sub_add, add_sub_cancel_left, two_mul]
[ " 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.NumberTheory.LegendreSymbol.QuadraticChar.Basic #align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Nat section Euler section Legendre open ZMod variable (p : ℕ) [Fact p.Prime] def legendreSym (a : ℤ) : ℤ := ...
Mathlib/NumberTheory/LegendreSymbol/Basic.lean
179
182
theorem sq_one' {a : ℤ} (ha : (a : ZMod p) ≠ 0) : legendreSym p (a ^ 2) = 1 := by
dsimp only [legendreSym] rw [Int.cast_pow] exact quadraticChar_sq_one' ha
[ " ↑(legendreSym p a) = ↑a ^ (p / 2)", " ↑0 = 0", " ↑(legendreSym 2 a) = ↑a ^ (2 / 2)", " ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → 1 = ↑a ^ 1", " ¬b = 0 → 1 = b ^ 1", " ¬⟨0, ⋯⟩ = 0 → 1 = ⟨0, ⋯⟩ ^ 1", " ¬⟨1, ⋯⟩ = 0 → 1 = ⟨1, ⋯⟩ ^ 1", " p = Fintype.card (ZMod p)", " legendreS...
[ " ↑(legendreSym p a) = ↑a ^ (p / 2)", " ↑0 = 0", " ↑(legendreSym 2 a) = ↑a ^ (2 / 2)", " ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)", " ¬↑a = 0 → 1 = ↑a ^ 1", " ¬b = 0 → 1 = b ^ 1", " ¬⟨0, ⋯⟩ = 0 → 1 = ⟨0, ⋯⟩ ^ 1", " ¬⟨1, ⋯⟩ = 0 → 1 = ⟨1, ⋯⟩ ^ 1", " p = Fintype.card (ZMod p)", " legendreS...
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
138
149
theorem map {f : A →ₐ[R] A'} (hf_inj : Set.InjOn f (adjoin R (range x))) : AlgebraicIndependent R (f ∘ x) := by
have : aeval (f ∘ x) = f.comp (aeval x) := by ext; simp have h : ∀ p : MvPolynomial ι R, aeval x p ∈ (@aeval R _ _ _ _ _ ((↑) : range x → A)).range := by intro p rw [AlgHom.mem_range] refine ⟨MvPolynomial.rename (codRestrict x (range x) mem_range_self) p, ?_⟩ simp [Function.comp, aeval_rename] in...
[ " 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 ι))", " Injective ⇑(...
[ " 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 ι))", " Injective ⇑(...
import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Data.Finsupp.Fin import Mathlib.Data.Finsupp.Indicator #align_import algebra.bi...
Mathlib/Algebra/BigOperators/Finsupp.lean
69
75
theorem prod_single_index {a : α} {b : M} {h : α → M → N} (h_zero : h a 0 = 1) : (single a b).prod h = h a b := calc (single a b).prod h = ∏ x ∈ {a}, h x (single a b x) := prod_of_support_subset _ support_single_subset h fun x hx => (mem_singleton.1 hx).symm ▸ h_zero _ = h a b := by
simp
[ " f.prod g = ∏ x ∈ s, g x (f x)", " f x = 0", " ∏ x ∈ {a}, h x ((single a b) x) = h a b" ]
[ " f.prod g = ∏ x ∈ s, g x (f x)", " f x = 0" ]
import Mathlib.Dynamics.Ergodic.AddCircle import Mathlib.MeasureTheory.Covering.LiminfLimsup #align_import number_theory.well_approximable from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Set Filter Function Metric MeasureTheory open scoped MeasureTheory Topology Pointwise @[...
Mathlib/NumberTheory/WellApproximable.lean
121
129
theorem image_pow_subset (n : ℕ) (hm : 0 < m) : (fun (y : A) => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (m * δ) := by
rintro - ⟨a, ha, rfl⟩ obtain ⟨b, hb : orderOf b = n * m, hab : a ∈ ball b δ⟩ := mem_approxOrderOf_iff.mp ha replace hb : b ^ m ∈ {y : A | orderOf y = n} := by rw [mem_setOf_eq, orderOf_pow' b hm.ne', hb, Nat.gcd_mul_left_left, n.mul_div_cancel hm] apply ball_subset_thickening hb (m * δ) convert pow_mem_b...
[ " a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ ball b δ", " (fun y => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (↑m * δ)", " (fun y => y ^ m) a ∈ approxOrderOf A n (↑m * δ)", " b ^ m ∈ {u | orderOf u = n}", " b ^ m ∈ {u | orderOf u = orderOf b}", " (fun y => y ^ m) a ∈ ball (b ^ m) (↑m • δ)"...
[ " a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ ball b δ", " (fun y => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (↑m * δ)", " (fun y => y ^ m) a ∈ approxOrderOf A n (↑m * δ)", " b ^ m ∈ {u | orderOf u = n}", " b ^ m ∈ {u | orderOf u = orderOf b}", " (fun y => y ^ m) a ∈ ball (b ^ m) (↑m • δ)"...
import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity #align_import number_theory.legendre_symbol.jacobi_symbol from "leanprover-community/mathlib"@"74a27133cf29446a0983779e37c8f829a85368f3" section Jacobi open Nat ZMod -- Since we need the fact that the factors are prime, we use `List.pmap`. def ...
Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
159
163
theorem mul_left (a₁ a₂ : ℤ) (b : ℕ) : J(a₁ * a₂ | b) = J(a₁ | b) * J(a₂ | b) := by
simp_rw [jacobiSym, List.pmap_eq_map_attach, legendreSym.mul _ _ _]; exact List.prod_map_mul (α := ℤ) (l := (factors b).attach) (f := fun x ↦ @legendreSym x {out := prime_of_mem_factors x.2} a₁) (g := fun x ↦ @legendreSym x {out := prime_of_mem_factors x.2} a₂)
[ " J(a | 0) = 1", " J(a | 1) = 1", " legendreSym p a = J(a | p)", " J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂)", " ∀ a ∈ b₁.factors ++ b₂.factors, a.Prime", " (List.pmap (fun p pp => legendreSym p a) b₁.factors ⋯).prod *\n (List.pmap (fun p pp => legendreSym p a) b₂.factors ⋯).prod =\n J(a | b₁) * J(a ...
[ " J(a | 0) = 1", " J(a | 1) = 1", " legendreSym p a = J(a | p)", " J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂)", " ∀ a ∈ b₁.factors ++ b₂.factors, a.Prime", " (List.pmap (fun p pp => legendreSym p a) b₁.factors ⋯).prod *\n (List.pmap (fun p pp => legendreSym p a) b₂.factors ⋯).prod =\n J(a | b₁) * J(a ...
import Mathlib.Algebra.Algebra.Subalgebra.Unitization import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.StarSubalgebra import Mathlib.Topology.ContinuousFunction.ContinuousMapZero import Mathlib.Topology.ContinuousFunction.Weierstrass #align_import topology.continuous_function.stone_weierstrass fro...
Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean
355
377
theorem Subalgebra.SeparatesPoints.rclike_to_real {A : StarSubalgebra 𝕜 C(X, 𝕜)} (hA : A.SeparatesPoints) : ((A.restrictScalars ℝ).comap (ofRealAm.compLeftContinuous ℝ continuous_ofReal)).SeparatesPoints := by
intro x₁ x₂ hx -- Let `f` in the subalgebra `A` separate the points `x₁`, `x₂` obtain ⟨_, ⟨f, hfA, rfl⟩, hf⟩ := hA hx let F : C(X, 𝕜) := f - const _ (f x₂) -- Subtract the constant `f x₂` from `f`; this is still an element of the subalgebra have hFA : F ∈ A := by refine A.sub_mem hfA (@Eq.subst _ (· ∈...
[ " (comap (AlgHom.compLeftContinuous ℝ ofRealAm ⋯) (restrictScalars ℝ A.toSubalgebra)).SeparatesPoints", " ∃ f ∈ (fun f => ⇑f) '' ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm ⋯) (restrictScalars ℝ A.toSubalgebra)),\n f x₁ ≠ f x₂", " F ∈ A", " f x₂ • 1 = const X (f x₂)", " (f x₂ • 1) a✝ = (const X (f x₂))...
[]
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
138
141
theorem degrees_mul (p q : MvPolynomial σ R) : (p * q).degrees ≤ p.degrees + q.degrees := by
classical simp_rw [degrees_def] exact supDegree_mul_le (map_add _)
[ " p.degrees = p.support.sup fun s => toMultiset s", " (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s", " ((monomial s) a).degrees ≤ toMultiset s", " (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s", " toMultiset s ≤ toMultiset s", " ((monomial s) a).degrees = toMultiset s",...
[ " p.degrees = p.support.sup fun s => toMultiset s", " (p.support.sup fun s => toMultiset s) = p.support.sup fun s => toMultiset s", " ((monomial s) a).degrees ≤ toMultiset s", " (if a = 0 then ⊥ else toMultiset s) ≤ toMultiset s", " toMultiset s ≤ toMultiset s", " ((monomial s) a).degrees = toMultiset s",...
import Mathlib.Topology.Instances.Real import Mathlib.Order.Filter.Archimedean #align_import analysis.subadditive from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Set Filter Topology def Subadditive (u : ℕ → ℝ) : Prop := ∀ m n, u (m + n) ≤ u m + u n #al...
Mathlib/Analysis/Subadditive.lean
51
59
theorem apply_mul_add_le (k n r) : u (k * n + r) ≤ k * u n + u r := by
induction k with | zero => simp only [Nat.zero_eq, Nat.cast_zero, zero_mul, zero_add]; rfl | succ k IH => calc u ((k + 1) * n + r) = u (n + (k * n + r)) := by congr 1; ring _ ≤ u n + u (k * n + r) := h _ _ _ ≤ u n + (k * u n + u r) := add_le_add_left IH _ _ = (k + 1 : ℕ) * u n + u r :...
[ " h.lim ≤ u n / ↑n", " sInf ((fun n => u n / ↑n) '' Ici 1) ≤ u n / ↑n", " u (k * n + r) ≤ ↑k * u n + u r", " u (0 * n + r) ≤ ↑0 * u n + u r", " u r ≤ u r", " u ((k + 1) * n + r) ≤ ↑(k + 1) * u n + u r", " u ((k + 1) * n + r) = u (n + (k * n + r))", " (k + 1) * n + r = n + (k * n + r)", " u n + (↑k *...
[ " h.lim ≤ u n / ↑n", " sInf ((fun n => u n / ↑n) '' Ici 1) ≤ u n / ↑n" ]
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.Probability.Kernel.Disintegration.CdfToKernel #align_import probability.kernel.cond_cdf from "leanprover-community/mathlib"@"3b88f4005dc2e28d42f974cc1ce838f0dafb39b8" open MeasureTheory Set Filter TopologicalSpace open scoped NNReal ENNReal Me...
Mathlib/Probability/Kernel/Disintegration/CondCdf.lean
92
99
theorem tendsto_IicSnd_atTop {s : Set α} (hs : MeasurableSet s) : Tendsto (fun r : ℚ ↦ ρ.IicSnd r s) atTop (𝓝 (ρ.fst s)) := by
simp_rw [ρ.IicSnd_apply _ hs, fst_apply hs, ← prod_univ] rw [← Real.iUnion_Iic_rat, prod_iUnion] refine tendsto_measure_iUnion fun r q hr_le_q x ↦ ?_ simp only [mem_prod, mem_Iic, and_imp] refine fun hxs hxr ↦ ⟨hxs, hxr.trans ?_⟩ exact mod_cast hr_le_q
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s", " Tendsto (f...
[ " (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)", " ρ.IicSnd r ≤ ρ.IicSnd r'", " (ρ.IicSnd r) s ≤ (ρ.IicSnd r') s", " ρ (s ×ˢ Iic r) ≤ ρ (s ×ˢ Iic r')", " r ≤ r'", " ρ.IicSnd r ≤ ρ.fst", " (ρ.IicSnd r) s ≤ ρ.fst s", " ρ (s ×ˢ Iic r) ≤ ρ (Prod.fst ⁻¹' s)", " ⨅ r, (ρ.IicSnd ↑↑r) s = (ρ.IicSnd ↑t) s" ]
import Mathlib.Algebra.Ring.InjSurj import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.Ring.Hom.Defs #align_import algebra.ring.units from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c" universe u v w x variable {α : Type u} {β : Type v} {γ : Type w} {R : Type x} open Funct...
Mathlib/Algebra/Ring/Units.lean
61
62
theorem divp_add_divp_same (a b : α) (u : αˣ) : a /ₚ u + b /ₚ u = (a + b) /ₚ u := by
simp only [divp, add_mul]
[ " a /ₚ u + b /ₚ u = (a + b) /ₚ u" ]
[]
import Mathlib.Data.DFinsupp.Interval import Mathlib.Data.DFinsupp.Multiset import Mathlib.Order.Interval.Finset.Nat #align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset DFinsupp Function open Pointwise variable {α : Type*} namespace Mu...
Mathlib/Data/Multiset/Interval.lean
67
69
theorem card_Ioc : (Finset.Ioc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1 := by
rw [Finset.card_Ioc_eq_card_Icc_sub_one, card_Icc]
[ " x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t", " Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)...
[ " x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t", " Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)...
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal va...
Mathlib/MeasureTheory/Decomposition/Jordan.lean
148
150
theorem real_smul_posPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).posPart = r.toNNReal • j.posPart := by
rw [real_smul_def, ← smul_posPart, if_pos hr]
[ " ↑r • j = r • j", " (r • j).posPart = r.toNNReal • j.posPart" ]
[ " ↑r • j = r • j" ]
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.Block #align_import analysis.inner_product_space.gram_schmidt_ortho from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0" open Finset Submodule FiniteDimensional variable (𝕜 : Type*) {E : Type*} [RCLike �...
Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
63
65
theorem gramSchmidt_def' (f : ι → E) (n : ι) : f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, orthogonalProjection (𝕜 ∙ gramSchmidt 𝕜 f i) (f n) := by
rw [gramSchmidt_def, sub_add_cancel]
[ " (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n", " gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))", " f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))" ]
[ " (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n", " gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, ↑((orthogonalProjection (span 𝕜 {gramSchmidt 𝕜 f i})) (f n))" ]
import Mathlib.ModelTheory.ElementarySubstructures #align_import model_theory.skolem from "leanprover-community/mathlib"@"3d7987cda72abc473c7cdbbb075170e9ac620042" universe u v w w' namespace FirstOrder namespace Language open Structure Cardinal open Cardinal variable (L : Language.{u, v}) {M : Type w} [None...
Mathlib/ModelTheory/Skolem.lean
65
73
theorem card_functions_sum_skolem₁_le : #(Σ n, (L.sum L.skolem₁).Functions n) ≤ max ℵ₀ L.card := by
rw [card_functions_sum_skolem₁] trans #(Σ n, L.BoundedFormula Empty n) · exact ⟨⟨Sigma.map Nat.succ fun _ => id, Nat.succ_injective.sigma_map fun _ => Function.injective_id⟩⟩ · refine _root_.trans BoundedFormula.card_le (lift_le.{max u v}.1 ?_) simp only [mk_empty, lift_zero, lift_uzero, ze...
[ " #((n : ℕ) × (L.sum L.skolem₁).Functions n) = #((n : ℕ) × L.BoundedFormula Empty (n + 1))", " ((sum fun i => lift.{max u v, u} #(L.Functions i)) +\n sum fun i => lift.{u, max u v} #(L.BoundedFormula Empty (i + 1))) =\n sum fun i => #(L.BoundedFormula Empty (i + 1))", "L : Language\nM : Type w\ninst✝¹ :...
[ " #((n : ℕ) × (L.sum L.skolem₁).Functions n) = #((n : ℕ) × L.BoundedFormula Empty (n + 1))", " ((sum fun i => lift.{max u v, u} #(L.Functions i)) +\n sum fun i => lift.{u, max u v} #(L.BoundedFormula Empty (i + 1))) =\n sum fun i => #(L.BoundedFormula Empty (i + 1))", "L : Language\nM : Type w\ninst✝¹ :...
import Mathlib.RepresentationTheory.Basic import Mathlib.RepresentationTheory.FdRep #align_import representation_theory.invariants from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" suppress_compilation open MonoidAlgebra open Representation namespace Representation namespace linHom...
Mathlib/RepresentationTheory/Invariants.lean
133
139
theorem mem_invariants_iff_comm {X Y : Rep k G} (f : X.V →ₗ[k] Y.V) (g : G) : (linHom X.ρ Y.ρ) g f = f ↔ f.comp (X.ρ g) = (Y.ρ g).comp f := by
dsimp erw [← ρAut_apply_inv] rw [← LinearMap.comp_assoc, ← ModuleCat.comp_def, ← ModuleCat.comp_def, Iso.inv_comp_eq, ρAut_apply_hom] exact comm
[ " ((X.ρ.linHom Y.ρ) g) f = f ↔ f ∘ₗ X.ρ g = Y.ρ g ∘ₗ f", " Y.ρ g ∘ₗ f ∘ₗ X.ρ g⁻¹ = f ↔ f ∘ₗ X.ρ g = Y.ρ g ∘ₗ f", " Y.ρ g ∘ₗ f ∘ₗ ((ρAut X) g).inv = f ↔ f ∘ₗ X.ρ g = Y.ρ g ∘ₗ f", " f ≫ Y.ρ g = X.ρ g ≫ f ↔ f ∘ₗ X.ρ g = f ≫ Y.ρ g" ]
[]
import Mathlib.Algebra.Order.ToIntervalMod import Mathlib.Algebra.Ring.AddAut import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.Divisible import Mathlib.Topology.Connected.PathConnected import Mathlib.Topology.IsLocalHomeomorph #align_import topology.instances.add_circle from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/AddCircle.lean
222
228
theorem liftIco_coe_apply {f : 𝕜 → B} {x : 𝕜} (hx : x ∈ Ico a (a + p)) : liftIco p a f ↑x = f x := by
have : (equivIco p a) x = ⟨x, hx⟩ := by rw [Equiv.apply_eq_iff_eq_symm_apply] rfl rw [liftIco, comp_apply, this] rfl
[ " ↑x = 0 ↔ ∃ n, n • p = x", " (∃ n, n • p = x) ↔ ∃ n, n • p = x", " (∃ n, n • p = x) → ∃ n, n • p = x", " ∃ n_1, n_1 • p = n • p", " 0 < n", " n • p ≤ 0", " n.toNat • p = n • p", " ↑n • p = n • p", " ↑(x + p) = ↑x", " ↑x = ↑y ↔ x = y", " x = y → ↑x = ↑y", " x = y", " ⟨x, hx⟩ = ⟨y, hy⟩", " ...
[ " ↑x = 0 ↔ ∃ n, n • p = x", " (∃ n, n • p = x) ↔ ∃ n, n • p = x", " (∃ n, n • p = x) → ∃ n, n • p = x", " ∃ n_1, n_1 • p = n • p", " 0 < n", " n • p ≤ 0", " n.toNat • p = n • p", " ↑n • p = n • p", " ↑(x + p) = ↑x", " ↑x = ↑y ↔ x = y", " x = y → ↑x = ↑y", " x = y", " ⟨x, hx⟩ = ⟨y, hy⟩", " ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
114
117
theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y • f) (c' • f) x := by
have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this
[ " HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x", " HasDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x", " HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) univ x", " HasStrictDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x", " HasStrictDerivAt (fun y => c y • f) (c' •...
[ " HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x", " HasDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x", " HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) univ x", " HasStrictDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x" ]
import Mathlib.LinearAlgebra.Matrix.BilinearForm import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Vandermonde import Mathlib.LinearAlgebra.Trace import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosu...
Mathlib/RingTheory/Trace.lean
134
146
theorem trace_trace_of_basis [Algebra S T] [IsScalarTower R S T] {ι κ : Type*} [Finite ι] [Finite κ] (b : Basis ι R S) (c : Basis κ S T) (x : T) : trace R S (trace S T x) = trace R T x := by
haveI := Classical.decEq ι haveI := Classical.decEq κ cases nonempty_fintype ι cases nonempty_fintype κ rw [trace_eq_matrix_trace (b.smul c), trace_eq_matrix_trace b, trace_eq_matrix_trace c, Matrix.trace, Matrix.trace, Matrix.trace, ← Finset.univ_product_univ, Finset.sum_product] refine Finset.sum_con...
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Polynomial.Degree.Lemmas #align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448" noncomputable section open Polynomial open Polynomial Finset namespace Polynomial variable {R : Type*}...
Mathlib/Algebra/Polynomial/EraseLead.lean
127
130
theorem card_support_eraseLead : f.eraseLead.support.card = f.support.card - 1 := by
by_cases hf : f = 0 · rw [hf, eraseLead_zero, support_zero, card_empty] · rw [← card_support_eraseLead_add_one hf, add_tsub_cancel_right]
[ " f.eraseLead.support = f.support.erase f.natDegree", " f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i", " f.eraseLead.coeff f.natDegree = 0", " f.eraseLead.coeff i = f.coeff i", " eraseLead 0 = 0", " f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f", " f - C f.leadingCoeff * X ^ f.n...
[ " f.eraseLead.support = f.support.erase f.natDegree", " f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i", " f.eraseLead.coeff f.natDegree = 0", " f.eraseLead.coeff i = f.coeff i", " eraseLead 0 = 0", " f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f", " f - C f.leadingCoeff * X ^ f.n...
import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Monomial import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Nat.WithBot import Mathlib.Data.Nat.Cast.WithTop import Mathlib.Data.Nat.SuccPred #align_import data.polynomial.degree.definitions...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
150
154
theorem degree_eq_iff_natDegree_eq_of_pos {p : R[X]} {n : ℕ} (hn : 0 < n) : p.degree = n ↔ p.natDegree = n := by
obtain rfl|h := eq_or_ne p 0 · simp [hn.ne] · exact degree_eq_iff_natDegree_eq h
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = ⊥", " p.natDegree = 0", " p.degree = ↑p.natDegree", " Option.some n = ↑(WithBot.unbot' 0 (Option.some n))", " AddMonoidAlgebra.supDegree id p.toFinsupp = p.natDegree", " AddMonoidAlgebra.supDegree id (toFinsupp 0) = natDegree 0", ...
[ " Decidable p.Monic", " Decidable (p.leadingCoeff = 1)", " p.degree = ⊥", " p.natDegree = 0", " p.degree = ↑p.natDegree", " Option.some n = ↑(WithBot.unbot' 0 (Option.some n))", " AddMonoidAlgebra.supDegree id p.toFinsupp = p.natDegree", " AddMonoidAlgebra.supDegree id (toFinsupp 0) = natDegree 0", ...
import Mathlib.Data.List.Chain import Mathlib.Data.List.Enum import Mathlib.Data.List.Nodup import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Zip #align_import data.list.range from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" set_option autoImplicit true universe u open Nat...
Mathlib/Data/List/Range.lean
125
126
theorem pairwise_gt_iota (n : ℕ) : Pairwise (· > ·) (iota n) := by
simpa only [iota_eq_reverse_range', pairwise_reverse] using pairwise_lt_range' 1 n
[ " (range' n m).nthLe i H = n + i", " Pairwise (fun x x_1 => x < x_1) (range n)", " take m (range n) = range (min m n)", " (take m (range n)).length = (range (min m n)).length", " ∀ (n_1 : ℕ) (h₁ : n_1 < (take m (range n)).length) (h₂ : n_1 < (range (min m n)).length),\n (take m (range n)).get ⟨n_1, h₁⟩ =...
[ " (range' n m).nthLe i H = n + i", " Pairwise (fun x x_1 => x < x_1) (range n)", " take m (range n) = range (min m n)", " (take m (range n)).length = (range (min m n)).length", " ∀ (n_1 : ℕ) (h₁ : n_1 < (take m (range n)).length) (h₂ : n_1 < (range (min m n)).length),\n (take m (range n)).get ⟨n_1, h₁⟩ =...
import Mathlib.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
91
92
theorem map_map₂ (f : α → β → γ) (g : γ → δ) : (map₂ f a b).map g = map₂ (fun a b => g (f a b)) a b := by
cases a <;> cases b <;> 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", " map₂ f a (some b) = Option.map (fun a => f a b) a", ...
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
167
168
theorem fourier_add {m n : ℤ} {x : AddCircle T} : fourier (m+n) x = fourier m x * fourier n x := by
simp_rw [fourier_apply, add_zsmul, toCircle_add, coe_mul_unitSphere]
[ " (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.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall #align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88" noncomputable section open RCLike Real ...
Mathlib/Analysis/InnerProductSpace/Calculus.lean
316
319
theorem differentiableAt_euclidean : DifferentiableAt 𝕜 f y ↔ ∀ i, DifferentiableAt 𝕜 (fun x => f x i) y := by
rw [← (EuclideanSpace.equiv ι 𝕜).comp_differentiableAt_iff, differentiableAt_pi] rfl
[ " DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " DifferentiableAt 𝕜 f y ↔ ∀ (i : ι), DifferentiableA...
[ " DifferentiableWithinAt 𝕜 f t y ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y", " (∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => (⇑(EuclideanSpace.equiv ι 𝕜) ∘ f) x i) t y) ↔\n ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => f x i) t y" ]
import Mathlib.Order.Sublattice import Mathlib.Order.Hom.CompleteLattice open Function Set variable (α β : Type*) [CompleteLattice α] [CompleteLattice β] (f : CompleteLatticeHom α β) structure CompleteSublattice extends Sublattice α where sSupClosed' : ∀ ⦃s : Set α⦄, s ⊆ carrier → sSup s ∈ carrier sInfClosed...
Mathlib/Order/CompleteSublattice.lean
84
85
theorem coe_sSup' (S : Set L) : (↑(sSup S) : α) = ⨆ N ∈ S, (N : α) := by
rw [coe_sSup, ← Set.image, sSup_image]
[ " x ⊔ y ∈ carrier", " z ∈ carrier", " x ⊔ y = sSup {x, y}", " x ⊓ y ∈ carrier", " x ⊓ y = sInf {x, y}", " L = M", " { toSublattice := toSublattice✝, sSupClosed' := sSupClosed'✝, sInfClosed' := sInfClosed'✝ } = M", " { toSublattice := toSublattice✝¹, sSupClosed' := sSupClosed'✝¹, sInfClosed' := sInfClo...
[ " x ⊔ y ∈ carrier", " z ∈ carrier", " x ⊔ y = sSup {x, y}", " x ⊓ y ∈ carrier", " x ⊓ y = sInf {x, y}", " L = M", " { toSublattice := toSublattice✝, sSupClosed' := sSupClosed'✝, sInfClosed' := sInfClosed'✝ } = M", " { toSublattice := toSublattice✝¹, sSupClosed' := sSupClosed'✝¹, sInfClosed' := sInfClo...
import Mathlib.Data.List.Basic namespace List variable {α β : Type*} @[simp] theorem reduceOption_cons_of_some (x : α) (l : List (Option α)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some...
Mathlib/Data/List/ReduceOption.lean
55
57
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option α)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
[ " (some x :: l).reduceOption = x :: l.reduceOption", " (none :: l).reduceOption = l.reduceOption", " (map (Option.map f) l).reduceOption = map f l.reduceOption", " (map (Option.map f) []).reduceOption = map f [].reduceOption", " (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption", ...
import Mathlib.Algebra.Field.Basic import Mathlib.Deprecated.Subring #align_import deprecated.subfield from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" variable {F : Type*} [Field F] (S : Set F) structure IsSubfield extends IsSubring S : Prop where inv_mem : ∀ {x : F}, x ∈ S → x⁻...
Mathlib/Deprecated/Subfield.lean
93
99
theorem closure.isSubmonoid : IsSubmonoid (closure S) := { mul_mem := by
rintro _ _ ⟨p, hp, q, hq, hq0, rfl⟩ ⟨r, hr, s, hs, hs0, rfl⟩ exact ⟨p * r, IsSubmonoid.mul_mem Ring.closure.isSubring.toIsSubmonoid hp hr, q * s, IsSubmonoid.mul_mem Ring.closure.isSubring.toIsSubmonoid hq hs, (div_mul_div_comm _ _ _ _).symm⟩ one_mem := ring_closure_subset <| IsSubmonoi...
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s", " IsSubfield (Set.range ⇑f)", " IsSubfield (⇑f '' Set.univ)", " ∀ {a b : F}, a ∈ closure S → b ∈ closure S → a * b ∈ closure S", ...
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s", " f a⁻¹ ∈ s", " (f a)⁻¹ ∈ s", " IsSubfield (Set.range ⇑f)", " IsSubfield (⇑f '' Set.univ)" ]
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
138
148
theorem AdjoinMonic.isIntegral (z : AdjoinMonic k) : IsIntegral k z := by
let ⟨p, hp⟩ := Ideal.Quotient.mk_surjective z rw [← hp] induction p using MvPolynomial.induction_on generalizing z with | h_C => exact isIntegral_algebraMap | h_add _ _ ha hb => exact (ha _ rfl).add (hb _ rfl) | h_X p f ih => refine @IsIntegral.mul k _ _ _ _ _ (Ideal.Quotient.mk (maxIdeal k) _)...
[ " (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", " spanEval k ≠ ⊤", " ¬∃ l ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible ...
[ " (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", " spanEval k ≠ ⊤", " ¬∃ l ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible ...
import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Set open Pointwise variable ...
Mathlib/Algebra/Order/Pointwise.lean
265
275
theorem smul_Ici : r • Ici a = Ici (r • a) := by
ext x simp only [mem_smul_set, smul_eq_mul, mem_Ioi] constructor · rintro ⟨a_w, a_h_left, rfl⟩ exact (mul_le_mul_left hr).mpr a_h_left · rintro h use x / r constructor · exact (le_div_iff' hr).mpr h · exact mul_div_cancel₀ _ (ne_of_gt hr)
[ " r • Ioo a b = Ioo (r • a) (r • b)", " x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
[ " r • Ioo a b = Ioo (r • a) (r • b)", " x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
import Mathlib.Algebra.ContinuedFractions.Computation.Basic import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction open Generali...
Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
263
270
theorem of_s_head_aux (v : K) : (of v).s.get? 0 = (IntFractPair.stream v 1).bind (some ∘ fun p => { a := 1 b := p.b }) := by
rw [of, IntFractPair.seq1] simp only [of, Stream'.Seq.map_tail, Stream'.Seq.map, Stream'.Seq.tail, Stream'.Seq.head, Stream'.Seq.get?, Stream'.map] rw [← Stream'.get_succ, Stream'.get, Option.map] split <;> simp_all only [Option.some_bind, Option.none_bind, Function.comp_apply]
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b", " (of v).s.get? n = some { a := 1, b := ↑ifp_succ_n.b }", ...
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b", " (of v).s.get? n = some { a := 1, b := ↑ifp_succ_n.b }", ...
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Instances.Irrational #align_import number_theory.liouville.liouville_with from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open Filter Metric Real Set open sc...
Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
341
364
theorem frequently_exists_num (hx : Liouville x) (n : ℕ) : ∃ᶠ b : ℕ in atTop, ∃ a : ℤ, x ≠ a / b ∧ |x - a / b| < 1 / (b : ℝ) ^ n := by
refine Classical.not_not.1 fun H => ?_ simp only [Liouville, not_forall, not_exists, not_frequently, not_and, not_lt, eventually_atTop] at H rcases H with ⟨N, hN⟩ have : ∀ b > (1 : ℕ), ∀ᶠ m : ℕ in atTop, ∀ a : ℤ, 1 / (b : ℝ) ^ m ≤ |x - a / b| := by intro b hb replace hb : (1 : ℝ) < b := Nat.one_lt_...
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
[ " LiouvilleWith 1 x", " ∃ᶠ (n : ℕ) in atTop, ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " ∃ m, x ≠ ↑m / ↑n ∧ |x - ↑m / ↑n| < 2 / ↑n ^ 1", " 0 < ↑n", " x < ↑(⌊x * ↑n⌋ + 1) / ↑n", " x * ↑n < ↑⌊x * ↑n⌋ + 1", " |x - ↑(⌊x * ↑n⌋ + 1) / ↑n| < 2 / ↑n ^ 1", " ↑(⌊x * ↑n⌋ + 1) / ↑n < (x * ↑n + 2) / ↑n", "...
import Mathlib.CategoryTheory.Limits.KanExtension import Mathlib.Topology.Category.TopCat.Opens import Mathlib.CategoryTheory.Adjunction.Unique import Mathlib.Topology.Sheaves.Init import Mathlib.Data.Set.Subsingleton #align_import topology.sheaves.presheaf from "leanprover-community/mathlib"@"5dc6092d09e5e4891068652...
Mathlib/Topology/Sheaves/Presheaf.lean
154
158
theorem map_restrict {X : TopCat} {C : Type*} [Category C] [ConcreteCategory C] {F G : X.Presheaf C} (e : F ⟶ G) {U V : Opens X} (h : U ≤ V) (x : F.obj (op V)) : e.app _ (x |_ U) = e.app _ x |_ U := by
delta restrictOpen restrict rw [← comp_apply, NatTrans.naturality, comp_apply]
[]
[]
import Mathlib.FieldTheory.Separable import Mathlib.RingTheory.IntegralDomain import Mathlib.Algebra.CharP.Reduced import Mathlib.Tactic.ApplyFun #align_import field_theory.finite.basic from "leanprover-community/mathlib"@"12a85fac627bea918960da036049d611b1a3ee43" variable {K : Type*} {R : Type*} local notation ...
Mathlib/FieldTheory/Finite/Basic.lean
179
210
theorem sum_subgroup_pow_eq_zero [CommRing K] [NoZeroDivisors K] {G : Subgroup Kˣ} [Fintype G] {k : ℕ} (k_pos : k ≠ 0) (k_lt_card_G : k < Fintype.card G) : ∑ x : G, ((x : Kˣ) : K) ^ k = 0 := by
nontriviality K have := NoZeroDivisors.to_isDomain K rcases (exists_pow_ne_one_of_isCyclic k_pos k_lt_card_G) with ⟨a, ha⟩ rw [Finset.sum_eq_multiset_sum] have h_multiset_map : Finset.univ.val.map (fun x : G => ((x : Kˣ) : K) ^ k) = Finset.univ.val.map (fun x : G => ((x : Kˣ) : K) ^ k * ((a : Kˣ) :...
[ " ∏ x : Kˣ, x = -1", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), a * (fun x x_1 => x⁻¹) a ha = 1", " ∀ (ha : a ∈ univ.erase (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a", " ∀ (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) a ha ∈ univ.erase (-1)", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) ((fun ...
[ " ∏ x : Kˣ, x = -1", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), a * (fun x x_1 => x⁻¹) a ha = 1", " ∀ (ha : a ∈ univ.erase (-1)), a ≠ 1 → (fun x x_1 => x⁻¹) a ha ≠ a", " ∀ (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) a ha ∈ univ.erase (-1)", " ∀ (a : Kˣ) (ha : a ∈ univ.erase (-1)), (fun x x_1 => x⁻¹) ((fun ...
import Mathlib.Algebra.Star.Basic import Mathlib.Data.Set.Finite import Mathlib.Data.Set.Pointwise.Basic #align_import algebra.star.pointwise from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" namespace Set open Pointwise local postfix:max "⋆" => star variable {α : Type*} {s t : Set...
Mathlib/Algebra/Star/Pointwise.lean
62
62
theorem star_mem_star [InvolutiveStar α] : a⋆ ∈ s⋆ ↔ a ∈ s := by
simp only [mem_star, star_star]
[ " a⋆ ∈ s⋆ ↔ a ∈ s" ]
[]
import Mathlib.Order.Disjoint #align_import order.prop_instances from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" instance Prop.instDistribLattice : DistribLattice Prop where sup := Or le_sup_left := @Or.inl le_sup_right := @Or.inr sup_le := fun _ _ _ => Or.rec inf := And ...
Mathlib/Order/PropInstances.lean
106
108
theorem Prop.isCompl_iff {P Q : Prop} : IsCompl P Q ↔ ¬(P ↔ Q) := by
rw [_root_.isCompl_iff, Prop.disjoint_iff, Prop.codisjoint_iff, not_iff] by_cases P <;> by_cases Q <;> simp [*]
[ " p ≤ q ∨ q ≤ p", " LinearOrder Prop", " IsCompl P Q ↔ ¬(P ↔ Q)", " ¬(P ∧ Q) ∧ (P ∨ Q) ↔ (¬P ↔ Q)" ]
[ " p ≤ q ∨ q ≤ p", " LinearOrder Prop" ]
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ι : Sort*} {𝕜 E : Type*} section OrderedSemiring variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] {s t s₁ s₂ t₁ t₂ u : Set ...
Mathlib/Analysis/Convex/Join.lean
85
87
theorem convexJoin_union_right (s t₁ t₂ : Set E) : convexJoin 𝕜 s (t₁ ∪ t₂) = convexJoin 𝕜 s t₁ ∪ convexJoin 𝕜 s t₂ := by
simp_rw [convexJoin_comm s, convexJoin_union_left]
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅", " convexJoin 𝕜 s ∅ = ∅", " convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y", " convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y", " convexJoin 𝕜 {x} {y} = ...
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅", " convexJoin 𝕜 s ∅ = ∅", " convexJoin 𝕜 {x} t = ⋃ y ∈ t, segment 𝕜 x y", " convexJoin 𝕜 s {y} = ⋃ x ∈ s, segment 𝕜 x y", " convexJoin 𝕜 {x} {y} = ...
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ι : Type*} {f : X → Y} {g : Y → Z} section Inducing variable [To...
Mathlib/Topology/Maps.lean
156
157
theorem isClosed_iff' (hf : Inducing f) {s : Set X} : IsClosed s ↔ ∀ x, f x ∈ closure (f '' s) → x ∈ s := by
rw [hf.induced, isClosed_induced_iff']
[ " inst✝² = TopologicalSpace.induced (g ∘ f) inst✝", " Inducing (g ∘ f) ↔ Inducing f", " Inducing f", " inst✝² ≤ induced f inst✝¹", " induced f inst✝¹ ≤ inst✝²", " induced f inst✝¹ ≤ induced f (induced g inst✝)", " 𝓝ˢ s = comap f (𝓝ˢ (f '' s))", " MapClusterPt (f x) l f ↔ ClusterPt x l", " (𝓝 (f x...
[ " inst✝² = TopologicalSpace.induced (g ∘ f) inst✝", " Inducing (g ∘ f) ↔ Inducing f", " Inducing f", " inst✝² ≤ induced f inst✝¹", " induced f inst✝¹ ≤ inst✝²", " induced f inst✝¹ ≤ induced f (induced g inst✝)", " 𝓝ˢ s = comap f (𝓝ˢ (f '' s))", " MapClusterPt (f x) l f ↔ ClusterPt x l", " (𝓝 (f x...
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
138
139
theorem invFun_add {p q} : invFun R A (p + q) = invFun R A p + invFun R A q := by
simp only [invFun, eval₂_add]
[ " ((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.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.LinearRecurrence import Mathlib.Tactic.NormNum.NatFib import Mathlib.Tactic.NormNum.Prime #align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712...
Mathlib/Data/Real/GoldenRatio.lean
112
114
theorem one_lt_gold : 1 < φ := by
refine lt_of_mul_lt_mul_left ?_ (le_of_lt gold_pos) simp [← sq, gold_pos, zero_lt_one, - div_pow] -- Porting note: Added `- div_pow`
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
import Mathlib.Algebra.Order.CauSeq.Basic #align_import data.real.cau_seq_completion from "leanprover-community/mathlib"@"cf4c49c445991489058260d75dae0ff2b1abca28" variable {α : Type*} [LinearOrderedField α] namespace CauSeq section variable (β : Type*) [Ring β] (abv : β → α) [IsAbsoluteValue abv] class IsCo...
Mathlib/Algebra/Order/CauSeq/Completion.lean
385
386
theorem lim_mul (f : CauSeq β abv) (x : β) : lim f * x = lim (f * const abv x) := by
rw [← lim_mul_lim, lim_const]
[ " (const abv (f.lim + g.lim) - (f + g)).LimZero", " (const abv f.lim - f + (const abv g.lim - g)).LimZero", " (const abv (f.lim * g.lim) - f * g).LimZero", " const abv (f.lim * g.lim) - f * g = (const abv f.lim - f) * g + const abv f.lim * (const abv g.lim - g)", " ↑(const abv (f.lim * g.lim) - f * g) = ↑((...
[ " (const abv (f.lim + g.lim) - (f + g)).LimZero", " (const abv f.lim - f + (const abv g.lim - g)).LimZero", " (const abv (f.lim * g.lim) - f * g).LimZero", " const abv (f.lim * g.lim) - f * g = (const abv f.lim - f) * g + const abv f.lim * (const abv g.lim - g)", " ↑(const abv (f.lim * g.lim) - f * g) = ↑((...
import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.RowCol import Mathlib.Data.Fin.VecNotation import Mathlib.Tactic.FinCases #align_import data.matrix.notation from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matrix universe u uₘ uₙ uₒ variable {α : Type u} {o n m...
Mathlib/Data/Matrix/Notation.lean
188
191
theorem col_cons (x : α) (u : Fin m → α) : col (vecCons x u) = of (vecCons (fun _ => x) (col u)) := by
ext i j refine Fin.cases ?_ ?_ i <;> simp [vecHead, vecTail]
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ", " col (vecCons x u) = of (vecCons (fun x_1 => x) (col u))", " col (vecCons x u) i j = of (vecCons (fun x_1 => x) (col ...
[ " vecCons v B i j = vecCons (v j) (fun i => B i j) i", " vecCons v B 0 j = vecCons (v j) (fun i => B i j) 0", " ∀ (i : Fin m), vecCons v B i.succ j = vecCons (v j) (fun i => B i j) i.succ" ]
import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Topology.Algebra.Field import Mathlib.Topology.Algebra.Order.Group #align_import topology.algebra.order.field from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Set Filter TopologicalSpace Function open scoped Pointwise Top...
Mathlib/Topology/Algebra/Order/Field.lean
102
105
theorem Filter.Tendsto.atBot_mul_neg {C : 𝕜} (hC : C < 0) (hf : Tendsto f l atBot) (hg : Tendsto g l (𝓝 C)) : Tendsto (fun x => f x * g x) l atTop := by
have := (tendsto_neg_atBot_atTop.comp hf).atTop_mul_neg hC hg simpa [(· ∘ ·)] using tendsto_neg_atBot_atTop.comp this
[ " TopologicalRing R", " ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)", " ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}", " c * norm x < ε", " ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �...
[ " TopologicalRing R", " ∀ (f : R → R), ∀ c ≥ 0, (∀ (x : R), norm (f x) ≤ c * norm x) → Tendsto f (𝓝 0) (𝓝 0)", " ∃ ia, 0 < ia ∧ ∀ x ∈ {x | norm x < ia}, f x ∈ {x | norm x < ε}", " c * norm x < ε", " ∀ (x₀ : R), Tendsto (fun x => x * x₀) (𝓝 0) (𝓝 0)", " Tendsto (uncurry fun x x_1 => x * x_1) (𝓝 0 ×ˢ �...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
43
46
theorem norm_add_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two (x y : V) : ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2 := by
rw [norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero] exact inner_eq_zero_iff_angle_eq_pi_div_two x y
[ " ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2", " ⟪x, y⟫_ℝ = 0 ↔ angle x y = π / 2" ]
[]
import Mathlib.Data.PFunctor.Univariate.Basic #align_import data.pfunctor.univariate.M from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" universe u v w open Nat Function open List variable (F : PFunctor.{u}) -- Porting note: the ♯ tactic is never used -- local prefix:0 "♯" => cast...
Mathlib/Data/PFunctor/Univariate/M.lean
86
86
theorem agree_trival {x : CofixA F 0} {y : CofixA F 1} : Agree x y := by
constructor
[ " x = CofixA.intro (head' x) (children' x)", " CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))", " Agree x y" ]
[ " x = CofixA.intro (head' x) (children' x)", " CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))" ]