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.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 266 | 276 | theorem linearIndependent_le_basis {ΞΉ : Type w} (b : Basis ΞΉ R M) {ΞΊ : Type w} (v : ΞΊ β M)
(i : LinearIndependent R v) : #ΞΊ β€ #ΞΉ := by |
classical
-- We split into cases depending on whether `ΞΉ` is infinite.
cases fintypeOrInfinite ΞΉ
Β· rw [Cardinal.mk_fintype ΞΉ] -- When `ΞΉ` is finite, we have `linearIndependent_le_span`,
haveI : Nontrivial R := nontrivial_of_invariantBasisNumber R
rw [Fintype.card_congr (Equiv.ofInjective b b.injective)... | [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw",
" #ΞΉ β€ β(Fintype.card βw)",
" β(Fintype.card ΞΉ) β€ β(Fintype.card βw)",
" range v β€ β(span R w)",
" ran... | [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw",
" #ΞΉ β€ β(Fintype.card βw)",
" β(Fintype.card ΞΉ) β€ β(Fintype.card βw)",
" range v β€ β(span R w)",
" ran... |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Nat
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Fintype
import Mathlib.Tactic.IntervalCases
#align_import number_the... | Mathlib/NumberTheory/LucasLehmer.lean | 173 | 174 | theorem sZMod_eq_sMod (p : β) (i : β) : sZMod p i = (sMod p i : ZMod (2 ^ p - 1)) := by |
induction i <;> push_cast [β Int.coe_nat_two_pow_pred p, sMod, sZMod, *] <;> rfl
| [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 β€ 2 ^ k",
" 1 β€ 2",
" 0 β€ sMod p i",
" 0 β€ sMod p 0",
" 0 β€ sMod p (nβ + 1)",
" 0 β€ 4 % (2 ^ p - 1)",
" 0 β€ (sMod p nβ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 β 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... | [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 β€ 2 ^ k",
" 1 β€ 2",
" 0 β€ sMod p i",
" 0 β€ sMod p 0",
" 0 β€ sMod p (nβ + 1)",
" 0 β€ 4 % (2 ^ p - 1)",
" 0 β€ (sMod p nβ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 β 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... |
import Mathlib.Algebra.Field.Defs
import Mathlib.Tactic.Common
#align_import algebra.field.defs from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
universe u
section IsField
structure IsField (R : Type u) [Semiring R] : Prop where
exists_pair_ne : β x y : R, x β y
mul_comm ... | Mathlib/Algebra/Field/IsField.lean | 84 | 93 | theorem uniq_inv_of_isField (R : Type u) [Ring R] (hf : IsField R) :
β x : R, x β 0 β β! y : R, x * y = 1 := by |
intro x hx
apply exists_unique_of_exists_of_unique
Β· exact hf.mul_inv_cancel hx
Β· intro y z hxy hxz
calc
y = y * (x * z) := by rw [hxz, mul_one]
_ = x * y * z := by rw [β mul_assoc, hf.mul_comm y x]
_ = z := by rw [hxy, one_mul]
| [
" a * aβ»ΒΉ = 1",
" aβ»ΒΉ = Classical.choose β―",
" β (x : R), x β 0 β β! y, x * y = 1",
" β! y, x * y = 1",
" β x_1, x * x_1 = 1",
" β (yβ yβ : R), x * yβ = 1 β x * yβ = 1 β yβ = yβ",
" y = z",
" y = y * (x * z)",
" y * (x * z) = x * y * z",
" x * y * z = z"
] | [
" a * aβ»ΒΉ = 1",
" aβ»ΒΉ = Classical.choose β―"
] |
import Mathlib.CategoryTheory.Limits.Shapes.SplitCoequalizer
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba"
noncomputable section
universe w vβ vβ uβ uβ
open Cate... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean | 207 | 211 | theorem map_Ο_preserves_coequalizer_inv :
G.map (coequalizer.Ο f g) β« (PreservesCoequalizer.iso G f g).inv =
coequalizer.Ο (G.map f) (G.map g) := by |
rw [β ΞΉ_comp_coequalizerComparison_assoc, β PreservesCoequalizer.iso_hom, Iso.hom_inv_id,
comp_id]
| [
" G.map f β« G.map h = G.map g β« G.map h",
" Cofork.Ο\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g β G)).inv).obj (G.mapCocone (Cofork.ofΟ h w))) β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g β G)).inv).obj\n (G.mapCocone (Cofor... | [
" G.map f β« G.map h = G.map g β« G.map h",
" Cofork.Ο\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g β G)).inv).obj (G.mapCocone (Cofork.ofΟ h w))) β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g β G)).inv).obj\n (G.mapCocone (Cofor... |
import Mathlib.Analysis.PSeries
import Mathlib.Data.Real.Pi.Wallis
import Mathlib.Tactic.AdaptationNote
#align_import analysis.special_functions.stirling from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open scoped Topology Real Nat Asymptotics
open Finset Filter Nat Real
namespace... | Mathlib/Analysis/SpecialFunctions/Stirling.lean | 104 | 120 | theorem log_stirlingSeq_diff_le_geo_sum (n : β) :
log (stirlingSeq (n + 1)) - log (stirlingSeq (n + 2)) β€
((1 : β) / (2 * β(n + 1) + 1)) ^ 2 / (1 - ((1 : β) / (2 * β(n + 1) + 1)) ^ 2) := by |
have h_nonneg : (0 : β) β€ ((1 : β) / (2 * β(n + 1) + 1)) ^ 2 := sq_nonneg _
have g : HasSum (fun k : β => (((1 : β) / (2 * β(n + 1) + 1)) ^ 2) ^ β(k + 1))
(((1 : β) / (2 * β(n + 1) + 1)) ^ 2 / (1 - ((1 : β) / (2 * β(n + 1) + 1)) ^ 2)) := by
have := (hasSum_geometric_of_lt_one h_nonneg ?_).mul_left (((1 :... | [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / β2",
" (stirlingSeq n).log = (βn !).log - 1 / 2 * (2 * βn).log - βn * (βn / rexp 1).log",
" (stirlingSeq 0).log = (β0!).log - 1 / 2 * (2 * β0).log - β0 * (β0 / rexp 1).log",
" (stirlingSeq (nβ + 1)).log = (β(nβ + 1)!).log - 1 / 2 * (2 * β(nβ + 1)).log - β(nβ ... | [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / β2",
" (stirlingSeq n).log = (βn !).log - 1 / 2 * (2 * βn).log - βn * (βn / rexp 1).log",
" (stirlingSeq 0).log = (β0!).log - 1 / 2 * (2 * β0).log - β0 * (β0 / rexp 1).log",
" (stirlingSeq (nβ + 1)).log = (β(nβ + 1)!).log - 1 / 2 * (2 * β(nβ + 1)).log - β(nβ ... |
import Mathlib.MeasureTheory.OuterMeasure.Caratheodory
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
open Outer... | Mathlib/MeasureTheory/OuterMeasure/Induced.lean | 65 | 68 | theorem le_extend {s : Ξ±} (h : P s) : m s h β€ extend m s := by |
simp only [extend, le_iInf_iff]
intro
rfl
| [
" extend m s = m s h",
" extend m s = β€",
" c β’ extend m = extend fun s h => c β’ m s h",
" (c β’ extend m) s = extend (fun s h => c β’ m s h) s",
" c β’ β¨
(h : P s), m s h = β¨
(h : P s), c β’ m s h",
" m s h β€ extend m s",
" β (i : P s), m s h β€ m s i",
" m s h β€ m s iβ"
] | [
" extend m s = m s h",
" extend m s = β€",
" c β’ extend m = extend fun s h => c β’ m s h",
" (c β’ extend m) s = extend (fun s h => c β’ m s h) s",
" c β’ β¨
(h : P s), m s h = β¨
(h : P s), c β’ m s h"
] |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uMβ uMβ
variable {R : Type uR} {A : Type uA} {Mβ : Type uMβ} {Mβ : Type uMβ}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommR... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 95 | 99 | theorem associated_baseChange [Invertible (2 : A)] (Q : QuadraticForm R Mβ) :
associated (R := A) (Q.baseChange A) = (associated (R := R) Q).baseChange A := by |
dsimp only [QuadraticForm.baseChange, LinearMap.baseChange]
rw [associated_tmul (QuadraticForm.sq (R := A)) Q, associated_sq]
exact rfl
| [
" associated (Qβ.tmul Qβ) = (associated Qβ).tmul (associated Qβ)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ββ tmulB ββ toB)\n (Qβ ... | [
" associated (Qβ.tmul Qβ) = (associated Qβ).tmul (associated Qβ)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (Mβ β[R] Mβ);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ββ tmulB ββ toB)\n (Qβ ... |
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Data.DFinsupp.Basic
#align_import algebra.direct_sum.basic from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Function
universe u v w uβ
variable (ΞΉ : Type v) [dec_ΞΉ : DecidableEq ΞΉ] (Ξ² : ΞΉ β Type w)
def DirectSum... | Mathlib/Algebra/DirectSum/Basic.lean | 155 | 159 | theorem sum_univ_of [Fintype ΞΉ] (x : β¨ i, Ξ² i) :
β i β Finset.univ, of Ξ² i (x i) = x := by |
apply DFinsupp.ext (fun i β¦ ?_)
rw [DFinsupp.finset_sum_apply]
simp [of_apply]
| [
" β i : ΞΉ, (of Ξ² i) (x i) = x",
" (β i : ΞΉ, (of Ξ² i) (x i)) i = x i",
" β a : ΞΉ, ((of Ξ² a) (x a)) i = x i"
] | [] |
import Mathlib.Algebra.Polynomial.Module.AEval
#align_import data.polynomial.module from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
universe u v
open Polynomial BigOperators
@[nolint unusedArguments]
def PolynomialModule (R M : Type*) [CommRing R] [AddCommGroup M] [Module R M] := β ... | Mathlib/Algebra/Polynomial/Module/Basic.lean | 123 | 135 | theorem monomial_smul_single (i : β) (r : R) (j : β) (m : M) :
monomial i r β’ single R j m = single R (i + j) (r β’ m) := by |
simp only [LinearMap.mul_apply, Polynomial.aeval_monomial, LinearMap.pow_apply,
Module.algebraMap_end_apply, smul_def]
induction i generalizing r j m with
| zero =>
rw [Function.iterate_zero, zero_add]
exact Finsupp.smul_single r j m
| succ n hn =>
rw [Function.iterate_succ, Function.comp_apply... | [
" f β’ m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m",
" IsScalarTower S R[X] (PolynomialModule R M)",
" β (x : S) (y : R[X]) (z : PolynomialModule R M), (x β’ y) β’ z = x β’ y β’ z",
" (x β’ y) β’ z = x β’ y β’ z",
" (monomial i) r β’ (single R j) m = (single R (i + j)) (r β’ m)",
" r β’ (β(Finsupp.lmapDomain ... | [
" f β’ m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m",
" IsScalarTower S R[X] (PolynomialModule R M)",
" β (x : S) (y : R[X]) (z : PolynomialModule R M), (x β’ y) β’ z = x β’ y β’ z",
" (x β’ y) β’ z = x β’ y β’ z"
] |
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 | 77 | 106 | theorem AnalyticAt.eventually_constant_or_nhds_le_map_nhds_aux (hf : AnalyticAt β f zβ) :
(βαΆ z in π zβ, f z = f zβ) β¨ π (f zβ) β€ map f (π zβ) := by |
/- The function `f` is analytic in a neighborhood of `zβ`; by the isolated zeros principle, if `f`
is not constant in a neighborhood of `zβ`, then it is nonzero, and therefore bounded below, on
every small enough circle around `zβ` and then `DiffContOnCl.ball_subset_image_closedBall`
provides an explicit... | [
" 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",
" (βαΆ (z : β) in π zβ, f z = f zβ) β¨ π (f zβ) β€ map f (π zβ)",
" π (f zβ) β€ map... | [
" 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.MeasureTheory.Function.AEEqFun.DomAct
import Mathlib.MeasureTheory.Function.LpSpace
set_option autoImplicit true
open MeasureTheory Filter
open scoped ENNReal
namespace DomMulAct
variable {M N Ξ± E : Type*} [MeasurableSpace M] [MeasurableSpace N]
[MeasurableSpace Ξ±] [NormedAddCommGroup E] {ΞΌ : Me... | Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean | 82 | 83 | theorem smul_Lp_sub (c : Mα΅α΅α΅) : β f g : Lp E p ΞΌ, c β’ (f - g) = c β’ f - c β’ g := by |
rintro β¨β¨β©, _β© β¨β¨β©, _β©; rfl
| [
" β (f g : β₯(Lp E p ΞΌ)), c β’ (f + g) = c β’ f + c β’ g",
" c β’ (β¨Quot.mk Setoid.r aβΒΉ, propertyβΒΉβ© + β¨Quot.mk Setoid.r aβ, propertyββ©) =\n c β’ β¨Quot.mk Setoid.r aβΒΉ, propertyβΒΉβ© + c β’ β¨Quot.mk Setoid.r aβ, propertyββ©",
" c β’ -f = -(c β’ f)",
" c β’ -β¨Quot.mk Setoid.r aβ, propertyββ© = -(c β’ β¨Quot.mk Setoid.r aβ... | [
" β (f g : β₯(Lp E p ΞΌ)), c β’ (f + g) = c β’ f + c β’ g",
" c β’ (β¨Quot.mk Setoid.r aβΒΉ, propertyβΒΉβ© + β¨Quot.mk Setoid.r aβ, propertyββ©) =\n c β’ β¨Quot.mk Setoid.r aβΒΉ, propertyβΒΉβ© + c β’ β¨Quot.mk Setoid.r aβ, propertyββ©",
" c β’ -f = -(c β’ f)",
" c β’ -β¨Quot.mk Setoid.r aβ, propertyββ© = -(c β’ β¨Quot.mk Setoid.r aβ... |
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Nat.GCD.BigOperators
import Mathlib.Order.SupIndep
#align_import group_theory.noncomm_pi_coprod from "leanprover-community/mathlib"@"6f9f36364eae3f42368b04858fd66d6d9ae730d8"
... | Mathlib/GroupTheory/NoncommPiCoprod.lean | 55 | 78 | theorem eq_one_of_noncommProd_eq_one_of_independent {ΞΉ : Type*} (s : Finset ΞΉ) (f : ΞΉ β G) (comm)
(K : ΞΉ β Subgroup G) (hind : CompleteLattice.Independent K) (hmem : β x β s, f x β K x)
(heq1 : s.noncommProd f comm = 1) : β i β s, f i = 1 := by |
classical
revert heq1
induction' s using Finset.induction_on with i s hnmem ih
Β· simp
Β· have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
simp only [Finset.forall_mem_insert] at hmem
have hmem_bsupr : s.noncommProd f hcomm β β¨ i β (s : Set ΞΉ), K i := by
ref... | [
" β i β s, f i = 1",
" s.noncommProd f comm = 1 β β i β s, f i = 1",
" β
.noncommProd f comm = 1 β β i β β
, f i = 1",
" (insert i s).noncommProd f comm = 1 β β i_1 β insert i s, f i_1 = 1",
" s.noncommProd f hcomm β β¨ i β βs, K i",
" β c β s, f c β β¨ i β βs, K i",
" f x β β¨ i β βs, K i",
" β i_1 β inse... | [] |
import Mathlib.Order.ConditionallyCompleteLattice.Finset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54"
assert_not_exists MonoidWithZero
open Set
namespace Nat
open scoped Classical
noncomputable instance : ... | Mathlib/Data/Nat/Lattice.lean | 110 | 120 | theorem sInf_upward_closed_eq_succ_iff {s : Set β} (hs : β kβ kβ : β, kβ β€ kβ β kβ β s β kβ β s)
(k : β) : sInf s = k + 1 β k + 1 β s β§ k β s := by |
constructor
Β· intro H
rw [eq_Ici_of_nonempty_of_upward_closed (nonempty_of_sInf_eq_succ _) hs, H, mem_Ici, mem_Ici]
Β· exact β¨le_rfl, k.not_succ_le_selfβ©;
Β· exact k
Β· assumption
Β· rintro β¨H, H'β©
rw [sInf_def (β¨_, Hβ© : s.Nonempty), find_eq_iff]
exact β¨H, fun n hnk hns β¦ H' <| hs n k (Nat.lt... | [
" sInf s = 0 β 0 β s β¨ s = β
",
" sInf β
= 0 β 0 β β
β¨ β
= β
",
" sInf β
= 0",
" 0 β β
β¨ β
= β
",
" β
= β
",
" iInf f = 0",
" β¨
i, 0 = 0",
" (0 β range fun i => 0) β¨ (range fun i => 0) = β
",
" sInf s β s",
" Nat.find h β s",
" m β s",
" m β β
",
" sInf s β€ m",
" Nat.find β― β€ m",
" s.Nonempty"... | [
" sInf s = 0 β 0 β s β¨ s = β
",
" sInf β
= 0 β 0 β β
β¨ β
= β
",
" sInf β
= 0",
" 0 β β
β¨ β
= β
",
" β
= β
",
" iInf f = 0",
" β¨
i, 0 = 0",
" (0 β range fun i => 0) β¨ (range fun i => 0) = β
",
" sInf s β s",
" Nat.find h β s",
" m β s",
" m β β
",
" sInf s β€ m",
" Nat.find β― β€ m",
" s.Nonempty"... |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.NNRat.Defs
variable {ΞΉ Ξ± : Type*}
namespace NNRat
@[norm_cast]
theorem coe_list_sum (l : List ββ₯0) : (l.sum : β) = (l.map (β)).sum :=
map_list_sum coeHom _
#align nnrat.coe_list_sum NNRat.coe_list_sum
@[norm_cast]
theorem coe_list_prod (... | Mathlib/Data/NNRat/BigOperators.lean | 52 | 55 | theorem toNNRat_prod_of_nonneg {s : Finset Ξ±} {f : Ξ± β β} (hf : β a β s, 0 β€ f a) :
(β a β s, f a).toNNRat = β a β s, (f a).toNNRat := by |
rw [β coe_inj, coe_prod, Rat.coe_toNNRat _ (Finset.prod_nonneg hf)]
exact Finset.prod_congr rfl fun x hxs β¦ by rw [Rat.coe_toNNRat _ (hf x hxs)]
| [
" (β a β s, f a).toNNRat = β a β s, (f a).toNNRat",
" β i β s, f i = β a β s, β(f a).toNNRat",
" f x = β(f x).toNNRat",
" (β a β s, f a).toNNRat = β a β s, (f a).toNNRat",
" β i β s, f i = β a β s, β(f a).toNNRat"
] | [
" (β a β s, f a).toNNRat = β a β s, (f a).toNNRat",
" β i β s, f i = β a β s, β(f a).toNNRat",
" f x = β(f x).toNNRat"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
noncomputable section
open NNReal ENNReal Topology Set Filter Bornology
universe u v w
variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :... | Mathlib/Topology/MetricSpace/Thickening.lean | 238 | 239 | theorem cthickening_empty (Ξ΄ : β) : cthickening Ξ΄ (β
: Set Ξ±) = β
:= by |
simp only [cthickening, ENNReal.ofReal_ne_top, setOf_false, infEdist_empty, top_le_iff]
| [
" βαΆ (Ξ΄ : β) in π 0, x β cthickening Ξ΄ E",
" x β cthickening Ξ΄ E",
" ENNReal.ofReal Ξ΄ < infEdist x E",
" x β cthickening Ξ΄ E",
" edist x y β€ ENNReal.ofReal Ξ΄",
" ENNReal.ofReal (dist x y) β€ ENNReal.ofReal Ξ΄",
" cthickening Ξ΄ β
= β
"
] | [
" βαΆ (Ξ΄ : β) in π 0, x β cthickening Ξ΄ E",
" x β cthickening Ξ΄ E",
" ENNReal.ofReal Ξ΄ < infEdist x E",
" x β cthickening Ξ΄ E",
" edist x y β€ ENNReal.ofReal Ξ΄",
" ENNReal.ofReal (dist x y) β€ ENNReal.ofReal Ξ΄"
] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Combinatorics.Additive.AP.Three.Defs
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Complex.ExponentialBounds
#align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
open N... | Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean | 118 | 118 | theorem sphere_zero_right (n k : β) : sphere (n + 1) 0 k = β
:= by | simp [sphere]
| [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) β’ a + (1 / 2) β’ c = b",
" 2 β 0",
" a = (1 / 2) β’ a + (1 / 2) β’ c",
" c = (2β»ΒΉ + 2β»ΒΉ) β’ c",
" c = 1 β’ c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x β box n d β β ... | [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) β’ a + (1 / 2) β’ c = b",
" 2 β 0",
" a = (1 / 2) β’ a + (1 / 2) β’ c",
" c = (2β»ΒΉ + 2β»ΒΉ) β’ c",
" c = 1 β’ c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x β box n d β β ... |
import Mathlib.Algebra.Group.Pi.Lemmas
import Mathlib.Topology.Algebra.Monoid
import Mathlib.Topology.Homeomorph
#align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2"
open Topology Filter Function
variable {Ξ± Ξ² Gβ : Type*}
section DivConst... | Mathlib/Topology/Algebra/GroupWithZero.lean | 69 | 71 | theorem ContinuousOn.div_const (hf : ContinuousOn f s) (y : Gβ) :
ContinuousOn (fun x => f x / y) s := by |
simpa only [div_eq_mul_inv] using hf.mul continuousOn_const
| [
" Tendsto (fun a => f a / y) l (π (x / y))",
" ContinuousOn (fun x => f x / y) s"
] | [
" Tendsto (fun a => f a / y) l (π (x / y))"
] |
import Mathlib.Algebra.Order.Group.Nat
import Mathlib.Data.Finset.Antidiagonal
import Mathlib.Data.Finset.Card
import Mathlib.Data.Multiset.NatAntidiagonal
#align_import data.finset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function
namespace Finset
name... | Mathlib/Data/Finset/NatAntidiagonal.lean | 89 | 99 | theorem antidiagonal_succ_succ' {n : β} :
antidiagonal (n + 2) =
cons (0, n + 2)
(cons (n + 2, 0)
((antidiagonal n).map
(Embedding.prodMap β¨Nat.succ, Nat.succ_injectiveβ©
β¨Nat.succ, Nat.succ_injectiveβ©)) <|
by simp)
(by simp) := by |
simp_rw [antidiagonal_succ (n + 1), antidiagonal_succ', Finset.map_cons, map_map]
rfl
| [
" xy β (fun n => { val := Multiset.Nat.antidiagonal n, nodup := β― }) n β xy.1 + xy.2 = n",
" antidiagonal n = map { toFun := fun i => (n - i, i), inj' := β― } (range (n + 1))",
" map ({ toFun := fun i => (i, n - i), inj' := β― }.trans { toFun := Prod.swap, inj' := β― }) (range (n + 1)) =\n map { toFun := fun i ... | [
" xy β (fun n => { val := Multiset.Nat.antidiagonal n, nodup := β― }) n β xy.1 + xy.2 = n",
" antidiagonal n = map { toFun := fun i => (n - i, i), inj' := β― } (range (n + 1))",
" map ({ toFun := fun i => (i, n - i), inj' := β― }.trans { toFun := Prod.swap, inj' := β― }) (range (n + 1)) =\n map { toFun := fun i ... |
import Mathlib.Algebra.Homology.Additive
import Mathlib.AlgebraicTopology.MooreComplex
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.CategoryTheory.Preadditive.Opposite
import Mathlib.CategoryTheory.Idempotents.FunctorCategories
#align_import algebraic_topology.alternating_face_map_complex from "leanprover-c... | Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean | 70 | 112 | theorem d_squared (n : β) : objD X (n + 1) β« objD X n = 0 := by |
-- we start by expanding d β« d as a double sum
dsimp
simp only [comp_sum, sum_comp, β Finset.sum_product']
-- then, we decompose the index set P into a subset S and its complement SαΆ
let P := Fin (n + 2) Γ Fin (n + 3)
let S := Finset.univ.filter fun ij : P => (ij.2 : β) β€ (ij.1 : β)
erw [β Finset.sum_add... | [
" objD X (n + 1) β« objD X n = 0",
" (β i : Fin (n + 1 + 2), (-1) ^ βi β’ X.Ξ΄ i) β« β i : Fin (n + 2), (-1) ^ βi β’ X.Ξ΄ i = 0",
" β x β Finset.univ ΓΛ’ Finset.univ, ((-1) ^ βx.2 β’ X.Ξ΄ x.2) β« ((-1) ^ βx.1 β’ X.Ξ΄ x.1) = 0",
" β i β S, ((-1) ^ βi.2 β’ X.Ξ΄ i.2) β« ((-1) ^ βi.1 β’ X.Ξ΄ i.1) =\n β x β SαΆ, -((-1) ^ βx.2 β’ ... | [] |
import Mathlib.Analysis.SpecialFunctions.Log.Base
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.measure.doubling from "leanprover-community/mathlib"@"5f6e827d81dfbeb6151d7016586ceeb0099b9655"
noncomputable section
open Set Filter Metric MeasureTheory TopologicalSpace ENNReal NN... | Mathlib/MeasureTheory/Measure/Doubling.lean | 113 | 129 | theorem eventually_measure_mul_le_scalingConstantOf_mul (K : β) :
β R : β,
0 < R β§
β x t r, t β Ioc 0 K β r β€ R β
ΞΌ (closedBall x (t * r)) β€ scalingConstantOf ΞΌ K * ΞΌ (closedBall x r) := by |
have h := Classical.choose_spec (exists_eventually_forall_measure_closedBall_le_mul ΞΌ K)
rcases mem_nhdsWithin_Ioi_iff_exists_Ioc_subset.1 h with β¨R, Rpos, hRβ©
refine β¨R, Rpos, fun x t r ht hr => ?_β©
rcases lt_trichotomy r 0 with (rneg | rfl | rpos)
Β· have : t * r < 0 := mul_neg_of_pos_of_neg ht.1 rneg
s... | [
" β C, βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), β t β€ K, ΞΌ (closedBall x (t * Ξ΅)) β€ βC * ΞΌ (closedBall x Ξ΅)",
" β (n : β), βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), ΞΌ (closedBall x (2 ^ n * Ξ΅)) β€ β(C ^ n) * ΞΌ (closedBall x Ξ΅)",
" βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), ΞΌ (closedBall x (2 ^ n * Ξ΅)) β€ β(C ^ n) * ΞΌ (closedBall x Ξ΅)",
... | [
" β C, βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), β t β€ K, ΞΌ (closedBall x (t * Ξ΅)) β€ βC * ΞΌ (closedBall x Ξ΅)",
" β (n : β), βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), ΞΌ (closedBall x (2 ^ n * Ξ΅)) β€ β(C ^ n) * ΞΌ (closedBall x Ξ΅)",
" βαΆ (Ξ΅ : β) in π[>] 0, β (x : Ξ±), ΞΌ (closedBall x (2 ^ n * Ξ΅)) β€ β(C ^ n) * ΞΌ (closedBall x Ξ΅)",
... |
import Mathlib.Topology.Sets.Opens
#align_import topology.sets.closeds from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Order OrderDual Set
variable {ΞΉ Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²]
namespace TopologicalSpace
structure Closeds (Ξ± : Type*) [Topolog... | Mathlib/Topology/Sets/Closeds.lean | 110 | 111 | theorem coe_sup (s t : Closeds Ξ±) : (β(s β t) : Set Ξ±) = βs βͺ βt := by |
rfl
| [
" s = t",
" { carrier := carrierβ, closed' := closed'β } = t",
" { carrier := carrierβΒΉ, closed' := closed'βΒΉ } = { carrier := carrierβ, closed' := closed'β }",
" β(s β t) = βs βͺ βt"
] | [
" s = t",
" { carrier := carrierβ, closed' := closed'β } = t",
" { carrier := carrierβΒΉ, closed' := closed'βΒΉ } = { carrier := carrierβ, closed' := closed'β }"
] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.RingTheory.Ideal.Quotient
#align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open I... | Mathlib/NumberTheory/Multiplicity.lean | 56 | 71 | theorem sq_dvd_add_pow_sub_sub (p x : R) (n : β) :
p ^ 2 β£ (x + p) ^ n - x ^ (n - 1) * p * n - x ^ n := by |
cases' n with n n
Β· simp only [pow_zero, Nat.cast_zero, sub_zero, sub_self, dvd_zero, Nat.zero_eq, mul_zero]
Β· simp only [Nat.succ_sub_succ_eq_sub, tsub_zero, Nat.cast_succ, add_pow, Finset.sum_range_succ,
Nat.choose_self, Nat.succ_sub _, tsub_self, pow_one, Nat.choose_succ_self_right, pow_zero,
mul_... | [
" p β£ β i β range n, x ^ i * y ^ (n - 1 - i) β p β£ βn * y ^ (n - 1)",
" p β£ β i β range n, x ^ i * y ^ (n - 1 - i) β p β£ βn * x ^ (n - 1)",
" p β£ y - x",
" p ^ 2 β£ (x + p) ^ n - x ^ (n - 1) * p * βn - x ^ n",
" p ^ 2 β£ (x + p) ^ 0 - x ^ (0 - 1) * p * β0 - x ^ 0",
" p ^ 2 β£ (x + p) ^ (n + 1) - x ^ (n + 1 -... | [
" p β£ β i β range n, x ^ i * y ^ (n - 1 - i) β p β£ βn * y ^ (n - 1)",
" p β£ β i β range n, x ^ i * y ^ (n - 1 - i) β p β£ βn * x ^ (n - 1)",
" p β£ y - x"
] |
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.RingTheory.Polynomial.Nilpotent
open scoped Classical Polynomial
open Polynomial
noncomputable section
| Mathlib/RingTheory/Polynomial/IrreducibleRing.lean | 37 | 61 | theorem Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical
{R S : Type*} [CommRing R] [(nilradical R).IsPrime] [CommRing S] [IsDomain S]
(Ο : R β+* S) (f : R[X]) (hm : f.Monic) (hi : Irreducible (f.map Ο)) : Irreducible f := by |
let R' := R β§Έ nilradical R
let Ο : R' β+* S := Ideal.Quotient.lift (nilradical R) Ο
(haveI := RingHom.ker_isPrime Ο; nilradical_le_prime (RingHom.ker Ο))
let ΞΉ := algebraMap R R'
rw [show Ο = Ο.comp ΞΉ from rfl, β map_map] at hi
replace hi := hm.map ΞΉ |>.irreducible_of_irreducible_map _ _ hi
refine β¨fun... | [
" Irreducible f",
" IsUnit a β¨ IsUnit b",
" Polynomial.map ΞΉ f = Polynomial.map ΞΉ a * Polynomial.map ΞΉ b",
" IsNilpotent (b.coeff i)",
" IsUnit (-(a.coeff f.natDegree * b.coeff 0))",
" IsUnit (β x β Finset.range f.natDegree, a.coeff x * b.coeff (f.natDegree - x) - 1)"
] | [] |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac"
noncomputable section
universe vβ vβ uβ uβ
-- Porting note: ne... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean | 225 | 228 | theorem PreservesPushout.inl_iso_hom :
pushout.inl β« (PreservesPushout.iso G f g).hom = G.map pushout.inl := by |
delta PreservesPushout.iso
simp
| [
" G.map f β« G.map h = G.map g β« G.map k",
" β (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj\n ... | [
" G.map f β« G.map h = G.map g β« G.map k",
" β (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j β«\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β G)).symm.hom).obj\n ... |
import Mathlib.Algebra.Bounds
import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc
import Mathlib.Data.Set.Pointwise.SMul
#align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Set
open Pointwise
variable ... | Mathlib/Algebra/Order/Pointwise.lean | 160 | 162 | theorem csSup_div (hsβ : s.Nonempty) (hsβ : BddAbove s) (htβ : t.Nonempty) (htβ : BddBelow t) :
sSup (s / t) = sSup s / sInf t := by |
rw [div_eq_mul_inv, csSup_mul hsβ hsβ htβ.inv htβ.inv, csSup_inv htβ htβ, div_eq_mul_inv]
| [
" sSup sβ»ΒΉ = (sInf s)β»ΒΉ",
" sSup (Inv.inv '' s) = (sInf s)β»ΒΉ",
" sInf sβ»ΒΉ = (sSup s)β»ΒΉ",
" sInf (Inv.inv '' s) = (sSup s)β»ΒΉ",
" sSup (s / t) = sSup s / sInf t"
] | [
" sSup sβ»ΒΉ = (sInf s)β»ΒΉ",
" sSup (Inv.inv '' s) = (sInf s)β»ΒΉ",
" sInf sβ»ΒΉ = (sSup s)β»ΒΉ",
" sInf (Inv.inv '' s) = (sSup s)β»ΒΉ"
] |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ Ξ½β Ξ½β: Measure Ξ±}
{s t : Set Ξ±}
section IsFinit... | Mathlib/MeasureTheory/Measure/Typeclasses.lean | 41 | 44 | theorem not_isFiniteMeasure_iff : Β¬IsFiniteMeasure ΞΌ β ΞΌ Set.univ = β := by |
refine β¨fun h => ?_, fun h => fun h' => h'.measure_univ_lt_top.ne hβ©
by_contra h'
exact h β¨lt_top_iff_ne_top.mpr h'β©
| [
" Β¬IsFiniteMeasure ΞΌ β ΞΌ univ = β€",
" ΞΌ univ = β€",
" False"
] | [] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.RingTheory.Ideal.Quotient
#align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open I... | Mathlib/NumberTheory/Multiplicity.lean | 39 | 43 | theorem dvd_geom_sumβ_iff_of_dvd_sub {x y p : R} (h : p β£ x - y) :
(p β£ β i β range n, x ^ i * y ^ (n - 1 - i)) β p β£ n * y ^ (n - 1) := by |
rw [β mem_span_singleton, β Ideal.Quotient.eq] at h
simp only [β mem_span_singleton, β eq_zero_iff_mem, RingHom.map_geom_sumβ, h, geom_sumβ_self,
_root_.map_mul, map_pow, map_natCast]
| [
" p β£ β i β range n, x ^ i * y ^ (n - 1 - i) β p β£ βn * y ^ (n - 1)"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 634 | 635 | theorem preimage_mul_const_Icc (a b : Ξ±) {c : Ξ±} (h : 0 < c) :
(fun x => x * c) β»ΒΉ' Icc a b = Icc (a / c) (b / c) := by | simp [β Ici_inter_Iic, h]
| [
" (fun x => x * c) β»ΒΉ' Ioo a b = Ioo (a / c) (b / c)",
" (fun x => x * c) β»ΒΉ' Ioc a b = Ioc (a / c) (b / c)",
" (fun x => x * c) β»ΒΉ' Ico a b = Ico (a / c) (b / c)",
" (fun x => x * c) β»ΒΉ' Icc a b = Icc (a / c) (b / c)"
] | [
" (fun x => x * c) β»ΒΉ' Ioo a b = Ioo (a / c) (b / c)",
" (fun x => x * c) β»ΒΉ' Ioc a b = Ioc (a / c) (b / c)",
" (fun x => x * c) β»ΒΉ' Ico a b = Ico (a / c) (b / c)"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 172 | 175 | theorem eq_zero_of_dvd_of_natDegree_lt {p q : R[X]} (hβ : p β£ q) (hβ : natDegree q < natDegree p) :
q = 0 := by |
by_contra hc
exact (lt_iff_not_ge _ _).mp hβ (natDegree_le_of_dvd hβ hc)
| [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... | [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... |
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Set.Lattice
#align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
assert_not_exists MonoidWithZero
open Prod Decidable Function
namespace Nat
-- Porting note: no pp_nodot
--@[pp_nodot]
def pair (a b : ... | Mathlib/Data/Nat/Pairing.lean | 64 | 73 | theorem unpair_pair (a b : β) : unpair (pair a b) = (a, b) := by |
dsimp only [pair]; split_ifs with h
Β· show unpair (b * b + a) = (a, b)
have be : sqrt (b * b + a) = b := sqrt_add_eq _ (le_trans (le_of_lt h) (Nat.le_add_left _ _))
simp [unpair, be, Nat.add_sub_cancel_left, h]
Β· show unpair (a * a + a + b) = (a, b)
have ae : sqrt (a * a + (a + b)) = a := by
rw... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... |
import Mathlib.Topology.Order.ProjIcc
import Mathlib.Topology.ContinuousFunction.Ordered
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.UnitInterval
#align_import topology.homotopy.basic from "leanprover-community/mathlib"@"11c53f174270aa43140c0b26dabce5fc4a253e80"
noncomputable section
universe u v ... | Mathlib/Topology/Homotopy/Basic.lean | 172 | 175 | theorem extend_apply_of_one_le (F : Homotopy fβ fβ) {t : β} (ht : 1 β€ t) (x : X) :
F.extend t x = fβ x := by |
rw [β F.apply_one]
exact ContinuousMap.congr_fun (Set.IccExtend_of_right_le (zero_le_one' β) F.curry ht) x
| [
" f = g",
" { toFun := toFunβ, continuous_toFun := continuous_toFunβ, map_zero_left := map_zero_leftβ,\n map_one_left := map_one_leftβ } =\n g",
" { toFun := toFunβΒΉ, continuous_toFun := continuous_toFunβΒΉ, map_zero_left := map_zero_leftβΒΉ,\n map_one_left := map_one_leftβΒΉ } =\n { toFun := toFun... | [
" f = g",
" { toFun := toFunβ, continuous_toFun := continuous_toFunβ, map_zero_left := map_zero_leftβ,\n map_one_left := map_one_leftβ } =\n g",
" { toFun := toFunβΒΉ, continuous_toFun := continuous_toFunβΒΉ, map_zero_left := map_zero_leftβΒΉ,\n map_one_left := map_one_leftβΒΉ } =\n { toFun := toFun... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Topology.Algebra.InfiniteSum.Constructions
import Mathlib.Topology.Algebra.Ring.Basic
#align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
open Filter Finset Function
open... | Mathlib/Topology/Algebra/InfiniteSum/Ring.lean | 38 | 39 | theorem HasSum.mul_right (aβ) (hf : HasSum f aβ) : HasSum (fun i β¦ f i * aβ) (aβ * aβ) := by |
simpa only using hf.map (AddMonoidHom.mulRight aβ) (continuous_id.mul continuous_const)
| [
" HasSum (fun i => aβ * f i) (aβ * aβ)",
" HasSum (fun i => f i * aβ) (aβ * aβ)"
] | [
" HasSum (fun i => aβ * f i) (aβ * aβ)"
] |
import Mathlib.Algebra.QuadraticDiscriminant
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
noncomputable secti... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean | 114 | 116 | theorem cos_eq_neg_one_iff {x : β} : cos x = -1 β β k : β€, Ο + k * (2 * Ο) = x := by |
rw [β neg_eq_iff_eq_neg, β cos_sub_pi, cos_eq_one_iff]
simp only [eq_sub_iff_add_eq']
| [
" ΞΈ.cos = 0 β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 β cexp (2 * ΞΈ * I) = -1",
" cexp (ΞΈ * I - -ΞΈ * I) = -1 β cexp (2 * ΞΈ * I) = -1",
" (β n, 2 * I * ΞΈ = βΟ * I + βn * (2 * βΟ * I)) β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" 2 * I * ΞΈ = βΟ * I + βx * (2 * βΟ * I) β ΞΈ = (2 * βx +... | [
" ΞΈ.cos = 0 β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 β cexp (2 * ΞΈ * I) = -1",
" cexp (ΞΈ * I - -ΞΈ * I) = -1 β cexp (2 * ΞΈ * I) = -1",
" (β n, 2 * I * ΞΈ = βΟ * I + βn * (2 * βΟ * I)) β β k, ΞΈ = (2 * βk + 1) * βΟ / 2",
" 2 * I * ΞΈ = βΟ * I + βx * (2 * βΟ * I) β ΞΈ = (2 * βx +... |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.symmetric from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable ... | Mathlib/Analysis/InnerProductSpace/Symmetric.lean | 97 | 110 | theorem IsSymmetric.continuous [CompleteSpace E] {T : E ββ[π] E} (hT : IsSymmetric T) :
Continuous T := by |
-- We prove it by using the closed graph theorem
refine T.continuous_of_seq_closed_graph fun u x y hu hTu => ?_
rw [β sub_eq_zero, β @inner_self_eq_zero π]
have hlhs : β k : β, βͺT (u k) - T x, y - T xβ« = βͺu k - x, T (y - T x)β« := by
intro k
rw [β T.map_sub, hT]
refine tendsto_nhds_unique ((hTu.sub_c... | [
" (starRingEnd π) βͺT x, yβ«_π = βͺT y, xβ«_π",
" (T + S).IsSymmetric",
" βͺ(T + S) x, yβ«_π = βͺx, (T + S) yβ«_π",
" βͺx, T y + S yβ«_π = βͺx, (T + S) yβ«_π",
" Continuous βT",
" y = T x",
" βͺy - T x, y - T xβ«_π = 0",
" β (k : β), βͺT (u k) - T x, y - T xβ«_π = βͺu k - x, T (y - T x)β«_π",
" βͺT (u k) - T... | [
" (starRingEnd π) βͺT x, yβ«_π = βͺT y, xβ«_π",
" (T + S).IsSymmetric",
" βͺ(T + S) x, yβ«_π = βͺx, (T + S) yβ«_π",
" βͺx, T y + S yβ«_π = βͺx, (T + S) yβ«_π"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.PEquiv
#align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
namespace PEquiv
open Matrix
universe u v
variable {k l m n : Type*}
variable {Ξ± : Type v}
open Matrix
def toMatrix [DecidableEq n] [Zer... | Mathlib/Data/Matrix/PEquiv.lean | 123 | 139 | theorem toMatrix_injective [DecidableEq n] [MonoidWithZero Ξ±] [Nontrivial Ξ±] :
Function.Injective (@toMatrix m n Ξ± _ _ _) := by |
classical
intro f g
refine not_imp_not.1 ?_
simp only [Matrix.ext_iff.symm, toMatrix_apply, PEquiv.ext_iff, not_forall, exists_imp]
intro i hi
use i
cases' hf : f i with fi
Β· cases' hg : g i with gi
-- Porting note: was `cc`
Β· rw [hf, hg] at hi
exact (hi rfl).elim
... | [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" β j_1 : m, (if j_1 β f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" β j_1 : m, (if j_1 β none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" β j_1 : m, (if j_1 β some fi then 1 else 0) * M j... | [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" β j_1 : m, (if j_1 β f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" β j_1 : m, (if j_1 β none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" β j_1 : m, (if j_1 β some fi then 1 else 0) * M j... |
import Mathlib.Algebra.Lie.Subalgebra
import Mathlib.RingTheory.Noetherian
import Mathlib.RingTheory.Artinian
#align_import algebra.lie.submodule from "leanprover-community/mathlib"@"9822b65bfc4ac74537d77ae318d27df1df662471"
universe u v w wβ wβ
section LieSubmodule
variable (R : Type u) (L : Type v) (M : Type ... | Mathlib/Algebra/Lie/Submodule.lean | 132 | 133 | theorem coe_toSubmodule_mk (p : Submodule R M) (h) :
(({ p with lie_mem := h } : LieSubmodule R L M) : Submodule R M) = p := by | cases p; rfl
| [
" N = O",
" { toSubmodule := toSubmoduleβ, lie_mem := lie_memβ } = O",
" { toSubmodule := toSubmoduleβΒΉ, lie_mem := lie_memβΒΉ } = { toSubmodule := toSubmoduleβ, lie_mem := lie_memβ }",
" toSubmoduleβΒΉ = toSubmoduleβ",
" β
x, mβ β __srcβ.carrier",
" β
x, 0β β __srcβ.carrier",
" β{ toSubmodule := p, lie_mem... | [
" N = O",
" { toSubmodule := toSubmoduleβ, lie_mem := lie_memβ } = O",
" { toSubmodule := toSubmoduleβΒΉ, lie_mem := lie_memβΒΉ } = { toSubmodule := toSubmoduleβ, lie_mem := lie_memβ }",
" toSubmoduleβΒΉ = toSubmoduleβ",
" β
x, mβ β __srcβ.carrier",
" β
x, 0β β __srcβ.carrier"
] |
import Mathlib.ModelTheory.Substructures
#align_import model_theory.finitely_generated from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398"
open FirstOrder Set
namespace FirstOrder
namespace Language
open Structure
variable {L : Language} {M : Type*} [L.Structure M]
namespace Substru... | Mathlib/ModelTheory/FinitelyGenerated.lean | 111 | 113 | theorem FG.cg {N : L.Substructure M} (h : N.FG) : N.CG := by |
obtain β¨s, hf, rflβ© := fg_def.1 h
exact β¨s, hf.countable, rflβ©
| [
" (β S, S.Finite β§ (closure L).toFun S = N) β N.FG",
" ((closure L).toFun t').FG",
" ((closure L).toFun βt).FG",
" N.FG β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (cl... | [
" (β S, S.Finite β§ (closure L).toFun S = N) β N.FG",
" ((closure L).toFun t').FG",
" ((closure L).toFun βt).FG",
" N.FG β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (cl... |
import Mathlib.NumberTheory.Cyclotomic.Discriminant
import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral
import Mathlib.RingTheory.Ideal.Norm
#align_import number_theory.cyclotomic.rat from "leanprover-community/mathlib"@"b353176c24d96c23f0ce1cc63efc3f55019702d9"
universe u
open Algebra IsCyclotomicExtensio... | Mathlib/NumberTheory/Cyclotomic/Rat.lean | 55 | 59 | theorem discr_prime_pow' [IsCyclotomicExtension {p ^ k} β K] (hΞΆ : IsPrimitiveRoot ΞΆ β(p ^ k)) :
discr β (hΞΆ.subOnePowerBasis β).basis =
(-1) ^ ((p ^ k : β).totient / 2) * p ^ ((p : β) ^ (k - 1) * ((p - 1) * k - 1)) := by |
rw [β discr_prime_pow hΞΆ (cyclotomic.irreducible_rat (p ^ k).pos)]
exact hΞΆ.discr_zeta_eq_discr_zeta_sub_one.symm
| [
" Algebra.discr β β(IsPrimitiveRoot.subOnePowerBasis β hΞΆ).basis =\n (-1) ^ (Ο (βp ^ (k + 1)) / 2) * ββp ^ (βp ^ k * ((βp - 1) * (k + 1) - 1))",
" Algebra.discr β β(IsPrimitiveRoot.subOnePowerBasis β hΞΆ).basis =\n Algebra.discr β β(IsPrimitiveRoot.powerBasis β hΞΆ).basis",
" Algebra.discr β β(IsPrimitiveRo... | [
" Algebra.discr β β(IsPrimitiveRoot.subOnePowerBasis β hΞΆ).basis =\n (-1) ^ (Ο (βp ^ (k + 1)) / 2) * ββp ^ (βp ^ k * ((βp - 1) * (k + 1) - 1))",
" Algebra.discr β β(IsPrimitiveRoot.subOnePowerBasis β hΞΆ).basis =\n Algebra.discr β β(IsPrimitiveRoot.powerBasis β hΞΆ).basis",
" Algebra.discr β β(IsPrimitiveRo... |
import Mathlib.Data.Countable.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Order.Disjointed
import Mathlib.MeasureTheory.OuterMeasure.Defs
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set F... | Mathlib/MeasureTheory/OuterMeasure/Basic.lean | 63 | 69 | theorem measure_iUnion_le [Countable ΞΉ] (s : ΞΉ β Set Ξ±) : ΞΌ (β i, s i) β€ β' i, ΞΌ (s i) := by |
refine rel_iSup_tsum ΞΌ measure_empty (Β· β€ Β·) (fun t β¦ ?_) _
calc
ΞΌ (β i, t i) = ΞΌ (β i, disjointed t i) := by rw [iUnion_disjointed]
_ β€ β' i, ΞΌ (disjointed t i) :=
OuterMeasureClass.measure_iUnion_nat_le _ _ (disjoint_disjointed _)
_ β€ β' i, ΞΌ (t i) := by gcongr; apply disjointed_subset
| [
" ΞΌ (β i, s i) β€ β' (i : ΞΉ), ΞΌ (s i)",
" (fun x x_1 => x β€ x_1) (ΞΌ (β¨ i, t i)) (β' (i : β), ΞΌ (t i))",
" ΞΌ (β i, t i) = ΞΌ (β i, disjointed t i)",
" β' (i : β), ΞΌ (disjointed t i) β€ β' (i : β), ΞΌ (t i)",
" disjointed t aβ β t aβ"
] | [] |
import Mathlib.Algebra.Category.GroupCat.EquivalenceGroupAddGroup
import Mathlib.GroupTheory.QuotientGroup
#align_import algebra.category.Group.epi_mono from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped Pointwise
universe u v
namespace MonoidHom
o... | Mathlib/Algebra/Category/GroupCat/EpiMono.lean | 35 | 36 | theorem ker_eq_bot_of_cancel {f : A β* B} (h : β u v : f.ker β* A, f.comp u = f.comp v β u = v) :
f.ker = β₯ := by | simpa using _root_.congr_arg range (h f.ker.subtype 1 (by aesop_cat))
| [
" f.ker = β₯",
" f.comp f.ker.subtype = f.comp 1"
] | [] |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {π V W Q P : Type*}
section AddTorsor
variable (π) [Ring π] [AddCommGroup V] [Modu... | Mathlib/Analysis/Convex/Intrinsic.lean | 142 | 143 | theorem intrinsicFrontier_singleton (x : P) : intrinsicFrontier π ({x} : Set P) = β
:= by |
rw [intrinsicFrontier, preimage_coe_affineSpan_singleton, frontier_univ, image_empty]
| [
" intrinsicInterior π β
= β
",
" intrinsicFrontier π β
= β
",
" intrinsicClosure π β
= β
",
" (intrinsicClosure π s).Nonempty β s.Nonempty",
" intrinsicClosure π s β β
β s β β
",
" False",
" intrinsicInterior π {x} = {x}",
" intrinsicFrontier π {x} = β
"
] | [
" intrinsicInterior π β
= β
",
" intrinsicFrontier π β
= β
",
" intrinsicClosure π β
= β
",
" (intrinsicClosure π s).Nonempty β s.Nonempty",
" intrinsicClosure π s β β
β s β β
",
" False",
" intrinsicInterior π {x} = {x}"
] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Topology Filter ENNReal
open Filter Asymptotics Set
variable... | Mathlib/Analysis/Calculus/Deriv/Add.lean | 97 | 99 | theorem derivWithin_add_const (hxs : UniqueDiffWithinAt π s x) (c : F) :
derivWithin (fun y => f y + c) s x = derivWithin f s x := by |
simp only [derivWithin, fderivWithin_add_const hxs]
| [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x",
" derivWithin (fun y => f y + c) s x = derivWithin f s x"
] | [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x"
] |
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finsupp.Fin
import Mathlib.Data.Finsupp.Indicator
#align_import algebra.bi... | Mathlib/Algebra/BigOperators/Finsupp.lean | 54 | 57 | theorem prod_of_support_subset (f : Ξ± ββ M) {s : Finset Ξ±} (hs : f.support β s) (g : Ξ± β M β N)
(h : β i β s, g i 0 = 1) : f.prod g = β x β s, g x (f x) := by |
refine Finset.prod_subset hs fun x hxs hx => h x hxs βΈ (congr_arg (g x) ?_)
exact not_mem_support_iff.1 hx
| [
" f.prod g = β x β s, g x (f x)",
" f x = 0"
] | [] |
import Mathlib.Data.List.Sublists
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
open List
variable {Ξ± : Type*}
-- Porting note (#11215): TODO: Write a more efficient version
def powerset... | Mathlib/Data/Multiset/Powerset.lean | 55 | 57 | theorem powersetAux'_cons (a : Ξ±) (l : List Ξ±) :
powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l) := by |
simp only [powersetAux', sublists'_cons, map_append, List.map_map, append_cancel_left_eq]; rfl
| [
" β (a : List Ξ±), β¦aβ§ β powersetAux l β β¦aβ§ β€ βl",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList β List.cons a) l.sublists' = List.map (cons a β ofList) l.sublists'"
] | [
" β (a : List Ξ±), β¦aβ§ β powersetAux l β β¦aβ§ β€ βl",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
#align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973"
-- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals.
open scoped Real
namespace Real
theorem ... | Mathlib/Data/Real/Pi/Bounds.lean | 128 | 136 | theorem pi_upper_bound_start (n : β) {a}
(h : (2 : β) - ((a - 1 / (4 : β) ^ n) / (2 : β) ^ (n + 1)) ^ 2 β€
sqrtTwoAddSeries ((0 : β) / (1 : β)) n)
(hβ : (1 : β) / (4 : β) ^ n β€ a) : Ο < a := by |
refine lt_of_lt_of_le (pi_lt_sqrtTwoAddSeries n) ?_
rw [β le_sub_iff_add_le, β le_div_iff', sqrt_le_left, sub_le_comm]
Β· rwa [Nat.cast_zero, zero_div] at h
Β· exact div_nonneg (sub_nonneg.2 hβ) (pow_nonneg (le_of_lt zero_lt_two) _)
Β· exact pow_pos zero_lt_two _
| [
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) < Ο",
" β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο",
" 0 < 2 ^ (n + 2)",
" (Ο / 2 ^ (n + 2)).sin < Ο / 2 ^ (n + 2)",
" 0 < Ο / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) = β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 β ... | [
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) < Ο",
" β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο",
" 0 < 2 ^ (n + 2)",
" (Ο / 2 ^ (n + 2)).sin < Ο / 2 ^ (n + 2)",
" 0 < Ο / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) = β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 β ... |
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 214 | 220 | theorem linearIndependent_le_span' {ΞΉ : Type*} (v : ΞΉ β M) (i : LinearIndependent R v) (w : Set M)
[Fintype w] (s : range v β€ span R w) : #ΞΉ β€ Fintype.card w := by |
haveI : Finite ΞΉ := i.finite_of_le_span_finite v w s
letI := Fintype.ofFinite ΞΉ
rw [Cardinal.mk_fintype]
simp only [Cardinal.natCast_le]
exact linearIndependent_le_span_aux' v i w s
| [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw",
" #ΞΉ β€ β(Fintype.card βw)",
" β(Fintype.card ΞΉ) β€ β(Fintype.card βw)"
] | [
" Fintype.card ΞΉ β€ Fintype.card βw",
" (ΞΉ ββ R) ββ[R] βw ββ R",
" ΞΉ β βw ββ R",
" Injective β(Finsupp.total ΞΉ (βw ββ R) R fun i => Span.repr R w β¨v i, β―β©)",
" f = g",
" t.card β€ Fintype.card βw"
] |
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp
#align_import measure_theory.integral.set_to_l1 from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical Topology NNReal ENNReal MeasureTheory Pointwise
open Set Filter TopologicalSpace ENNR... | Mathlib/MeasureTheory/Integral/SetToL1.lean | 105 | 109 | theorem add (hT : FinMeasAdditive ΞΌ T) (hT' : FinMeasAdditive ΞΌ T') :
FinMeasAdditive ΞΌ (T + T') := by |
intro s t hs ht hΞΌs hΞΌt hst
simp only [hT s t hs ht hΞΌs hΞΌt hst, hT' s t hs ht hΞΌs hΞΌt hst, Pi.add_apply]
abel
| [
" 0 (s βͺ t) = 0 s + 0 t",
" FinMeasAdditive ΞΌ (T + T')",
" (T + T') (s βͺ t) = (T + T') s + (T + T') t",
" T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)"
] | [
" 0 (s βͺ t) = 0 s + 0 t"
] |
import Mathlib.Analysis.NormedSpace.Star.GelfandDuality
import Mathlib.Topology.Algebra.StarSubalgebra
#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
open scoped Pointwise ENNReal NNReal ComplexOrder
open Weak... | Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus.lean | 81 | 94 | theorem spectrum_star_mul_self_of_isStarNormal :
spectrum β (star a * a) β Set.Icc (0 : β) βstar a * aβ := by |
-- this instance should be found automatically, but without providing it Lean goes on a wild
-- goose chase when trying to apply `spectrum.gelfandTransform_eq`.
--letI := elementalStarAlgebra.Complex.normedAlgebra a
rcases subsingleton_or_nontrivial A with β¨β©
Β· simp only [spectrum.of_subsingleton, Set.empty_... | [
" spectrum β (star a * a) β Set.Icc 0 ββstar a * aβ",
" spectrum β (star a' * a') β Set.Icc 0 ββstar a * aβ",
" Set.range β((gelfandTransform β β₯(elementalStarAlgebra β a)) (star a' * a')) β Set.Icc 0 ββstar a * aβ",
" ((gelfandTransform β β₯(elementalStarAlgebra β a)) (star a' * a')) Ο β Set.Icc 0 ββstar a * ... | [] |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Combinatorics.Enumerative.Composition
#align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
noncomputable section
variable {π : Type*} {E F G H : Type*}
open Filter List
open scoped Topol... | Mathlib/Analysis/Analytic/Composition.lean | 166 | 169 | theorem compContinuousLinearMap_applyComposition {n : β} (p : FormalMultilinearSeries π F G)
(f : E βL[π] F) (c : Composition n) (v : Fin n β E) :
(p.compContinuousLinearMap f).applyComposition c v = p.applyComposition c (f β v) := by |
simp (config := {unfoldPartialApp := true}) [applyComposition]; rfl
| [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE β― i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE β― i)",
" β (i_1 : β) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 β (v β β((Composition.ones n).embedding i)) β¨i_1, himβ© = v (Fi... | [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE β― i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE β― i)",
" β (i_1 : β) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 β (v β β((Composition.ones n).embedding i)) β¨i_1, himβ© = v (Fi... |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 295 | 295 | theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1 := by | simp
| [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section IsCoprime
variable {R : Type ... | Mathlib/RingTheory/Coprime/Lemmas.lean | 79 | 80 | theorem IsCoprime.prod_right_iff : IsCoprime x (β i β t, s i) β β i β t, IsCoprime x (s i) := by |
simpa only [isCoprime_comm] using IsCoprime.prod_left_iff (R := R)
| [
" IsCoprime m n β m.gcd n = 1",
" IsCoprime m n β m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 β IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 β β a b, a * m + b * n = 1",
" β a b, a * m + b * n = 1",
" IsCoprime βm βn β m.Coprime n",
" IsCoprime βa βb",
" IsCoprime ββa ββ... | [
" IsCoprime m n β m.gcd n = 1",
" IsCoprime m n β m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 β IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 β β a b, a * m + b * n = 1",
" β a b, a * m + b * n = 1",
" IsCoprime βm βn β m.Coprime n",
" IsCoprime βa βb",
" IsCoprime ββa ββ... |
import Mathlib.FieldTheory.RatFunc.Defs
import Mathlib.RingTheory.EuclideanDomain
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Polynomial.Content
#align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6"
universe u v
noncompu... | Mathlib/FieldTheory/RatFunc/Basic.lean | 235 | 239 | theorem mk_smul (c : R) (p q : K[X]) : RatFunc.mk (c β’ p) q = c β’ RatFunc.mk p q := by |
by_cases hq : q = 0
Β· rw [hq, mk_zero, mk_zero, β ofFractionRing_smul, smul_zero]
Β· rw [mk_eq_localization_mk _ hq, mk_eq_localization_mk _ hq, β Localization.smul_mk, β
ofFractionRing_smul]
| [
" { toFractionRing := 0 } = 0",
" { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }",
" { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }",
" { toFractionRing := -p } = -{ toFractionRing := p }",
" { toFractionRing := 1 } = 1",
" { toFractionRing... | [
" { toFractionRing := 0 } = 0",
" { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }",
" { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }",
" { toFractionRing := -p } = -{ toFractionRing := p }",
" { toFractionRing := 1 } = 1",
" { toFractionRing... |
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordin... | Mathlib/SetTheory/Game/Ordinal.lean | 96 | 97 | theorem toPGame_moveLeft {o : Ordinal} (i) :
o.toPGame.moveLeft (toLeftMovesToPGame i) = i.val.toPGame := by | simp
| [
" let_fun this := β―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).Ξ±",
" o.toPGame.RightMoves = PEmpty.{u_1 + 1}",
" IsEmpty (toPGame 0).LeftMoves",
" IsEmpty (Quotient.out 0).Ξ±",
" IsEmpty ... | [
" let_fun this := β―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).Ξ±",
" o.toPGame.RightMoves = PEmpty.{u_1 + 1}",
" IsEmpty (toPGame 0).LeftMoves",
" IsEmpty (Quotient.out 0).Ξ±",
" IsEmpty ... |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMa... | Mathlib/Analysis/Calculus/FDeriv/Equiv.lean | 121 | 130 | theorem comp_hasFDerivWithinAt_iff {f : G β E} {s : Set G} {x : G} {f' : G βL[π] E} :
HasFDerivWithinAt (iso β f) ((iso : E βL[π] F).comp f') s x β HasFDerivWithinAt f f' s x := by |
refine β¨fun H => ?_, fun H => iso.hasFDerivAt.comp_hasFDerivWithinAt x Hβ©
have A : f = iso.symm β iso β f := by
rw [β Function.comp.assoc, iso.symm_comp_self]
rfl
have B : f' = (iso.symm : F βL[π] E).comp ((iso : E βL[π] F).comp f') := by
rw [β ContinuousLinearMap.comp_assoc, iso.coe_symm_comp_coe,... | [
" DifferentiableWithinAt π (βiso β f) s x β DifferentiableWithinAt π f s x",
" DifferentiableWithinAt π f s x",
" DifferentiableAt π (βiso β f) x β DifferentiableAt π f x",
" DifferentiableOn π (βiso β f) s β DifferentiableOn π f s",
" (β x β s, DifferentiableWithinAt π (βiso β f) s x) β β x β s, Di... | [
" DifferentiableWithinAt π (βiso β f) s x β DifferentiableWithinAt π f s x",
" DifferentiableWithinAt π f s x",
" DifferentiableAt π (βiso β f) x β DifferentiableAt π f x",
" DifferentiableOn π (βiso β f) s β DifferentiableOn π f s",
" (β x β s, DifferentiableWithinAt π (βiso β f) s x) β β x β s, Di... |
import Mathlib.Data.Set.Equitable
import Mathlib.Logic.Equiv.Fin
import Mathlib.Order.Partition.Finpartition
#align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset Fintype
namespace Finpartition
variable {Ξ± : Type*} [DecidableEq Ξ±] ... | Mathlib/Order/Partition/Equipartition.lean | 114 | 134 | theorem IsEquipartition.exists_partsEquiv (hP : P.IsEquipartition) :
β f : P.parts β Fin P.parts.card,
β t, t.1.card = s.card / P.parts.card + 1 β f t < s.card % P.parts.card := by |
let el := (P.parts.filter fun p β¦ p.card = s.card / P.parts.card + 1).equivFin
let es := (P.parts.filter fun p β¦ p.card = s.card / P.parts.card).equivFin
simp_rw [mem_filter, hP.card_large_parts_eq_mod] at el
simp_rw [mem_filter, hP.card_small_parts_eq_mod] at es
let sneg : { x // x β P.parts β§ Β¬x.card = s.c... | [
" P.IsEquipartition β β a β P.parts, a.card = s.card / P.parts.card β¨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card β t.card β s.card / P.parts.card + 1",
" Β¬(t.card = s.card / P.parts.card β§ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card β€ t.card",
" (β i ... | [
" P.IsEquipartition β β a β P.parts, a.card = s.card / P.parts.card β¨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card β t.card β s.card / P.parts.card + 1",
" Β¬(t.card = s.card / P.parts.card β§ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card β€ t.card",
" (β i ... |
import Mathlib.Data.Set.Lattice
import Mathlib.Order.Directed
#align_import data.set.Union_lift from "leanprover-community/mathlib"@"5a4ea8453f128345f73cc656e80a49de2a54f481"
variable {Ξ± : Type*} {ΞΉ Ξ² : Sort _}
namespace Set
section UnionLift
@[nolint unusedArguments]
noncomputable def iUnionLift (S : ΞΉ β Set... | Mathlib/Data/Set/UnionLift.lean | 107 | 120 | theorem iUnionLift_unary (u : T β T) (ui : β i, S i β S i)
(hui :
β (i) (x : S i),
u (Set.inclusion (show S i β T from hT'.symm βΈ Set.subset_iUnion S i) x) =
Set.inclusion (show S i β T from hT'.symm βΈ Set.subset_iUnion S i) (ui i x))
(uΞ² : Ξ² β Ξ²) (h : β (i) (x : S i), f i (ui i x) = uΞ² ... |
subst hT'
cases' Set.mem_iUnion.1 x.prop with i hi
rw [iUnionLift_of_mem x hi, β h i]
have : x = Set.inclusion (Set.subset_iUnion S i) β¨x, hiβ© := by
cases x
rfl
conv_lhs => rw [this, hui, iUnionLift_inclusion]
| [
" iUnionLift S f hf T hT x = f i β¨βx, hxβ©",
" iUnionLift S f hf T hT β¨x, hxββ© = f i β¨ββ¨x, hxββ©, hxβ©",
" iUnionLift S f hf T hT β»ΒΉ' t = inclusion hT β»ΒΉ' β i, inclusion β― '' (f i β»ΒΉ' t)",
" x β iUnionLift S f hf T hT β»ΒΉ' t β x β inclusion hT β»ΒΉ' β i, inclusion β― '' (f i β»ΒΉ' t)",
" iUnionLift S f hf T hT x β t... | [
" iUnionLift S f hf T hT x = f i β¨βx, hxβ©",
" iUnionLift S f hf T hT β¨x, hxββ© = f i β¨ββ¨x, hxββ©, hxβ©",
" iUnionLift S f hf T hT β»ΒΉ' t = inclusion hT β»ΒΉ' β i, inclusion β― '' (f i β»ΒΉ' t)",
" x β iUnionLift S f hf T hT β»ΒΉ' t β x β inclusion hT β»ΒΉ' β i, inclusion β― '' (f i β»ΒΉ' t)",
" iUnionLift S f hf T hT x β t... |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Nat.PartENat
import Mathlib.Tactic.Linarith
#align_import ring_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
variable {Ξ± Ξ²... | Mathlib/RingTheory/Multiplicity.lean | 99 | 107 | theorem pow_dvd_of_le_multiplicity {a b : Ξ±} {k : β} :
(k : PartENat) β€ multiplicity a b β a ^ k β£ b := by |
rw [β PartENat.some_eq_natCast]
exact
Nat.casesOn k
(fun _ => by
rw [_root_.pow_zero]
exact one_dvd _)
fun k β¨_, hββ© => by_contradiction fun hk => Nat.find_min _ (lt_of_succ_le (hβ β¨k, hkβ©)) hk
| [
" multiplicity βa βb = multiplicity a b",
" (multiplicity βa βb).Dom β (multiplicity a b).Dom",
" (β n, Β¬βa ^ (n + 1) β£ βb) β β n, Β¬a ^ (n + 1) β£ b",
" β (hβ : (multiplicity βa βb).Dom) (hβ : (multiplicity a b).Dom),\n (multiplicity βa βb).get hβ = (multiplicity a b).get hβ",
" (multiplicity βa βb).get h... | [
" multiplicity βa βb = multiplicity a b",
" (multiplicity βa βb).Dom β (multiplicity a b).Dom",
" (β n, Β¬βa ^ (n + 1) β£ βb) β β n, Β¬a ^ (n + 1) β£ b",
" β (hβ : (multiplicity βa βb).Dom) (hβ : (multiplicity a b).Dom),\n (multiplicity βa βb).get hβ = (multiplicity a b).get hβ",
" (multiplicity βa βb).get h... |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Algebra.MvPolynomial.Variables
import Mathlib.Algebra.MvPolynomial.CommRing
import Mathlib.Algebra.MvPolynomial.Expand
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.ZMod.Basic
#align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c... | Mathlib/RingTheory/WittVector/WittPolynomial.lean | 136 | 137 | theorem wittPolynomial_zero : wittPolynomial p R 0 = X 0 := by |
simp only [wittPolynomial, X, sum_singleton, range_one, pow_zero, zero_add, tsub_self]
| [
" wittPolynomial p R n = β i β range (n + 1), C (βp ^ i) * X i ^ p ^ (n - i)",
" β x β range (n + 1), (monomial (single x (p ^ (n - x)))) (βp ^ x) = C (βp ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (βp ^ i) = C (βp ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... | [
" wittPolynomial p R n = β i β range (n + 1), C (βp ^ i) * X i ^ p ^ (n - i)",
" β x β range (n + 1), (monomial (single x (p ^ (n - x)))) (βp ^ x) = C (βp ^ x) * X x ^ p ^ (n - x)",
" (monomial (single i (p ^ (n - i)))) (βp ^ i) = C (βp ^ i) * X i ^ p ^ (n - i)",
" X i ^ 0 = 1",
" (map f) (W_ R n) = W_ S n"... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 145 | 148 | theorem multinomial_univ_two (a b : β) :
multinomial Finset.univ ![a, b] = (a + b)! / (a ! * b !) := by |
rw [multinomial, Fin.sum_univ_two, Fin.prod_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one,
Matrix.head_cons]
| [
" multinomial β
f = 1",
" multinomial (cons a s ha) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" 0 < β i β cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + β i β β
, f i).choose (f a) * multinomial β
... | [
" multinomial β
f = 1",
" multinomial (cons a s ha) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" 0 < β i β cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + β i β s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + β i β β
, f i).choose (f a) * multinomial β
... |
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 | 45 | 52 | theorem support_single_mul_eq_image [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) {r : k}
(hr : β y, r * y = 0 β y = 0) {x : G} (lx : IsLeftRegular x) :
(single x r * f : MonoidAlgebra k G).support = Finset.image (x * Β·) f.support := by |
refine subset_antisymm (support_single_mul_subset f _ _) fun y hy => ?_
obtain β¨y, yf, rflβ© : β a : G, a β f.support β§ x * a = 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 Mathlib.Algebra.Ring.Defs
import Mathlib.Algebra.Group.Ext
local macro:max "local_hAdd[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HAdd.hAdd : $type β $type β $type))
local macro:max "local_hMul[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HMul.hMul : $type β $typ... | Mathlib/Algebra/Ring/Ext.lean | 427 | 429 | theorem toNonUnitalSemiring_injective :
Function.Injective (@toNonUnitalSemiring R) := by |
rintro β¨β© β¨β© _; congr
| [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... |
import Mathlib.GroupTheory.Solvable
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import field_theory.abel_ruffini from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial Intermedi... | Mathlib/FieldTheory/AbelRuffini.lean | 66 | 72 | theorem gal_prod_isSolvable {s : Multiset F[X]} (hs : β p β s, IsSolvable (Gal p)) :
IsSolvable s.prod.Gal := by |
apply Multiset.induction_on' s
Β· exact gal_one_isSolvable
Β· intro p t hps _ ht
rw [Multiset.insert_eq_cons, Multiset.prod_cons]
exact gal_mul_isSolvable (hs p hps) ht
| [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" β {a : F[X]} {s_1 : Multiset F[X]}, a β s β s_1 β s β IsSolvable s_1.prod.Gal β IsSolva... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal"
] |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9"
namespace Set
variable {M : Type*} ... | Mathlib/Algebra/Order/Interval/Set/Monoid.lean | 133 | 134 | theorem image_const_add_Ioc : (fun x => a + x) '' Ioc b c = Ioc (a + b) (a + c) := by |
simp only [add_comm a, image_add_const_Ioc]
| [
" BijOn (fun x => x + d) (Ici a) (Ici (a + d))",
" xβ β (fun x => x + d) '' Ici a",
" a + d + c β (fun x => x + d) '' Ici a",
" (fun x => x + d) (a + c) = a + d + c",
" BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))",
" xβ β (fun x => x + d) '' Ioi a",
" a + d + c β (fun x => x + d) '' Ioi a",
" BijOn (... | [
" BijOn (fun x => x + d) (Ici a) (Ici (a + d))",
" xβ β (fun x => x + d) '' Ici a",
" a + d + c β (fun x => x + d) '' Ici a",
" (fun x => x + d) (a + c) = a + d + c",
" BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))",
" xβ β (fun x => x + d) '' Ioi a",
" a + d + c β (fun x => x + d) '' Ioi a",
" BijOn (... |
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 | 132 | 145 | theorem integrable_cexp_neg_mul_sq_add_real_mul_I (hb : 0 < b.re) (c : β) :
Integrable fun x : β => cexp (-b * (x + c * I) ^ 2) := by |
refine
β¨(Complex.continuous_exp.comp
(continuous_const.mul
((continuous_ofReal.add continuous_const).pow 2))).aestronglyMeasurable,
?_β©
rw [β hasFiniteIntegral_norm_iff]
simp_rw [norm_cexp_neg_mul_sq_add_mul_I' hb.ne', neg_sub _ (c ^ 2 * _),
sub_eq_add_neg _ (b.re * _), Real.e... | [
" β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.Analysis.InnerProductSpace.Dual
#align_import analysis.inner_product_space.lax_milgram from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike LinearMap ContinuousLinearMap InnerProductSpace
open LinearMap (ker range)
open RealInnerProduct... | Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean | 51 | 62 | theorem bounded_below (coercive : IsCoercive B) : β C, 0 < C β§ β v, C * βvβ β€ βBβ― vβ := by |
rcases coercive with β¨C, C_ge_0, coercivityβ©
refine β¨C, C_ge_0, ?_β©
intro v
by_cases h : 0 < βvβ
Β· refine (mul_le_mul_right h).mp ?_
calc
C * βvβ * βvβ β€ B v v := coercivity v
_ = βͺBβ― v, vβ«_β := (continuousLinearMapOfBilin_apply B v v).symm
_ β€ βBβ― vβ * βvβ := real_inner_le_norm (Bβ― v) ... | [
" β C, 0 < C β§ β (v : V), C * βvβ β€ β(continuousLinearMapOfBilin B) vβ",
" β (v : V), C * βvβ β€ β(continuousLinearMapOfBilin B) vβ",
" C * βvβ β€ β(continuousLinearMapOfBilin B) vβ",
" C * βvβ * βvβ β€ β(continuousLinearMapOfBilin B) vβ * βvβ",
" v = 0"
] | [] |
import Mathlib.Logic.Equiv.Option
import Mathlib.Order.RelIso.Basic
import Mathlib.Order.Disjoint
import Mathlib.Order.WithBot
import Mathlib.Tactic.Monotonicity.Attr
import Mathlib.Util.AssertExists
#align_import order.hom.basic from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
open ... | Mathlib/Order/Hom/Basic.lean | 1,235 | 1,239 | theorem OrderIso.map_bot' [LE Ξ±] [PartialOrder Ξ²] (f : Ξ± βo Ξ²) {x : Ξ±} {y : Ξ²} (hx : β x', x β€ x')
(hy : β y', y β€ y') : f x = y := by |
refine le_antisymm ?_ (hy _)
rw [β f.apply_symm_apply y, f.map_rel_iff]
apply hx
| [
" β {a b : Ξ±}, f.toEmbedding a β€ f.toEmbedding b β a β€ b",
" f.toEmbedding aβ β€ f.toEmbedding bβ β aβ β€ bβ",
" f x = y",
" f x β€ y",
" x β€ (RelIso.symm f) y"
] | [
" β {a b : Ξ±}, f.toEmbedding a β€ f.toEmbedding b β a β€ b",
" f.toEmbedding aβ β€ f.toEmbedding bβ β aβ β€ bβ"
] |
import Mathlib.Data.Finset.Sigma
import Mathlib.Data.Finset.Pairwise
import Mathlib.Data.Finset.Powerset
import Mathlib.Data.Fintype.Basic
import Mathlib.Order.CompleteLatticeIntervals
#align_import order.sup_indep from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d"
variable {Ξ± Ξ² ΞΉ ΞΉ' :... | Mathlib/Order/SupIndep.lean | 151 | 154 | theorem supIndep_univ_bool (f : Bool β Ξ±) :
(Finset.univ : Finset Bool).SupIndep f β Disjoint (f false) (f true) :=
haveI : true β false := by | simp only [Ne, not_false_iff]
(supIndep_pair this).trans disjoint_comm
| [
" Decidable (s.SupIndep f)",
" (t : Finset ΞΉ) β t β s β Decidable (β β¦i : ΞΉβ¦, i β s β i β t β Disjoint (f i) (t.sup f))",
" Decidable (β β¦i : ΞΉβ¦, i β s β i β t β Disjoint (f i) (t.sup f))",
" (a : ΞΉ) β a β s β Decidable (a β t β Disjoint (f a) (t.sup f))",
" Decidable (i β t β Disjoint (f i) (t.sup f))",
... | [
" Decidable (s.SupIndep f)",
" (t : Finset ΞΉ) β t β s β Decidable (β β¦i : ΞΉβ¦, i β s β i β t β Disjoint (f i) (t.sup f))",
" Decidable (β β¦i : ΞΉβ¦, i β s β i β t β Disjoint (f i) (t.sup f))",
" (a : ΞΉ) β a β s β Decidable (a β t β Disjoint (f a) (t.sup f))",
" Decidable (i β t β Disjoint (f i) (t.sup f))",
... |
import Mathlib.Analysis.BoxIntegral.Partition.Filter
import Mathlib.Analysis.BoxIntegral.Partition.Measure
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Init.Data.Bool.Lemmas
#align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open... | Mathlib/Analysis/BoxIntegral/Basic.lean | 127 | 133 | theorem integralSum_disjUnion (f : ββΏ β E) (vol : ΞΉ βα΅α΅ E βL[β] F) {Οβ Οβ : TaggedPrepartition I}
(h : Disjoint Οβ.iUnion Οβ.iUnion) :
integralSum f vol (Οβ.disjUnion Οβ h) = integralSum f vol Οβ + integralSum f vol Οβ := by |
refine (Prepartition.sum_disj_union_boxes h _).trans
(congr_argβ (Β· + Β·) (sum_congr rfl fun J hJ => ?_) (sum_congr rfl fun J hJ => ?_))
Β· rw [disjUnion_tag_of_mem_left _ hJ]
Β· rw [disjUnion_tag_of_mem_right _ hJ]
| [
" integralSum f vol (Ο.biUnionTagged Οi) = β J β Ο.boxes, integralSum f vol (Οi J)",
" (vol J') (f ((Ο.biUnionTagged Οi).tag J')) = (vol J') (f ((Οi J).tag J'))",
" integralSum f vol (Ο.biUnionPrepartition Οi) = integralSum f vol Ο",
" β J' β (Οi J).boxes, (vol J') (f ((Ο.biUnionPrepartition Οi).tag J')) = (v... | [
" integralSum f vol (Ο.biUnionTagged Οi) = β J β Ο.boxes, integralSum f vol (Οi J)",
" (vol J') (f ((Ο.biUnionTagged Οi).tag J')) = (vol J') (f ((Οi J).tag J'))",
" integralSum f vol (Ο.biUnionPrepartition Οi) = integralSum f vol Ο",
" β J' β (Οi J).boxes, (vol J') (f ((Ο.biUnionPrepartition Οi).tag J')) = (v... |
import Mathlib.Data.Finsupp.Lex
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.GameAdd
#align_import logic.hydra from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
namespace Relation
open Multiset Prod
variable {Ξ± : Type*}
def CutExpand (r : Ξ± β Ξ± β Prop) (s' s : Multise... | Mathlib/Logic/Hydra.lean | 62 | 74 | theorem cutExpand_le_invImage_lex [DecidableEq Ξ±] [IsIrrefl Ξ± r] :
CutExpand r β€ InvImage (Finsupp.Lex (rαΆ β (Β· β Β·)) (Β· < Β·)) toFinsupp := by |
rintro s t β¨u, a, hr, heβ©
replace hr := fun a' β¦ mt (hr a')
classical
refine β¨a, fun b h β¦ ?_, ?_β© <;> simp_rw [toFinsupp_apply]
Β· apply_fun count b at he
simpa only [count_add, count_singleton, if_neg h.2, add_zero, count_eq_zero.2 (hr b h.1)]
using he
Β· apply_fun count a at he
simp only [co... | [
" CutExpand r β€ InvImage (Finsupp.Lex (rαΆ β fun x x_1 => x β x_1) fun x x_1 => x < x_1) βtoFinsupp",
" InvImage (Finsupp.Lex (rαΆ β fun x x_1 => x β x_1) fun x x_1 => x < x_1) (βtoFinsupp) s t",
" (toFinsupp s) b = (toFinsupp t) b",
" (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)",
" count b... | [] |
import Mathlib.Analysis.SpecialFunctions.Complex.Arg
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Complex
open Set Filter Bornology
open scop... | Mathlib/Analysis/SpecialFunctions/Complex/Log.lean | 116 | 116 | theorem log_I : log I = Ο / 2 * I := by | simp [log]
| [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -Ο < x.log.im",
" x.log.im β€ Ο",
" cexp x.log = x",
" x β Set.range cexp β x β {0}αΆ",
" cexp x β {0}αΆ",
" (cexp x).log = x",
" x = y",
" (βx.log).re = (βx).log.re",
" (βx.log).im = (βx).log.im",
" (βx).log.re = x.log",
" (βr * x).log = βr.log... | [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -Ο < x.log.im",
" x.log.im β€ Ο",
" cexp x.log = x",
" x β Set.range cexp β x β {0}αΆ",
" cexp x β {0}αΆ",
" (cexp x).log = x",
" x = y",
" (βx.log).re = (βx).log.re",
" (βx.log).im = (βx).log.im",
" (βx).log.re = x.log",
" (βr * x).log = βr.log... |
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped NNReal Matrix
namespace Matrix
variable {R l m n Ξ± Ξ² : Type*} [Fintype l] [Fintyp... | Mathlib/Analysis/Matrix.lean | 574 | 575 | theorem frobenius_nnnorm_map_eq (A : Matrix m n Ξ±) (f : Ξ± β Ξ²) (hf : β a, βf aββ = βaββ) :
βA.map fββ = βAββ := by | simp_rw [frobenius_nnnorm_def, Matrix.map_apply, hf]
| [
" NormedAddCommGroup (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" BoundedSMul R (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" NormedSpace R (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" βAββ = (β i : m, β j : n, βA i jββ ^ 2) ^ (1 / 2)",
" β(WithLp.equiv 2 (m β WithLp 2 (n β Ξ±))).symm fun i => (WithLp.equiv 2 (n β Ξ±)).symm ... | [
" NormedAddCommGroup (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" BoundedSMul R (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" NormedSpace R (PiLp 2 fun i => PiLp 2 fun j => Ξ±)",
" βAββ = (β i : m, β j : n, βA i jββ ^ 2) ^ (1 / 2)",
" β(WithLp.equiv 2 (m β WithLp 2 (n β Ξ±))).symm fun i => (WithLp.equiv 2 (n β Ξ±)).symm ... |
import Mathlib.RingTheory.OrzechProperty
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.RingTheory.PrincipalIdealDomain
#align_import linear_algebra.invariant_basis_number from "leanprover-community/mathlib"@"5fd3186f1ec30a75d5f65732e3ce5e623382556f"
noncomputable section
open Function
universe u v w
... | Mathlib/LinearAlgebra/InvariantBasisNumber.lean | 197 | 203 | theorem card_le_of_surjective' [RankCondition R] {Ξ± Ξ² : Type*} [Fintype Ξ±] [Fintype Ξ²]
(f : (Ξ± ββ R) ββ[R] Ξ² ββ R) (i : Surjective f) : Fintype.card Ξ² β€ Fintype.card Ξ± := by |
let P := Finsupp.linearEquivFunOnFinite R R Ξ²
let Q := (Finsupp.linearEquivFunOnFinite R R Ξ±).symm
exact
card_le_of_surjective R ((P.toLinearMap.comp f).comp Q.toLinearMap)
((P.surjective.comp i).comp Q.surjective)
| [
" StrongRankCondition R β β (n : β) (f : (Fin (n + 1) β R) ββ[R] Fin n β R), Β¬Injective βf",
" False",
" n β€ m",
" StrongRankCondition R",
" 0 = update 0 (Fin.last n) 1",
" f 0 = f (update 0 (Fin.last n) 1)",
" f 0 m = f (update 0 (Fin.last n) 1) m",
" Fintype.card Ξ± β€ Fintype.card Ξ²",
" Fintype.car... | [
" StrongRankCondition R β β (n : β) (f : (Fin (n + 1) β R) ββ[R] Fin n β R), Β¬Injective βf",
" False",
" n β€ m",
" StrongRankCondition R",
" 0 = update 0 (Fin.last n) 1",
" f 0 = f (update 0 (Fin.last n) 1)",
" f 0 m = f (update 0 (Fin.last n) 1) m",
" Fintype.card Ξ± β€ Fintype.card Ξ²",
" Fintype.car... |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.Matrix.AbsoluteValue
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.ClassGroup
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.Ri... | Mathlib/NumberTheory/ClassNumber/Finite.lean | 119 | 135 | theorem exists_min (I : (Ideal S)β°) :
β b β (I : Ideal S),
b β 0 β§ β c β (I : Ideal S), abv (Algebra.norm R c) < abv (Algebra.norm R b) β c =
(0 : S) := by |
obtain β¨_, β¨b, b_mem, b_ne_zero, rflβ©, minβ© := @Int.exists_least_of_bdd
(fun a => β b β (I : Ideal S), b β (0 : S) β§ abv (Algebra.norm R b) = a)
(by
use 0
rintro _ β¨b, _, _, rflβ©
apply abv.nonneg)
(by
obtain β¨b, b_mem, b_ne_zeroβ© := (I : Ideal S).ne_bot_iff.mp (nonZeroDivisors.c... | [
" 0 < normBound abv bS",
" β i j k, (Algebra.leftMulMatrix bS) (bS i) j k β 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n β(Fintype.card ΞΉ).factorial *\n (β(Fintype.card ΞΉ) *\n (Finset.image (fun ijk => abv... | [
" 0 < normBound abv bS",
" β i j k, (Algebra.leftMulMatrix bS) (bS i) j k β 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n β(Fintype.card ΞΉ).factorial *\n (β(Fintype.card ΞΉ) *\n (Finset.image (fun ijk => abv... |
import Mathlib.Probability.Martingale.Basic
#align_import probability.martingale.centering from "leanprover-community/mathlib"@"bea6c853b6edbd15e9d0941825abd04d77933ed0"
open TopologicalSpace Filter
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheory
variable {Ξ© E : Type*} {m0 : ... | Mathlib/Probability/Martingale/Centering.lean | 50 | 51 | theorem predictablePart_zero : predictablePart f β± ΞΌ 0 = 0 := by |
simp_rw [predictablePart, Finset.range_zero, Finset.sum_empty]
| [
" predictablePart f β± ΞΌ 0 = 0"
] | [] |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.Tactic.FinCases
#align_import linear_algebra.affine_space.combination from ... | Mathlib/LinearAlgebra/AffineSpace/Combination.lean | 151 | 155 | theorem weightedVSubOfPoint_insert [DecidableEq ΞΉ] (w : ΞΉ β k) (p : ΞΉ β P) (i : ΞΉ) :
(insert i s).weightedVSubOfPoint p (p i) w = s.weightedVSubOfPoint p (p i) w := by |
rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply]
apply sum_insert_zero
rw [vsub_self, smul_zero]
| [
" univ = {0, 1}",
" x β univ β x β {0, 1}",
" β¨0, β―β© β univ β β¨0, β―β© β {0, 1}",
" β¨1, β―β© β univ β β¨1, β―β© β {0, 1}",
" (s.weightedVSubOfPoint p b) w = β i β s, w i β’ (p i -α΅₯ b)",
" (s.weightedVSubOfPoint (fun x => p) b) w = (β i β s, w i) β’ (p -α΅₯ b)",
" (s.weightedVSubOfPoint pβ b) wβ = (s.weightedVSubOf... | [
" univ = {0, 1}",
" x β univ β x β {0, 1}",
" β¨0, β―β© β univ β β¨0, β―β© β {0, 1}",
" β¨1, β―β© β univ β β¨1, β―β© β {0, 1}",
" (s.weightedVSubOfPoint p b) w = β i β s, w i β’ (p i -α΅₯ b)",
" (s.weightedVSubOfPoint (fun x => p) b) w = (β i β s, w i) β’ (p -α΅₯ b)",
" (s.weightedVSubOfPoint pβ b) wβ = (s.weightedVSubOf... |
import Mathlib.Data.Nat.Bits
import Mathlib.Order.Lattice
#align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
namespace Nat
section
set_option linter.deprecated false
theorem shiftLeft_eq_mul_pow (m) : β n, m <<< n = m * 2 ^ n := shiftLeft_eq _
#align nat.... | Mathlib/Data/Nat/Size.lean | 107 | 116 | theorem lt_size_self (n : β) : n < 2 ^ size n := by |
rw [β one_shiftLeft]
have : β {n}, n = 0 β n < 1 <<< (size n) := by simp
apply binaryRec _ _ n
Β· apply this rfl
intro b n IH
by_cases h : bit b n = 0
Β· apply this h
rw [size_bit h, shiftLeft_succ, shiftLeft_eq, one_mul, β bit0_val]
exact bit_lt_bit0 _ (by simpa [shiftLeft_eq, shiftRight_eq_div_pow] u... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n β 0",
... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n β 0",
... |
import Mathlib.Topology.Separation
import Mathlib.Topology.NoetherianSpace
#align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
open TopologicalSpace
variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] {f : Ξ± β Ξ²}
def IsQuasiSeparate... | Mathlib/Topology/QuasiSeparated.lean | 53 | 56 | theorem isQuasiSeparated_univ_iff {Ξ± : Type*} [TopologicalSpace Ξ±] :
IsQuasiSeparated (Set.univ : Set Ξ±) β QuasiSeparatedSpace Ξ± := by |
rw [quasiSeparatedSpace_iff]
simp [IsQuasiSeparated]
| [
" IsQuasiSeparated Set.univ β QuasiSeparatedSpace Ξ±",
" IsQuasiSeparated Set.univ β β (U V : Set Ξ±), IsOpen U β IsCompact U β IsOpen V β IsCompact V β IsCompact (U β© V)"
] | [] |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 109 | 111 | theorem mul_self_den (q : β) : (q * q).den = q.den * q.den := by |
rw [Rat.mul_den, Int.natAbs_mul, Nat.Coprime.gcd_eq_one, Nat.div_one]
exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)
| [
" (a /. b).num β£ a",
" { num := n, den := d, den_nz := h, reduced := c }.num β£ a",
" n.natAbs β£ a.natAbs * d",
" β(a /. b).den β£ b",
" β{ num := n, den := d, den_nz := h, reduced := c }.den β£ b",
" d β£ n.natAbs * b.natAbs",
" βd β£ a * βd",
" β c, n = c * q.num β§ d = c * βq.den",
" β c, 0 = c * q.num... | [
" (a /. b).num β£ a",
" { num := n, den := d, den_nz := h, reduced := c }.num β£ a",
" n.natAbs β£ a.natAbs * d",
" β(a /. b).den β£ b",
" β{ num := n, den := d, den_nz := h, reduced := c }.den β£ b",
" d β£ n.natAbs * b.natAbs",
" βd β£ a * βd",
" β c, n = c * q.num β§ d = c * βq.den",
" β c, 0 = c * q.num... |
import Mathlib.CategoryTheory.Category.Cat
import Mathlib.CategoryTheory.Elements
#align_import category_theory.grothendieck from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
namespace CategoryTheory
variable {C D : Type*} [Category C] [Category D]
variable (F : C β₯€ Cat)
... | Mathlib/CategoryTheory/Grothendieck.lean | 78 | 83 | theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
(w_fiber : eqToHom (by rw [w_base]) β« f.fiber = g.fiber) : f = g := by |
cases f; cases g
congr
dsimp at w_base
aesop_cat
| [
" (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber",
" f = g",
" { base := baseβ, fiber := fiberβ } = g",
" { base := baseβΒΉ, fiber := fiberβΒΉ } = { base := baseβ, fiber := fiberβ }",
" HEq fiberβΒΉ fiberβ"
] | [] |
import Mathlib.CategoryTheory.Adjunction.Basic
import Mathlib.CategoryTheory.Category.Preorder
import Mathlib.CategoryTheory.IsomorphismClasses
import Mathlib.CategoryTheory.Thin
#align_import category_theory.skeletal from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe vβ vβ vβ... | Mathlib/CategoryTheory/Skeletal.lean | 108 | 111 | theorem skeleton_skeletal : Skeletal (Skeleton C) := by |
rintro X Y β¨hβ©
have : X.out β Y.out := β¨(fromSkeleton C).mapIso hβ©
simpa using Quotient.sound this
| [
" Category.{?u.1478, uβ} (Skeleton C)",
" (fromSkeleton C).Full",
" (fromSkeleton C).Faithful",
" Skeletal (Skeleton C)",
" X = Y"
] | [
" Category.{?u.1478, uβ} (Skeleton C)",
" (fromSkeleton C).Full",
" (fromSkeleton C).Faithful"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 55 | 56 | theorem eraseLead_coeff_of_ne (i : β) (hi : i β f.natDegree) : f.eraseLead.coeff i = f.coeff i := by |
simp [eraseLead_coeff, hi]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i"
] | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0"
] |
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Nat.ModEq
import Mathlib.Data.Nat.GCD.BigOperators
namespace Nat
variable {ΞΉ : Type*}
lemma modEq_list_prod_iff {a b} {l : List β} (co : l.Pairwise Coprime) :
a β‘ b [MOD l.prod] β β i, a β‘ b [MOD l.get i] := by
induction' l with m l ih
Β· si... | Mathlib/Data/Nat/ChineseRemainder.lean | 107 | 118 | theorem chineseRemainderOfList_perm {l l' : List ΞΉ} (hl : l.Perm l')
(hs : β i β l, s i β 0) (co : l.Pairwise (Coprime on s)) :
(chineseRemainderOfList a s l co : β) =
chineseRemainderOfList a s l' (co.perm hl coprime_comm.mpr) := by |
let z := chineseRemainderOfList a s l' (co.perm hl coprime_comm.mpr)
have hlp : (l.map s).prod = (l'.map s).prod := List.Perm.prod_eq (List.Perm.map s hl)
exact (chineseRemainderOfList_modEq_unique a s l co (z := z)
(fun i hi => z.prop i (hl.symm.mem_iff.mpr hi))).symm.eq_of_lt_of_lt
(chineseRemainderO... | [
" a β‘ b [MOD l.prod] β β (i : Fin l.length), a β‘ b [MOD l.get i]",
" a β‘ b [MOD [].prod] β β (i : Fin [].length), a β‘ b [MOD [].get i]",
" a β‘ b [MOD (m :: l).prod] β β (i : Fin (m :: l).length), a β‘ b [MOD (m :: l).get i]",
" (a β‘ b [MOD m] β§ β (i : Fin l.length), a β‘ b [MOD l.get i]) β β (i : Fin l.length.s... | [
" a β‘ b [MOD l.prod] β β (i : Fin l.length), a β‘ b [MOD l.get i]",
" a β‘ b [MOD [].prod] β β (i : Fin [].length), a β‘ b [MOD [].get i]",
" a β‘ b [MOD (m :: l).prod] β β (i : Fin (m :: l).length), a β‘ b [MOD (m :: l).get i]",
" (a β‘ b [MOD m] β§ β (i : Fin l.length), a β‘ b [MOD l.get i]) β β (i : Fin l.length.s... |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Data.Matrix.CharP
#align_import linear_algebra.matrix.charpoly.finite_field from "leanprover-community/mathlib"@"b95b8c7a484a298228805c72c142f6b062eb0d70"
noncomputable section
open Polynomial Matrix
open s... | Mathlib/LinearAlgebra/Matrix/Charpoly/FiniteField.lean | 53 | 58 | theorem FiniteField.trace_pow_card {K : Type*} [Field K] [Fintype K] (M : Matrix n n K) :
trace (M ^ Fintype.card K) = trace M ^ Fintype.card K := by |
cases isEmpty_or_nonempty n
Β· simp [Matrix.trace]
rw [Matrix.trace_eq_neg_charpoly_coeff, Matrix.trace_eq_neg_charpoly_coeff,
FiniteField.Matrix.charpoly_pow_card, FiniteField.pow_card]
| [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (β(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (β(frobeni... | [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (β(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (β(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (β(frobeni... |
import Mathlib.Analysis.Convex.StrictConvexBetween
import Mathlib.Geometry.Euclidean.Basic
#align_import geometry.euclidean.sphere.basic from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RealInnerProductSpace
namespace EuclideanGeometry
variable {V : Type... | Mathlib/Geometry/Euclidean/Sphere/Basic.lean | 74 | 75 | theorem Sphere.mk_center_radius (s : Sphere P) : (β¨s.center, s.radiusβ© : Sphere P) = s := by |
ext <;> rfl
| [
" { center := s.center, radius := s.radius } = s",
" { center := s.center, radius := s.radius }.center = s.center",
" { center := s.center, radius := s.radius }.radius = s.radius"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
#align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973"
-- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals.
open scoped Real
namespace Real
theorem ... | Mathlib/Data/Real/Pi/Bounds.lean | 40 | 71 | theorem pi_lt_sqrtTwoAddSeries (n : β) :
Ο < (2 : β) ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) + 1 / (4 : β) ^ n := by |
have : Ο <
(β(2 - sqrtTwoAddSeries 0 n) / (2 : β) + (1 : β) / ((2 : β) ^ n) ^ 3 / 4) *
(2 : β) ^ (n + 2) := by
rw [β div_lt_iff (by norm_num), β sin_pi_over_two_pow_succ]
refine lt_of_lt_of_le (lt_add_of_sub_right_lt (sin_gt_sub_cube ?_ ?_)) ?_
Β· apply div_pos pi_pos; apply pow_pos; norm_num
... | [
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) < Ο",
" β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο",
" 0 < 2 ^ (n + 2)",
" (Ο / 2 ^ (n + 2)).sin < Ο / 2 ^ (n + 2)",
" 0 < Ο / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) = β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 β ... | [
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) < Ο",
" β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο",
" 0 < 2 ^ (n + 2)",
" (Ο / 2 ^ (n + 2)).sin < Ο / 2 ^ (n + 2)",
" 0 < Ο / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * β(2 - sqrtTwoAddSeries 0 n) = β(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 β ... |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.Ring.Int
#align_import algebra.field.power from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
variable {Ξ± : Type*}
section DivisionRing
variable [DivisionRing Ξ±] {n : β€}
| Mathlib/Algebra/Field/Power.lean | 26 | 30 | theorem Odd.neg_zpow (h : Odd n) (a : Ξ±) : (-a) ^ n = -a ^ n := by |
have hn : n β 0 := by rintro rfl; exact Int.odd_iff_not_even.1 h even_zero
obtain β¨k, rflβ© := h
simp_rw [zpow_add' (.inr (.inl hn)), zpow_one, zpow_mul, zpow_two, neg_mul_neg,
neg_mul_eq_mul_neg]
| [
" (-a) ^ n = -a ^ n",
" n β 0",
" False",
" (-a) ^ (2 * k + 1) = -a ^ (2 * k + 1)"
] | [] |
import Mathlib.CategoryTheory.Adjunction.Whiskering
import Mathlib.CategoryTheory.Sites.PreservesSheafification
#align_import category_theory.sites.adjunction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory
open GrothendieckTopology CategoryTheory Limits Op... | Mathlib/CategoryTheory/Sites/Adjunction.lean | 136 | 143 | theorem adjunctionToTypes_unit_app_val {G : Type max v u β₯€ D} (adj : G β£ forget D)
(Y : SheafOfTypes J) :
((adjunctionToTypes J adj).unit.app Y).val =
(adj.whiskerRight _).unit.app ((sheafOfTypesToPresheaf J).obj Y) β«
whiskerRight (toSheafify J _) (forget D) := by |
dsimp [adjunctionToTypes, Adjunction.comp]
simp
rfl
| [
" Function.LeftInverse\n (fun Ξ³ =>\n { val := sheafifyLift J ((A.homEquiv ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map Ξ³)) β― })\n fun Ξ· => { val := (A.homEquiv X.val Y.val) (toSheafify J (((whiskeringRight Cα΅α΅ E D).obj G).obj X.val) β« Ξ·.val) }",
" (fun Ξ³ =>\n {\n ... | [
" Function.LeftInverse\n (fun Ξ³ =>\n { val := sheafifyLift J ((A.homEquiv ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map Ξ³)) β― })\n fun Ξ· => { val := (A.homEquiv X.val Y.val) (toSheafify J (((whiskeringRight Cα΅α΅ E D).obj G).obj X.val) β« Ξ·.val) }",
" (fun Ξ³ =>\n {\n ... |
import Mathlib.Logic.Encodable.Lattice
import Mathlib.MeasureTheory.MeasurableSpace.Defs
#align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
open MeasurableSpace Set
open scoped Classical
open MeasureTheory
def IsPiSystem {Ξ±} (C : Set (Set Ξ±)) :... | Mathlib/MeasureTheory/PiSystem.lean | 105 | 109 | theorem IsPiSystem.comap {Ξ± Ξ²} {S : Set (Set Ξ²)} (h_pi : IsPiSystem S) (f : Ξ± β Ξ²) :
IsPiSystem { s : Set Ξ± | β t β S, f β»ΒΉ' t = s } := by |
rintro _ β¨s, hs_mem, rflβ© _ β¨t, ht_mem, rflβ© hst
rw [β Set.preimage_inter] at hst β’
exact β¨s β© t, h_pi s hs_mem t ht_mem (nonempty_of_nonempty_preimage hst), rflβ©
| [
" IsPiSystem {S}",
" s β© t β {S}",
" IsPiSystem (insert β
S)",
" s β© t β insert β
S",
" IsPiSystem (insert univ S)",
" s β© t β insert univ S",
" IsPiSystem {s | β t β S, f β»ΒΉ' t = s}",
" f β»ΒΉ' s β© f β»ΒΉ' t β {s | β t β S, f β»ΒΉ' t = s}",
" f β»ΒΉ' (s β© t) β {s | β t β S, f β»ΒΉ' t = s}"
] | [
" IsPiSystem {S}",
" s β© t β {S}",
" IsPiSystem (insert β
S)",
" s β© t β insert β
S",
" IsPiSystem (insert univ S)",
" s β© t β insert univ S"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 72 | 80 | theorem smul_modByMonic (c : R) (p : R[X]) : c β’ p %β q = c β’ (p %β q) := by |
by_cases hq : q.Monic
Β· cases' subsingleton_or_nontrivial R with hR hR
Β· simp only [eq_iff_true_of_subsingleton]
Β· exact
(div_modByMonic_unique (c β’ (p /β q)) (c β’ (p %β q)) hq
β¨by rw [mul_smul_comm, β smul_add, modByMonic_add_div p hq],
(degree_smul_le _ _).trans_lt (degree_mod... | [
" pβ %β q = pβ %β q",
" pβ %β q + q * (pβ /β q + f) = pβ",
" (pβ + pβ) %β q = pβ %β q + pβ %β q",
" pβ %β q + pβ %β q + q * (pβ /β q + pβ /β q) = pβ + pβ",
" c β’ p %β q = c β’ (p %β q)",
" c β’ (p %β q) + q * c β’ (p /β q) = c β’ p"
] | [
" pβ %β q = pβ %β q",
" pβ %β q + q * (pβ /β q + f) = pβ",
" (pβ + pβ) %β q = pβ %β q + pβ %β q",
" pβ %β q + pβ %β q + q * (pβ /β q + pβ /β q) = pβ + pβ"
] |
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals
import Mathlib.Analysis.Calculus.ParametricIntegral
import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
#align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb"
open MeasureTheory Set Filter A... | Mathlib/Analysis/MellinTransform.lean | 112 | 114 | theorem mellin_const_smul (f : β β E) (s : β) {π : Type*} [NontriviallyNormedField π]
[NormedSpace π E] [SMulCommClass β π E] (c : π) :
mellin (fun t => c β’ f t) s = c β’ mellin f s := by | simp only [mellin, smul_comm, integral_smul]
| [
" MellinConvergent (fun t => c β’ f t) s",
" MellinConvergent (fun t => βt ^ a β’ f t) s β MellinConvergent f (s + a)",
" βt ^ (s - 1) β’ (fun t => βt ^ a β’ f t) t = βt ^ (s + a - 1) β’ f t",
" MellinConvergent (fun t => f t / a) s",
" MellinConvergent (fun t => f (a * t)) s β MellinConvergent f s",
" (fun t ... | [
" MellinConvergent (fun t => c β’ f t) s",
" MellinConvergent (fun t => βt ^ a β’ f t) s β MellinConvergent f (s + a)",
" βt ^ (s - 1) β’ (fun t => βt ^ a β’ f t) t = βt ^ (s + a - 1) β’ f t",
" MellinConvergent (fun t => f t / a) s",
" MellinConvergent (fun t => f (a * t)) s β MellinConvergent f s",
" (fun t ... |
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87"
noncomputable section
open scoped Classical nonZeroDivisors
open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind... | Mathlib/RingTheory/DedekindDomain/Factorization.lean | 131 | 144 | theorem finprod_not_dvd (I : Ideal R) (hI : I β 0) :
Β¬v.asIdeal ^ ((Associates.mk v.asIdeal).count (Associates.mk I).factors + 1) β£
βαΆ v : HeightOneSpectrum R, v.maxPowDividing I := by |
have hf := finite_mulSupport hI
have h_ne_zero : v.maxPowDividing I β 0 := pow_ne_zero _ v.ne_bot
rw [β mul_finprod_cond_ne v hf, pow_add, pow_one, finprod_cond_ne _ _ hf]
intro h_contr
have hv_prime : Prime v.asIdeal := Ideal.prime_of_isPrime v.ne_bot v.isPrime
obtain β¨w, hw, hvw'β© :=
Prime.exists_mem... | [
" {v | v.asIdeal β£ I}.Finite",
" Finite { x // x.asIdeal β£ I }",
" Injective fun v => β¨(βv).asIdeal, β―β©",
" v = w",
" βαΆ (v : HeightOneSpectrum R) in Filter.cofinite, β((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | Β¬β((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... | [
" {v | v.asIdeal β£ I}.Finite",
" Finite { x // x.asIdeal β£ I }",
" Injective fun v => β¨(βv).asIdeal, β―β©",
" v = w",
" βαΆ (v : HeightOneSpectrum R) in Filter.cofinite, β((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | Β¬β((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... |
import Mathlib.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 | 122 | 122 | theorem singleton_prod_singleton : ({a} : Set Ξ±) ΓΛ’ ({b} : Set Ξ²) = {(a, b)} := by | simp
| [
" (β x β s ΓΛ’ t, p x) β β x β s, β y β t, p (x, y)",
" s ΓΛ’ β
= β
",
" xβ β s ΓΛ’ β
β xβ β β
",
" β
ΓΛ’ t = β
",
" xβ β β
ΓΛ’ t β xβ β β
",
" univ ΓΛ’ univ = univ",
" xβ β univ ΓΛ’ univ β xβ β univ",
" univ ΓΛ’ t = Prod.snd β»ΒΉ' t",
" s ΓΛ’ univ = Prod.fst β»ΒΉ' s",
" s ΓΛ’ t = univ β s = univ β§ t = univ",
" {... | [
" (β x β s ΓΛ’ t, p x) β β x β s, β y β t, p (x, y)",
" s ΓΛ’ β
= β
",
" xβ β s ΓΛ’ β
β xβ β β
",
" β
ΓΛ’ t = β
",
" xβ β β
ΓΛ’ t β xβ β β
",
" univ ΓΛ’ univ = univ",
" xβ β univ ΓΛ’ univ β xβ β univ",
" univ ΓΛ’ t = Prod.snd β»ΒΉ' t",
" s ΓΛ’ univ = Prod.fst β»ΒΉ' s",
" s ΓΛ’ t = univ β s = univ β§ t = univ",
" {... |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function ... | Mathlib/Algebra/Field/Basic.lean | 56 | 58 | theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a β 0) (hb : b β 0) :
1 / a * (a + b) * (1 / b) = 1 / a + 1 / b := by |
simpa only [one_div] using (inv_add_inv' ha hb).symm
| [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1",
" 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b"
] | [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1"
] |
import Mathlib.Algebra.Order.Floor
import Mathlib.Algebra.Order.Field.Power
import Mathlib.Data.Nat.Log
#align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R]
namespace Int
def log (b : β) (r : ... | Mathlib/Data/Int/Log.lean | 66 | 70 | theorem log_of_right_le_one (b : β) {r : R} (hr : r β€ 1) : log b r = -Nat.clog b βrβ»ΒΉββ := by |
obtain rfl | hr := hr.eq_or_lt
Β· rw [log, if_pos hr, inv_one, Nat.ceil_one, Nat.floor_one, Nat.log_one_right, Nat.clog_one_right,
Int.ofNat_zero, neg_zero]
Β· exact if_neg hr.not_le
| [
" log b r = -β(b.clog βrβ»ΒΉββ)",
" log b 1 = -β(b.clog β1β»ΒΉββ)"
] | [] |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd5389208... | Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 110 | 113 | theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k β ΞΌ)
(ha : G.Adj v w) : (G.neighborFinset v βͺ G.neighborFinset w).card = 2 * k - β := by |
rw [β h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
| [
" (fun v w => Β¬β₯.Adj v w β Fintype.card β(β₯.commonNeighbors v w) = 0) v w",
" filter (fun x => x β β₯.commonNeighbors v w) univ = β
",
" aβ β filter (fun x => x β β₯.commonNeighbors v w) univ β aβ β β
",
" Fintype.card β(β€.commonNeighbors v w) = Fintype.card V - 2",
" v β w",
" (G.neighborFinset v βͺ G.neighbo... | [
" (fun v w => Β¬β₯.Adj v w β Fintype.card β(β₯.commonNeighbors v w) = 0) v w",
" filter (fun x => x β β₯.commonNeighbors v w) univ = β
",
" aβ β filter (fun x => x β β₯.commonNeighbors v w) univ β aβ β β
",
" Fintype.card β(β€.commonNeighbors v w) = Fintype.card V - 2",
" v β w",
" (G.neighborFinset v βͺ G.neighbo... |
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.affine_space.matrix from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Affine Matrix
open Set
universe uβ uβ uβ uβ
variable {ΞΉ : Type uβ} {k : Type... | Mathlib/LinearAlgebra/AffineSpace/Matrix.lean | 114 | 119 | theorem toMatrix_vecMul_coords (x : P) : bβ.coords x α΅₯* b.toMatrix bβ = b.coords x := by |
ext j
change _ = b.coord j x
conv_rhs => rw [β bβ.affineCombination_coord_eq_self x]
rw [Finset.map_affineCombination _ _ _ (bβ.sum_coord_apply_eq_one x)]
simp [Matrix.vecMul, Matrix.dotProduct, toMatrix_apply, coords]
| [
" b.toMatrix βb = 1",
" b.toMatrix (βb) i j = 1 i j",
" β j : ΞΉ, b.toMatrix q i j = 1",
" AffineIndependent k p",
" β (w1 w2 : ΞΉ' β k),\n β i : ΞΉ', w1 i = 1 β\n β i : ΞΉ', w2 i = 1 β\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 β w1 = w2",
"... | [
" b.toMatrix βb = 1",
" b.toMatrix (βb) i j = 1 i j",
" β j : ΞΉ, b.toMatrix q i j = 1",
" AffineIndependent k p",
" β (w1 w2 : ΞΉ' β k),\n β i : ΞΉ', w1 i = 1 β\n β i : ΞΉ', w2 i = 1 β\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 β w1 = w2",
"... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antidiagonal mem_anti... | Mathlib/RingTheory/PowerSeries/Order.lean | 134 | 139 | theorem order_eq_nat {Ο : Rβ¦Xβ§} {n : β} :
order Ο = n β coeff R n Ο β 0 β§ β i, i < n β coeff R i Ο = 0 := by |
classical
rcases eq_or_ne Ο 0 with (rfl | hΟ)
Β· simpa [(coeff R _).map_zero] using (PartENat.natCast_ne_top _).symm
simp [order, dif_neg hΟ, Nat.find_eq_iff]
| [
" (β n, (coeff R n) Ο β 0) β Ο β 0",
" (Β¬β n, (coeff R n) Ο β 0) β Β¬Ο β 0",
" (β (n : β), (coeff R n) Ο = 0) β Ο = 0",
" Ο.order.Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" β€.Dom β Ο β 0",
" (β(Nat.find β―)).Dom β Ο β ... | [
" (β n, (coeff R n) Ο β 0) β Ο β 0",
" (Β¬β n, (coeff R n) Ο β 0) β Β¬Ο β 0",
" (β (n : β), (coeff R n) Ο = 0) β Ο = 0",
" Ο.order.Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" (if h : Ο = 0 then β€ else β(Nat.find β―)).Dom β Ο β 0",
" β€.Dom β Ο β 0",
" (β(Nat.find β―)).Dom β Ο β ... |
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.LinearAlgebra.Dimension.Constructions
#align_import algebra.linear_recurrence from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
noncomputable section
open Finset
open Polynomial
structure LinearRecurrence (Ξ± : Type*) [CommSemir... | Mathlib/Algebra/LinearRecurrence.lean | 92 | 95 | theorem mkSol_eq_init (init : Fin E.order β Ξ±) : β n : Fin E.order, E.mkSol init n = init n := by |
intro n
rw [mkSol]
simp only [n.is_lt, dif_pos, Fin.mk_val, Fin.eta]
| [
" n - E.order + βk < n",
" βk + n < E.order + n",
" E.order β€ βk + n",
" E.order = 0 + E.order",
" E.IsSolution (E.mkSol init)",
" E.mkSol init (n + E.order) = β i : Fin E.order, E.coeffs i * E.mkSol init (n + βi)",
" (if h : n + E.order < E.order then init β¨n + E.order, hβ©\n else\n β k : Fin E.... | [
" n - E.order + βk < n",
" βk + n < E.order + n",
" E.order β€ βk + n",
" E.order = 0 + E.order",
" E.IsSolution (E.mkSol init)",
" E.mkSol init (n + E.order) = β i : Fin E.order, E.coeffs i * E.mkSol init (n + βi)",
" (if h : n + E.order < E.order then init β¨n + E.order, hβ©\n else\n β k : Fin E.... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 166 | 169 | theorem eq_zero_of_dvd_of_degree_lt {p q : R[X]} (hβ : p β£ q) (hβ : degree q < degree p) :
q = 0 := by |
by_contra hc
exact (lt_iff_not_ge _ _).mp hβ (degree_le_of_dvd hβ hc)
| [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... | [
" aβ = 0 β¨ bβ = 0",
" aβ.leadingCoeff = 0 β¨ bβ.leadingCoeff = 0",
" aβ.leadingCoeff * bβ.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" β(p.natTrailingDegree + q.natTrailingDegree) = βp.natTrailingDegree + βq.natTrail... |
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 | 209 | 212 | theorem of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none :
(of v).TerminatedAt n β IntFractPair.stream v (n + 1) = none := by |
rw [of_terminatedAt_iff_intFractPair_seq1_terminatedAt, Stream'.Seq.TerminatedAt,
IntFractPair.get?_seq1_eq_succ_get?_stream]
| [
" (of v).TerminatedAt n β IntFractPair.stream v (n + 1) = none"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.