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.Finsupp.Encodable
import Mathlib.LinearAlgebra.Pi
import Mathlib.LinearAlgebra.Span
import Mathlib.Data.Set.Countable
#align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb"
noncomputable section
open Set LinearMap Submodule
namespa... | Mathlib/LinearAlgebra/Finsupp.lean | 255 | 257 | theorem iInf_ker_lapply_le_bot : β¨
a, ker (lapply a : (Ξ± ββ M) ββ[R] M) β€ β₯ := by |
simp only [SetLike.le_def, mem_iInf, mem_ker, mem_bot, lapply_apply]
exact fun a h => Finsupp.ext h
| [
" β(x + y) = βx + βy",
" (x + y) xβ = (βx + βy) xβ",
" { toFun := DFunLike.coe, map_add' := β― }.toFun (x β’ y) =\n (RingHom.id R) x β’ { toFun := DFunLike.coe, map_add' := β― }.toFun y",
" { toFun := DFunLike.coe, map_add' := β― }.toFun (x β’ y) xβ =\n ((RingHom.id R) x β’ { toFun := DFunLike.coe, map_add' :=... | [
" β(x + y) = βx + βy",
" (x + y) xβ = (βx + βy) xβ",
" { toFun := DFunLike.coe, map_add' := β― }.toFun (x β’ y) =\n (RingHom.id R) x β’ { toFun := DFunLike.coe, map_add' := β― }.toFun y",
" { toFun := DFunLike.coe, map_add' := β― }.toFun (x β’ y) xβ =\n ((RingHom.id R) x β’ { toFun := DFunLike.coe, map_add' :=... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Algebra.Ring.Hom.Defs
import Mathlib.GroupTheory.GroupAction.Units
import Mathlib.Logic.Basic
import Mathlib.Tactic.Ring
#align_import ring_theory.coprime.basic from "leanprover-community/mathlib"@"a95b16cb... | Mathlib/RingTheory/Coprime/Basic.lean | 124 | 126 | theorem IsCoprime.mul_right (H1 : IsCoprime x y) (H2 : IsCoprime x z) : IsCoprime x (y * z) := by |
rw [isCoprime_comm] at H1 H2 β’
exact H1.mul_left H2
| [
" b * y + a * x = 1",
" x * (a + b) = 1",
" b * x + 0 * x = 1",
" x * b = 1",
" 1 * 0 + b * x = 1",
" IsCoprime βa βb",
" βu * βa + βv * βb = 1",
" β1 = 1",
" p β 0",
" False",
" x β 0 β¨ y β 0",
" x = 0 β y β 0",
" 1 * 1 + 0 * x = 1",
" 0 * x + 1 * 1 = 1",
" x β£ y",
" x β£ y * a * x + b... | [
" b * y + a * x = 1",
" x * (a + b) = 1",
" b * x + 0 * x = 1",
" x * b = 1",
" 1 * 0 + b * x = 1",
" IsCoprime βa βb",
" βu * βa + βv * βb = 1",
" β1 = 1",
" p β 0",
" False",
" x β 0 β¨ y β 0",
" x = 0 β y β 0",
" 1 * 1 + 0 * x = 1",
" 0 * x + 1 * 1 = 1",
" x β£ y",
" x β£ y * a * x + b... |
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.FreeModule.Basic
#align_import linear_algebra.free_module.pid from "leanprover-community/mathlib"@"d87199d51218d36a0a42c66c82d147b5a7ff87b3"
universe u v
section Ring
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/FreeModule/PID.lean | 59 | 69 | theorem eq_bot_of_generator_maximal_map_eq_zero (b : Basis ΞΉ R M) {N : Submodule R M}
{Ο : M ββ[R] R} (hΟ : β Ο : M ββ[R] R, Β¬N.map Ο < N.map Ο) [(N.map Ο).IsPrincipal]
(hgen : generator (N.map Ο) = (0 : R)) : N = β₯ := by |
rw [Submodule.eq_bot_iff]
intro x hx
refine b.ext_elem fun i β¦ ?_
rw [(eq_bot_iff_generator_eq_zero _).mpr hgen] at hΟ
rw [LinearEquiv.map_zero, Finsupp.zero_apply]
exact
(Submodule.eq_bot_iff _).mp (not_bot_lt_iff.1 <| hΟ (Finsupp.lapply i ββ βb.repr)) _
β¨x, hx, rflβ©
| [
" N = β₯",
" β x β N, x = 0",
" x = 0",
" (b.repr x) i = (b.repr 0) i",
" (b.repr x) i = 0"
] | [] |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classi... | Mathlib/Topology/MetricSpace/Contracting.lean | 62 | 64 | theorem one_sub_K_ne_top : (1 : ββ₯0β) - K β β := by |
norm_cast
exact ENNReal.coe_ne_top
| [
" 0 < 1 - βK",
" 1 - βK β β€",
" Β¬1 - βK = β€"
] | [
" 0 < 1 - βK"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 134 | 147 | theorem mem_cylinder_iff_eq {x y : β n, E n} {n : β} :
y β cylinder x n β cylinder y n = cylinder x n := by |
constructor
Β· intro hy
apply Subset.antisymm
Β· intro z hz i hi
rw [β hy i hi]
exact hz i hi
Β· intro z hz i hi
rw [hy i hi]
exact hz i hi
Β· intro h
rw [β h]
exact self_mem_cylinder _ _
| [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) β€ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (β(Finset.range n)).pi... | [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) β€ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)",
" cylinder x n = (β(Finset.range n)).pi... |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.Galois
universe u v w
open scoped Classical Polynomial
open Polynomial
variable (k : Type u) [Field k] (K : Type v) [Field K]
class IsSepClosed : Prop where
splits_of_separable : β p : k[X], p.Separable β (p.Splits <| RingHom.... | Mathlib/FieldTheory/IsSepClosed.lean | 122 | 129 | theorem roots_eq_zero_iff [IsSepClosed k] {p : k[X]} (hsep : p.Separable) :
p.roots = 0 β p = Polynomial.C (p.coeff 0) := by |
refine β¨fun h => ?_, fun hp => by rw [hp, roots_C]β©
rcases le_or_lt (degree p) 0 with hd | hd
Β· exact eq_C_of_degree_le_zero hd
Β· obtain β¨z, hzβ© := IsSepClosed.exists_root p hd.ne' hsep
rw [β mem_roots (ne_zero_of_degree_gt hd), h] at hz
simp at hz
| [
" Splits f p",
" Splits f p β Splits (RingHom.id K) (map f p)",
" β z, z ^ n = x",
" False",
" (X ^ n - C x).degree β 0",
" βn β 0",
" 0 ^ n = x",
" z ^ n = x",
" β z, x = z * z",
" β z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 β p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)"
] | [
" Splits f p",
" Splits f p β Splits (RingHom.id K) (map f p)",
" β z, z ^ n = x",
" False",
" (X ^ n - C x).degree β 0",
" βn β 0",
" 0 ^ n = x",
" z ^ n = x",
" β z, x = z * z",
" β z_1, z ^ 2 = z_1 * z_1"
] |
import Mathlib.NumberTheory.LegendreSymbol.Basic
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
#align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Values
variable {p : β} [Fact p.Pri... | Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean | 158 | 162 | theorem quadratic_reciprocity_three_mod_four (hp : p % 4 = 3) (hq : q % 4 = 3) :
legendreSym q p = -legendreSym p q := by |
let nop := @neg_one_pow_div_two_of_three_mod_four
rw [quadratic_reciprocity', pow_mul, nop hp, nop hq, neg_one_mul] <;>
rwa [β Prime.mod_two_eq_one_iff_ne_two, odd_of_mod_four_eq_three]
| [
" legendreSym q βp * legendreSym p βq = (-1) ^ (p / 2 * (q / 2))",
" ββn = βn",
" β((-1) ^ (p / 2)) = (-1) ^ (p / 2)",
" legendreSym q βp = (-1) ^ (p / 2 * (q / 2)) * legendreSym p βq",
" legendreSym q βq = (-1) ^ (q / 2 * (q / 2)) * legendreSym q βq",
" legendreSym q βp = legendreSym p βq",
" legendreS... | [
" legendreSym q βp * legendreSym p βq = (-1) ^ (p / 2 * (q / 2))",
" ββn = βn",
" β((-1) ^ (p / 2)) = (-1) ^ (p / 2)",
" legendreSym q βp = (-1) ^ (p / 2 * (q / 2)) * legendreSym p βq",
" legendreSym q βq = (-1) ^ (q / 2 * (q / 2)) * legendreSym q βq",
" legendreSym q βp = legendreSym p βq"
] |
import Mathlib.Data.Int.GCD
import Mathlib.Tactic.NormNum
namespace Tactic
namespace NormNum
theorem int_gcd_helper' {d : β} {x y : β€} (a b : β€) (hβ : (d : β€) β£ x) (hβ : (d : β€) β£ y)
(hβ : x * a + y * b = d) : Int.gcd x y = d := by
refine Nat.dvd_antisymm ?_ (Int.natCast_dvd_natCast.1 (Int.dvd_gcd hβ hβ))
... | Mathlib/Tactic/NormNum/GCD.lean | 64 | 66 | theorem int_gcd_helper {x y : β€} {x' y' d : β}
(hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.gcd x' y' = d) :
Int.gcd x y = d := by | subst_vars; rw [Int.gcd_def]
| [
" x.gcd y = d",
" x.gcd y β£ d",
" β(x.gcd y) β£ x * a + y * b",
" β(x.gcd y) β£ x * a",
" β(x.gcd y) β£ y * b",
" (βx).gcd βy = d",
" βx * βa + βy * -βb = βd",
" βx * βa = βy * βb + βd",
" (fun x => d * x) (x.lcm y) = (fun x => d * x) m",
" d * x.lcm y = d * m",
" x.gcd y = x.natAbs.gcd y.natAbs"
] | [
" x.gcd y = d",
" x.gcd y β£ d",
" β(x.gcd y) β£ x * a + y * b",
" β(x.gcd y) β£ x * a",
" β(x.gcd y) β£ y * b",
" (βx).gcd βy = d",
" βx * βa + βy * -βb = βd",
" βx * βa = βy * βb + βd",
" (fun x => d * x) (x.lcm y) = (fun x => d * x) m",
" d * x.lcm y = d * m"
] |
import Mathlib.Order.PrimeIdeal
import Mathlib.Order.Zorn
universe u
variable {Ξ± : Type*}
open Order Ideal Set
variable [DistribLattice Ξ±] [BoundedOrder Ξ±]
variable {F : PFilter Ξ±} {I : Ideal Ξ±}
namespace DistribLattice
lemma mem_ideal_sup_principal (a b : Ξ±) (J : Ideal Ξ±) : b β J β principal a β β j β J, ... | Mathlib/Order/PrimeSeparator.lean | 46 | 143 | theorem prime_ideal_of_disjoint_filter_ideal (hFI : Disjoint (F : Set Ξ±) (I : Set Ξ±)) :
β J : Ideal Ξ±, (IsPrime J) β§ I β€ J β§ Disjoint (F : Set Ξ±) J := by |
-- Let S be the set of ideals containing I and disjoint from F.
set S : Set (Set Ξ±) := { J : Set Ξ± | IsIdeal J β§ I β€ J β§ Disjoint (F : Set Ξ±) J }
-- Then I is in S...
have IinS : βI β S := by
refine β¨Order.Ideal.isIdeal I, by trivialβ©
-- ...and S contains upper bounds for any non-empty chains.
have ... | [
" β J, J.IsPrime β§ I β€ J β§ Disjoint βF βJ",
" βI β S",
" βI β€ βI β§ Disjoint βF βI",
" β c β S, IsChain (fun x x_1 => x β x_1) c β c.Nonempty β β ub β S, β s β c, s β ub",
" β ub β S, β s β c, s β ub",
" ββ c β S β§ β s β c, s β ββ c",
" ββ c β S",
" IsIdeal (ββ c) β§ βI β ββ c β§ β t β c, Disjoint (βF) t... | [] |
import Mathlib.Dynamics.Flow
import Mathlib.Tactic.Monotonicity
#align_import dynamics.omega_limit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Function Filter Topology
section omegaLimit
variable {Ο : Type*} {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*}
def omegaLimit [Topol... | Mathlib/Dynamics/OmegaLimit.lean | 70 | 74 | theorem omegaLimit_subset_of_tendsto {m : Ο β Ο} {fβ fβ : Filter Ο} (hf : Tendsto m fβ fβ) :
Ο fβ (fun t x β¦ Ο (m t) x) s β Ο fβ Ο s := by |
refine iInterβ_mono' fun u hu β¦ β¨m β»ΒΉ' u, tendsto_def.mp hf _ hu, ?_β©
rw [β image2_image_left]
exact closure_mono (image2_subset (image_preimage_subset _ _) Subset.rfl)
| [
" Ο fβ (fun t x => Ο (m t) x) s β Ο fβ Ο s",
" closure (image2 (fun t x => Ο (m t) x) (m β»ΒΉ' u) s) β closure (image2 Ο u s)",
" closure (image2 Ο ((fun t => m t) '' (m β»ΒΉ' u)) s) β closure (image2 Ο u s)"
] | [] |
import Mathlib.Topology.Order.Basic
open Set Filter OrderDual
open scoped Topology
section OrderClosedTopology
variable {Ξ± : Type*} [LinearOrder Ξ±] [TopologicalSpace Ξ±] [OrderClosedTopology Ξ±] {a b c d : Ξ±}
@[simp] theorem nhdsSet_Ioi : πΛ’ (Ioi a) = π (Ioi a) := isOpen_Ioi.nhdsSet_eq
@[simp] theorem nhdsSet... | Mathlib/Topology/Order/NhdsSet.lean | 36 | 37 | theorem nhdsSet_Ici : πΛ’ (Ici a) = π a β π (Ioi a) := by |
rw [β Ioi_insert, nhdsSet_insert, nhdsSet_Ioi]
| [
" πΛ’ (Ici a) = π a β π (Ioi a)"
] | [] |
import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular
import Mathlib.Topology.Category.CompHaus.EffectiveEpi
import Mathlib.Topology.Category.Stonean.Limits
import Mathlib.Topology.Category.CompHaus.EffectiveEpi
universe u
open CategoryTheory Limits
namespace Stonean
noncomputable
def struct {B X : St... | Mathlib/Topology/Category/Stonean/EffectiveEpi.lean | 62 | 75 | theorem effectiveEpi_tfae
{B X : Stonean.{u}} (Ο : X βΆ B) :
TFAE
[ EffectiveEpi Ο
, Epi Ο
, Function.Surjective Ο
] := by |
tfae_have 1 β 2
Β· intro; infer_instance
tfae_have 2 β 3
Β· exact epi_iff_surjective Ο
tfae_have 3 β 1
Β· exact fun hΟ β¦ β¨β¨struct Ο hΟβ©β©
tfae_finish
| [
" { toFun := fun x => a, continuous_toFun := β― } β« Ο = { toFun := fun x => b, continuous_toFun := β― } β« Ο",
" ({ toFun := fun x => a, continuous_toFun := β― } β« Ο) xβ = ({ toFun := fun x => b, continuous_toFun := β― } β« Ο) xβ",
" g = (fun {W} e h => β―.lift e β―) e β―",
" g = β―.liftEquiv β¨e, β―β©",
" β―.liftEquiv.s... | [
" { toFun := fun x => a, continuous_toFun := β― } β« Ο = { toFun := fun x => b, continuous_toFun := β― } β« Ο",
" ({ toFun := fun x => a, continuous_toFun := β― } β« Ο) xβ = ({ toFun := fun x => b, continuous_toFun := β― } β« Ο) xβ",
" g = (fun {W} e h => β―.lift e β―) e β―",
" g = β―.liftEquiv β¨e, β―β©",
" β―.liftEquiv.s... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.integral_normalization from "leanprover-community/mathlib"@"6f401acf4faec3ab9ab13a42789c4f68064a61cd"
open Polynomial
namespace Polynomial
universe u... | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | 48 | 53 | theorem integralNormalization_coeff {f : R[X]} {i : β} :
(integralNormalization f).coeff i =
if f.degree = i then 1 else coeff f i * f.leadingCoeff ^ (f.natDegree - 1 - i) := by |
have : f.coeff i = 0 β f.degree β i := fun hc hd => coeff_ne_zero_of_eq_degree hd hc
simp (config := { contextual := true }) [integralNormalization, coeff_monomial, this,
mem_support_iff]
| [
" integralNormalization 0 = 0",
" f.integralNormalization.coeff i = if f.degree = βi then 1 else f.coeff i * f.leadingCoeff ^ (f.natDegree - 1 - i)"
] | [
" integralNormalization 0 = 0"
] |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
theorem periodic_gcd (a : β) : P... | Mathlib/Data/Nat/Periodic.lean | 29 | 30 | theorem periodic_coprime (a : β) : Periodic (Coprime a) a := by |
simp only [coprime_add_self_right, forall_const, iff_self_iff, eq_iff_iff, Periodic]
| [
" Periodic a.gcd a",
" Periodic a.Coprime a"
] | [
" Periodic a.gcd a"
] |
import Mathlib.Probability.Notation
import Mathlib.Probability.Density
import Mathlib.Probability.ConditionalProbability
import Mathlib.Probability.ProbabilityMassFunction.Constructions
open scoped Classical MeasureTheory NNReal ENNReal
-- TODO: We can't `open ProbabilityTheory` without opening the `ProbabilityThe... | Mathlib/Probability/Distributions/Uniform.lean | 95 | 98 | theorem toMeasurable_iff {X : Ξ© β E} {s : Set E} :
IsUniform X (toMeasurable ΞΌ s) β ΞΌ β IsUniform X s β ΞΌ := by |
unfold IsUniform
rw [ProbabilityTheory.cond_toMeasurable_eq]
| [
" AEMeasurable X β",
" False",
" 0 = 1",
" 0 Set.univ = 1",
" Measure.map X β βͺ ΞΌ",
" ProbabilityTheory.cond ΞΌ s βͺ ΞΌ",
" β (X β»ΒΉ' A) = ΞΌ (s β© A) / ΞΌ s",
" β Set.univ = 1",
" IsUniform X (toMeasurable ΞΌ s) β ΞΌ β IsUniform X s β ΞΌ",
" Measure.map X β = ProbabilityTheory.cond ΞΌ (toMeasurable ΞΌ s) β M... | [
" AEMeasurable X β",
" False",
" 0 = 1",
" 0 Set.univ = 1",
" Measure.map X β βͺ ΞΌ",
" ProbabilityTheory.cond ΞΌ s βͺ ΞΌ",
" β (X β»ΒΉ' A) = ΞΌ (s β© A) / ΞΌ s",
" β Set.univ = 1"
] |
import Mathlib.Analysis.Quaternion
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series
#align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open scoped Quaternion Nat
open... | Mathlib/Analysis/NormedSpace/QuaternionExponential.lean | 114 | 114 | theorem re_exp (q : β[β]) : (exp β q).re = exp β q.re * Real.cos βq - q.reβ := by | simp [exp_eq]
| [
" ((expSeries β β (2 * n)) fun x => q) = β((-1) ^ n * βqβ ^ (2 * n) / β(2 * n)!)",
" (β(2 * n)!)β»ΒΉ β’ q ^ (2 * n) = β((-1) ^ n * βqβ ^ (2 * n) / β(2 * n)!)",
" kβ»ΒΉ β’ q ^ (2 * n) = kβ»ΒΉ β’ (-β(normSq q)) ^ n",
" kβ»ΒΉ β’ (-β(normSq q)) ^ n = kβ»ΒΉ β’ β((-1) ^ n * βqβ ^ (2 * n))",
" (-β(normSq q)) ^ n = β((-1) ^ n * β... | [
" ((expSeries β β (2 * n)) fun x => q) = β((-1) ^ n * βqβ ^ (2 * n) / β(2 * n)!)",
" (β(2 * n)!)β»ΒΉ β’ q ^ (2 * n) = β((-1) ^ n * βqβ ^ (2 * n) / β(2 * n)!)",
" kβ»ΒΉ β’ q ^ (2 * n) = kβ»ΒΉ β’ (-β(normSq q)) ^ n",
" kβ»ΒΉ β’ (-β(normSq q)) ^ n = kβ»ΒΉ β’ β((-1) ^ n * βqβ ^ (2 * n))",
" (-β(normSq q)) ^ n = β((-1) ^ n * β... |
import Mathlib.Tactic.TFAE
import Mathlib.Topology.ContinuousOn
#align_import topology.inseparable from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology List
variable {X Y Z Ξ± ΞΉ : Type*} {Ο : ΞΉ β Type*} [TopologicalSpace X] [TopologicalSpace Y]
[Topolo... | Mathlib/Topology/Inseparable.lean | 95 | 96 | theorem ker_nhds_eq_specializes : (π x).ker = {y | y β€³ x} := by |
ext; simp [specializes_iff_pure, le_def]
| [
" [x β€³ y, pure x β€ π y, β (s : Set X), IsOpen s β y β s β x β s, β (s : Set X), IsClosed s β x β s β y β s,\n y β closure {x}, closure {y} β closure {x}, ClusterPt y (pure x)].TFAE",
" x β€³ y β pure x β€ π y",
" pure x β€ π y β β (s : Set X), IsOpen s β y β s β x β s",
" (β (s : Set X), IsOpen s β y β s ... | [
" [x β€³ y, pure x β€ π y, β (s : Set X), IsOpen s β y β s β x β s, β (s : Set X), IsClosed s β x β s β y β s,\n y β closure {x}, closure {y} β closure {x}, ClusterPt y (pure x)].TFAE",
" x β€³ y β pure x β€ π y",
" pure x β€ π y β β (s : Set X), IsOpen s β y β s β x β s",
" (β (s : Set X), IsOpen s β y β s ... |
import Mathlib.Data.Finsupp.Defs
#align_import data.finsupp.fin from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
noncomputable section
namespace Finsupp
variable {n : β} (i : Fin n) {M : Type*} [Zero M] (y : M) (t : Fin (n + 1) ββ M) (s : Fin n ββ M)
def tail (s : Fin (n + 1) ββ ... | Mathlib/Data/Finsupp/Fin.lean | 83 | 86 | theorem cons_ne_zero_of_right (h : s β 0) : cons y s β 0 := by |
contrapose! h with c
ext a
simp [β cons_succ a y s, c]
| [
" (cons y s).tail k = s k",
" cons (t 0) t.tail = t",
" (cons (t 0) t.tail) a = t a",
" cons 0 0 = 0",
" (cons 0 0) a = 0 a",
" 0 (a.pred c) = 0 (a.pred c).succ",
" cons y s β 0",
" y = 0",
" s = 0",
" s a = 0 a"
] | [
" (cons y s).tail k = s k",
" cons (t 0) t.tail = t",
" (cons (t 0) t.tail) a = t a",
" cons 0 0 = 0",
" (cons 0 0) a = 0 a",
" 0 (a.pred c) = 0 (a.pred c).succ",
" cons y s β 0",
" y = 0"
] |
import Mathlib.Algebra.Polynomial.Coeff
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antid... | Mathlib/RingTheory/PowerSeries/Trunc.lean | 44 | 46 | theorem coeff_trunc (m) (n) (Ο : Rβ¦Xβ§) :
(trunc n Ο).coeff m = if m < n then coeff R m Ο else 0 := by |
simp [trunc, Polynomial.coeff_sum, Polynomial.coeff_monomial, Nat.lt_succ_iff]
| [
" (trunc n Ο).coeff m = if m < n then (coeff R m) Ο else 0"
] | [] |
import Mathlib.Data.Set.Image
import Mathlib.Data.SProd
#align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
open Function
namespace Set
section Prod
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {s sβ sβ : Set Ξ±} {t tβ tβ : Set Ξ²} {a : Ξ±} {b : Ξ²}
theorem Subsingleton.pro... | Mathlib/Data/Set/Prod.lean | 84 | 86 | theorem prod_empty : s ΓΛ’ (β
: Set Ξ²) = β
:= by |
ext
exact and_false_iff _
| [
" (β x β s ΓΛ’ t, p x) β β x β s, β y β t, p (x, y)",
" s ΓΛ’ β
= β
",
" xβ β s ΓΛ’ β
β xβ β β
"
] | [
" (β x β s ΓΛ’ t, p x) β β x β s, β y β t, p (x, y)"
] |
import Mathlib.Data.Finset.Lattice
#align_import data.finset.pairwise from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d"
open Finset
variable {Ξ± ΞΉ ΞΉ' : Type*}
instance [DecidableEq Ξ±] {r : Ξ± β Ξ± β Prop} [DecidableRel r] {s : Finset Ξ±} :
Decidable ((s : Set Ξ±).Pairwise r) :=
dec... | Mathlib/Data/Finset/Pairwise.lean | 27 | 30 | theorem Finset.pairwiseDisjoint_range_singleton :
(Set.range (singleton : Ξ± β Finset Ξ±)).PairwiseDisjoint id := by |
rintro _ β¨a, rflβ© _ β¨b, rflβ© h
exact disjoint_singleton.2 (ne_of_apply_ne _ h)
| [
" (Set.range singleton).PairwiseDisjoint id",
" (Disjoint on id) {a} {b}"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.MeasureTheory.Integral.Pi
import Mathlib.Analysis.Fourier.FourierTransform
open Real Set MeasureTheory Filter Asymptotics intervalIntegral
open scoped Real Topology FourierTransform Re... | Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean | 70 | 112 | theorem verticalIntegral_norm_le (hb : 0 < b.re) (c : β) {T : β} (hT : 0 β€ T) :
βverticalIntegral b c Tβ β€
(2 : β) * |c| * exp (-(b.re * T ^ 2 - (2 : β) * |b.im| * |c| * T - b.re * c ^ 2)) := by |
-- first get uniform bound for integrand
have vert_norm_bound :
β {T : β},
0 β€ T β
β {c y : β},
|y| β€ |c| β
βcexp (-b * (T + y * I) ^ 2)β β€
exp (-(b.re * T ^ 2 - (2 : β) * |b.im| * |c| * T - b.re * c ^ 2)) := by
intro T hT c y hy
rw [norm_cexp_neg_mul_s... | [
" βcexp (-b * (βT + βc * I) ^ 2)β = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))",
" rexp (-((βb.re + βb.im * I) * (βT + βc * I) ^ 2).re) =\n rexp (-((βb.re + βb.im * I).re * T ^ 2 - 2 * (βb.re + βb.im * I).im * c * T - (βb.re + βb.im * I).re * c ^ 2))",
" rexp\n (-(b.re * ((T + (c * 0 - 0 *... | [
" βcexp (-b * (βT + βc * I) ^ 2)β = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))",
" rexp (-((βb.re + βb.im * I) * (βT + βc * I) ^ 2).re) =\n rexp (-((βb.re + βb.im * I).re * T ^ 2 - 2 * (βb.re + βb.im * I).im * c * T - (βb.re + βb.im * I).re * c ^ 2))",
" rexp\n (-(b.re * ((T + (c * 0 - 0 *... |
import Mathlib.Algebra.Order.Ring.Int
#align_import data.int.least_greatest from "leanprover-community/mathlib"@"3342d1b2178381196f818146ff79bc0e7ccd9e2d"
namespace Int
def leastOfBdd {P : β€ β Prop} [DecidablePred P] (b : β€) (Hb : β z : β€, P z β b β€ z)
(Hinh : β z : β€, P z) : { lb : β€ // P lb β§ β z : β€, P z... | Mathlib/Data/Int/LeastGreatest.lean | 96 | 103 | theorem exists_greatest_of_bdd
{P : β€ β Prop}
(Hbdd : β b : β€ , β z : β€ , P z β z β€ b)
(Hinh : β z : β€ , P z) : β ub : β€ , P ub β§ β z : β€ , P z β z β€ ub := by |
classical
let β¨b, Hbβ© := Hbdd
let β¨lb, Hβ© := greatestOfBdd b Hb Hinh
exact β¨lb, Hβ©
| [
" β lb, P lb β§ β (z : β€), P z β lb β€ z",
" β(b.leastOfBdd Hb Hinh) = β(b'.leastOfBdd Hb' Hinh)",
" ββ¨n, β―β© = β(b'.leastOfBdd Hb' Hinh)",
" ββ¨n, β―β© = ββ¨n', β―β©",
" P (- -elt)",
" P elt",
" P (- -z)",
" β ub, P ub β§ β (z : β€), P z β z β€ ub"
] | [
" β lb, P lb β§ β (z : β€), P z β lb β€ z",
" β(b.leastOfBdd Hb Hinh) = β(b'.leastOfBdd Hb' Hinh)",
" ββ¨n, β―β© = β(b'.leastOfBdd Hb' Hinh)",
" ββ¨n, β―β© = ββ¨n', β―β©",
" P (- -elt)",
" P elt",
" P (- -z)"
] |
import Mathlib.LinearAlgebra.Projectivization.Basic
#align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe"
open scoped LinearAlgebra.Projectivization
variable {ΞΉ K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ΞΉ β ... | Mathlib/LinearAlgebra/Projectivization/Independence.lean | 109 | 114 | theorem dependent_pair_iff_eq (u v : β K V) : Dependent ![u, v] β u = v := by |
rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2,
Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne]
simp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply,
β mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, Classical.... | [
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" LinearIndependent K (Projectivization.rep β fun i => mk K (ff i) β―)",
" (Projectivization.rep β fun i => mk K (ff i) β―) = a β’ ff",
" (Projectivization.rep β fun i => mk K (... | [
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" Independent f β LinearIndependent K (Projectivization.rep β f)",
" LinearIndependent K (Projectivization.rep β fun i => mk K (ff i) β―)",
" (Projectivization.rep β fun i => mk K (ff i) β―) = a β’ ff",
" (Projectivization.rep β fun i => mk K (... |
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 | 110 | 111 | theorem count_succ_eq_count_iff {n : β} : count p (n + 1) = count p n β Β¬p n := by |
by_cases h : p n <;> simp [h, count_succ]
| [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... | [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ΞΉ : Type*} [Fintype ΞΉ]
variable {M : Type*} [AddCommGroup M] (R : Type*) [Co... | Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 131 | 133 | theorem Matrix.Represents.add {A A' : Matrix ΞΉ ΞΉ R} {f f' : Module.End R M} (h : A.Represents b f)
(h' : Matrix.Represents b A' f') : (A + A').Represents b (f + f') := by |
delta Matrix.Represents at h h' β’; rw [map_add, map_add, h, h']
| [
" ((fromMatrix R b) A) (Pi.single j 1) = β i : ΞΉ, A i j β’ b i",
" β i : ΞΉ, (fun i => A i j * 1) i β’ b i = β i : ΞΉ, A i j β’ b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 β’ b i",
"... | [
" ((fromMatrix R b) A) (Pi.single j 1) = β i : ΞΉ, A i j β’ b i",
" β i : ΞΉ, (fun i => A i j * 1) i β’ b i = β i : ΞΉ, A i j β’ b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 β’ b i",
"... |
import Mathlib.Algebra.Group.Center
#align_import group_theory.subsemigroup.centralizer from "leanprover-community/mathlib"@"cc67cd75b4e54191e13c2e8d722289a89e67e4fa"
variable {M : Type*} {S T : Set M}
namespace Set
variable (S)
@[to_additive addCentralizer " The centralizer of a subset of an additive magma. ... | Mathlib/Algebra/Group/Centralizer.lean | 102 | 105 | theorem div_mem_centralizerβ [GroupWithZero M] (ha : a β centralizer S) (hb : b β centralizer S) :
a / b β centralizer S := by |
rw [div_eq_mul_inv]
exact mul_mem_centralizer ha (inv_mem_centralizerβ hb)
| [
" 1 β S.centralizer",
" 0 β S.centralizer",
" g * (a * b) = a * b * g",
" g * aβ»ΒΉ = aβ»ΒΉ * g",
" aβ»ΒΉ β S.centralizer",
" c * aβ»ΒΉ = aβ»ΒΉ * c",
" a / b β S.centralizer",
" a * bβ»ΒΉ β S.centralizer"
] | [
" 1 β S.centralizer",
" 0 β S.centralizer",
" g * (a * b) = a * b * g",
" g * aβ»ΒΉ = aβ»ΒΉ * g",
" aβ»ΒΉ β S.centralizer",
" c * aβ»ΒΉ = aβ»ΒΉ * c",
" a / b β S.centralizer",
" a * bβ»ΒΉ β S.centralizer"
] |
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.Data.ZMod.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
#align_import ring_theory.zmod from "leanprover-community/mathlib"@"00d163e35035c3577c1c79fa53b68de17781ffc1"
theorem ZMod.ker_intCastRingHom (n : β) :
RingHom.ker (Int.castRingHom (ZMod n)) =... | Mathlib/RingTheory/ZMod.lean | 42 | 46 | theorem isReduced_zmod {n : β} : IsReduced (ZMod n) β Squarefree n β¨ n = 0 := by |
rw [β RingHom.ker_isRadical_iff_reduced_of_surjective
(ZMod.ringHom_surjective <| Int.castRingHom <| ZMod n),
ZMod.ker_intCastRingHom, β isRadical_iff_span_singleton, isRadical_iff_squarefree_or_zero,
Int.squarefree_natCast, Nat.cast_eq_zero]
| [
" RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {βn}",
" xβ β RingHom.ker (Int.castRingHom (ZMod n)) β xβ β Ideal.span {βn}",
" f = g",
" IsReduced (ZMod n) β Squarefree n β¨ n = 0"
] | [
" RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {βn}",
" xβ β RingHom.ker (Int.castRingHom (ZMod n)) β xβ β Ideal.span {βn}",
" f = g"
] |
import Mathlib.RingTheory.Localization.Module
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Discriminant
#align_import ring_theory.localization.norm from "leanprover-community/mathlib"@"2e59a6de168f95d16b16d217b808a36290398c0a"
open scoped nonZeroDivisors
variable (R : Type*) {S : Type*} [CommRing R] ... | Mathlib/RingTheory/Localization/NormTrace.lean | 83 | 92 | theorem Algebra.trace_localization [Module.Free R S] [Module.Finite R S] (a : S) :
Algebra.trace Rβ Sβ (algebraMap S Sβ a) = algebraMap R Rβ (Algebra.trace R S a) := by |
cases subsingleton_or_nontrivial R
Β· haveI : Subsingleton Rβ := Module.subsingleton R Rβ
simp [eq_iff_true_of_subsingleton]
let b := Module.Free.chooseBasis R S
letI := Classical.decEq (Module.Free.ChooseBasisIndex R S)
rw [Algebra.trace_eq_matrix_trace (b.localizationLocalization Rβ M Sβ),
Algebra.t... | [
" (algebraMap R Rβ).mapMatrix ((leftMulMatrix b) a) =\n (leftMulMatrix (Basis.localizationLocalization Rβ M Sβ b)) ((algebraMap S Sβ) a)",
" (algebraMap R Rβ).mapMatrix ((leftMulMatrix b) a) i j =\n (leftMulMatrix (Basis.localizationLocalization Rβ M Sβ b)) ((algebraMap S Sβ) a) i j",
" (norm Rβ) ((algebr... | [
" (algebraMap R Rβ).mapMatrix ((leftMulMatrix b) a) =\n (leftMulMatrix (Basis.localizationLocalization Rβ M Sβ b)) ((algebraMap S Sβ) a)",
" (algebraMap R Rβ).mapMatrix ((leftMulMatrix b) a) i j =\n (leftMulMatrix (Basis.localizationLocalization Rβ M Sβ b)) ((algebraMap S Sβ) a) i j",
" (norm Rβ) ((algebr... |
import Mathlib.FieldTheory.SplittingField.Construction
import Mathlib.RingTheory.Int.Basic
import Mathlib.RingTheory.Localization.Integral
import Mathlib.RingTheory.IntegrallyClosed
#align_import ring_theory.polynomial.gauss_lemma from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
open... | Mathlib/RingTheory/Polynomial/GaussLemma.lean | 115 | 121 | theorem IsPrimitive.isUnit_iff_isUnit_map_of_injective : IsUnit f β IsUnit (map Ο f) := by |
refine β¨(mapRingHom Ο).isUnit_map, fun h => ?_β©
rcases isUnit_iff.1 h with β¨_, β¨u, rflβ©, huβ©
have hdeg := degree_C u.ne_zero
rw [hu, degree_map_eq_of_injective hinj] at hdeg
rw [eq_C_of_degree_eq_zero hdeg] at hf β’
exact isUnit_C.mpr (isPrimitive_iff_isUnit_of_C_dvd.mp hf (f.coeff 0) dvd_rfl)
| [
" IsUnit f β IsUnit (map Ο f)",
" IsUnit f",
" IsUnit (C (f.coeff 0))"
] | [] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 93 | 98 | theorem interedges_disjoint_right (s : Finset Ξ±) {t t' : Finset Ξ²} (ht : Disjoint t t') :
Disjoint (interedges r s t) (interedges r s t') := by |
rw [Finset.disjoint_left] at ht β’
intro _ hx hy
rw [mem_interedges_iff] at hx hy
exact ht hx.2.1 hy.2.1
| [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... | [
" x β interedges r s t β x.1 β s β§ x.2 β t β§ r x.1 x.2",
" interedges r β
t = β
",
" x β interedges r sβ tβ β x β interedges r sβ tβ",
" x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2 β x.1 β sβ β§ x.2 β tβ β§ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
import Mathlib.Data.Set.Pairwise.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.Data.SetLike.Basic
#align_import order.chain from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open scoped Classical
open Set
variable {Ξ± Ξ² : Type*}
section Chain
variable (r : Ξ± β Ξ± β Prop)
... | Mathlib/Order/Chain.lean | 171 | 174 | theorem succChain_spec (h : β t, IsChain r s β§ SuperChain r s t) :
SuperChain r s (SuccChain r s) := by |
have : IsChain r s β§ SuperChain r s h.choose := h.choose_spec
simpa [SuccChain, dif_pos, exists_and_left.mp h] using this.2
| [
" IsChain r univ β IsTrichotomous Ξ± r",
" r a b β¨ a = b β¨ r b a",
" Β¬a = b β r a b β¨ r b a",
" IsChain (fun x x_1 => x β€ x_1) (range f)",
" IsChain (fun x x_1 => x β€ x_1) (f '' univ)",
" SuperChain r s (SuccChain r s)"
] | [
" IsChain r univ β IsTrichotomous Ξ± r",
" r a b β¨ a = b β¨ r b a",
" Β¬a = b β r a b β¨ r b a",
" IsChain (fun x x_1 => x β€ x_1) (range f)",
" IsChain (fun x x_1 => x β€ x_1) (f '' univ)"
] |
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.Algebra.Regular.Basic
import Mathlib.Data.Nat.Choose.Sum
#align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
set_option linter.uppercaseLean3 false
no... | Mathlib/Algebra/Polynomial/Coeff.lean | 120 | 124 | theorem coeff_sum [Semiring S] (n : β) (f : β β R β S[X]) :
coeff (p.sum f) n = p.sum fun a b => coeff (f a b) n := by |
rcases p with β¨β©
-- porting note (#10745): was `simp [Polynomial.sum, support, coeff]`.
simp [Polynomial.sum, support_ofFinsupp, coeff_ofFinsupp]
| [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsuppβ } + q).coeff n = { toFinsupp := toFinsuppβ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsuppβΒΉ } + { toFinsupp := toFinsuppβ }).coeff n =\n { toFinsupp := toFinsuppβΒΉ }.coeff n + { toFinsupp := toFinsuppβ }.coeff n",
" (toFinsuppβΒΉ ... | [
" (p + q).coeff n = p.coeff n + q.coeff n",
" ({ toFinsupp := toFinsuppβ } + q).coeff n = { toFinsupp := toFinsuppβ }.coeff n + q.coeff n",
" ({ toFinsupp := toFinsuppβΒΉ } + { toFinsupp := toFinsuppβ }).coeff n =\n { toFinsupp := toFinsuppβΒΉ }.coeff n + { toFinsupp := toFinsuppβ }.coeff n",
" (toFinsuppβΒΉ ... |
import Mathlib.Tactic.Ring
#align_import algebra.group_power.identities from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
variable {R : Type*} [CommRing R] {a b xβ xβ xβ xβ xβ
xβ xβ xβ yβ yβ yβ yβ yβ
yβ yβ yβ n : R}
theorem sq_add_sq_mul_sq_add_sq :
(xβ ^ 2 + xβ ^ 2) * (yβ ^ 2 +... | Mathlib/Algebra/Ring/Identities.lean | 31 | 34 | theorem sq_add_mul_sq_mul_sq_add_mul_sq :
(xβ ^ 2 + n * xβ ^ 2) * (yβ ^ 2 + n * yβ ^ 2) =
(xβ * yβ - n * xβ * yβ) ^ 2 + n * (xβ * yβ + xβ * yβ) ^ 2 := by |
ring
| [
" (xβ ^ 2 + xβ ^ 2) * (yβ ^ 2 + yβ ^ 2) = (xβ * yβ - xβ * yβ) ^ 2 + (xβ * yβ + xβ * yβ) ^ 2",
" (xβ ^ 2 + n * xβ ^ 2) * (yβ ^ 2 + n * yβ ^ 2) = (xβ * yβ - n * xβ * yβ) ^ 2 + n * (xβ * yβ + xβ * yβ) ^ 2"
] | [
" (xβ ^ 2 + xβ ^ 2) * (yβ ^ 2 + yβ ^ 2) = (xβ * yβ - xβ * yβ) ^ 2 + (xβ * yβ + xβ * yβ) ^ 2"
] |
import Mathlib.Data.Set.Subsingleton
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Group.Nat
import Mathlib.Data.Set.Basic
#align_import data.set.equitable from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
variable {Ξ± Ξ² : Type*}
namespace Set
def Equ... | Mathlib/Data/Set/Equitable.lean | 62 | 64 | theorem equitableOn_iff_exists_eq_eq_add_one {s : Set Ξ±} {f : Ξ± β β} :
s.EquitableOn f β β b, β a β s, f a = b β¨ f a = b + 1 := by |
simp_rw [equitableOn_iff_exists_le_le_add_one, Nat.le_and_le_add_one_iff]
| [
" s.EquitableOn f β β b, β a β s, b β€ f a β§ f a β€ b + 1",
" s.EquitableOn f β β b, β a β s, b β€ f a β§ f a β€ b + 1",
" β
.EquitableOn f β β b, β a β β
, b β€ f a β§ f a β€ b + 1",
" β b, β a β s, b β€ f a β§ f a β€ b + 1",
" (f w).succ β€ (f y).succ",
" f x β€ (f y).succ",
" s.EquitableOn f β β b, f '' s β Icc b (... | [
" s.EquitableOn f β β b, β a β s, b β€ f a β§ f a β€ b + 1",
" s.EquitableOn f β β b, β a β s, b β€ f a β§ f a β€ b + 1",
" β
.EquitableOn f β β b, β a β β
, b β€ f a β§ f a β€ b + 1",
" β b, β a β s, b β€ f a β§ f a β€ b + 1",
" (f w).succ β€ (f y).succ",
" f x β€ (f y).succ",
" s.EquitableOn f β β b, f '' s β Icc b (... |
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.Topology.Spectral.Hom
import Mathlib.AlgebraicGeometry.Limits
#align_import algebraic_geometry.morphisms.quasi_compact from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
noncomputable section
open CategoryTheory CategoryT... | Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean | 109 | 111 | theorem QuasiCompact.affineProperty_toProperty {X Y : Scheme} (f : X βΆ Y) :
(QuasiCompact.affineProperty : _).toProperty f β IsAffine Y β§ CompactSpace X.carrier := by |
delta AffineTargetMorphismProperty.toProperty QuasiCompact.affineProperty; simp
| [
" Continuous βf.val.base",
" QuasiCompact f",
" β (U : Set ββY.toPresheafedSpace), IsOpen U β IsCompact U β IsCompact (βf.val.base β»ΒΉ' U)",
" IsCompact (βf.val.base β»ΒΉ' U)",
" βf.val.base β»ΒΉ' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (βf.val.base) (inv f.val.base).toFun",
" β (x : ββY.toP... | [
" Continuous βf.val.base",
" QuasiCompact f",
" β (U : Set ββY.toPresheafedSpace), IsOpen U β IsCompact U β IsCompact (βf.val.base β»ΒΉ' U)",
" IsCompact (βf.val.base β»ΒΉ' U)",
" βf.val.base β»ΒΉ' U = (inv f.val.base).toFun '' U",
" Function.LeftInverse (βf.val.base) (inv f.val.base).toFun",
" β (x : ββY.toP... |
import Mathlib.Geometry.Manifold.MFDeriv.Basic
noncomputable section
open scoped Manifold
variable {π : Type*} [NontriviallyNormedField π] {E : Type*} [NormedAddCommGroup E]
[NormedSpace π E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π E'] {f : E β E'}
{s : Set E} {x : E}
section MFDerivFderiv
t... | Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean | 49 | 52 | theorem hasMFDerivWithinAt_iff_hasFDerivWithinAt {f'} :
HasMFDerivWithinAt π(π, E) π(π, E') f s x f' β HasFDerivWithinAt f f' s x := by |
simpa only [HasMFDerivWithinAt, and_iff_right_iff_imp, mfld_simps] using
HasFDerivWithinAt.continuousWithinAt
| [
" UniqueMDiffWithinAt π(π, E) s x β UniqueDiffWithinAt π s x",
" UniqueMDiffOn π(π, E) s β UniqueDiffOn π s",
" HasMFDerivWithinAt π(π, E) π(π, E') f s x f' β HasFDerivWithinAt f f' s x"
] | [
" UniqueMDiffWithinAt π(π, E) s x β UniqueDiffWithinAt π s x",
" UniqueMDiffOn π(π, E) s β UniqueDiffOn π s"
] |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904"
open Function OrderDual
variable {ΞΉ Ξ± Ξ² : Type*} {Ο : ΞΉ β Type*}
def symmDiff [Sup Ξ±] [SDiff Ξ±] (a b : Ξ±) : Ξ± :=
a \ b β b \ a
#ali... | Mathlib/Order/SymmDiff.lean | 133 | 134 | theorem symmDiff_eq_bot {a b : Ξ±} : a β b = β₯ β a = b := by |
simp_rw [symmDiff, sup_eq_bot_iff, sdiff_eq_bot_iff, le_antisymm_iff]
| [
" β (p q : Bool), p β q = xor p q",
" a β b = b β a",
" a β a = β₯",
" a β β₯ = a",
" β₯ β a = a",
" a β b = β₯ β a = b"
] | [
" β (p q : Bool), p β q = xor p q",
" a β b = b β a",
" a β a = β₯",
" a β β₯ = a",
" β₯ β a = a"
] |
import Mathlib.Logic.Function.Basic
import Mathlib.Logic.Relator
import Mathlib.Init.Data.Quot
import Mathlib.Tactic.Cases
import Mathlib.Tactic.Use
import Mathlib.Tactic.MkIffOfInductiveProp
import Mathlib.Tactic.SimpRw
#align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a... | Mathlib/Logic/Relation.lean | 353 | 357 | theorem cases_head_iff : ReflTransGen r a b β a = b β¨ β c, r a c β§ ReflTransGen r c b := by |
use cases_head
rintro (rfl | β¨c, hac, hcbβ©)
Β· rfl
Β· exact head hac hcb
| [
" ReflTransGen r a c",
" ReflTransGen r a b",
" ReflTransGen r a cβ",
" Symmetric (ReflTransGen r)",
" ReflTransGen r y x",
" ReflTransGen r x x",
" ReflTransGen r w x",
" P a h",
" P a β―",
" P b β―",
" β {a c_1 : Ξ±} (h' : r a c_1) (h : ReflTransGen r c_1 b), P c_1 β― β P a β―",
" P h",
" P β―",... | [
" ReflTransGen r a c",
" ReflTransGen r a b",
" ReflTransGen r a cβ",
" Symmetric (ReflTransGen r)",
" ReflTransGen r y x",
" ReflTransGen r x x",
" ReflTransGen r w x",
" P a h",
" P a β―",
" P b β―",
" β {a c_1 : Ξ±} (h' : r a c_1) (h : ReflTransGen r c_1 b), P c_1 β― β P a β―",
" P h",
" P β―",... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.integral_normalization from "leanprover-community/mathlib"@"6f401acf4faec3ab9ab13a42789c4f68064a61cd"
open Polynomial
namespace Polynomial
universe u... | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | 44 | 45 | theorem integralNormalization_zero : integralNormalization (0 : R[X]) = 0 := by |
simp [integralNormalization]
| [
" integralNormalization 0 = 0"
] | [] |
import Mathlib.Algebra.Polynomial.Monic
#align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722"
open Finset
open Multiset
open Polynomial
universe u w
variable {R : Type u} {ΞΉ : Type w}
namespace Polynomial
variable (s : Finset ΞΉ)
sectio... | Mathlib/Algebra/Polynomial/BigOperators.lean | 86 | 89 | theorem degree_list_prod_le (l : List S[X]) : degree l.prod β€ (l.map degree).sum := by |
induction' l with hd tl IH
Β· simp
Β· simpa using (degree_mul_le _ _).trans (add_le_add_left IH _)
| [
" natDegree 0 β€ 0",
" β (a : List S[X]), (Multiset.sum β¦aβ§).natDegree β€ foldr max β― 0 (Multiset.map natDegree β¦aβ§)",
" (β i β s, f i).natDegree β€ Finset.fold max 0 (natDegree β f) s",
" 0 β€ n β§ β x β s, (natDegree β f) x β€ n",
" l.sum.degree β€ (List.map natDegree l).maximum",
" βl.sum.natDegree β€ (List.ma... | [
" natDegree 0 β€ 0",
" β (a : List S[X]), (Multiset.sum β¦aβ§).natDegree β€ foldr max β― 0 (Multiset.map natDegree β¦aβ§)",
" (β i β s, f i).natDegree β€ Finset.fold max 0 (natDegree β f) s",
" 0 β€ n β§ β x β s, (natDegree β f) x β€ n",
" l.sum.degree β€ (List.map natDegree l).maximum",
" βl.sum.natDegree β€ (List.ma... |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Topology.Order.ProjIcc
#align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Filter
open S... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean | 124 | 125 | theorem arcsin_of_one_le {x : β} (hx : 1 β€ x) : arcsin x = Ο / 2 := by |
rw [β arcsin_projIcc, projIcc_of_right_le _ hx, Subtype.coe_mk, arcsin_one]
| [
" range arcsin = Icc (-(Ο / 2)) (Ο / 2)",
" Subtype.val '' range (IccExtend arcsin.proof_2 βsinOrderIso.symm) = Icc (-(Ο / 2)) (Ο / 2)",
" (β(projIcc (-1) 1 β― x)).arcsin = x.arcsin",
" x.arcsin.sin = x",
" x.sin.arcsin.sin = x.sin",
" y.arcsin = x",
" x.sin.arcsin = x",
" x.arcsin = Ο / 2"
] | [
" range arcsin = Icc (-(Ο / 2)) (Ο / 2)",
" Subtype.val '' range (IccExtend arcsin.proof_2 βsinOrderIso.symm) = Icc (-(Ο / 2)) (Ο / 2)",
" (β(projIcc (-1) 1 β― x)).arcsin = x.arcsin",
" x.arcsin.sin = x",
" x.sin.arcsin.sin = x.sin",
" y.arcsin = x",
" x.sin.arcsin = x"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : β}
-- @... | Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 105 | 108 | theorem mul_logb {a b c : β} (hβ : b β 0) (hβ : b β 1) (hβ : b β -1) :
logb a b * logb b c = logb a c := by |
unfold logb
rw [mul_comm, div_mul_div_cancel _ (log_ne_zero.mpr β¨hβ, hβ, hββ©)]
| [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb xβ»ΒΉ = -b.logb x",
" (a.logb b)β»ΒΉ = b.logb a",
" ((a * b).logb c)β»ΒΉ = (a.logb c)β»ΒΉ + (b.logb c)β»ΒΉ",
" c.logb ... | [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb xβ»ΒΉ = -b.logb x",
" (a.logb b)β»ΒΉ = b.logb a",
" ((a * b).logb c)β»ΒΉ = (a.logb c)β»ΒΉ + (b.logb c)β»ΒΉ",
" c.logb ... |
import Mathlib.CategoryTheory.Limits.ColimitLimit
import Mathlib.CategoryTheory.Limits.Preserves.FunctorCategory
import Mathlib.CategoryTheory.Limits.Preserves.Finite
import Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits
import Mathlib.CategoryTheory.Limits.TypesFiltered
import Mathlib.CategoryTheory.ConcreteCatego... | Mathlib/CategoryTheory/Limits/FilteredColimitCommutesFiniteLimit.lean | 72 | 142 | theorem colimitLimitToLimitColimit_injective :
Function.Injective (colimitLimitToLimitColimit F) := by |
classical
cases nonempty_fintype J
-- Suppose we have two terms `x y` in the colimit (over `K`) of the limits (over `J`),
-- and that these have the same image under `colimitLimitToLimitColimit F`.
intro x y h
-- These elements of the colimit have representatives somewhere:
obtain β¨kx, x, rfl... | [
" Function.Injective (colimitLimitToLimitColimit F)",
" x = y",
" colimit.ΞΉ (curry.obj (swap K J β F) β lim) kx x = y",
" colimit.ΞΉ (curry.obj (swap K J β F) β lim) kx x = colimit.ΞΉ (curry.obj (swap K J β F) β lim) ky y",
" kx β {kx, ky}",
" ky β {kx, ky}",
" k j β Finset.image k Finset.univ",
" β¨kx, ... | [] |
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.Finite
universe u v
open Function Set Cardinal
variable {R} {M Mβ Mβ Mβ : Type u} {M' : Type v} [Ring R]
variable [AddCommGroup M] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup Mβ] [AddCommGroup M']
variable [Module R M... | Mathlib/LinearAlgebra/Dimension/RankNullity.lean | 113 | 123 | theorem exists_linearIndependent_cons_of_lt_rank [StrongRankCondition R] {n : β} {v : Fin n β M}
(hv : LinearIndependent R v) (h : n < Module.rank R M) :
β (x : M), LinearIndependent R (Fin.cons x v) := by |
obtain β¨t, hβ, hβ, hββ© := exists_linearIndependent_of_lt_rank hv.to_subtype_range
have : range v β t := by
refine fun e β¦ h.ne ?_
rw [β e, β lift_injective.eq_iff, mk_range_eq_of_injective hv.injective] at hβ
simpa only [mk_fintype, Fintype.card_fin, lift_natCast, lift_id'] using hβ
obtain β¨x, hx, hx... | [
" Nontrivial R",
" False",
" lift.{u, v} (Module.rank R β₯(LinearMap.range f)) + lift.{v, u} (Module.rank R β₯(LinearMap.ker f)) =\n lift.{v, u} (Module.rank R M)",
" Module.rank R β₯(LinearMap.range f) + Module.rank R β₯(LinearMap.ker f) = Module.rank R M",
" lift.{v, u} (Module.rank R M) = lift.{u, v} (Mod... | [
" Nontrivial R",
" False",
" lift.{u, v} (Module.rank R β₯(LinearMap.range f)) + lift.{v, u} (Module.rank R β₯(LinearMap.ker f)) =\n lift.{v, u} (Module.rank R M)",
" Module.rank R β₯(LinearMap.range f) + Module.rank R β₯(LinearMap.ker f) = Module.rank R M",
" lift.{v, u} (Module.rank R M) = lift.{u, v} (Mod... |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
ope... | Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 298 | 301 | theorem finsuppTensorFinsuppLid_single_tmul_single (a : ΞΉ) (b : ΞΊ) (r : R) (n : N) :
finsuppTensorFinsuppLid R N ΞΉ ΞΊ (Finsupp.single a r ββ[R] Finsupp.single b n) =
Finsupp.single (a, b) (r β’ n) := by |
simp [finsuppTensorFinsuppLid]
| [
" (finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (Finsupp.single i m ββ[R] Finsupp.single k n) = Finsupp.single (i, k) (m ββ[R] n)",
" ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (f ββ[R] g)) (i, k) = f i ββ[R] g k",
" ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (0 ββ[R] g)) (i, k) = 0 i ββ[R] g k",
" β (f g_1 : ΞΉ ββ M),\n ((finsuppT... | [
" (finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (Finsupp.single i m ββ[R] Finsupp.single k n) = Finsupp.single (i, k) (m ββ[R] n)",
" ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (f ββ[R] g)) (i, k) = f i ββ[R] g k",
" ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (0 ββ[R] g)) (i, k) = 0 i ββ[R] g k",
" β (f g_1 : ΞΉ ββ M),\n ((finsuppT... |
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Algebra.Polynomial.RingDivision
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
noncomputable section
open scoped Classical
open scoped nonZeroDivisors Polynomial
universe u v
va... | Mathlib/FieldTheory/RatFunc/Defs.lean | 123 | 127 | theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]β°) (f : K[X] β K[X] β P)
(H : β {p q p' q'} (_hq : q β K[X]β°) (_hq' : q' β K[X]β°), q' * p = q * p' β f p q = f p' q') :
RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by |
rw [RatFunc.liftOn]
exact Localization.liftOn_mk _ _ _ _
| [
" { toFractionRing := x } = { toFractionRing := y }",
" { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }",
" P",
" β {a c : K[X]} {b d : β₯K[X]β°},\n (Localization.r K[X]β°) (a, b) (c, d) β (fun p q => f p βq) a b = (fun p q => f p βq) c d",
" (fun p q => f p βq) p q = ... | [
" { toFractionRing := x } = { toFractionRing := y }",
" { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }",
" P",
" β {a c : K[X]} {b d : β₯K[X]β°},\n (Localization.r K[X]β°) (a, b) (c, d) β (fun p q => f p βq) a b = (fun p q => f p βq) c d",
" (fun p q => f p βq) p q = ... |
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.CategoryTheory.MorphismProperty.Limits
import Mathlib.Data.List.TFAE
#align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218"
set_option lin... | Mathlib/AlgebraicGeometry/Morphisms/Basic.lean | 104 | 106 | theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso)
{X Y Z : Scheme} (f : X βΆ Y) (g : Y βΆ Z) [IsIso g] [IsAffine Z] [IsAffine Y] :
P (f β« g) β P f := by | rw [β P.toProperty_apply, β P.toProperty_apply, hP.cancel_right_isIso]
| [
" P.toProperty f β P f",
" (β (h : IsAffine Y), P f) β P f",
" P (f β« g) β P g",
" P (f β« g) β P f"
] | [
" P.toProperty f β P f",
" (β (h : IsAffine Y), P f) β P f",
" P (f β« g) β P g"
] |
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function
open scoped Topology ENNReal Convex
variable... | Mathlib/MeasureTheory/Integral/Average.lean | 336 | 337 | theorem average_eq_integral [IsProbabilityMeasure ΞΌ] (f : Ξ± β E) : β¨ x, f x βΞΌ = β« x, f x βΞΌ := by |
rw [average, measure_univ, inv_one, one_smul]
| [
" β¨ (x : Ξ±), 0 βΞΌ = 0",
" β¨ (x : Ξ±), f x β0 = 0",
" β¨ (x : Ξ±), f x βΞΌ = (ΞΌ univ).toRealβ»ΒΉ β’ β« (x : Ξ±), f x βΞΌ",
" β¨ (x : Ξ±), f x βΞΌ = β« (x : Ξ±), f x βΞΌ"
] | [
" β¨ (x : Ξ±), 0 βΞΌ = 0",
" β¨ (x : Ξ±), f x β0 = 0",
" β¨ (x : Ξ±), f x βΞΌ = (ΞΌ univ).toRealβ»ΒΉ β’ β« (x : Ξ±), f x βΞΌ"
] |
import Mathlib.Algebra.Order.Field.Power
import Mathlib.NumberTheory.Padics.PadicVal
#align_import number_theory.padics.padic_norm from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
def padicNorm (p : β) (q : β) : β :=
if q = 0 then 0 else (p : β) ^ (-padicValRat p q)
#align padic_n... | Mathlib/NumberTheory/Padics/PadicNorm.lean | 94 | 98 | theorem padicNorm_of_prime_of_ne {q : β} [p_prime : Fact p.Prime] [q_prime : Fact q.Prime]
(neq : p β q) : padicNorm p q = 1 := by |
have p : padicValRat p q = 0 := mod_cast padicValNat_primes neq
rw [padicNorm, p]
simp [q_prime.1.ne_zero]
| [
" padicNorm p q = βp ^ (-padicValRat p q)",
" 0 β€ padicNorm p q",
" 0 β€ if q = 0 then 0 else βp ^ (-padicValRat p q)",
" 0 β€ βp ^ (-padicValRat p q)",
" 0 β€ βp",
" padicNorm p 0 = 0",
" padicNorm p 1 = 1",
" padicNorm p βp = (βp)β»ΒΉ",
" padicNorm p βq = 1",
" padicNorm pβ βq = 1",
" (if βq = 0 th... | [
" padicNorm p q = βp ^ (-padicValRat p q)",
" 0 β€ padicNorm p q",
" 0 β€ if q = 0 then 0 else βp ^ (-padicValRat p q)",
" 0 β€ βp ^ (-padicValRat p q)",
" 0 β€ βp",
" padicNorm p 0 = 0",
" padicNorm p 1 = 1",
" padicNorm p βp = (βp)β»ΒΉ"
] |
import Mathlib.AlgebraicGeometry.Properties
#align_import algebraic_geometry.function_field from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc"
-- Explicit universe annotations were used in this file to improve perfomance #12737
set_option linter.uppercaseLean3 false
universe u v
open... | Mathlib/AlgebraicGeometry/FunctionField.lean | 115 | 121 | theorem genericPoint_eq_bot_of_affine (R : CommRingCat) [IsDomain R] :
genericPoint (Scheme.Spec.obj <| op R).carrier = (β¨0, Ideal.bot_primeβ© : PrimeSpectrum R) := by |
apply (genericPoint_spec (Scheme.Spec.obj <| op R).carrier).eq
rw [isGenericPoint_def]
rw [β PrimeSpectrum.zeroLocus_vanishingIdeal_eq_closure, PrimeSpectrum.vanishingIdeal_singleton]
rw [Set.top_eq_univ, β PrimeSpectrum.zeroLocus_singleton_zero]
simp_rw [Submodule.zero_eq_bot, Submodule.bot_coe]
| [
" (β€ β© βU).Nonempty",
" Field βX.functionField",
" IsUnit a β¨ a = 0",
" IsUnit ((X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s) β¨\n (X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s = 0",
" Β¬(X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s =\n (X.presheaf.germ β¨ge... | [
" (β€ β© βU).Nonempty",
" Field βX.functionField",
" IsUnit a β¨ a = 0",
" IsUnit ((X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s) β¨\n (X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s = 0",
" Β¬(X.presheaf.germ β¨genericPoint ββX.toPresheafedSpace, mβ©) s =\n (X.presheaf.germ β¨ge... |
import Mathlib.AlgebraicTopology.SimplicialObject
import Mathlib.CategoryTheory.Limits.Shapes.Products
#align_import algebraic_topology.split_simplicial_object from "leanprover-community/mathlib"@"dd1f8496baa505636a82748e6b652165ea888733"
noncomputable section
open CategoryTheory CategoryTheory.Category Category... | Mathlib/AlgebraicTopology/SplitSimplicialObject.lean | 77 | 84 | theorem ext (Aβ Aβ : IndexSet Ξ) (hβ : Aβ.1 = Aβ.1) (hβ : Aβ.e β« eqToHom (by rw [hβ]) = Aβ.e) :
Aβ = Aβ := by |
rcases Aβ with β¨Ξβ, β¨Ξ±β, hΞ±ββ©β©
rcases Aβ with β¨Ξβ, β¨Ξ±β, hΞ±ββ©β©
simp only at hβ
subst hβ
simp only [eqToHom_refl, comp_id, IndexSet.e] at hβ
simp only [hβ]
| [
" Aβ.fst.unop = Aβ.fst.unop",
" Aβ = Aβ",
" β¨Ξβ, β¨Ξ±β, hΞ±ββ©β© = Aβ",
" β¨Ξβ, β¨Ξ±β, hΞ±ββ©β© = β¨Ξβ, β¨Ξ±β, hΞ±ββ©β©",
" β¨Ξβ, β¨Ξ±β, hΞ±ββ©β© = β¨Ξβ, β¨Ξ±β, hΞ±ββ©β©"
] | [] |
import Mathlib.Analysis.Convex.Function
import Mathlib.Analysis.Convex.StrictConvexSpace
import Mathlib.MeasureTheory.Function.AEEqOfIntegral
import Mathlib.MeasureTheory.Integral.Average
#align_import analysis.convex.integral from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Mea... | Mathlib/Analysis/Convex/Integral.lean | 122 | 127 | theorem ConcaveOn.average_mem_hypograph [IsFiniteMeasure ΞΌ] [NeZero ΞΌ] (hg : ConcaveOn β s g)
(hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : βα΅ x βΞΌ, f x β s)
(hfi : Integrable f ΞΌ) (hgi : Integrable (g β f) ΞΌ) :
(β¨ x, f x βΞΌ, β¨ x, g (f x) βΞΌ) β {p : E Γ β | p.1 β s β§ p.2 β€ g p.1} := by |
simpa only [mem_setOf_eq, Pi.neg_apply, average_neg, neg_le_neg_iff] using
hg.neg.average_mem_epigraph hgc.neg hsc hfs hfi hgi.neg
| [
" β« (x : Ξ±), f x βΞΌ β s",
" (range g β© s).Nonempty",
" f xβ β range g",
" β« (a : Ξ±), g a βΞΌ β s",
" βα΅ (x : Ξ±) βΞΌ, g x β closure (range g β© s)",
" g x β closure (range g β© s)",
" g x β range g β© s",
" β i β (G n).range, 0 β€ (ΞΌ (β(G n) β»ΒΉ' {i})).toReal",
" β i β (G n).range, (ΞΌ (β(G n) β»ΒΉ' {i})).toRe... | [
" β« (x : Ξ±), f x βΞΌ β s",
" (range g β© s).Nonempty",
" f xβ β range g",
" β« (a : Ξ±), g a βΞΌ β s",
" βα΅ (x : Ξ±) βΞΌ, g x β closure (range g β© s)",
" g x β closure (range g β© s)",
" g x β range g β© s",
" β i β (G n).range, 0 β€ (ΞΌ (β(G n) β»ΒΉ' {i})).toReal",
" β i β (G n).range, (ΞΌ (β(G n) β»ΒΉ' {i})).toRe... |
import Mathlib.Data.Nat.Choose.Basic
import Mathlib.Data.Sym.Sym2
namespace List
variable {Ξ± : Type*}
section Sym2
protected def sym2 : List Ξ± β List (Sym2 Ξ±)
| [] => []
| x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2
theorem mem_sym2_cons_iff {x : Ξ±} {xs : List Ξ±} {z : Sym2 Ξ±} :
z β (x :: xs)... | Mathlib/Data/List/Sym.lean | 81 | 87 | theorem mk_mem_sym2_iff {xs : List Ξ±} {a b : Ξ±} :
s(a, b) β xs.sym2 β a β xs β§ b β xs := by |
constructor
Β· intro h
exact β¨left_mem_of_mk_mem_sym2 h, right_mem_of_mk_mem_sym2 hβ©
Β· rintro β¨ha, hbβ©
exact mk_mem_sym2 ha hb
| [
" z β (x :: xs).sym2 β z = s(x, x) β¨ (β y β xs, z = s(x, y)) β¨ z β xs.sym2",
" z = s(x, x) β¨ (β a β xs, s(x, a) = z) β¨ z β xs.sym2 β z = s(x, x) β¨ (β y β xs, z = s(x, y)) β¨ z β xs.sym2",
" xs.sym2 = [] β xs = []",
" [].sym2 = [] β [] = []",
" (headβ :: tailβ).sym2 = [] β headβ :: tailβ = []",
" a β xs",
... | [
" z β (x :: xs).sym2 β z = s(x, x) β¨ (β y β xs, z = s(x, y)) β¨ z β xs.sym2",
" z = s(x, x) β¨ (β a β xs, s(x, a) = z) β¨ z β xs.sym2 β z = s(x, x) β¨ (β y β xs, z = s(x, y)) β¨ z β xs.sym2",
" xs.sym2 = [] β xs = []",
" [].sym2 = [] β [] = []",
" (headβ :: tailβ).sym2 = [] β headβ :: tailβ = []",
" a β xs",
... |
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.GroupTheory.Abelianization
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.SpecificGroups.Dihedral
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Line... | Mathlib/GroupTheory/CommutingProbability.lean | 108 | 116 | theorem Subgroup.commProb_subgroup_le : commProb H β€ commProb G * (H.index : β) ^ 2 := by |
/- After rewriting with `commProb_def`, we reduce to showing that `G` has at least as many
commuting pairs as `H`. -/
rw [commProb_def, commProb_def, div_le_iff, mul_assoc, β mul_pow, β Nat.cast_mul,
mul_comm H.index, H.card_mul_index, div_mul_cancelβ, Nat.cast_le]
Β· refine Finite.card_le_of_injective ... | [
" commProb (M Γ M') = commProb M * commProb M'",
" β(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 β§ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (β(Nat.card M) ^ 2 * β(Nat.card M') ^ 2) =\n β(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } Γ { p // p.1 * p.2 = p.2 * p.1 })) /\n (β(Nat.card M) ^ 2 * β(Nat.card M') ... | [
" commProb (M Γ M') = commProb M * commProb M'",
" β(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 β§ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (β(Nat.card M) ^ 2 * β(Nat.card M') ^ 2) =\n β(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } Γ { p // p.1 * p.2 = p.2 * p.1 })) /\n (β(Nat.card M) ^ 2 * β(Nat.card M') ... |
import Mathlib.Order.UpperLower.Basic
import Mathlib.Data.Finset.Preimage
#align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Function
@[ext]
structure YoungDiagram where
cells : Finset (β Γ β)
isLowerSet : IsLowerSet (cel... | Mathlib/Combinatorics/Young/YoungDiagram.lean | 289 | 289 | theorem mk_mem_row_iff {ΞΌ : YoungDiagram} {i j : β} : (i, j) β ΞΌ.row i β (i, j) β ΞΌ := by | simp [row]
| [
" ΞΌ = Ξ½",
" c β ΞΌ.row i β c β ΞΌ β§ c.1 = i",
" (i, j) β ΞΌ.row i β (i, j) β ΞΌ"
] | [
" ΞΌ = Ξ½",
" c β ΞΌ.row i β c β ΞΌ β§ c.1 = i"
] |
import Mathlib.Topology.Connected.Basic
import Mathlib.Topology.Separation
open scoped Topology
variable {X Y A} [TopologicalSpace X] [TopologicalSpace A]
theorem embedding_toPullbackDiag (f : X β Y) : Embedding (toPullbackDiag f) :=
Embedding.mk' _ (injective_toPullbackDiag f) fun x β¦ by
rw [toPullbackDiag,... | Mathlib/Topology/SeparatedMap.lean | 89 | 92 | theorem isSeparatedMap_iff_closedEmbedding {f : X β Y} :
IsSeparatedMap f β ClosedEmbedding (toPullbackDiag f) := by |
rw [isSeparatedMap_iff_isClosed_diagonal, β range_toPullbackDiag]
exact β¨fun h β¦ β¨embedding_toPullbackDiag f, hβ©, fun h β¦ h.isClosed_rangeβ©
| [
" Filter.comap (toPullbackDiag f) (π (toPullbackDiag f x)) = π x",
" Filter.comap (Prod.fst β Subtype.val β toPullbackDiag f) (π x) β\n Filter.comap (Prod.snd β Subtype.val β toPullbackDiag f) (π x) =\n π x",
" Continuous (Function.mapPullback mapX mapY mapZ commX commZ)",
" Continuous fun x => m... | [
" Filter.comap (toPullbackDiag f) (π (toPullbackDiag f x)) = π x",
" Filter.comap (Prod.fst β Subtype.val β toPullbackDiag f) (π x) β\n Filter.comap (Prod.snd β Subtype.val β toPullbackDiag f) (π x) =\n π x",
" Continuous (Function.mapPullback mapX mapY mapZ commX commZ)",
" Continuous fun x => m... |
import Mathlib.Algebra.Regular.Basic
import Mathlib.LinearAlgebra.Matrix.MvPolynomial
import Mathlib.LinearAlgebra.Matrix.Polynomial
import Mathlib.RingTheory.Polynomial.Basic
#align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a"
namespace Matr... | Mathlib/LinearAlgebra/Matrix/Adjugate.lean | 141 | 142 | theorem cramer_subsingleton_apply [Subsingleton n] (A : Matrix n n Ξ±) (b : n β Ξ±) (i : n) :
cramer A b i = b i := by | rw [cramer_apply, det_eq_elem_of_subsingleton _ i, updateColumn_self]
| [
" IsLinearMap Ξ± A.cramerMap",
" β (x y : n β Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" β (c : Ξ±) (x : n β Ξ±), A.cramerMap (c β’ x) = c β’ A.cramerMap x",
" A.cramerMap (xβ + yβ) = A.cramerMap xβ + A.cramerMap yβ",
" A.cramerMap (cβ β’ xβ) = cβ β’ A.cramerMap xβ",
" A.cramerMap (xβ + yβ) i = ... | [
" IsLinearMap Ξ± A.cramerMap",
" β (x y : n β Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y",
" β (c : Ξ±) (x : n β Ξ±), A.cramerMap (c β’ x) = c β’ A.cramerMap x",
" A.cramerMap (xβ + yβ) = A.cramerMap xβ + A.cramerMap yβ",
" A.cramerMap (cβ β’ xβ) = cβ β’ A.cramerMap xβ",
" A.cramerMap (xβ + yβ) i = ... |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 74 | 77 | theorem apply_firstDiff_ne {x y : β n, E n} (h : x β y) :
x (firstDiff x y) β y (firstDiff x y) := by |
rw [firstDiff_def, dif_pos h]
exact Nat.find_spec (ne_iff.1 h)
| [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)"
] | [] |
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 | 46 | 48 | theorem mapβ_def {Ξ± Ξ² Ξ³ : Type u} (f : Ξ± β Ξ² β Ξ³) (a : Option Ξ±) (b : Option Ξ²) :
mapβ f a b = f <$> a <*> b := by |
cases a <;> rfl
| [
" mapβ f a b = Seq.seq (f <$> a) fun x => b",
" mapβ f none b = Seq.seq (f <$> none) fun x => b",
" mapβ f (some valβ) b = Seq.seq (f <$> some valβ) fun x => b"
] | [] |
import Mathlib.MeasureTheory.Integral.Bochner
import Mathlib.MeasureTheory.Group.Measure
#align_import measure_theory.group.integration from "leanprover-community/mathlib"@"ec247d43814751ffceb33b758e8820df2372bf6f"
namespace MeasureTheory
open Measure TopologicalSpace
open scoped ENNReal
variable {π M Ξ± G E F ... | Mathlib/MeasureTheory/Group/Integral.lean | 124 | 127 | theorem Integrable.comp_div_right {f : G β F} [IsMulRightInvariant ΞΌ] (hf : Integrable f ΞΌ)
(g : G) : Integrable (fun t => f (t / g)) ΞΌ := by |
simp_rw [div_eq_mul_inv]
exact hf.comp_mul_right gβ»ΒΉ
| [
" β« (x : G), f (g * x) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x * g) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x / g) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x * gβ»ΒΉ) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f x βΞΌ = 0",
" Integrable (fun t => f (t / g)) ΞΌ",
" Integrable (fun t => f (t * gβ»ΒΉ)) ΞΌ"
] | [
" β« (x : G), f (g * x) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x * g) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x / g) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f (x * gβ»ΒΉ) βΞΌ = β« (x : G), f x βΞΌ",
" β« (x : G), f x βΞΌ = 0"
] |
import Mathlib.CategoryTheory.Adjunction.Basic
import Mathlib.CategoryTheory.Conj
#align_import category_theory.adjunction.mates from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184"
universe vβ vβ vβ vβ uβ uβ uβ uβ
namespace CategoryTheory
open Category
variable {C : Type uβ} {D : Typ... | Mathlib/CategoryTheory/Adjunction/Mates.lean | 111 | 115 | theorem transferNatTrans_counit (f : G β Lβ βΆ Lβ β H) (Y : D) :
Lβ.map ((transferNatTrans adjβ adjβ f).app _) β« adjβ.counit.app _ =
f.app _ β« H.map (adjβ.counit.app Y) := by |
erw [Functor.map_comp]
simp
| [
" (Rβ β G).map f β«\n (fun X => adjβ.unit.app (G.obj (Rβ.obj X)) β« Rβ.map (h.app (Rβ.obj X) β« H.map (adjβ.counit.app X))) Y =\n (fun X => adjβ.unit.app (G.obj (Rβ.obj X)) β« Rβ.map (h.app (Rβ.obj X) β« H.map (adjβ.counit.app X))) X β«\n (H β Rβ).map f",
" G.map (Rβ.map f) β« adjβ.unit.app (G.obj (Rβ.obj Y... | [
" (Rβ β G).map f β«\n (fun X => adjβ.unit.app (G.obj (Rβ.obj X)) β« Rβ.map (h.app (Rβ.obj X) β« H.map (adjβ.counit.app X))) Y =\n (fun X => adjβ.unit.app (G.obj (Rβ.obj X)) β« Rβ.map (h.app (Rβ.obj X) β« H.map (adjβ.counit.app X))) X β«\n (H β Rβ).map f",
" G.map (Rβ.map f) β« adjβ.unit.app (G.obj (Rβ.obj Y... |
import Mathlib.Topology.ContinuousOn
import Mathlib.Data.Set.BoolIndicator
open Set Filter Topology TopologicalSpace Classical
universe u v
variable {X : Type u} {Y : Type v} {ΞΉ : Type*}
variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X}
section Clopen
protected theorem IsClopen.isOpen (hs : IsClo... | Mathlib/Topology/Clopen.lean | 113 | 120 | theorem isClopen_inter_of_disjoint_cover_clopen {s a b : Set X} (h : IsClopen s) (cover : s β a βͺ b)
(ha : IsOpen a) (hb : IsOpen b) (hab : Disjoint a b) : IsClopen (s β© a) := by |
refine β¨?_, IsOpen.inter h.2 haβ©
have : IsClosed (s β© bαΆ) := IsClosed.inter h.1 (isClosed_compl_iff.2 hb)
convert this using 1
refine (inter_subset_inter_right s hab.subset_compl_right).antisymm ?_
rintro x β¨hxβ, hxββ©
exact β¨hxβ, by simpa [not_mem_of_mem_compl hxβ] using cover hxββ©
| [
" IsClopen s β frontier s = β
",
" closure s = s β§ interior s = s β closure s β interior s",
" closure s = s β§ interior s = s",
" IsClopen (s β© a)",
" IsClosed (s β© a)",
" s β© a = s β© bαΆ",
" s β© bαΆ β s β© a",
" x β s β© a",
" x β a"
] | [
" IsClopen s β frontier s = β
",
" closure s = s β§ interior s = s β closure s β interior s",
" closure s = s β§ interior s = s"
] |
import Mathlib.Order.Filter.Bases
import Mathlib.Order.ConditionallyCompleteLattice.Basic
#align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Set Classical Filter Function
namespace Filter
variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*}
section lift
protect... | Mathlib/Order/Filter/Lift.lean | 65 | 70 | theorem HasBasis.lift {ΞΉ} {p : ΞΉ β Prop} {s : ΞΉ β Set Ξ±} {f : Filter Ξ±} (hf : f.HasBasis p s)
{Ξ² : ΞΉ β Type*} {pg : β i, Ξ² i β Prop} {sg : β i, Ξ² i β Set Ξ³} {g : Set Ξ± β Filter Ξ³}
(hg : β i, (g (s i)).HasBasis (pg i) (sg i)) (gm : Monotone g) :
(f.lift g).HasBasis (fun i : Ξ£i, Ξ² i => p i.1 β§ pg i.1 i.2) fun... |
refine β¨fun t => (hf.mem_lift_iff hg gm).trans ?_β©
simp [Sigma.exists, and_assoc, exists_and_left]
| [
" β€.lift g = g univ",
" s β f.lift g β β i, p i β§ β x, pg i x β§ sg i x β s",
" DirectedOn ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) f.sets",
" β z β f.sets, ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) tβ z β§ ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) tβ z",
" (β i β f.sets, s β g i) β β i, p i β§ β x, pg i x... | [
" β€.lift g = g univ",
" s β f.lift g β β i, p i β§ β x, pg i x β§ sg i x β s",
" DirectedOn ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) f.sets",
" β z β f.sets, ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) tβ z β§ ((fun s => g s) β»ΒΉ'o fun x x_1 => x β₯ x_1) tβ z",
" (β i β f.sets, s β g i) β β i, p i β§ β x, pg i x... |
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.Data.Finset.Pointwise
#align_import algebra.monoid_algebra.support from "leanprover-community/mathlib"@"16749fc4661828cba18cd0f4e3c5eb66a8e80598"
open scoped Pointwise
universe uβ uβ uβ
namespace MonoidAlgebra
open Finset Finsupp
variable {k : Type uβ} ... | Mathlib/Algebra/MonoidAlgebra/Support.lean | 55 | 62 | theorem support_mul_single_eq_image [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) {r : k}
(hr : β y, y * r = 0 β y = 0) {x : G} (rx : IsRightRegular x) :
(f * single x r).support = Finset.image (Β· * x) f.support := by |
refine subset_antisymm (support_mul_single_subset f _ _) fun y hy => ?_
obtain β¨y, yf, rflβ© : β a : G, a β f.support β§ a * x = y := by
simpa only [Finset.mem_image, exists_prop] using hy
simp only [mul_apply, mem_support_iff.mp yf, hr, mem_support_iff, sum_single_index,
Finsupp.sum_ite_eq', Ne, not_false... | [
" (a * b).support β a.support * b.support",
" (sum a fun aβ bβ => sum b fun aβ bβ => single (aβ * aβ) (bβ * bβ)).support β a.support * b.support",
" imageβ (fun x x_1 => x * x_1) {a} f.support β image (fun x => a * x) f.support",
" imageβ (fun x x_1 => x * x_1) f.support {a} β image (fun x => x * a) f.support... | [
" (a * b).support β a.support * b.support",
" (sum a fun aβ bβ => sum b fun aβ bβ => single (aβ * aβ) (bβ * bβ)).support β a.support * b.support",
" imageβ (fun x x_1 => x * x_1) {a} f.support β image (fun x => a * x) f.support",
" imageβ (fun x x_1 => x * x_1) f.support {a} β image (fun x => x * a) f.support... |
import Batteries.Data.List.Basic
import Batteries.Data.List.Lemmas
open Nat
namespace List
section countP
variable (p q : Ξ± β Bool)
@[simp] theorem countP_nil : countP p [] = 0 := rfl
protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by
induction l generalizing n with
| nil... | .lake/packages/batteries/Batteries/Data/List/Count.lean | 107 | 119 | theorem countP_mono_left (h : β x β l, p x β q x) : countP p l β€ countP q l := by |
induction l with
| nil => apply Nat.le_refl
| cons a l ihl =>
rw [forall_mem_cons] at h
have β¨ha, hlβ© := h
simp [countP_cons]
cases h : p a
. simp
apply Nat.le_trans ?_ (Nat.le_add_right _ _)
apply ihl hl
. simp [ha h]
apply ihl hl
| [
" countP.go p l n = n + countP.go p l 0",
" countP.go p [] n = n + countP.go p [] 0",
" countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0",
" (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0",
" (bif ... | [
" countP.go p l n = n + countP.go p l 0",
" countP.go p [] n = n + countP.go p [] 0",
" countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0",
" (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0",
" (bif ... |
import Mathlib.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 | 106 | 109 | theorem isPiSystem_Ici_rat : IsPiSystem (β a : β, {Ici (a : β)}) := by |
convert isPiSystem_image_Ici (((β) : β β β) '' univ)
ext x
simp only [iUnion_singleton_eq_range, mem_range, image_univ, mem_image, exists_exists_eq_and]
| [
" 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.Algebra.Associated
import Mathlib.Algebra.BigOperators.Finsupp
#align_import algebra.big_operators.associated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*}
-- the same local notation used in `Algebra.Associated`
local infixl:50 " ~α΅€ " => ... | Mathlib/Algebra/BigOperators/Associated.lean | 29 | 36 | theorem exists_mem_multiset_dvd {s : Multiset Ξ±} : p β£ s.prod β β a β s, p β£ a :=
Multiset.induction_on s (fun h => (hp.not_dvd_one h).elim) fun a s ih h =>
have : p β£ a * s.prod := by | simpa using h
match hp.dvd_or_dvd this with
| Or.inl h => β¨a, Multiset.mem_cons_self a s, hβ©
| Or.inr h =>
let β¨a, has, hβ© := ih h
β¨a, Multiset.mem_cons_of_mem has, hβ©
| [
" p β£ a * s.prod"
] | [] |
import Mathlib.Data.Option.NAry
import Mathlib.Data.Seq.Computation
#align_import data.seq.seq from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace Stream'
universe u v w
def IsSeq {Ξ± : Type u} (s : Stream' (Option Ξ±)) : Prop :=
β {n : β}, s n = none β s (n + 1) = none
#al... | Mathlib/Data/Seq/Seq.lean | 160 | 163 | theorem le_stable (s : Seq Ξ±) {m n} (h : m β€ n) : s.get? m = none β s.get? n = none := by |
cases' s with f al
induction' h with n _ IH
exacts [id, fun h2 => al (IH h2)]
| [
" (some a :: βs).IsSeq",
" (some a :: βs) (0 + 1) = none",
" (some a :: βs) (nβ + 1 + 1) = none",
" x = y",
" s.get? n = t.get? n",
" s.TerminatedAt n β (s.get? n).isNone = true",
" s.get? n = none β (s.get? n).isNone = true",
" none = none β none.isNone = true",
" some valβ = none β (some valβ).isN... | [
" (some a :: βs).IsSeq",
" (some a :: βs) (0 + 1) = none",
" (some a :: βs) (nβ + 1 + 1) = none",
" x = y",
" s.get? n = t.get? n",
" s.TerminatedAt n β (s.get? n).isNone = true",
" s.get? n = none β (s.get? n).isNone = true",
" none = none β none.isNone = true",
" some valβ = none β (some valβ).isN... |
import Mathlib.Analysis.Analytic.IsolatedZeros
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.Complex.AbsMax
#align_import analysis.complex.open_mapping from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
open Set Filter Metric Complex
open scoped Topology
vari... | Mathlib/Analysis/Complex/OpenMapping.lean | 44 | 70 | theorem DiffContOnCl.ball_subset_image_closedBall (h : DiffContOnCl β f (ball zβ r)) (hr : 0 < r)
(hf : β z β sphere zβ r, Ξ΅ β€ βf z - f zββ) (hzβ : βαΆ z in π zβ, f z β f zβ) :
ball (f zβ) (Ξ΅ / 2) β f '' closedBall zβ r := by |
/- This is a direct application of the maximum principle. Pick `v` close to `f zβ`, and look at
the function `fun z β¦ βf z - vβ`: it is bounded below on the circle, and takes a small value
at `zβ` so it is not constant on the disk, which implies that its infimum is equal to `0` and
hence that `v` is in t... | [
" ball (f zβ) (Ξ΅ / 2) β f '' closedBall zβ r",
" v β f '' closedBall zβ r",
" Ξ΅ / 2 β€ βf z - vβ",
" βf zβ - vβ < Ξ΅ / 2",
" f z - v = 0",
" False",
" βαΆ (w : β) in π z, f w = f z",
" f h - v = f z - v β f h = f z"
] | [] |
import Mathlib.RingTheory.Valuation.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.valuation.quotient from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
namespace Valuation
variable {R Ξβ : Type*} [CommRing R] [LinearOrderedCommMonoidWithZero Ξβ]
va... | Mathlib/RingTheory/Valuation/Quotient.lean | 66 | 74 | theorem supp_quot {J : Ideal R} (hJ : J β€ supp v) :
supp (v.onQuot hJ) = (supp v).map (Ideal.Quotient.mk J) := by |
apply le_antisymm
Β· rintro β¨xβ© hx
apply Ideal.subset_span
exact β¨x, hx, rflβ©
Β· rw [Ideal.map_le_iff_le_comap]
intro x hx
exact hx
| [
" v a = v (b + -(-a + b))",
" J β€ (comap (Ideal.Quotient.mk J) v).supp",
" Ideal.map (Ideal.Quotient.mk J) J β€ v.supp",
" β (r : R β§Έ J), ((comap (Ideal.Quotient.mk J) v).onQuot β―) r = v r",
" ((comap (Ideal.Quotient.mk J) v).onQuot β―) (Quot.mk Setoid.r x) = v (Quot.mk Setoid.r x)",
" (v.onQuot hJ).supp = ... | [
" v a = v (b + -(-a + b))",
" J β€ (comap (Ideal.Quotient.mk J) v).supp",
" Ideal.map (Ideal.Quotient.mk J) J β€ v.supp",
" β (r : R β§Έ J), ((comap (Ideal.Quotient.mk J) v).onQuot β―) r = v r",
" ((comap (Ideal.Quotient.mk J) v).onQuot β―) (Quot.mk Setoid.r x) = v (Quot.mk Setoid.r x)"
] |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
section AddMonoidWithOne
variable {Ξ± M : Type*} [AddMonoidWith... | Mathlib/Algebra/CharZero/Lemmas.lean | 236 | 238 | theorem units_ne_neg_self (u : RΛ£) : u β -u := by |
simp_rw [ne_eq, Units.ext_iff, Units.val_neg, eq_neg_iff_add_eq_zero, β two_mul,
Units.mul_left_eq_zero, two_ne_zero, not_false_iff]
| [
" 2 β 0",
" a + a = 0 β a = 0",
" 0 = bit0 a β a = 0",
" bit0 a = 0 β a = 0",
" n = 0 β¨ a = b",
" a = b",
" β2 * a = β2 * b",
" bit1 a = 1 β a = 0",
" 1 = bit1 0",
" 1 = bit1 a β a = 0",
" (a + a) / 2 = a",
" a / 2 + a / 2 = a",
" a - a / 2 = a / 2",
" a / 2 - a = -(a / 2)",
" u β -u"
] | [
" 2 β 0",
" a + a = 0 β a = 0",
" 0 = bit0 a β a = 0",
" bit0 a = 0 β a = 0",
" n = 0 β¨ a = b",
" a = b",
" β2 * a = β2 * b",
" bit1 a = 1 β a = 0",
" 1 = bit1 0",
" 1 = bit1 a β a = 0",
" (a + a) / 2 = a",
" a / 2 + a / 2 = a",
" a - a / 2 = a / 2",
" a / 2 - a = -(a / 2)"
] |
import Mathlib.FieldTheory.PrimitiveElement
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.G... | Mathlib/RingTheory/Norm.lean | 179 | 183 | theorem norm_eq_zero_iff_of_basis [IsDomain R] [IsDomain S] (b : Basis ΞΉ R S) {x : S} :
Algebra.norm R x = 0 β x = 0 := by |
haveI : Module.Free R S := Module.Free.of_basis b
haveI : Module.Finite R S := Module.Finite.of_basis b
exact norm_eq_zero_iff
| [
" (norm R) x = 1",
" (if H : β s, Nonempty (Basis { x // x β s } R S) then detAux (Trunc.mk β―.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk β―.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (β s, Nonempty (Basis { x // x β s } R S)) β Module.Finite R S",
" Module.Finite R S",
" (norm R) ... | [
" (norm R) x = 1",
" (if H : β s, Nonempty (Basis { x // x β s } R S) then detAux (Trunc.mk β―.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk β―.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (β s, Nonempty (Basis { x // x β s } R S)) β Module.Finite R S",
" Module.Finite R S",
" (norm R) ... |
import Mathlib.Algebra.Order.Floor
import Mathlib.Topology.Algebra.Order.Group
import Mathlib.Topology.Order.Basic
#align_import topology.algebra.order.floor from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219"
open Filter Function Int Set Topology
variable {Ξ± Ξ² Ξ³ : Type*} [LinearOrdere... | Mathlib/Topology/Algebra/Order/Floor.lean | 74 | 75 | theorem tendsto_floor_right_pure (n : β€) : Tendsto (floor : Ξ± β β€) (π[β₯] n) (pure n) := by |
simpa only [floor_intCast] using tendsto_floor_right_pure_floor (n : Ξ±)
| [
" b β€ ββ(b + 1)β",
" b β€ b + 1",
" ββ(b - 1)β β€ b",
" b - 1 β€ b",
" Tendsto floor (π[β₯] βn) (pure n)"
] | [
" b β€ ββ(b + 1)β",
" b β€ b + 1",
" ββ(b - 1)β β€ b",
" b - 1 β€ b"
] |
import Mathlib.Probability.Kernel.MeasurableIntegral
#align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b"
open MeasureTheory
open scoped ENNReal
namespace ProbabilityTheory
namespace kernel
variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}... | Mathlib/Probability/Kernel/Composition.lean | 131 | 143 | theorem compProdFun_tsum_right (ΞΊ : kernel Ξ± Ξ²) (Ξ· : kernel (Ξ± Γ Ξ²) Ξ³) [IsSFiniteKernel Ξ·] (a : Ξ±)
(hs : MeasurableSet s) : compProdFun ΞΊ Ξ· a s = β' n, compProdFun ΞΊ (seq Ξ· n) a s := by |
simp_rw [compProdFun, (measure_sum_seq Ξ· _).symm]
have :
β«β» b, Measure.sum (fun n => seq Ξ· n (a, b)) {c : Ξ³ | (b, c) β s} βΞΊ a =
β«β» b, β' n, seq Ξ· n (a, b) {c : Ξ³ | (b, c) β s} βΞΊ a := by
congr
ext1 b
rw [Measure.sum_apply]
exact measurable_prod_mk_left hs
rw [this, lintegral_tsum]
ex... | [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... | [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... |
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.CategoryTheory.Limits.Preserves.Basic
import Mathlib.CategoryTheory.Limits.TypesFiltered
import Mathlib.CategoryTheory.Limits.Yoneda
import Mathlib.Tactic.ApplyFun
#align_import category_theory.limits.concrete_category from "leanprover-community/math... | Mathlib/CategoryTheory/Limits/ConcreteCategory.lean | 86 | 89 | theorem Concrete.isColimit_exists_rep {D : Cocone F} (hD : IsColimit D) (x : D.pt) :
β (j : J) (y : F.obj j), D.ΞΉ.app j y = x := by |
obtain β¨a, rflβ© := Concrete.from_union_surjective_of_isColimit F hD x
exact β¨a.1, a.2, rflβ©
| [
" let ff := fun a => (D.ΞΉ.app a.fst) a.snd;\n Function.Surjective ff",
" β a, ff a = x",
" β j y, (D.ΞΉ.app j) y = x",
" β j y, (D.ΞΉ.app j) y = (fun a => (D.ΞΉ.app a.fst) a.snd) a"
] | [
" let ff := fun a => (D.ΞΉ.app a.fst) a.snd;\n Function.Surjective ff",
" β a, ff a = x"
] |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : β) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 112 | 113 | theorem dist_succ_succ {i j : Nat} : dist (succ i) (succ j) = dist i j := by |
simp [dist, succ_sub_succ]
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m β€ n + n.dist m",
" m β€ n.dist m + n",
" n β€ n.dist m + m",
" n β€ m.dist n + m",
" n β€ m + n.dist m",
" n β€ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m β€ n + n.dist m",
" m β€ n.dist m + n",
" n β€ n.dist m + m",
" n β€ m.dist n + m",
" n β€ m + n.dist m",
" n β€ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 127 | 137 | theorem eq_top_of_card_eq [Finite H] (h : Nat.card H = Nat.card G) :
H = β€ := by |
have : Nonempty H := β¨1, one_mem Hβ©
have h' : Nat.card H β 0 := Nat.card_pos.ne'
have : Finite G := (Nat.finite_of_card_ne_zero (h βΈ h'))
have : Fintype G := Fintype.ofFinite G
have : Fintype H := Fintype.ofFinite H
rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card] at h
rw [SetLike.ext'_iff, coe_to... | [
" β (x : β₯β₯), x β {1}",
" β¨1, β―β© β {1}",
" H = β€",
" Fintype.card ββH = Fintype.card β₯H"
] | [
" β (x : β₯β₯), x β {1}",
" β¨1, β―β© β {1}"
] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Exponent
#align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
inductive DihedralGroup (n : β) : Type
| r : ZMod n β DihedralGroup n
| sr : ZMod n β DihedralGroup n
derivin... | Mathlib/GroupTheory/SpecificGroups/Dihedral.lean | 146 | 149 | theorem r_one_pow_n : r (1 : ZMod n) ^ n = 1 := by |
rw [r_one_pow, one_def]
congr 1
exact ZMod.natCast_self _
| [
" β (a b c : DihedralGroup n), a * b * c = a * (b * c)",
" r a * r b * r c = r a * (r b * r c)",
" r a * r b * sr c = r a * (r b * sr c)",
" r a * sr b * r c = r a * (sr b * r c)",
" r a * sr b * sr c = r a * (sr b * sr c)",
" sr a * r b * r c = sr a * (r b * r c)",
" sr a * r b * sr c = sr a * (r b * s... | [
" β (a b c : DihedralGroup n), a * b * c = a * (b * c)",
" r a * r b * r c = r a * (r b * r c)",
" r a * r b * sr c = r a * (r b * sr c)",
" r a * sr b * r c = r a * (sr b * r c)",
" r a * sr b * sr c = r a * (sr b * sr c)",
" sr a * r b * r c = sr a * (r b * r c)",
" sr a * r b * sr c = sr a * (r b * s... |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteD... | Mathlib/NumberTheory/Cyclotomic/Basic.lean | 132 | 150 | theorem trans (C : Type w) [CommRing C] [Algebra A C] [Algebra B C] [IsScalarTower A B C]
[hS : IsCyclotomicExtension S A B] [hT : IsCyclotomicExtension T B C]
(h : Function.Injective (algebraMap B C)) : IsCyclotomicExtension (S βͺ T) A C := by |
refine β¨fun hn => ?_, fun x => ?_β©
Β· cases' hn with hn hn
Β· obtain β¨b, hbβ© := ((isCyclotomicExtension_iff _ _ _).1 hS).1 hn
refine β¨algebraMap B C b, ?_β©
exact hb.map_of_injective h
Β· exact ((isCyclotomicExtension_iff _ _ _).1 hT).1 hn
Β· refine adjoin_induction (((isCyclotomicExtension_iff T ... | [
" IsCyclotomicExtension {n} A B β (β r, IsPrimitiveRoot r βn) β§ β (x : B), x β adjoin A {b | b ^ βn = 1}",
" β₯ = β€",
" x β β₯",
" IsCyclotomicExtension β
A B",
" β r, IsPrimitiveRoot r βs",
" x β adjoin A {b | β n β β
, b ^ βn = 1}",
" IsCyclotomicExtension (S βͺ T) A C",
" β r, IsPrimitiveRoot r βnβ",
... | [
" IsCyclotomicExtension {n} A B β (β r, IsPrimitiveRoot r βn) β§ β (x : B), x β adjoin A {b | b ^ βn = 1}",
" β₯ = β€",
" x β β₯",
" IsCyclotomicExtension β
A B",
" β r, IsPrimitiveRoot r βs",
" x β adjoin A {b | β n β β
, b ^ βn = 1}"
] |
import Mathlib.Order.Filter.Basic
import Mathlib.Topology.Bases
import Mathlib.Data.Set.Accumulate
import Mathlib.Topology.Bornology.Basic
import Mathlib.Topology.LocallyFinite
open Set Filter Topology TopologicalSpace Classical Function
universe u v
variable {X : Type u} {Y : Type v} {ΞΉ : Type*}
variable [Topolog... | Mathlib/Topology/Compactness/Compact.lean | 57 | 64 | theorem IsCompact.compl_mem_sets_of_nhdsWithin (hs : IsCompact s) {f : Filter X}
(hf : β x β s, β t β π[s] x, tαΆ β f) : sαΆ β f := by |
refine hs.compl_mem_sets fun x hx => ?_
rcases hf x hx with β¨t, ht, hstβ©
replace ht := mem_inf_principal.1 ht
apply mem_inf_of_inter ht hst
rintro x β¨hβ, hββ© hs
exact hβ (hβ hs)
| [
" sαΆ β f",
" β x β s, sαΆ β π x β f",
" β x β s, (π x β (f β π s)).NeBot",
" sαΆ β π x β f",
" {x | x β s β x β t} β© tαΆ β sαΆ",
" False"
] | [
" sαΆ β f",
" β x β s, sαΆ β π x β f",
" β x β s, (π x β (f β π s)).NeBot"
] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.Perm.Cycle.Type
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Tactic.IntervalCases
#align_import group_theory.p_gr... | Mathlib/GroupTheory/PGroup.lean | 54 | 65 | theorem iff_card [Fact p.Prime] [Fintype G] : IsPGroup p G β β n : β, card G = p ^ n := by |
have hG : card G β 0 := card_ne_zero
refine β¨fun h => ?_, fun β¨n, hnβ© => of_card hnβ©
suffices β q β Nat.factors (card G), q = p by
use (card G).factors.length
rw [β List.prod_replicate, β List.eq_replicate_of_mem this, Nat.prod_factors hG]
intro q hq
obtain β¨hq1, hq2β© := (Nat.mem_factors hG).mp hq
... | [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card β₯β₯ = p ^ ?m.2806",
" IsPGroup p G β β n, card G = p ^ n",
" β n, card G = p ^ n",
" card G = p ^ (card G).factors.length",
" β q β (card G).factors, q = p",
" q = p"
] | [
" g ^ p ^ k = 1",
" g ^ p ^ n = 1",
" card β₯β₯ = p ^ ?m.2806"
] |
import Mathlib.CategoryTheory.Closed.Cartesian
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
#align_import category_theory.closed.functor from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184"
noncomputable secti... | Mathlib/CategoryTheory/Closed/Functor.lean | 100 | 103 | theorem uncurry_expComparison (A B : C) :
CartesianClosed.uncurry ((expComparison F A).app B) =
inv (prodComparison F _ _) β« F.map ((exp.ev _).app _) := by |
rw [uncurry_eq, expComparison_ev]
| [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B β« prod.map (h.counit.app A) (π (L.obj B)))",
" prod.map (π (F.obj A)) ((expComparison F A).app B) β« (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A βΉ B)) β« F.map ((exp.ev A).app B)",
" inv (prodComparison F ... | [
" IsIso ((frobeniusMorphism F h A).app B)",
" IsIso (prodComparison L (F.obj A) B β« prod.map (h.counit.app A) (π (L.obj B)))",
" prod.map (π (F.obj A)) ((expComparison F A).app B) β« (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A βΉ B)) β« F.map ((exp.ev A).app B)",
" inv (prodComparison F ... |
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {Ξ± : Type*}
namespace WithTop
@[simp]
theorem preimage_coe_top : (some : Ξ± β WithTop Ξ±) β»ΒΉ' {β€} =... | Mathlib/Order/Interval/Set/WithBotTop.lean | 80 | 81 | theorem preimage_coe_Ico_top : (some : Ξ± β WithTop Ξ±) β»ΒΉ' Ico a β€ = Ici a := by |
simp [β Ici_inter_Iio]
| [
" range some = Iio β€",
" x β range some β x β Iio β€",
" some β»ΒΉ' Icc βa βb = Icc a b",
" some β»ΒΉ' Ico βa βb = Ico a b",
" some β»ΒΉ' Ioc βa βb = Ioc a b",
" some β»ΒΉ' Ioo βa βb = Ioo a b",
" some β»ΒΉ' Iio β€ = univ",
" some β»ΒΉ' Ico βa β€ = Ici a"
] | [
" range some = Iio β€",
" x β range some β x β Iio β€",
" some β»ΒΉ' Icc βa βb = Icc a b",
" some β»ΒΉ' Ico βa βb = Ico a b",
" some β»ΒΉ' Ioc βa βb = Ioc a b",
" some β»ΒΉ' Ioo βa βb = Ioo a b",
" some β»ΒΉ' Iio β€ = univ"
] |
import Mathlib.CategoryTheory.Limits.Creates
import Mathlib.CategoryTheory.Comma.Over
import Mathlib.CategoryTheory.IsConnected
#align_import category_theory.limits.constructions.over.connected from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31"
universe v u
-- morphism levels before o... | Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean | 60 | 62 | theorem raised_cone_lowers_to_original [IsConnected J] {B : C} {F : J β₯€ Over B}
(c : Cone (F β forget B)) :
(forget B).mapCone (raiseCone c) = c := by | aesop_cat
| [
" β β¦X Y : Jβ¦ (f : X βΆ Y),\n ((Functor.const J).obj (mk (c.Ο.app (Classical.arbitrary J) β« (F.obj (Classical.arbitrary J)).hom))).map f β«\n (fun j => homMk (c.Ο.app j) β―) Y =\n (fun j => homMk (c.Ο.app j) β―) X β« F.map f",
" ((Functor.const J).obj (mk (c.Ο.app (Classical.arbitrary J) β« (F.obj (Class... | [
" β β¦X Y : Jβ¦ (f : X βΆ Y),\n ((Functor.const J).obj (mk (c.Ο.app (Classical.arbitrary J) β« (F.obj (Classical.arbitrary J)).hom))).map f β«\n (fun j => homMk (c.Ο.app j) β―) Y =\n (fun j => homMk (c.Ο.app j) β―) X β« F.map f",
" ((Functor.const J).obj (mk (c.Ο.app (Classical.arbitrary J) β« (F.obj (Class... |
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.Topology.MetricSpace.ThickenedIndicator
open MeasureTheory Topology Metric Filter Set ENNReal NNReal
open scoped Topology ENNReal NNReal BoundedContinuousFunction
section auxiliary
namespace MeasureTheory
variable {Ξ© : Type*} [TopologicalSpace Ξ©] [Mea... | Mathlib/MeasureTheory/Measure/HasOuterApproxClosed.lean | 110 | 119 | theorem tendsto_lintegral_thickenedIndicator_of_isClosed {Ξ© : Type*} [MeasurableSpace Ξ©]
[PseudoEMetricSpace Ξ©] [OpensMeasurableSpace Ξ©] (ΞΌ : Measure Ξ©) [IsFiniteMeasure ΞΌ] {F : Set Ξ©}
(F_closed : IsClosed F) {Ξ΄s : β β β} (Ξ΄s_pos : β n, 0 < Ξ΄s n)
(Ξ΄s_lim : Tendsto Ξ΄s atTop (π 0)) :
Tendsto (fun n β¦ lin... |
apply measure_of_cont_bdd_of_tendsto_indicator ΞΌ F_closed.measurableSet
(fun n β¦ thickenedIndicator (Ξ΄s_pos n) F) fun n Ο β¦ thickenedIndicator_le_one (Ξ΄s_pos n) F Ο
have key := thickenedIndicator_tendsto_indicator_closure Ξ΄s_pos Ξ΄s_lim F
rwa [F_closed.closure_eq] at key
| [
" Tendsto (fun i => β«β» (Ο : Ξ©), β((fs i) Ο) βΞΌ) L (π (β«β» (Ο : Ξ©), β(f Ο) βΞΌ))",
" βαΆ (n : ΞΉ) in L, βα΅ (a : Ξ©) βΞΌ, β((fs n) a) β€ (fun x => βc) a",
" βα΅ (a : Ξ©) βΞΌ, Tendsto (fun n => β((fs n) a)) L (π β(f a))",
" Tendsto (fun n => β«β» (Ο : Ξ©), β((fs n) Ο) βΞΌ) L (π (ΞΌ E))",
" ΞΌ E = β«β» (Ο : Ξ©), β(E.indicator ... | [
" Tendsto (fun i => β«β» (Ο : Ξ©), β((fs i) Ο) βΞΌ) L (π (β«β» (Ο : Ξ©), β(f Ο) βΞΌ))",
" βαΆ (n : ΞΉ) in L, βα΅ (a : Ξ©) βΞΌ, β((fs n) a) β€ (fun x => βc) a",
" βα΅ (a : Ξ©) βΞΌ, Tendsto (fun n => β((fs n) a)) L (π β(f a))",
" Tendsto (fun n => β«β» (Ο : Ξ©), β((fs n) Ο) βΞΌ) L (π (ΞΌ E))",
" ΞΌ E = β«β» (Ο : Ξ©), β(E.indicator ... |
import Mathlib.Combinatorics.SimpleGraph.DegreeSum
import Mathlib.Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508"
universe u
namespace SimpleGraph
variable {V : Type u} {G : SimpleGraph V} (M : Su... | Mathlib/Combinatorics/SimpleGraph/Matching.lean | 127 | 130 | theorem IsPerfectMatching.even_card {M : Subgraph G} [Fintype V] (h : M.IsPerfectMatching) :
Even (Fintype.card V) := by |
classical
simpa only [h.2.card_verts] using IsMatching.even_card h.1
| [
" h.toEdge β¨v, hvβ© = β¨s(v, w), hvwβ©",
" s(v, Exists.choose β―) = s(v, w)",
" Exists.choose β― = w",
" Function.Surjective h.toEdge",
" β a, h.toEdge a = β¨e, heβ©",
" β a, h.toEdge a = β¨s(x, y), heβ©",
" h.toEdge β¨v, hvβ© = h.toEdge β¨w, hwβ©",
" M.support = M.verts",
" v β M.support",
" M.IsMatching β β ... | [
" h.toEdge β¨v, hvβ© = β¨s(v, w), hvwβ©",
" s(v, Exists.choose β―) = s(v, w)",
" Exists.choose β― = w",
" Function.Surjective h.toEdge",
" β a, h.toEdge a = β¨e, heβ©",
" β a, h.toEdge a = β¨s(x, y), heβ©",
" h.toEdge β¨v, hvβ© = h.toEdge β¨w, hwβ©",
" M.support = M.verts",
" v β M.support",
" M.IsMatching β β ... |
import Mathlib.Algebra.Module.Equiv
import Mathlib.Algebra.Module.Hom
import Mathlib.Algebra.Module.Prod
import Mathlib.Algebra.Module.Submodule.Range
import Mathlib.Data.Set.Finite
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Tactic.Abel
#align_import linear_algebra.basic from "leanprover-c... | Mathlib/LinearAlgebra/Basic.lean | 138 | 138 | theorem ofEq_rfl : ofEq p p rfl = LinearEquiv.refl R p := by | ext; rfl
| [
" ofEq p p β― = refl R β₯p",
" β((ofEq p p β―) xβ) = β((refl R β₯p) xβ)"
] | [] |
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 | 163 | 165 | theorem of_h_eq_intFractPair_seq1_fst_b : (of v).h = (IntFractPair.seq1 v).fst.b := by |
cases aux_seq_eq : IntFractPair.seq1 v
simp [of, aux_seq_eq]
| [
" (of v).h = β(IntFractPair.seq1 v).1.b",
" (of v).h = β(fstβ, sndβ).1.b"
] | [] |
import Mathlib.Data.Fintype.Card
import Mathlib.Computability.Language
import Mathlib.Tactic.NormNum
#align_import computability.DFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
open Computability
universe u v
-- Porting note: Required as `DFA` is used in mathlib3
set_option li... | Mathlib/Computability/DFA.lean | 98 | 98 | theorem mem_accepts (x : List Ξ±) : x β M.accepts β M.evalFrom M.start x β M.accept := by | rfl
| [
" M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a",
" x β M.accepts β M.evalFrom M.start x β M.accept"
] | [
" M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a"
] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
universe u v w x
variable {Ξ± : ... | Mathlib/Algebra/Ring/Defs.lean | 197 | 198 | theorem mul_ite {Ξ±} [Mul Ξ±] (P : Prop) [Decidable P] (a b c : Ξ±) :
(a * if P then b else c) = if P then a * b else a * c := by | split_ifs <;> rfl
| [
" (a + b + c) * d = a * d + b * d + c * d",
" (a * if P then b else c) = if P then a * b else a * c",
" a * b = a * b",
" a * c = a * c"
] | [
" (a + b + c) * d = a * d + b * d + c * d"
] |
import Mathlib.ModelTheory.Syntax
import Mathlib.ModelTheory.Semantics
import Mathlib.Algebra.Ring.Equiv
variable {Ξ± : Type*}
namespace FirstOrder
open FirstOrder
inductive ringFunc : β β Type
| add : ringFunc 2
| mul : ringFunc 2
| neg : ringFunc 1
| zero : ringFunc 0
| one : ringFunc 0
deriving D... | Mathlib/ModelTheory/Algebra/Ring/Basic.lean | 190 | 192 | theorem realize_neg (x : ring.Term Ξ±) (v : Ξ± β R) :
Term.realize v (-x) = -Term.realize v x := by |
simp [neg_def, funMap_neg]
| [
" DecidableEq (ring.Functions n)",
" DecidableEq (ringFunc n)",
" DecidableEq (ring.Relations n)",
" DecidableEq Empty",
" (β[Sum.inl β¨2, addβ©, Sum.inl β¨2, mulβ©, Sum.inl β¨1, negβ©, Sum.inl β¨0, zeroβ©, Sum.inl β¨0, oneβ©]).Nodup",
" β (x : ring.Symbols),\n x β\n { val := β[Sum.inl β¨2, addβ©, Sum.inl β¨2,... | [
" DecidableEq (ring.Functions n)",
" DecidableEq (ringFunc n)",
" DecidableEq (ring.Relations n)",
" DecidableEq Empty",
" (β[Sum.inl β¨2, addβ©, Sum.inl β¨2, mulβ©, Sum.inl β¨1, negβ©, Sum.inl β¨0, zeroβ©, Sum.inl β¨0, oneβ©]).Nodup",
" β (x : ring.Symbols),\n x β\n { val := β[Sum.inl β¨2, addβ©, Sum.inl β¨2,... |
import Mathlib.Algebra.IsPrimePow
import Mathlib.NumberTheory.ArithmeticFunction
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import number_theory.von_mangoldt from "leanprover-community/mathlib"@"c946d6097a6925ad16d7ec55677bbc977f9846de"
namespace ArithmeticFunction
open Finset Nat
open scoped Arit... | Mathlib/NumberTheory/VonMangoldt.lean | 131 | 131 | theorem zeta_mul_vonMangoldt : (ΞΆ : ArithmeticFunction β) * Ξ = log := by | rw [mul_comm]; simp
| [
" (fun n => (βn).log) 0 = 0",
" Ξ 1 = 0",
" 0 β€ Ξ n",
" 0 β€ if IsPrimePow n then (βn.minFac).log else 0",
" 0 β€ (βn.minFac).log",
" 0 β€ 0",
" Ξ (n ^ k) = Ξ n",
" Ξ p = (βp).log",
" Ξ n β 0 β IsPrimePow n",
" Ξ 1 β 0 β IsPrimePow 1",
" β i β n.divisors, Ξ i = (βn).log",
" β i β divisors 0, Ξ i ... | [
" (fun n => (βn).log) 0 = 0",
" Ξ 1 = 0",
" 0 β€ Ξ n",
" 0 β€ if IsPrimePow n then (βn.minFac).log else 0",
" 0 β€ (βn.minFac).log",
" 0 β€ 0",
" Ξ (n ^ k) = Ξ n",
" Ξ p = (βp).log",
" Ξ n β 0 β IsPrimePow n",
" Ξ 1 β 0 β IsPrimePow 1",
" β i β n.divisors, Ξ i = (βn).log",
" β i β divisors 0, Ξ i ... |
import Mathlib.Analysis.NormedSpace.Exponential
import Mathlib.Analysis.Matrix
import Mathlib.LinearAlgebra.Matrix.ZPow
import Mathlib.LinearAlgebra.Matrix.Hermitian
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.Topology.UniformSpace.Matrix
#align_import analysis.normed_space.matrix_exponential from "l... | Mathlib/Analysis/NormedSpace/MatrixExponential.lean | 80 | 81 | theorem exp_diagonal (v : m β πΈ) : exp π (diagonal v) = diagonal (exp π v) := by |
simp_rw [exp_eq_tsum, diagonal_pow, β diagonal_smul, β diagonal_tsum]
| [
" exp π (diagonal v) = diagonal (exp π v)"
] | [] |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 133 | 143 | theorem coeff_hermite_of_odd_add {n k : β} (hnk : Odd (n + k)) : coeff (hermite n) k = 0 := by |
induction' n with n ih generalizing k
Β· rw [zero_add k] at hnk
exact coeff_hermite_of_lt hnk.pos
Β· cases' k with k
Β· rw [Nat.succ_add_eq_add_succ] at hnk
rw [coeff_hermite_succ_zero, ih hnk, neg_zero]
Β· rw [coeff_hermite_succ_succ, ih, ih, mul_zero, sub_zero]
Β· rwa [Nat.succ_add_eq_add_su... | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... | [
" hermite (n + 1) = X * hermite n - derivative (hermite n)",
" hermite n = (fun p => X * p - derivative p)^[n] 1",
" hermite 0 = (fun p => X * p - derivative p)^[0] 1",
" hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1",
" hermite 1 = X",
" X * C 1 - derivative (C 1) = X",
" (hermite (n + 1)... |
import Mathlib.Algebra.GroupPower.IterateHom
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.GroupTheory.GroupAction.Ring
#align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Finset
open Polynomial
namespace Pol... | Mathlib/Algebra/Polynomial/Derivative.lean | 92 | 93 | theorem derivative_C_mul_X (a : R) : derivative (C a * X) = C a := by |
simp [C_mul_X_eq_monomial, derivative_monomial, Nat.cast_one, mul_one]
| [
" (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * βn) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * βn) * X ^ (n - 1)) + q.sum fun n a => C (a * β... | [
" (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * βn) * X ^ (n - 1)) q",
" ((p + q).sum fun n a => C (a * βn) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * βn) * X ^ (n - 1)) + q.sum fun n a => C (a * β... |
import Mathlib.CategoryTheory.Limits.Shapes.CommSq
import Mathlib.CategoryTheory.Limits.Shapes.Diagonal
import Mathlib.CategoryTheory.MorphismProperty.Composition
universe v u
namespace CategoryTheory
open Limits
namespace MorphismProperty
variable {C : Type u} [Category.{v} C]
def StableUnderBaseChange (P : ... | Mathlib/CategoryTheory/MorphismProperty/Limits.lean | 83 | 92 | theorem StableUnderBaseChange.baseChange_map [HasPullbacks C] {P : MorphismProperty C}
(hP : StableUnderBaseChange P) {S S' : C} (f : S' βΆ S) {X Y : Over S} (g : X βΆ Y)
(H : P g.left) : P ((Over.baseChange f).map g).left := by |
let e :=
pullbackRightPullbackFstIso Y.hom f g.left βͺβ«
pullback.congrHom (g.w.trans (Category.comp_id _)) rfl
have : e.inv β« pullback.snd = ((Over.baseChange f).map g).left := by
ext <;> dsimp [e] <;> simp
rw [β this, hP.respectsIso.cancel_left_isIso]
exact hP.snd _ _ H
| [
" P g'",
" P pullback.fst",
" P.RespectsIso",
" β (f g : Arrow C), (f β
g) β P f.hom β P g.hom",
" P f.hom β P g.hom",
" P ((Over.baseChange f).map g).left",
" e.inv β« pullback.snd = ((Over.baseChange f).map g).left",
" (e.inv β« pullback.snd) β« pullback.fst = ((Over.baseChange f).map g).left β« pullbac... | [
" P g'",
" P pullback.fst",
" P.RespectsIso",
" β (f g : Arrow C), (f β
g) β P f.hom β P g.hom",
" P f.hom β P g.hom"
] |
import Mathlib.MeasureTheory.Function.L1Space
import Mathlib.MeasureTheory.Function.SimpleFuncDense
#align_import measure_theory.function.simple_func_dense_lp from "leanprover-community/mathlib"@"5a2df4cd59cb31e97a516d4603a14bed5c2f9425"
noncomputable section
set_option linter.uppercaseLean3 false
open Set Func... | Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean | 77 | 82 | theorem norm_approxOn_yβ_le [OpensMeasurableSpace E] {f : Ξ² β E} (hf : Measurable f) {s : Set E}
{yβ : E} (hβ : yβ β s) [SeparableSpace s] (x : Ξ²) (n : β) :
βapproxOn f hf s yβ hβ n x - yββ β€ βf x - yββ + βf x - yββ := by |
have := edist_approxOn_y0_le hf hβ x n
repeat rw [edist_comm yβ, edist_eq_coe_nnnorm_sub] at this
exact mod_cast this
| [
" ββ(approxOn f hf s yβ hβ n) x - f xββ β€ βf x - yβββ",
" ββ(approxOn f hf s yβ hβ n) x - yββ β€ βf x - yββ + βf x - yββ"
] | [
" ββ(approxOn f hf s yβ hβ n) x - f xββ β€ βf x - yβββ"
] |
import Mathlib.Algebra.Category.ModuleCat.EpiMono
import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
#align_import algebra.category.Module.kernels from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
set_option linter.uppercaseLean3 false
open CategoryTheory CategoryTheory.Limits... | Mathlib/Algebra/Category/ModuleCat/Kernels.lean | 137 | 140 | theorem cokernel_Ο_ext {M N : ModuleCat.{u} R} (f : M βΆ N) {x y : N} (m : M) (w : x = y + f m) :
cokernel.Ο f x = cokernel.Ο f y := by |
subst w
simpa only [map_add, add_right_eq_self] using cokernel.condition_apply f m
| [
" β(LinearMap.ker f).subtype β« f = 0",
" (β(LinearMap.ker f).subtype β« f) x = 0 x",
" (β(LinearMap.ker f).subtype β« f) β¨valβ, propertyββ© = 0 β¨valβ, propertyββ©",
" f (s.ΞΉ c) = 0",
" (s.ΞΉ β« f) c = 0",
" 0 c = 0",
" β(m x) = β(((fun s => LinearMap.codRestrict (LinearMap.ker f) s.ΞΉ β―) s) x)",
" m x = (Lin... | [
" β(LinearMap.ker f).subtype β« f = 0",
" (β(LinearMap.ker f).subtype β« f) x = 0 x",
" (β(LinearMap.ker f).subtype β« f) β¨valβ, propertyββ© = 0 β¨valβ, propertyββ©",
" f (s.ΞΉ c) = 0",
" (s.ΞΉ β« f) c = 0",
" 0 c = 0",
" β(m x) = β(((fun s => LinearMap.codRestrict (LinearMap.ker f) s.ΞΉ β―) s) x)",
" m x = (Lin... |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.Nat.Totient
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Subgroup.Simple
import Mathlib.Tactic.Group
import Mathlib.GroupTheory.Exponent
#align_import group_theory.specific_groups.cyclic from "leanprover-community/mathli... | Mathlib/GroupTheory/SpecificGroups/Cyclic.lean | 105 | 107 | theorem Nontrivial.of_not_isCyclic (nc : Β¬IsCyclic Ξ±) : Nontrivial Ξ± := by |
contrapose! nc
exact @isCyclic_of_subsingleton _ _ (not_nontrivial_iff_subsingleton.mp nc)
| [
" x β zpowers 1",
" 1 β zpowers 1",
" Nontrivial Ξ±",
" IsCyclic Ξ±"
] | [
" x β zpowers 1",
" 1 β zpowers 1"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.