Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Data.Int.Order.Units
import Mathlib.Data.ZMod.IntUnitsPower
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
import Mathlib.Algebra.DirectSum.Algebra
suppress_compilation
open scoped TensorProduct DirectSum
variable {R ΞΉ A B : Type*}
namespace Tens... | Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean | 126 | 135 | theorem gradedComm_tmul_of_zero (a : β¨ i, π i) (b : β¬ 0) :
gradedComm R π β¬ (a ββ lof R _ β¬ 0 b) = lof R _ β¬ _ b ββ a := by |
suffices
(gradedComm R π β¬).toLinearMap ββ
(TensorProduct.mk R (β¨ i, π i) (β¨ i, β¬ i)).flip (lof R _ β¬ 0 b) =
TensorProduct.mk R _ _ (lof R _ β¬ 0 b) from
DFunLike.congr_fun this a
ext i a
dsimp
rw [gradedComm_of_tmul_of, zero_mul, uzpow_zero, one_smul]
| [
" (β¨ (i : ΞΉ Γ ΞΉ), π i.1 β[R] β¬ i.2) ββ[R] β¨ (i : ΞΉ Γ ΞΉ), β¬ i.1 β[R] π i.2",
" π i.1 β[R] β¬ i.2 ββ[R] β¨ (i : ΞΉ Γ ΞΉ), β¬ i.1 β[R] π i.2",
" (gradedCommAux R π β¬) ((lof R (ΞΉ Γ ΞΉ) (fun i => π i.1 β[R] β¬ i.2) (i, j)) (a ββ[R] b)) =\n (-1) ^ (j * i) β’ (lof R (ΞΉ Γ ΞΉ) (fun i => β¬ i.1 β[R] π i.2) (j, i)) (b ββ[... | [
" (β¨ (i : ΞΉ Γ ΞΉ), π i.1 β[R] β¬ i.2) ββ[R] β¨ (i : ΞΉ Γ ΞΉ), β¬ i.1 β[R] π i.2",
" π i.1 β[R] β¬ i.2 ββ[R] β¨ (i : ΞΉ Γ ΞΉ), β¬ i.1 β[R] π i.2",
" (gradedCommAux R π β¬) ((lof R (ΞΉ Γ ΞΉ) (fun i => π i.1 β[R] β¬ i.2) (i, j)) (a ββ[R] b)) =\n (-1) ^ (j * i) β’ (lof R (ΞΉ Γ ΞΉ) (fun i => β¬ i.1 β[R] π i.2) (j, i)) (b ββ[... |
import Mathlib.Algebra.Bounds
import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc
import Mathlib.Data.Set.Pointwise.SMul
#align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Set
open Pointwise
variable ... | Mathlib/Algebra/Order/Pointwise.lean | 225 | 236 | theorem smul_Ioc : r β’ Ioc a b = Ioc (r β’ a) (r β’ b) := by |
ext x
simp only [mem_smul_set, smul_eq_mul, mem_Ioc]
constructor
Β· rintro β¨a, β¨a_h_left_left, a_h_left_rightβ©, rflβ©
constructor
Β· exact (mul_lt_mul_left hr).mpr a_h_left_left
Β· exact (mul_le_mul_left hr).mpr a_h_left_right
Β· rintro β¨a_left, a_rightβ©
use x / r
refine β¨β¨(lt_div_iff' hr).mpr... | [
" r β’ Ioo a b = Ioo (r β’ a) (r β’ b)",
" x β r β’ Ioo a b β x β Ioo (r β’ a) (r β’ b)",
" (β y, (a < y β§ y < b) β§ r * y = x) β r * a < x β§ x < r * b",
" (β y, (a < y β§ y < b) β§ r * y = x) β r * a < x β§ x < r * b",
" r * aβ < r * a β§ r * a < r * b",
" r * aβ < r * a",
" r * a < r * b",
" r * a < x β§ x < r ... | [
" r β’ Ioo a b = Ioo (r β’ a) (r β’ b)",
" x β r β’ Ioo a b β x β Ioo (r β’ a) (r β’ b)",
" (β y, (a < y β§ y < b) β§ r * y = x) β r * a < x β§ x < r * b",
" (β y, (a < y β§ y < b) β§ r * y = x) β r * a < x β§ x < r * b",
" r * aβ < r * a β§ r * a < r * b",
" r * aβ < r * a",
" r * a < r * b",
" r * a < x β§ x < r ... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
#align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d"
variable {R : Type*} [CommRing R]
variable {M : Type*} [AddCommGroup M] [Module R M]
variable {Q : QuadraticForm R M}
namespac... | Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean | 50 | 50 | theorem star_ΞΉ (m : M) : star (ΞΉ Q m) = -ΞΉ Q m := by | rw [star_def, involute_ΞΉ, map_neg, reverse_ΞΉ]
| [
" star (star x) = x",
" star (x * y) = star y * star x",
" star (x + y) = star x + star y",
" star ((ΞΉ Q) m) = -(ΞΉ Q) m"
] | [
" star (star x) = x",
" star (x * y) = star y * star x",
" star (x + y) = star x + star y"
] |
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Analysis.InnerProductSpace.l2Space
import Mathlib.MeasureTheory.Function.ContinuousMapDense
import Mathlib.MeasureTheory.Function.L2Space
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.M... | Mathlib/Analysis/Fourier/AddCircle.lean | 117 | 123 | theorem fourier_coe_apply {n : β€} {x : β} :
fourier n (x : AddCircle T) = Complex.exp (2 * Ο * Complex.I * n * x / T) := by |
rw [fourier_apply, β QuotientAddGroup.mk_zsmul, toCircle, Function.Periodic.lift_coe,
expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul,
Complex.ofReal_mul, Complex.ofReal_intCast]
norm_num
congr 1; ring
| [
" (fourier n) βx = (2 * βΟ * Complex.I * βn * βx / βT).exp",
" (β2 * βΟ / βT * (βn * βx) * Complex.I).exp = (2 * βΟ * Complex.I * βn * βx / βT).exp",
" (2 * βΟ / βT * (βn * βx) * Complex.I).exp = (2 * βΟ * Complex.I * βn * βx / βT).exp",
" 2 * βΟ / βT * (βn * βx) * Complex.I = 2 * βΟ * Complex.I * βn * βx / β... | [] |
import Mathlib.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 | 60 | 61 | theorem sin_ne_zero_iff {ΞΈ : β} : sin ΞΈ β 0 β β k : β€, ΞΈ β k * Ο := by |
rw [β not_exists, not_iff_not, sin_eq_zero_iff]
| [
" ΞΈ.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.Algebra.IsPrimePow
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.Order.Hom.Bounded
import Mathlib.Algebra.GCDMonoid.Basic
#align_import ring_theory.chain_of_divisors from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {M : Type*} [CancelCommMonoidWithZero... | Mathlib/RingTheory/ChainOfDivisors.lean | 99 | 108 | theorem second_of_chain_is_irreducible {q : Associates M} {n : β} (hn : n β 0)
{c : Fin (n + 1) β Associates M} (hβ : StrictMono c) (hβ : β {r}, r β€ q β β i, r = c i)
(hq : q β 0) : Irreducible (c 1) := by |
cases' n with n; Β· contradiction
refine (Associates.isAtom_iff (ne_zero_of_dvd_ne_zero hq (hβ.2 β¨1, rflβ©))).mp β¨?_, fun b hb => ?_β©
Β· exact ne_bot_of_gt (hβ (show (0 : Fin (n + 2)) < 1 from Fin.one_pos))
obtain β¨β¨i, hiβ©, rflβ© := hβ.1 (hb.le.trans (hβ.2 β¨1, rflβ©))
cases i
Β· exact (Associates.isUnit_iff_eq_o... | [
" Β¬IsUnit p",
" IsUnit b",
" Associated (p * b) p",
"M : Type u_1\ninstβ : CancelCommMonoidWithZero M\np : Associates M\nhβ : p β 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p",
" p β β₯",
" b = β₯",
" b = p * βha.unitβ»ΒΉ",
" β c, c 1 = p β§ StrictMono c β§ β {r : Associates M}, r β€ ... | [
" Β¬IsUnit p",
" IsUnit b",
" Associated (p * b) p",
"M : Type u_1\ninstβ : CancelCommMonoidWithZero M\np : Associates M\nhβ : p β 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p",
" p β β₯",
" b = β₯",
" b = p * βha.unitβ»ΒΉ",
" β c, c 1 = p β§ StrictMono c β§ β {r : Associates M}, r β€ ... |
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 | 131 | 132 | theorem ofFractionRing_one : (ofFractionRing 1 : RatFunc K) = 1 := by |
simp only [One.one, OfNat.ofNat, RatFunc.one]
| [
" { 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 := 0 } = 0",
" { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }",
" { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }",
" { toFractionRing := -p } = -{ toFractionRing := p }"
] |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 65 | 66 | theorem map_commutatorElement : (f β
gβ, gββ : G') = β
f gβ, f gββ := by |
simp_rw [commutatorElement_def, map_mul f, map_inv f]
| [
" β
gβ, gββ = 1 β gβ * gβ = gβ * gβ",
" β
gβ, gβββ»ΒΉ = β
gβ, gββ",
" f β
gβ, gββ = β
f gβ, f gββ"
] | [
" β
gβ, gββ = 1 β gβ * gβ = gβ * gβ",
" β
gβ, gβββ»ΒΉ = β
gβ, gββ"
] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Field.Rat
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Field.Rat
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SetFamily.Shadow
#align_import combinatorics.set_family.lym from "leanprover-co... | Mathlib/Combinatorics/SetFamily/LYM.lean | 65 | 87 | theorem card_mul_le_card_shadow_mul (hπ : (π : Set (Finset Ξ±)).Sized r) :
π.card * r β€ (β π).card * (Fintype.card Ξ± - r + 1) := by |
let i : DecidableRel ((Β· β Β·) : Finset Ξ± β Finset Ξ± β Prop) := fun _ _ => Classical.dec _
refine card_mul_le_card_mul' (Β· β Β·) (fun s hs => ?_) (fun s hs => ?_)
Β· rw [β hπ hs, β card_image_of_injOn s.erase_injOn]
refine card_le_card ?_
simp_rw [image_subset_iff, mem_bipartiteBelow]
exact fun a ha =>... | [
" π.card * r β€ (β π).card * (Fintype.card Ξ± - r + 1)",
" r β€ (bipartiteBelow (fun x x_1 => x β x_1) (β π) s).card",
" (image s.erase s).card β€ (bipartiteBelow (fun x x_1 => x β x_1) (β π) s).card",
" image s.erase s β bipartiteBelow (fun x x_1 => x β x_1) (β π) s",
" β x β s, s.erase x β β π β§ s.erase... | [] |
import Mathlib.Data.Multiset.Sum
import Mathlib.Data.Finset.Card
#align_import data.finset.sum from "leanprover-community/mathlib"@"48a058d7e39a80ed56858505719a0b2197900999"
open Function Multiset Sum
namespace Finset
variable {Ξ± Ξ² : Type*} (s : Finset Ξ±) (t : Finset Ξ²)
def disjSum : Finset (Sum Ξ± Ξ²) :=
β¨s.... | Mathlib/Data/Finset/Sum.lean | 54 | 56 | theorem disjoint_map_inl_map_inr : Disjoint (s.map Embedding.inl) (t.map Embedding.inr) := by |
simp_rw [disjoint_left, mem_map]
rintro x β¨a, _, rflβ© β¨b, _, β¨β©β©
| [
" _root_.Disjoint (map Embedding.inl s) (map Embedding.inr t)",
" β β¦a : Ξ± β Ξ²β¦, (β a_1 β s, Embedding.inl a_1 = a) β Β¬β a_2 β t, Embedding.inr a_2 = a"
] | [] |
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Multiset
variable {Ξ± : Type*} [CancelCommMonoidWithZero Ξ±] [NormalizedG... | Mathlib/Algebra/GCDMonoid/Multiset.lean | 219 | 221 | theorem gcd_ndinsert (a : Ξ±) (s : Multiset Ξ±) : (ndinsert a s).gcd = GCDMonoid.gcd a s.gcd := by |
rw [β gcd_dedup, dedup_ext.2, gcd_dedup, gcd_cons]
simp
| [
" (sβ + sβ).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (sβ + sβ)",
" a β£ gcd 0 β β b β 0, a β£ b",
" β (a_1 : Ξ±) (s : Multiset Ξ±), (a β£ s.gcd β β b β s, a β£ b) β (a β£ (a_1 ::β s).gcd β β b β a_1 ::β s, a β£ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::β s).gcd = (a ::β s).gcd",
" s.gcd = 0 β β x β ... | [
" (sβ + sβ).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (sβ + sβ)",
" a β£ gcd 0 β β b β 0, a β£ b",
" β (a_1 : Ξ±) (s : Multiset Ξ±), (a β£ s.gcd β β b β s, a β£ b) β (a β£ (a_1 ::β s).gcd β β b β a_1 ::β s, a β£ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::β s).gcd = (a ::β s).gcd",
" s.gcd = 0 β β x β ... |
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Measure.Haar.Quotient
import Mathlib.MeasureTheory.Constructions.Polish
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Topology.Algebra.Order.Floor
#align_import measure_theory.integral.periodic from "leanprover-c... | Mathlib/MeasureTheory/Integral/Periodic.lean | 256 | 262 | theorem intervalIntegral_add_eq_of_pos (hf : Periodic f T) (hT : 0 < T) (t s : β) :
β« x in t..t + T, f x = β« x in s..s + T, f x := by |
simp only [integral_of_le, hT.le, le_add_iff_nonneg_right]
haveI : VAddInvariantMeasure (AddSubgroup.zmultiples T) β volume :=
β¨fun c s _ => measure_preimage_add _ _ _β©
apply IsAddFundamentalDomain.setIntegral_eq (G := AddSubgroup.zmultiples T)
exacts [isAddFundamentalDomain_Ioc hT t, isAddFundamentalDomai... | [
" IsAddFundamentalDomain (β₯(zmultiples T)) (Ioc t (t + T)) ΞΌ",
" β! g, g +α΅₯ x β Ioc t (t + T)",
" β! x_1, codRestrict (fun n => n β’ T) β(zmultiples T) β― x_1 +α΅₯ x β Ioc t (t + T)",
" IsAddFundamentalDomain (β₯(zmultiples T).op) (Ioc t (t + T)) ΞΌ",
" β! x_1, (β(zmultiples T).equivOp β codRestrict (fun n => n β’... | [
" IsAddFundamentalDomain (β₯(zmultiples T)) (Ioc t (t + T)) ΞΌ",
" β! g, g +α΅₯ x β Ioc t (t + T)",
" β! x_1, codRestrict (fun n => n β’ T) β(zmultiples T) β― x_1 +α΅₯ x β Ioc t (t + T)",
" IsAddFundamentalDomain (β₯(zmultiples T).op) (Ioc t (t + T)) ΞΌ",
" β! x_1, (β(zmultiples T).equivOp β codRestrict (fun n => n β’... |
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics
#align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter ComplexConjugate
open Filter Finset... | Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean | 53 | 62 | theorem cpow_eq_nhds' {p : β Γ β} (hp_fst : p.fst β 0) :
(fun x => x.1 ^ x.2) =αΆ [π p] fun x => exp (log x.1 * x.2) := by |
suffices βαΆ x : β Γ β in π p, x.1 β 0 from
this.mono fun x hx β¦ by
dsimp only
rw [cpow_def_of_ne_zero hx]
refine IsOpen.eventually_mem ?_ hp_fst
change IsOpen { x : β Γ β | x.1 = 0 }αΆ
rw [isOpen_compl_iff]
exact isClosed_eq continuous_fst continuous_const
| [
" (fun x => 0 ^ x) =αΆ [π b] 0",
" (fun x => 0 ^ x) x = 0 x",
" 0 ^ x = OfNat.ofNat 0 x",
" βαΆ (x : β) in π b, x β 0",
" (fun x => x ^ b) =αΆ [π a] fun x => cexp (x.log * b)",
" (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x",
" x ^ b = cexp (x.log * b)",
" βαΆ (x : β) in π a, x β 0",
" (fun x =>... | [
" (fun x => 0 ^ x) =αΆ [π b] 0",
" (fun x => 0 ^ x) x = 0 x",
" 0 ^ x = OfNat.ofNat 0 x",
" βαΆ (x : β) in π b, x β 0",
" (fun x => x ^ b) =αΆ [π a] fun x => cexp (x.log * b)",
" (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x",
" x ^ b = cexp (x.log * b)",
" βαΆ (x : β) in π a, x β 0"
] |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.List.Zip
#align_import data.vector.zip from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
namespace Vector
section ZipWith
variable {Ξ± Ξ² Ξ³ : Type*} {n : β} (f : Ξ± β Ξ² β Ξ³)
def zipWith : Vector Ξ± n β Vector Ξ² n β Vector Ξ³ n := fun... | Mathlib/Data/Vector/Zip.lean | 33 | 36 | theorem zipWith_get (x : Vector Ξ± n) (y : Vector Ξ² n) (i) :
(Vector.zipWith f x y).get i = f (x.get i) (y.get i) := by |
dsimp only [Vector.zipWith, Vector.get]
simp only [List.get_zipWith, Fin.cast]
| [
" (List.zipWith f βx βy).length = n",
" (zipWith f x y).get i = f (x.get i) (y.get i)",
" (List.zipWith f βx βy).get (Fin.cast β― i) = f ((βx).get (Fin.cast β― i)) ((βy).get (Fin.cast β― i))"
] | [
" (List.zipWith f βx βy).length = n"
] |
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Sum
import Mathlib.Logic.Embedding.Set
#align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
universe u v
variable {Ξ± Ξ² : Type*}
open Finset
instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintyp... | Mathlib/Data/Fintype/Sum.lean | 105 | 115 | theorem Set.MapsTo.exists_equiv_extend_of_card_eq [Fintype Ξ±] {t : Finset Ξ²}
(hΞ±t : Fintype.card Ξ± = t.card) {s : Set Ξ±} {f : Ξ± β Ξ²} (hfst : s.MapsTo f t)
(hfs : Set.InjOn f s) : β g : Ξ± β t, β i β s, (g i : Ξ²) = f i := by |
classical
let s' : Finset Ξ± := s.toFinset
have hfst' : s'.image f β t := by simpa [s', β Finset.coe_subset] using hfst
have hfs' : Set.InjOn f s' := by simpa [s'] using hfs
obtain β¨g, hgβ© := Finset.exists_equiv_extend_of_card_eq hΞ±t hfst' hfs'
refine β¨g, fun i hi => ?_β©
apply hg
simpa [s'... | [
" β (x : Ξ± β Ξ²), x β univ.disjSum univ",
" Sum.inl valβ β univ.disjSum univ",
" Sum.inr valβ β univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b βi) univ = (image b univ).erase k",
" image (fun i => b βi) univ β (image b univ).erase k",
" β x β univ, b βx ... | [
" β (x : Ξ± β Ξ²), x β univ.disjSum univ",
" Sum.inl valβ β univ.disjSum univ",
" Sum.inr valβ β univ.disjSum univ",
" Function.Bijective (Sum.elim Subtype.val Subtype.val)",
" image (fun i => b βi) univ = (image b univ).erase k",
" image (fun i => b βi) univ β (image b univ).erase k",
" β x β univ, b βx ... |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open scoped Classical Topology Filter
open Function Set Filter
variable {π E : Type*} [NontriviallyNormed... | Mathlib/Analysis/Calculus/Dslope.lean | 72 | 74 | theorem dslope_sub_smul_of_ne (f : π β E) (h : b β a) :
dslope (fun x => (x - a) β’ f x) a b = f b := by |
rw [dslope_of_ne _ h, slope_sub_smul _ h.symm]
| [
" dslope (βf β g) a b = f (dslope g a b)",
" dslope (βf β g) b b = f (dslope g b b)",
" deriv (βf β g) b = f (deriv g b)",
" (b - a) β’ dslope f a b = f b - f a",
" (b - b) β’ dslope f b b = f b - f b",
" dslope (fun x => (x - a) β’ f x) a b = f b"
] | [
" dslope (βf β g) a b = f (dslope g a b)",
" dslope (βf β g) b b = f (dslope g b b)",
" deriv (βf β g) b = f (deriv g b)",
" (b - a) β’ dslope f a b = f b - f a",
" (b - b) β’ dslope f b b = f b - f b"
] |
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups
noncomputable section
open ModularForm UpperHalfPlane Complex Matrix
open scoped MatrixGroups
namespace EisensteinSeries
variable (N : β) (a : Fin 2 β ZMod N)
variable {N a}
section eisSum... | Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean | 92 | 100 | theorem eisSummand_SL2_apply (k : β€) (i : (Fin 2 β β€)) (A : SL(2, β€)) (z : β) :
eisSummand k i (A β’ z) = (z.denom A) ^ k * eisSummand k (i α΅₯* A) z := by |
simp only [eisSummand, specialLinearGroup_apply, algebraMap_int_eq, eq_intCast, ofReal_intCast,
one_div, vecMul, vec2_dotProduct, Int.cast_add, Int.cast_mul]
have h (a b c d u v : β) (hc : c * z + d β 0) : ((u * ((a * z + b) / (c * z + d)) + v) ^ k)β»ΒΉ =
(c * z + d) ^ k * (((u * a + v * c) * z + (u * b + ... | [
" eisSummand k i (A β’ z) = denom (βA) z ^ k * eisSummand k (i α΅₯* βA) z",
" ((β(i 0) * β(UpperHalfPlane.mk ((β(ββA 0 0) * βz + β(ββA 0 1)) / (β(ββA 1 0) * βz + β(ββA 1 1))) β―) + β(i 1)) ^ k)β»ΒΉ =\n denom (βA) z ^ k *\n (((β(i 0) * β(βA 0 0) + β(i 1) * β(βA 1 0)) * βz + (β(i 0) * β(βA 0 1) + β(i 1) * β(βA 1 ... | [] |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 158 | 168 | theorem content_eq_zero_iff {p : R[X]} : content p = 0 β p = 0 := by |
rw [content, Finset.gcd_eq_zero_iff]
constructor <;> intro h
Β· ext n
by_cases h0 : n β p.support
Β· rw [h n h0, coeff_zero]
Β· rw [mem_support_iff] at h0
push_neg at h0
simp [h0]
Β· intro x
simp [h]
| [
" p.content β£ p.coeff n",
" p.content β£ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1",
" (X * p).content = p.content",
" (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd",
" Multis... | [
" p.content β£ p.coeff n",
" p.content β£ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1",
" (X * p).content = p.content",
" (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd",
" Multis... |
import Mathlib.LinearAlgebra.FreeModule.IdealQuotient
import Mathlib.RingTheory.Norm
#align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
open Ideal Polynomial
open scoped Polynomial
variable {R S ΞΉ : Type*} [CommRing R] [IsDomain R] [IsPri... | Mathlib/LinearAlgebra/FreeModule/Norm.lean | 30 | 50 | theorem associated_norm_prod_smith [Fintype ΞΉ] (b : Basis ΞΉ R S) {f : S} (hf : f β 0) :
Associated (Algebra.norm R f) (β i, smithCoeffs b _ (span_singleton_eq_bot.not.2 hf) i) := by |
have hI := span_singleton_eq_bot.not.2 hf
let b' := ringBasis b (span {f}) hI
classical
rw [β Matrix.det_diagonal, β LinearMap.det_toLin b']
let e :=
(b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
((LinearEquiv.coord S S f hf).restrictScalars R)
refine (LinearMap.associated_det_of_e... | [
" Associated ((Algebra.norm R) f) (β i : ΞΉ, smithCoeffs b (span {f}) β― i)",
" Associated ((Algebra.norm R) f)\n (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) β― i)))",
" β (x : S),\n ((Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) β― i)) x =... | [] |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {Ξ± : Type u}
class OrderedAddCommGroup (Ξ± : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 394 | 394 | theorem lt_inv' : a < bβ»ΒΉ β b < aβ»ΒΉ := by | rw [β inv_lt_inv_iff, inv_inv]
| [
" b β€ c",
" aβ»ΒΉ < bβ»ΒΉ β b < a",
" a * aβ»ΒΉ * b < a * bβ»ΒΉ * b β b < a",
" aβ»ΒΉ < b β bβ»ΒΉ < a",
" a < bβ»ΒΉ β b < aβ»ΒΉ"
] | [
" b β€ c",
" aβ»ΒΉ < bβ»ΒΉ β b < a",
" a * aβ»ΒΉ * b < a * bβ»ΒΉ * b β b < a",
" aβ»ΒΉ < b β bβ»ΒΉ < a"
] |
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Data.Set.Function
#align_import analysis.sum_integral_comparisons from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Set MeasureTheory.MeasureSpace
variable {xβ : β} {a b : β} {f : β β β}
theorem AntitoneOn.in... | Mathlib/Analysis/SumIntegralComparisons.lean | 98 | 123 | theorem AntitoneOn.sum_le_integral (hf : AntitoneOn f (Icc xβ (xβ + a))) :
(β i β Finset.range a, f (xβ + (i + 1 : β))) β€ β« x in xβ..xβ + a, f x := by |
have hint : β k : β, k < a β IntervalIntegrable f volume (xβ + k) (xβ + (k + 1 : β)) := by
intro k hk
refine (hf.mono ?_).intervalIntegrable
rw [uIcc_of_le]
Β· apply Icc_subset_Icc
Β· simp only [le_add_iff_nonneg_right, Nat.cast_nonneg]
Β· simp only [add_le_add_iff_left, Nat.cast_le, Nat.suc... | [
" β« (x : β) in xβ..xβ + βa, f x β€ β i β Finset.range a, f (xβ + βi)",
" β k < a, IntervalIntegrable f volume (xβ + βk) (xβ + β(k + 1))",
" IntervalIntegrable f volume (xβ + βk) (xβ + β(k + 1))",
" uIcc (xβ + βk) (xβ + β(k + 1)) β Icc xβ (xβ + βa)",
" Icc (xβ + βk) (xβ + β(k + 1)) β Icc xβ (xβ + βa)",
" xβ... | [
" β« (x : β) in xβ..xβ + βa, f x β€ β i β Finset.range a, f (xβ + βi)",
" β k < a, IntervalIntegrable f volume (xβ + βk) (xβ + β(k + 1))",
" IntervalIntegrable f volume (xβ + βk) (xβ + β(k + 1))",
" uIcc (xβ + βk) (xβ + β(k + 1)) β Icc xβ (xβ + βa)",
" Icc (xβ + βk) (xβ + β(k + 1)) β Icc xβ (xβ + βa)",
" xβ... |
import Mathlib.Algebra.Group.Embedding
import Mathlib.Data.Fin.Basic
import Mathlib.Data.Finset.Union
#align_import data.finset.image from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
-- TODO
-- assert_not_exists OrderedCommMonoid
assert_not_exists MonoidWithZero
assert_not_exists MulA... | Mathlib/Data/Finset/Image.lean | 141 | 144 | theorem map_cast_heq {Ξ± Ξ²} (h : Ξ± = Ξ²) (s : Finset Ξ±) :
HEq (s.map (Equiv.cast h).toEmbedding) s := by |
subst h
simp
| [
" b β map f.toEmbedding s β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" f.symm (f.toEmbedding a) β s",
" f.toEmbedding (f.symm b) = b",
" p x hx",
" p (f y) hx",
" β (x : Ξ²), x β β(map f s) β x β βf '' βs",
" xβ β map f s.toFin... | [
" b β map f.toEmbedding s β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" (β a β s, f.toEmbedding a = b) β f.symm b β s",
" f.symm (f.toEmbedding a) β s",
" f.toEmbedding (f.symm b) = b",
" p x hx",
" p (f y) hx",
" β (x : Ξ²), x β β(map f s) β x β βf '' βs",
" xβ β map f s.toFin... |
import Mathlib.Algebra.Module.PID
import Mathlib.Data.ZMod.Quotient
#align_import group_theory.finite_abelian from "leanprover-community/mathlib"@"879155bff5af618b9062cbb2915347dafd749ad6"
open scoped DirectSum
private def directSumNeZeroMulHom {ΞΉ : Type} [DecidableEq ΞΉ] (p : ΞΉ β β) (n : ΞΉ β β) :
(β¨ i : {i ... | Mathlib/GroupTheory/FiniteAbelian.lean | 114 | 126 | theorem equiv_free_prod_directSum_zmod [hG : AddGroup.FG G] :
β (n : β) (ΞΉ : Type) (_ : Fintype ΞΉ) (p : ΞΉ β β) (_ : β i, Nat.Prime <| p i) (e : ΞΉ β β),
Nonempty <| G β+ (Fin n ββ β€) Γ β¨ i : ΞΉ, ZMod (p i ^ e i) := by |
obtain β¨n, ΞΉ, fΞΉ, p, hp, e, β¨fβ©β© :=
@Module.equiv_free_prod_directSum _ _ _ _ _ _ _ (Module.Finite.iff_addGroup_fg.mpr hG)
refine β¨n, ΞΉ, fΞΉ, fun i => (p i).natAbs, fun i => ?_, e, β¨?_β©β©
Β· rw [β Int.prime_iff_natAbs_prime, β irreducible_iff_prime]; exact hp i
exact
f.toAddEquiv.trans
((AddEquiv.re... | [
" (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p βj ^ n βj)) β¨i, hβ©)\n ((directSumNeZeroMulHom p n) x) =\n x",
" (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p βj ^ n βj)) β¨i, hβ©)\n ((directSumNeZeroMulHom p n) 0) =... | [
" (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p βj ^ n βj)) β¨i, hβ©)\n ((directSumNeZeroMulHom p n) x) =\n x",
" (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p βj ^ n βj)) β¨i, hβ©)\n ((directSumNeZeroMulHom p n) 0) =... |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex
#align_import analysis.special_functions.trigonometric.arctan from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Real
open Set Filter
open scoped Topology Real
theorem tan_add {x y : β}
... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean | 56 | 60 | theorem continuousOn_tan : ContinuousOn tan {x | cos x β 0} := by |
suffices ContinuousOn (fun x => sin x / cos x) {x | cos x β 0} by
have h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos]
rwa [h_eq] at this
exact continuousOn_sin.div continuousOn_cos fun x => id
| [
" (x + y).tan = (x.tan + y.tan) / (1 - x.tan * y.tan)",
" ((β (k : β€), βx β (2 * βk + 1) * βΟ / 2) β§ β (l : β€), βy β (2 * βl + 1) * βΟ / 2) β¨\n (β k, βx = (2 * βk + 1) * βΟ / 2) β§ β l, βy = (2 * βl + 1) * βΟ / 2",
" βx = (2 * βaβ + 1) * βΟ / 2 β x = (2 * βaβ + 1) * Ο / 2",
" βy = (2 * βaβ + 1) * βΟ / 2 β y... | [
" (x + y).tan = (x.tan + y.tan) / (1 - x.tan * y.tan)",
" ((β (k : β€), βx β (2 * βk + 1) * βΟ / 2) β§ β (l : β€), βy β (2 * βl + 1) * βΟ / 2) β¨\n (β k, βx = (2 * βk + 1) * βΟ / 2) β§ β l, βy = (2 * βl + 1) * βΟ / 2",
" βx = (2 * βaβ + 1) * βΟ / 2 β x = (2 * βaβ + 1) * Ο / 2",
" βy = (2 * βaβ + 1) * βΟ / 2 β y... |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.Multiset.Dedup
#align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
universe v
variable {Ξ± : Type*} {Ξ² : Type v} {Ξ³ Ξ΄ : Ty... | Mathlib/Data/Multiset/Bind.lean | 142 | 142 | theorem bind_add : (s.bind fun a => f a + g a) = s.bind f + s.bind g := by | simp [bind, join]
| [
" (β(List.map ofList (l :: L))).join = β(l :: L).join",
" a β join 0 β β s β 0, a β s",
" β (a_1 : Multiset Ξ±) (s : Multiset (Multiset Ξ±)),\n (a β s.join β β s_1 β s, a β s_1) β (a β (a_1 ::β s).join β β s_1 β a_1 ::β s, a β s_1)",
" card (join 0) = (map (βcard) 0).sum",
" β (a : Multiset Ξ±) (s : Multise... | [
" (β(List.map ofList (l :: L))).join = β(l :: L).join",
" a β join 0 β β s β 0, a β s",
" β (a_1 : Multiset Ξ±) (s : Multiset (Multiset Ξ±)),\n (a β s.join β β s_1 β s, a β s_1) β (a β (a_1 ::β s).join β β s_1 β a_1 ::β s, a β s_1)",
" card (join 0) = (map (βcard) 0).sum",
" β (a : Multiset Ξ±) (s : Multise... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Logic.Function.Iterate
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Zify
#align_import data.nat.fib from "leanprover-community/mathlib"@"... | Mathlib/Data/Nat/Fib/Basic.lean | 174 | 179 | theorem fib_two_mul (n : β) : fib (2 * n) = fib n * (2 * fib (n + 1) - fib n) := by |
cases n
Β· simp
Β· rw [two_mul, β add_assoc, fib_add, fib_add_two, two_mul]
simp only [β add_assoc, add_tsub_cancel_right]
ring
| [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib β€ (n + 1).fib",
" fib 0 β€ (0 + 1).fib",
" (nβ + 1).fib β€ (nβ + 1 + 1).fib",
" (n + 2).fib = 0 β n + 2 = 0",
" 0 < n.fib β 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... | [
" (n + 2).fib = n.fib + (n + 1).fib",
" n.fib β€ (n + 1).fib",
" fib 0 β€ (0 + 1).fib",
" (nβ + 1).fib β€ (nβ + 1 + 1).fib",
" (n + 2).fib = 0 β n + 2 = 0",
" 0 < n.fib β 0 < n",
" (n + 2).fib - (n + 1).fib = n.fib",
" n.fib < (n + 1).fib",
" (2 + n).fib < (2 + n + 1).fib",
" 0 < n + 1",
" StrictMo... |
import Mathlib.LinearAlgebra.TensorProduct.Basic
import Mathlib.RingTheory.Finiteness
open scoped TensorProduct
open Submodule
variable {R M N : Type*}
variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N]
variable {Mβ Mβ : Submodule R M} {Nβ Nβ : Submodule R N}
namespace Tens... | Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean | 121 | 126 | theorem exists_finite_submodule_left_of_finite (s : Set (M β[R] N)) (hs : s.Finite) :
β M' : Submodule R M, Module.Finite R M' β§ s β LinearMap.range (M'.subtype.rTensor N) := by |
obtain β¨M', _, hfin, _, hβ© := exists_finite_submodule_of_finite s hs
refine β¨M', hfin, ?_β©
rw [mapIncl, β LinearMap.rTensor_comp_lTensor] at h
exact h.trans (LinearMap.range_comp_le_range _ _)
| [
" β S, x = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" β S, 0 = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" 0 = (Multiset.map (fun i => i.1 ββ[R] i.2) 0).sum",
" β S, x ββ[R] y = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" x ββ[R] y = (Multiset.map (fun i => i.1 ββ[R] i.2) {(x, y)}).sum",
... | [
" β S, x = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" β S, 0 = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" 0 = (Multiset.map (fun i => i.1 ββ[R] i.2) 0).sum",
" β S, x ββ[R] y = (Multiset.map (fun i => i.1 ββ[R] i.2) S).sum",
" x ββ[R] y = (Multiset.map (fun i => i.1 ββ[R] i.2) {(x, y)}).sum",
... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Int.ModEq
import Mathlib.Data.Nat.Bits
import Mathlib.Data.Nat.Log
import Mathlib.Data.List.Indexes
import Mathlib.Data.List.Palindrome
import Mathlib.Tactic.IntervalCases
import Mathlib.Tactic.Linarith
impo... | Mathlib/Data/Nat/Digits.lean | 137 | 140 | theorem digits_of_lt (b x : β) (hx : x β 0) (hxb : x < b) : digits b x = [x] := by |
rcases exists_eq_succ_of_ne_zero hx with β¨x, rflβ©
rcases Nat.exists_eq_add_of_le' ((Nat.le_add_left 1 x).trans_lt hxb) with β¨b, rflβ©
rw [digits_add_two_add_one, div_eq_of_lt hxb, digits_zero, mod_eq_of_lt hxb]
| [
" (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 ((n + 1) / b) n.succ",
" b.digitsAux h 0 = []",
" b.digitsAux h n = n % b :: b.digitsAux h (n / b)",
" b.digitsAux h 0 = 0 % b :: b.digitsAux h (0 / b)",
" b.digitsAux h (nβ + 1) = (nβ + 1) % b :: b.digitsAux h ((nβ + 1) / b)",
" 2 β€ b + 2",
" ... | [
" (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 ((n + 1) / b) n.succ",
" b.digitsAux h 0 = []",
" b.digitsAux h n = n % b :: b.digitsAux h (n / b)",
" b.digitsAux h 0 = 0 % b :: b.digitsAux h (0 / b)",
" b.digitsAux h (nβ + 1) = (nβ + 1) % b :: b.digitsAux h ((nβ + 1) / b)",
" 2 β€ b + 2",
" ... |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' ΞΆ ΞΆ' Ξ½ : Type*} {f f' : Ξ± β Ξ² β Ξ³} {g g' : Ξ± β Ξ² β Ξ³ β Ξ΄}
variable {s s' : Set Ξ±} {t t' : Set Ξ²} {u u' : Set Ξ³} {v... | Mathlib/Data/Set/NAry.lean | 68 | 69 | theorem image2_subset_iff_left : image2 f s t β u β β a β s, (fun b => f a b) '' t β u := by |
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
| [
" f a b β image2 f s t β a β s β§ b β t",
" a β s β§ b β t",
" a' β s β§ b' β t",
" image2 f s t β image2 f s' t'",
" f a b β image2 f s' t'",
" image2 f s t β u β β a β s, (fun b => f a b) '' t β u"
] | [
" f a b β image2 f s t β a β s β§ b β t",
" a β s β§ b β t",
" a' β s β§ b' β t",
" image2 f s t β image2 f s' t'",
" f a b β image2 f s' t'"
] |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {Ξ± : Type*}
namespace List
inductive Duplicate (x : Ξ±) : List Ξ± β Prop
| cons_mem {l : List Ξ±} : x β l β Duplicate x (x :: l)
| cons_duplicate {y : Ξ±} {l ... | Mathlib/Data/List/Duplicate.lean | 141 | 142 | theorem duplicate_iff_two_le_count [DecidableEq Ξ±] : x β+ l β 2 β€ count x l := by |
simp [duplicate_iff_sublist, le_count_iff_replicate_sublist]
| [
" x β l",
" x β x :: l'",
" x β y :: l'",
" l β [y]",
" x :: l' β [y]",
" z :: l' β [y]",
" x β+ y :: l β y = x β§ x β l β¨ x β+ l",
" y = x β§ x β l β¨ x β+ l",
" x = x β§ x β l β¨ x β+ l",
" x β+ y :: l",
" x β+ x :: l",
" x β+ l",
" x β+ y :: l β x β+ l",
" x β+ l'",
" x β+ []",
" x β+ y ... | [
" x β l",
" x β x :: l'",
" x β y :: l'",
" l β [y]",
" x :: l' β [y]",
" z :: l' β [y]",
" x β+ y :: l β y = x β§ x β l β¨ x β+ l",
" y = x β§ x β l β¨ x β+ l",
" x = x β§ x β l β¨ x β+ l",
" x β+ y :: l",
" x β+ x :: l",
" x β+ l",
" x β+ y :: l β x β+ l",
" x β+ l'",
" x β+ []",
" x β+ y ... |
import Mathlib.RingTheory.RingHomProperties
import Mathlib.RingTheory.IntegralClosure
#align_import ring_theory.ring_hom.integral from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
theorem isIntegra... | Mathlib/RingTheory/RingHom/Integral.lean | 28 | 32 | theorem isIntegral_respectsIso : RespectsIso fun f => f.IsIntegral := by |
apply isIntegral_stableUnderComposition.respectsIso
introv x
rw [β e.apply_symm_apply x]
apply RingHom.isIntegralElem_map
| [
" StableUnderComposition fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral",
" (g.comp f).IsIntegral",
" RespectsIso fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral",
" β {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R β+* S), e.toRingHom.IsIntegral",
" e.toRingHom.IsIntegralElem... | [
" StableUnderComposition fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral",
" (g.comp f).IsIntegral"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
#align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace Nat
variable {ΞΉ : Type*}
| Mathlib/Data/Nat/GCD/BigOperators.lean | 20 | 22 | theorem coprime_list_prod_left_iff {l : List β} {k : β} :
Coprime l.prod k β β n β l, Coprime n k := by |
induction l <;> simp [Nat.coprime_mul_iff_left, *]
| [
" l.prod.Coprime k β β n β l, n.Coprime k",
" [].prod.Coprime k β β n β [], n.Coprime k",
" (headβ :: tailβ).prod.Coprime k β β n β headβ :: tailβ, n.Coprime k"
] | [] |
import Mathlib.Dynamics.Ergodic.MeasurePreserving
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
import Mathlib.LinearAlgebra.Matrix.Transvection
import Mathlib.MeasureTheory.Group.LIntegral
import Mathlib.MeasureTheory.Integral.Marginal
import Mathlib.MeasureTheory.Measure.Stiel... | Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean | 145 | 150 | theorem volume_Ioi {a : β} : volume (Ioi a) = β :=
top_unique <|
le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n =>
calc
(n : ββ₯0β) = volume (Ioo a (a + n)) := by | simp
_ β€ volume (Ioi a) := measure_mono Ioo_subset_Ioi_self
| [
" volume = StieltjesFunction.id.measure",
" StieltjesFunction.id.measure (Ioo βp βq) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo βp βq)",
" StieltjesFunction.id.measure β(stdOrthonormalBasis β β).toBasis.parallelepiped = 1",
" StieltjesFunction.id.measure (parallelepiped β(stdOrthonorma... | [
" volume = StieltjesFunction.id.measure",
" StieltjesFunction.id.measure (Ioo βp βq) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo βp βq)",
" StieltjesFunction.id.measure β(stdOrthonormalBasis β β).toBasis.parallelepiped = 1",
" StieltjesFunction.id.measure (parallelepiped β(stdOrthonorma... |
import Mathlib.Probability.Kernel.MeasurableIntegral
#align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b"
open MeasureTheory
open scoped ENNReal
namespace ProbabilityTheory
namespace kernel
variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}... | Mathlib/Probability/Kernel/Composition.lean | 146 | 148 | theorem compProdFun_tsum_left (ΞΊ : kernel Ξ± Ξ²) (Ξ· : kernel (Ξ± Γ Ξ²) Ξ³) [IsSFiniteKernel ΞΊ] (a : Ξ±)
(s : Set (Ξ² Γ Ξ³)) : compProdFun ΞΊ Ξ· a s = β' n, compProdFun (seq ΞΊ n) Ξ· a s := by |
simp_rw [compProdFun, (measure_sum_seq ΞΊ _).symm, lintegral_sum_measure]
| [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... | [
" compProdFun ΞΊ Ξ· a β
= 0",
" compProdFun ΞΊ Ξ· a (β i, f i) = β' (i : β), compProdFun ΞΊ Ξ· a (f i)",
" (fun b => (Ξ· (a, b)) {c | (b, c) β β i, f i}) = fun b => (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" (Ξ· (a, b)) {c | (b, c) β β i, f i} = (Ξ· (a, b)) (β i, {c | (b, c) β f i})",
" c β {c | (b, c) β β i, f i} β c... |
import Mathlib.CategoryTheory.EffectiveEpi.Preserves
import Mathlib.CategoryTheory.EffectiveEpi.Coproduct
import Mathlib.CategoryTheory.Extensive
import Mathlib.CategoryTheory.Limits.Preserves.Finite
namespace CategoryTheory
open Limits
variable {C : Type*} [Category C] [FinitaryPreExtensive C]
| Mathlib/CategoryTheory/EffectiveEpi/Extensive.lean | 24 | 29 | theorem effectiveEpi_desc_iff_effectiveEpiFamily {Ξ± : Type} [Finite Ξ±]
{B : C} (X : Ξ± β C) (Ο : (a : Ξ±) β X a βΆ B) :
EffectiveEpi (Sigma.desc Ο) β EffectiveEpiFamily X Ο := by |
exact β¨fun h β¦ β¨β¨@effectiveEpiFamilyStructOfEffectiveEpiDesc _ _ _ _ X Ο _ h _ _ (fun g β¦
(FinitaryPreExtensive.sigma_desc_iso (fun a β¦ Sigma.ΞΉ X a) g inferInstance).epi_of_iso)β©β©,
fun _ β¦ inferInstanceβ©
| [
" EffectiveEpi (Sigma.desc Ο) β EffectiveEpiFamily X Ο"
] | [] |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {Ξ± : Type u}
#align dlist.of_list... | Mathlib/Data/DList/Defs.lean | 84 | 85 | theorem toList_push (x : Ξ±) (l : DList Ξ±) : toList (push l x) = toList l ++ [x] := by |
cases' l with _ l_invariant; simp; rw [l_invariant]
| [
" (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t",
" (ofList l).toList = l",
" (ofList (headβ :: tailβ)).toList = headβ :: tailβ",
" ofList l.toList = l",
" ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }",
" (fun x => app [] ++ x) = app",
" app [] ++ x... | [
" (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t",
" (ofList l).toList = l",
" (ofList (headβ :: tailβ)).toList = headβ :: tailβ",
" ofList l.toList = l",
" ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }",
" (fun x => app [] ++ x) = app",
" app [] ++ x... |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.Tactic.ComputeDegree
#align_import linear_algebra.matrix.polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
set_... | Mathlib/LinearAlgebra/Matrix/Polynomial.lean | 73 | 86 | theorem coeff_det_X_add_C_card (A B : Matrix n n Ξ±) :
coeff (det ((X : Ξ±[X]) β’ A.map C + B.map C)) (Fintype.card n) = det A := by |
rw [det_apply, det_apply, finset_sum_coeff]
refine Finset.sum_congr rfl ?_
simp only [Algebra.id.smul_eq_mul, Finset.mem_univ, RingHom.mapMatrix_apply, forall_true_left,
map_apply, Pi.smul_apply]
intro g
convert coeff_smul (R := Ξ±) (sign g) _ _
rw [β mul_one (Fintype.card n)]
convert (coeff_prod_of_n... | [
" (X β’ A.map βC + B.map βC).det.natDegree β€ Fintype.card n",
" (β Ο : Equiv.Perm n, sign Ο β’ β i : n, (X β’ A.map βC + B.map βC) (Ο i) i).natDegree β€ Fintype.card n",
" Finset.fold max 0 (natDegree β fun Ο => sign Ο β’ β i : n, (X β’ A.map βC + B.map βC) (Ο i) i) Finset.univ β€\n Fintype.card n",
" β x β Multi... | [
" (X β’ A.map βC + B.map βC).det.natDegree β€ Fintype.card n",
" (β Ο : Equiv.Perm n, sign Ο β’ β i : n, (X β’ A.map βC + B.map βC) (Ο i) i).natDegree β€ Fintype.card n",
" Finset.fold max 0 (natDegree β fun Ο => sign Ο β’ β i : n, (X β’ A.map βC + B.map βC) (Ο i) i) Finset.univ β€\n Fintype.card n",
" β x β Multi... |
import Mathlib.Topology.MetricSpace.PseudoMetric
#align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
open Set Filter Bornology
open scoped NNReal Uniformity
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {X ΞΉ : Type*}
variable [PseudoMetricS... | Mathlib/Topology/MetricSpace/Basic.lean | 107 | 108 | theorem zero_eq_nndist {x y : Ξ³} : 0 = nndist x y β x = y := by |
simp only [β NNReal.eq_iff, β dist_nndist, imp_self, NNReal.coe_zero, zero_eq_dist]
| [
" m = m'",
" mk eq_of_dist_eq_zeroβ = m'",
" mk eq_of_dist_eq_zeroβΒΉ = mk eq_of_dist_eq_zeroβ",
" toPseudoMetricSpaceβΒΉ = toPseudoMetricSpaceβ",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y β x = y",
" dist x y β 0 β x β y",
" dist x y β€ 0 β x = y",
" 0 < dist x y β x β y",... | [
" m = m'",
" mk eq_of_dist_eq_zeroβ = m'",
" mk eq_of_dist_eq_zeroβΒΉ = mk eq_of_dist_eq_zeroβ",
" toPseudoMetricSpaceβΒΉ = toPseudoMetricSpaceβ",
" PseudoMetricSpace.toDist = PseudoMetricSpace.toDist",
" 0 = dist x y β x = y",
" dist x y β 0 β x β y",
" dist x y β€ 0 β x = y",
" 0 < dist x y β x β y",... |
import Mathlib.Analysis.SpecialFunctions.Bernstein
import Mathlib.Topology.Algebra.Algebra
#align_import topology.continuous_function.weierstrass from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
open ContinuousMap Filter
open scoped unitInterval
theorem polynomialFunctions_closure... | Mathlib/Topology/ContinuousFunction/Weierstrass.lean | 99 | 105 | theorem exists_polynomial_near_continuousMap (a b : β) (f : C(Set.Icc a b, β)) (Ξ΅ : β)
(pos : 0 < Ξ΅) : β p : β[X], βp.toContinuousMapOn _ - fβ < Ξ΅ := by |
have w := mem_closure_iff_frequently.mp (continuousMap_mem_polynomialFunctions_closure _ _ f)
rw [Metric.nhds_basis_ball.frequently_iff] at w
obtain β¨-, H, β¨m, β¨-, rflβ©β©β© := w Ξ΅ pos
rw [Metric.mem_ball, dist_eq_norm] at H
exact β¨m, Hβ©
| [
" (polynomialFunctions I).topologicalClosure = β€",
" β€ β€ (polynomialFunctions I).topologicalClosure",
" f β (polynomialFunctions I).topologicalClosure",
" βαΆ (x : C(βI, β)) in nhds f, x β β(polynomialFunctions I)",
" βαΆ (x : β) in atTop, bernsteinApproximation x f β β(polynomialFunctions I)",
" β (x : β),... | [
" (polynomialFunctions I).topologicalClosure = β€",
" β€ β€ (polynomialFunctions I).topologicalClosure",
" f β (polynomialFunctions I).topologicalClosure",
" βαΆ (x : C(βI, β)) in nhds f, x β β(polynomialFunctions I)",
" βαΆ (x : β) in atTop, bernsteinApproximation x f β β(polynomialFunctions I)",
" β (x : β),... |
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Data.Finset.Basic
import Mathlib.Order.Interval.Finset.Defs
open Function
namespace Finset
class HasAntidiagonal (A : Type*) [AddMonoid A] where
antidiagonal : A β Finset (A Γ A)
mem_antidiagonal {n} {a} : a β antidiagonal n β a.fst + a.snd = n
exp... | Mathlib/Data/Finset/Antidiagonal.lean | 141 | 144 | theorem antidiagonal.snd_le {n : A} {kl : A Γ A} (hlk : kl β antidiagonal n) : kl.2 β€ n := by |
rw [le_iff_exists_add]
use kl.1
rwa [mem_antidiagonal, eq_comm, add_comm] at hlk
| [
" β (a b : HasAntidiagonal A), a = b",
" { antidiagonal := a, mem_antidiagonal := ha } = { antidiagonal := b, mem_antidiagonal := hb }",
" xy β a n β xy β b n",
" antidiagonal = antidiagonal",
" H1 = H2",
" xy.swap β antidiagonal n β xy β antidiagonal n",
" (a, b) β map (Equiv.prodComm A A).toEmbedding ... | [
" β (a b : HasAntidiagonal A), a = b",
" { antidiagonal := a, mem_antidiagonal := ha } = { antidiagonal := b, mem_antidiagonal := hb }",
" xy β a n β xy β b n",
" antidiagonal = antidiagonal",
" H1 = H2",
" xy.swap β antidiagonal n β xy β antidiagonal n",
" (a, b) β map (Equiv.prodComm A A).toEmbedding ... |
import Mathlib.MeasureTheory.Integral.SetToL1
#align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
assert_not_exists Differentiable
noncomputable section
open scoped Topology NNReal ENNReal MeasureTheory
open Set Filter TopologicalSpace EN... | Mathlib/MeasureTheory/Integral/Bochner.lean | 209 | 210 | theorem weightedSMul_null {s : Set Ξ±} (h_zero : ΞΌ s = 0) : (weightedSMul ΞΌ s : F βL[β] F) = 0 := by |
ext1 x; rw [weightedSMul_apply, h_zero]; simp
| [
" (weightedSMul ΞΌ s) x = (ΞΌ s).toReal β’ x",
" weightedSMul 0 = 0",
" weightedSMul 0 xβ = 0 xβ",
" weightedSMul ΞΌ β
= 0",
" (weightedSMul ΞΌ β
) x = 0 x",
" (ΞΌ β
).toReal β’ x = 0 x",
" weightedSMul (ΞΌ + Ξ½) s = weightedSMul ΞΌ s + weightedSMul Ξ½ s",
" (weightedSMul (ΞΌ + Ξ½) s) x = (weightedSMul ΞΌ s + weighte... | [
" (weightedSMul ΞΌ s) x = (ΞΌ s).toReal β’ x",
" weightedSMul 0 = 0",
" weightedSMul 0 xβ = 0 xβ",
" weightedSMul ΞΌ β
= 0",
" (weightedSMul ΞΌ β
) x = 0 x",
" (ΞΌ β
).toReal β’ x = 0 x",
" weightedSMul (ΞΌ + Ξ½) s = weightedSMul ΞΌ s + weightedSMul Ξ½ s",
" (weightedSMul (ΞΌ + Ξ½) s) x = (weightedSMul ΞΌ s + weighte... |
import Mathlib.Analysis.SpecialFunctions.Exponential
#align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84e0d918668460a34aa19d02fe2e0e2286da0"
open NormedSpace
open scoped Nat
section SinCos
| Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean | 32 | 46 | theorem Complex.hasSum_cos' (z : β) :
HasSum (fun n : β => (z * Complex.I) ^ (2 * n) / β(2 * n)!) (Complex.cos z) := by |
rw [Complex.cos, Complex.exp_eq_exp_β]
have := ((expSeries_div_hasSum_exp β (z * Complex.I)).add
(expSeries_div_hasSum_exp β (-z * Complex.I))).div_const 2
replace := (Nat.divModEquiv 2).symm.hasSum_iff.mpr this
dsimp [Function.comp_def] at this
simp_rw [β mul_comm 2 _] at this
refine this.prod_fiberwi... | [
" HasSum (fun n => (z * I) ^ (2 * n) / β(2 * n)!) z.cos",
" HasSum (fun n => (z * I) ^ (2 * n) / β(2 * n)!) ((NormedSpace.exp β (z * I) + NormedSpace.exp β (-z * I)) / 2)",
" HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + β(k, c).2) / β(2 * (k, c).1 + β(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +... | [] |
import Mathlib.SetTheory.Ordinal.Arithmetic
import Mathlib.Tactic.TFAE
import Mathlib.Topology.Order.Monotone
#align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
noncomputable section
universe u v
open Cardinal Order Topology
namespace Ordina... | Mathlib/SetTheory/Ordinal/Topology.lean | 41 | 53 | theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) β Β¬IsLimit a := by |
refine β¨fun h β¨hβ, hsuccβ© => ?_, fun ha => ?_β©
Β· obtain β¨b, c, hbc, hbc'β© :=
(mem_nhds_iff_exists_Ioo_subset' β¨0, Ordinal.pos_iff_ne_zero.2 hββ© β¨_, lt_succ aβ©).1
(h.mem_nhds rfl)
have hba := hsucc b hbc.1
exact hba.ne (hbc' β¨lt_succ b, hba.trans hbc.2β©)
Β· rcases zero_or_succ_or_limit a with... | [
" IsOpen {a} β Β¬a.IsLimit",
" False",
" IsOpen {a}",
" IsOpen {0}",
" IsOpen (Set.Iio (succ β₯))",
" IsOpen {succ b}",
" IsOpen (Set.Ioo b (succ (succ b)))"
] | [] |
import Mathlib.Data.Finset.Image
import Mathlib.Data.List.FinRange
#align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {Ξ± Ξ² Ξ³ : Type*}
class Fi... | Mathlib/Data/Fintype/Basic.lean | 92 | 92 | theorem coe_univ : β(univ : Finset Ξ±) = (Set.univ : Set Ξ±) := by | ext; simp
| [
" s = univ β β (x : Ξ±), x β s",
" βuniv = Set.univ",
" xβ β βuniv β xβ β Set.univ"
] | [
" s = univ β β (x : Ξ±), x β s"
] |
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Algebra.Group.Basic
#align_import data.int.cast.basic from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u
open Nat
namespace Int
variable {R : Type u} [AddGroupWithOne R]
@[simp, norm_cas... | Mathlib/Data/Int/Cast/Basic.lean | 74 | 76 | theorem cast_ofNat (n : β) [n.AtLeastTwo] :
((no_index (OfNat.ofNat n) : β€) : R) = OfNat.ofNat n := by |
simpa only [OfNat.ofNat] using AddGroupWithOne.intCast_ofNat (R := R) n
| [
" β(OfNat.ofNat n) = OfNat.ofNat n"
] | [] |
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9"
open scoped ENNReal
namespace MeasureTheory
variable {Ξ± E : Type*} {m0 : MeasurableSpace Ξ±} [NormedAddCommGroup E]
{p : ββ₯0β} (ΞΌ... | Mathlib/MeasureTheory/Function/LpSeminorm/ChebyshevMarkov.lean | 23 | 28 | theorem pow_mul_meas_ge_le_snorm (hp_ne_zero : p β 0) (hp_ne_top : p β β)
(hf : AEStronglyMeasurable f ΞΌ) (Ξ΅ : ββ₯0β) :
(Ξ΅ * ΞΌ { x | Ξ΅ β€ (βf xββ : ββ₯0β) ^ p.toReal }) ^ (1 / p.toReal) β€ snorm f p ΞΌ := by |
rw [snorm_eq_lintegral_rpow_nnnorm hp_ne_zero hp_ne_top]
gcongr
exact mul_meas_ge_le_lintegralβ (hf.ennnorm.pow_const _) Ξ΅
| [
" (Ξ΅ * ΞΌ {x | Ξ΅ β€ ββf xββ ^ p.toReal}) ^ (1 / p.toReal) β€ snorm f p ΞΌ",
" (Ξ΅ * ΞΌ {x | Ξ΅ β€ ββf xββ ^ p.toReal}) ^ (1 / p.toReal) β€ (β«β» (x : Ξ±), ββf xββ ^ p.toReal βΞΌ) ^ (1 / p.toReal)",
" Ξ΅ * ΞΌ {x | Ξ΅ β€ ββf xββ ^ p.toReal} β€ β«β» (x : Ξ±), ββf xββ ^ p.toReal βΞΌ"
] | [] |
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925"
namespace Cardinal
universe u v
open Cardinal
def continuum : Cardinal.{u} :=
2 ^ β΅β
#align cardinal.continuum Cardinal.continuum
scoped notat... | Mathlib/SetTheory/Cardinal/Continuum.lean | 64 | 66 | theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < π β c < π := by |
-- Porting note: added explicit universes
rw [β lift_continuum.{u,v}, lift_lt]
| [
" lift.{v, u_1} π = π ",
" π β€ lift.{v, u} c β π β€ c",
" lift.{v, u} c β€ π β c β€ π ",
" π < lift.{v, u} c β π < c",
" lift.{v, u} c < π β c < π "
] | [
" lift.{v, u_1} π = π ",
" π β€ lift.{v, u} c β π β€ c",
" lift.{v, u} c β€ π β c β€ π ",
" π < lift.{v, u} c β π < c"
] |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNR... | Mathlib/Probability/IdentDistrib.lean | 326 | 348 | theorem Memβp.uniformIntegrable_of_identDistrib_aux {ΞΉ : Type*} {f : ΞΉ β Ξ± β E} {j : ΞΉ} {p : ββ₯0β}
(hp : 1 β€ p) (hp' : p β β) (hβp : Memβp (f j) p ΞΌ) (hfmeas : β i, StronglyMeasurable (f i))
(hf : β i, IdentDistrib (f i) (f j) ΞΌ ΞΌ) : UniformIntegrable f p ΞΌ := by |
refine uniformIntegrable_of' hp hp' hfmeas fun Ξ΅ hΞ΅ => ?_
by_cases hΞΉ : Nonempty ΞΉ
swap; Β· exact β¨0, fun i => False.elim (hΞΉ <| Nonempty.intro i)β©
obtain β¨C, hCβ, hCββ© := hβp.snorm_indicator_norm_ge_pos_le (hfmeas _) hΞ΅
refine β¨β¨C, hCβ.leβ©, fun i => le_trans (le_of_eq ?_) hCββ©
have : {x | (β¨C, hCβ.leβ© : ββ₯... | [
" UniformIntegrable f p ΞΌ",
" β C, β (i : ΞΉ), snorm ({x | C β€ βf i xββ}.indicator (f i)) p ΞΌ β€ ENNReal.ofReal Ξ΅",
" snorm ({x | β¨C, β―β© β€ βf i xββ}.indicator (f i)) p ΞΌ = snorm ({x | C β€ ββf j xββ}.indicator (f j)) p ΞΌ",
" {x | β¨C, β―β© β€ βf i xββ} = {x | C β€ βf i xβ}",
" x β {x | β¨C, β―β© β€ βf i xββ} β x β {x |... | [] |
import Mathlib.Topology.Order.Basic
import Mathlib.Data.Set.Pointwise.Basic
open Set Filter TopologicalSpace Topology Function
open OrderDual (toDual ofDual)
variable {Ξ± Ξ² Ξ³ : Type*}
section LinearOrder
variable [TopologicalSpace Ξ±] [LinearOrder Ξ±]
section OrderTopology
variable [OrderTopology Ξ±]
open List ... | Mathlib/Topology/Order/LeftRightNhds.lean | 131 | 138 | theorem TFAE_mem_nhdsWithin_Iio {a b : Ξ±} (h : a < b) (s : Set Ξ±) :
TFAE [s β π[<] b,-- 0 : `s` is a neighborhood of `b` within `(-β, b)`
s β π[Ico a b] b,-- 1 : `s` is a neighborhood of `b` within `[a, b)`
s β π[Ioo a b] b,-- 2 : `s` is a neighborhood of `b` within `(a, b)`
β l β Ico a b... | -- 4 : `s` includes `(l, b)` for some `l < b`
simpa only [exists_prop, OrderDual.exists, dual_Ioi, dual_Ioc, dual_Ioo] using
TFAE_mem_nhdsWithin_Ioi h.dual (ofDual β»ΒΉ' s)
| [
" [s β π[>] a, s β π[Ioc a b] a, s β π[Ioo a b] a, β u β Ioc a b, Ioo a u β s, β u β Ioi a, Ioo a u β s].TFAE",
" s β π[>] a β s β π[Ioc a b] a",
" s β π[>] a β s β π[Ioo a b] a",
" (β u β Ioc a b, Ioo a u β s) β β u β Ioi a, Ioo a u β s",
" (β u β Ioi a, Ioo a u β s) β s β π[>] a",
" s β π[>] a"... | [
" [s β π[>] a, s β π[Ioc a b] a, s β π[Ioo a b] a, β u β Ioc a b, Ioo a u β s, β u β Ioi a, Ioo a u β s].TFAE",
" s β π[>] a β s β π[Ioc a b] a",
" s β π[>] a β s β π[Ioo a b] a",
" (β u β Ioc a b, Ioo a u β s) β β u β Ioi a, Ioo a u β s",
" (β u β Ioi a, Ioo a u β s) β s β π[>] a",
" s β π[>] a"... |
import Mathlib.Order.Filter.Lift
import Mathlib.Order.Filter.AtTopBot
#align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
open Filter
open Filter Set
variable {Ξ± Ξ² : Type*} {ΞΉ : Sort*}
namespace Filter
variable {l l' la : Filter Ξ±} {lb : Filter ... | Mathlib/Order/Filter/SmallSets.lean | 40 | 42 | theorem smallSets_eq_generate {f : Filter Ξ±} : f.smallSets = generate (powerset '' f.sets) := by |
simp_rw [generate_eq_biInf, smallSets, iInf_image]
rfl
| [
" f.smallSets = generate (powerset '' f.sets)",
" f.lift' powerset = β¨
b β f.sets, π (π« b)"
] | [] |
import Mathlib.Data.PFunctor.Multivariate.W
import Mathlib.Data.QPF.Multivariate.Basic
#align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe u v
namespace MvQPF
open TypeVec
open MvFunctor (LiftP LiftR)
open MvFunctor
var... | Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean | 120 | 121 | theorem wEquiv.refl {Ξ± : TypeVec n} (x : q.P.W Ξ±) : WEquiv x x := by |
apply q.P.w_cases _ x; intro a f' f; exact WEquiv.abs a f' f a f' f rfl
| [
" recF g ((P F).wMk a f' f) = g (abs β¨a, splitFun f' (recF g β f)β©)",
" g (abs β¨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs β¨a, splitFun f' recβ©)) (f i)β©) =\n g (abs β¨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs β¨a, splitFun f' recβ©)) β f)β©)",
" recF g x = g (abs ((TypeVec.id ::: r... | [
" recF g ((P F).wMk a f' f) = g (abs β¨a, splitFun f' (recF g β f)β©)",
" g (abs β¨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs β¨a, splitFun f' recβ©)) (f i)β©) =\n g (abs β¨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs β¨a, splitFun f' recβ©)) β f)β©)",
" recF g x = g (abs ((TypeVec.id ::: r... |
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional
open sco... | Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean | 98 | 125 | theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ΞΉ β β) :
parallelepiped b = Icc 0 1 β¨ parallelepiped b = Icc (-1) 0 := by |
have e : ΞΉ β Fin 1 := by
apply Fintype.equivFinOfCardEq
simp only [β finrank_eq_card_basis b.toBasis, finrank_self]
have B : parallelepiped (b.reindex e) = parallelepiped b := by
convert parallelepiped_comp_equiv b e.symm
ext i
simp only [OrthonormalBasis.coe_reindex]
rw [β B]
let F : β β F... | [
" x β parallelepiped v β β t β Icc 0 1, x = β i : ΞΉ, t i β’ v i",
" parallelepiped βb = {x | β (i : ΞΉ), (b.repr x) i β Icc 0 1}",
" x β parallelepiped βb β x β {x | β (i : ΞΉ), (b.repr x) i β Icc 0 1}",
" (β t, β (x_1 : ΞΉ), (0 β€ t x_1 β§ t x_1 β€ 1) β§ (b.repr x) x_1 = t x_1) β β (i : ΞΉ), 0 β€ (b.repr x) i β§ (b.rep... | [
" x β parallelepiped v β β t β Icc 0 1, x = β i : ΞΉ, t i β’ v i",
" parallelepiped βb = {x | β (i : ΞΉ), (b.repr x) i β Icc 0 1}",
" x β parallelepiped βb β x β {x | β (i : ΞΉ), (b.repr x) i β Icc 0 1}",
" (β t, β (x_1 : ΞΉ), (0 β€ t x_1 β§ t x_1 β€ 1) β§ (b.repr x) x_1 = t x_1) β β (i : ΞΉ), 0 β€ (b.repr x) i β§ (b.rep... |
import Mathlib.Order.Interval.Set.Disjoint
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
#align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open scoped... | Mathlib/MeasureTheory/Integral/IntervalIntegral.lean | 129 | 131 | theorem intervalIntegrable_const_iff {c : E} :
IntervalIntegrable (fun _ => c) ΞΌ a b β c = 0 β¨ ΞΌ (Ξ a b) < β := by |
simp only [intervalIntegrable_iff, integrableOn_const]
| [
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ξ a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ioc a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f [[a, b]] ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Icc a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ico a b) ΞΌ",
" Interva... | [
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ξ a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ioc a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f [[a, b]] ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Icc a b) ΞΌ",
" IntervalIntegrable f ΞΌ a b β IntegrableOn f (Ico a b) ΞΌ",
" Interva... |
import Mathlib.Dynamics.Ergodic.AddCircle
import Mathlib.MeasureTheory.Covering.LiminfLimsup
#align_import number_theory.well_approximable from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Set Filter Function Metric MeasureTheory
open scoped MeasureTheory Topology Pointwise
@[... | Mathlib/NumberTheory/WellApproximable.lean | 108 | 116 | theorem image_pow_subset_of_coprime (hm : 0 < m) (hmn : n.Coprime m) :
(fun (y : A) => y ^ m) '' approxOrderOf A n Ξ΄ β approxOrderOf A n (m * Ξ΄) := by |
rintro - β¨a, ha, rflβ©
obtain β¨b, hb, habβ© := mem_approxOrderOf_iff.mp ha
replace hb : b ^ m β {u : A | orderOf u = n} := by
rw [β hb] at hmn β’; exact hmn.orderOf_pow
apply ball_subset_thickening hb ((m : β) β’ Ξ΄)
convert pow_mem_ball hm hab using 1
simp only [nsmul_eq_mul, Algebra.id.smul_eq_mul]
| [
" a β approxOrderOf A n Ξ΄ β β b, orderOf b = n β§ a β ball b Ξ΄",
" (fun y => y ^ m) '' approxOrderOf A n Ξ΄ β approxOrderOf A n (βm * Ξ΄)",
" (fun y => y ^ m) a β approxOrderOf A n (βm * Ξ΄)",
" b ^ m β {u | orderOf u = n}",
" b ^ m β {u | orderOf u = orderOf b}",
" (fun y => y ^ m) a β ball (b ^ m) (βm β’ Ξ΄)"... | [
" a β approxOrderOf A n Ξ΄ β β b, orderOf b = n β§ a β ball b Ξ΄"
] |
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Localization.NormTrace
#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
open scoped NumberField
open Finset NumberField Algebra FiniteDimensional
namespace RingOfIn... | Mathlib/NumberTheory/NumberField/Norm.lean | 111 | 126 | theorem isUnit_norm [CharZero K] {x : π F} : IsUnit (norm K x) β IsUnit x := by |
letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K
let L := normalClosure K F (AlgebraicClosure F)
haveI : FiniteDimensional F L := FiniteDimensional.right K F L
haveI : IsAlgClosure K (AlgebraicClosure F) :=
IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F)
haveI : IsGalois F L := I... | [
" (norm K) ((algebraMap (π K) (π L)) x) = x ^ finrank K L",
" IsUnit ((norm K) x) β IsUnit x",
" IsUnit x",
" IsUnit (β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * x)",
" β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * x = (algebraMap (π K) (π L)) ((norm K) x)",
" β(β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * ... | [
" (norm K) ((algebraMap (π K) (π L)) x) = x ^ finrank K L",
" IsUnit ((norm K) x) β IsUnit x",
" IsUnit x",
" IsUnit (β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * x)",
" β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * x = (algebraMap (π K) (π L)) ((norm K) x)",
" β(β¨β Ο β univ \\ {AlgEquiv.refl}, Ο βx, β―β© * ... |
import Mathlib.Topology.MetricSpace.Isometry
#align_import topology.metric_space.gluing from "leanprover-community/mathlib"@"e1a7bdeb4fd826b7e71d130d34988f0a2d26a177"
noncomputable section
universe u v w
open Function Set Uniformity Topology
namespace Metric
--section
section InductiveLimit
open Nat
variab... | Mathlib/Topology/MetricSpace/Gluing.lean | 648 | 658 | theorem toInductiveLimit_commute (I : β n, Isometry (f n)) (n : β) :
toInductiveLimit I n.succ β f n = toInductiveLimit I n := by |
let h := inductivePremetric I
let _ := h.toUniformSpace.toTopologicalSpace
funext x
simp only [comp, toInductiveLimit]
refine SeparationQuotient.mk_eq_mk.2 (Metric.inseparable_iff.2 ?_)
show inductiveLimitDist f β¨n.succ, f n xβ© β¨n, xβ© = 0
rw [inductiveLimitDist_eq_dist I β¨n.succ, f n xβ© β¨n, xβ© n.succ, le... | [
" inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)",
" inductiveLimitDist f β¨i, xβ© y = dist (leRecOn hx (fun {k} => f k) β¨i, xβ©.snd) (leRecOn hy (fun {k} => f k) y.snd)",
" inductiveLimitDist f β¨i, xβ© β¨j, yβ© =\n dist (leRecOn hx (fun {k} => f k) β¨i, xβ©.s... | [
" inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)",
" inductiveLimitDist f β¨i, xβ© y = dist (leRecOn hx (fun {k} => f k) β¨i, xβ©.snd) (leRecOn hy (fun {k} => f k) y.snd)",
" inductiveLimitDist f β¨i, xβ© β¨j, yβ© =\n dist (leRecOn hx (fun {k} => f k) β¨i, xβ©.s... |
import Mathlib.Analysis.Normed.Group.Basic
#align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
section HammingDistNorm
open Finset Function
variable {Ξ± ΞΉ : Type*} {Ξ² : ΞΉ β Type*} [Fintype ΞΉ] [β i, DecidableEq (Ξ² i)]
variable {Ξ³ : ΞΉ β Type*} [β ... | Mathlib/InformationTheory/Hamming.lean | 56 | 57 | theorem hammingDist_comm (x y : β i, Ξ² i) : hammingDist x y = hammingDist y x := by |
simp_rw [hammingDist, ne_comm]
| [
" hammingDist x x = 0",
" β β¦x_1 : ΞΉβ¦, x_1 β univ β Β¬x x_1 β x x_1",
" hammingDist x y = hammingDist y x"
] | [
" hammingDist x x = 0",
" β β¦x_1 : ΞΉβ¦, x_1 β univ β Β¬x x_1 β x x_1"
] |
import Mathlib.Control.Bifunctor
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.functor from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
universe u v w
variable {Ξ± Ξ² : Type u}
open Equiv
namespace Functor
variable (f : Type u β Type v) [Functor f] [LawfulFunctor f]
d... | Mathlib/Logic/Equiv/Functor.lean | 57 | 60 | theorem mapEquiv_refl : mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±) := by |
ext x
simp only [mapEquiv_apply, refl_apply]
exact LawfulFunctor.id_map x
| [
" βh.symm <$> βh <$> x = x",
" βh <$> βh.symm <$> x = x",
" mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±)",
" (mapEquiv f (Equiv.refl Ξ±)) x = (Equiv.refl (f Ξ±)) x",
" β(Equiv.refl Ξ±) <$> x = x"
] | [
" βh.symm <$> βh <$> x = x",
" βh <$> βh.symm <$> x = x"
] |
import Mathlib.Data.Set.Function
import Mathlib.Order.Interval.Set.OrdConnected
#align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c"
variable {Ξ± Ξ² : Type*} [LinearOrder Ξ±]
open Function
namespace Set
def projIci (a x : Ξ±) : Ici a := β¨max a x,... | Mathlib/Order/Interval/Set/ProjIcc.lean | 113 | 113 | theorem projIci_of_mem (hx : x β Ici a) : projIci a x = β¨x, hxβ© := by | simpa [projIci]
| [
" projIcc a b h x = β¨a, β―β©",
" projIcc a b h x = β¨b, β―β©",
" projIci a x = β¨a, β―β© β x β€ a",
" projIic b x = β¨b, β―β© β b β€ x",
" projIcc a b β― x = β¨a, β―β© β x β€ a",
" projIcc a b β― x = β¨b, β―β© β b β€ x",
" projIci a x = β¨x, hxβ©"
] | [
" projIcc a b h x = β¨a, β―β©",
" projIcc a b h x = β¨b, β―β©",
" projIci a x = β¨a, β―β© β x β€ a",
" projIic b x = β¨b, β―β© β b β€ x",
" projIcc a b β― x = β¨a, β―β© β x β€ a",
" projIcc a b β― x = β¨b, β―β© β b β€ x"
] |
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic
import Mathlib.RingTheory.Localization.AsSubring
#align_import algebraic_geometry.prime_spectrum.maximal from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301"
noncomputable section
open scoped Classical
universe u v
variable (R : Typ... | Mathlib/AlgebraicGeometry/PrimeSpectrum/Maximal.lean | 92 | 117 | theorem iInf_localization_eq_bot : (β¨
v : MaximalSpectrum R,
Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = β₯ := by |
ext x
rw [Algebra.mem_bot, Algebra.mem_iInf]
constructor
Β· contrapose
intro hrange hlocal
let denom : Ideal R := (Submodule.span R {1} : Submodule R K).colon (Submodule.span R {x})
have hdenom : (1 : R) β denom := by
intro hdenom
rcases Submodule.mem_span_singleton.mp
(Submodule... | [
" { asIdeal := asIdealβΒΉ, IsMaximal := IsMaximalβΒΉ } = { asIdeal := asIdealβ, IsMaximal := IsMaximalβ }",
" range toPrimeSpectrum = {x | IsClosed {x}}",
" range toPrimeSpectrum = {x | x.asIdeal.IsMaximal}",
" { asIdeal := x, IsPrime := IsPrimeβ } β range toPrimeSpectrum β\n { asIdeal := x, IsPrime := IsPri... | [
" { asIdeal := asIdealβΒΉ, IsMaximal := IsMaximalβΒΉ } = { asIdeal := asIdealβ, IsMaximal := IsMaximalβ }",
" range toPrimeSpectrum = {x | IsClosed {x}}",
" range toPrimeSpectrum = {x | x.asIdeal.IsMaximal}",
" { asIdeal := x, IsPrime := IsPrimeβ } β range toPrimeSpectrum β\n { asIdeal := x, IsPrime := IsPri... |
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.GaloisConnection
import Mathlib.Order.Hom.Basic
#align_import order.hom.order from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
namespace OrderHom
variable {Ξ± Ξ² : Type*}
section Preorder
variable [Preorder Ξ±]
instance [Sem... | Mathlib/Order/Hom/Order.lean | 133 | 154 | theorem iterate_sup_le_sup_iff {Ξ± : Type*} [SemilatticeSup Ξ±] (f : Ξ± βo Ξ±) :
(β nβ nβ aβ aβ, f^[nβ + nβ] (aβ β aβ) β€ f^[nβ] aβ β f^[nβ] aβ) β
β aβ aβ, f (aβ β aβ) β€ f aβ β aβ := by |
constructor <;> intro h
Β· exact h 1 0
Β· intro nβ nβ aβ aβ
have h' : β n aβ aβ, f^[n] (aβ β aβ) β€ f^[n] aβ β aβ := by
intro n
induction' n with n ih <;> intro aβ aβ
Β· rfl
Β· calc
f^[n + 1] (aβ β aβ) = f^[n] (f (aβ β aβ)) := Function.iterate_succ_apply f n _
_ β€ f^[n]... | [
" β(β¨
i, f i) = β¨
i, β(f i)",
" (β¨
i, f i) x = (β¨
i, β(f i)) x",
" β(β¨ i, f i) = β¨ i, β(f i)",
" (β¨ i, f i) x = (β¨ i, β(f i)) x",
" f.toFun x β€ β¨ (_ : f β s), f x",
" (β (nβ nβ : β) (aβ aβ : Ξ±), (βf)^[nβ + nβ] (aβ β aβ) β€ (βf)^[nβ] aβ β (βf)^[nβ] aβ) β\n β (aβ aβ : Ξ±), f (aβ β aβ) β€ f aβ β aβ",
" (β ... | [
" β(β¨
i, f i) = β¨
i, β(f i)",
" (β¨
i, f i) x = (β¨
i, β(f i)) x",
" β(β¨ i, f i) = β¨ i, β(f i)",
" (β¨ i, f i) x = (β¨ i, β(f i)) x",
" f.toFun x β€ β¨ (_ : f β s), f x"
] |
import Mathlib.Analysis.Calculus.MeanValue
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Order.Filter.Curry
#align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open Filter
open scoped uniformity Filter Topology
section d... | Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean | 455 | 474 | theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter π}
(hf' : UniformCauchySeqOnFilter f' l l') :
UniformCauchySeqOnFilter (fun n => fun z => (1 : π βL[π] π).smulRight (f' n z)) l l' := by |
-- The tricky part of this proof is that operator norms are written in terms of `β€` whereas
-- metrics are written in terms of `<`. So we need to shrink `Ξ΅` utilizing the archimedean
-- property of `β`
rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero,
Metric.tendstoUniforml... | [
" UniformCauchySeqOnFilter (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l l'",
" β Ξ΅ > 0,\n βαΆ (n : (ΞΉ Γ ΞΉ) Γ π) in (l ΓΛ’ l) ΓΛ’ l',\n dist (0 n.2) (ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) < Ξ΅",
" βαΆ (n : (ΞΉ Γ ΞΉ) Γ π) in (l ΓΛ’ l) ΓΛ’ l',\... | [] |
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 | 317 | 332 | theorem isBigO_rpow_zero_log_smul [NormedSpace β E] {a b : β} {f : β β E} (hab : a < b)
(hf : f =O[π[>] 0] (Β· ^ (-a))) :
(fun t : β => log t β’ f t) =O[π[>] 0] (Β· ^ (-b)) := by |
have : log =o[π[>] 0] fun t : β => t ^ (a - b) := by
refine ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).neg_left.comp_tendsto
tendsto_inv_zero_atTop).congr'
(eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => ?_)
(eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t... | [
" (fun t => t.log β’ f t) =O[atTop] fun x => x ^ (-b)",
" (fun x => x.log β’ f x) t = (fun t => t.log β’ f t) t",
" (fun x => x ^ (a - b) β’ x ^ (-a)) t = (fun x => x ^ (-b)) t",
" t ^ (a - b) β’ t ^ (-a) = t ^ (-b)",
" (fun t => t.log β’ f t) =O[π[>] 0] fun x => x ^ (-b)",
" log =o[π[>] 0] fun t => t ^ (a - ... | [
" (fun t => t.log β’ f t) =O[atTop] fun x => x ^ (-b)",
" (fun x => x.log β’ f x) t = (fun t => t.log β’ f t) t",
" (fun x => x ^ (a - b) β’ x ^ (-a)) t = (fun x => x ^ (-b)) t",
" t ^ (a - b) β’ t ^ (-a) = t ^ (-b)"
] |
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra
import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra
import Mathlib.Algebra.Lie.UniversalEnveloping
import Mathlib.GroupTheory.GroupAction.Ring
#align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4"
universe ... | Mathlib/Algebra/Lie/Free.lean | 95 | 96 | theorem Rel.subLeft (a : lib R X) {b c : lib R X} (h : Rel R X b c) : Rel R X (a - b) (a - c) := by |
simpa only [sub_eq_add_neg] using h.neg.addLeft a
| [
" Rel R X (a + b) (a + c)",
" Rel R X (b + a) (c + a)",
" Rel R X (-a) (-b)",
" Rel R X (a - b) (a - c)"
] | [
" Rel R X (a + b) (a + c)",
" Rel R X (b + a) (c + a)",
" Rel R X (-a) (-b)"
] |
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Limits.Shapes.Images
import Mathlib.CategoryTheory.IsomorphismClasses
import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects
#align_import category_theory.limits.shapes.zero_morphisms from "leanpr... | Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean | 106 | 113 | theorem ext (I J : HasZeroMorphisms C) : I = J := by |
apply ext_aux
intro X Y
have : (I.zero X Y).zero β« (J.zero Y Y).zero = (I.zero X Y).zero := by
apply I.zero_comp X (J.zero Y Y).zero
have that : (I.zero X Y).zero β« (J.zero Y Y).zero = (J.zero X Y).zero := by
apply J.comp_zero (I.zero X Y).zero Y
rw [β this, β that]
| [] | [] |
import Mathlib.LinearAlgebra.Dual
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.contraction from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec"
suppress_compilation
-- Porting note: universe metavariables behave oddly
universe w u vβ vβ vβ vβ
variable {ΞΉ : Type... | Mathlib/LinearAlgebra/Contraction.lean | 105 | 110 | theorem zero_prodMap_dualTensorHom (g : Module.Dual R N) (q : Q) :
(0 : M ββ[R] P).prodMap ((dualTensorHom R N Q) (g ββ[R] q)) =
dualTensorHom R (M Γ N) (P Γ Q) ((g ββ snd R M N) ββ inr R P Q q) := by |
ext <;>
simp only [coe_comp, coe_inr, Function.comp_apply, prodMap_apply, dualTensorHom_apply,
snd_apply, Prod.smul_mk, LinearMap.zero_apply, smul_zero]
| [
" Dual.transpose ((dualTensorHom R M M) (f ββ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ββ[R] f)",
" ((Dual.transpose ((dualTensorHom R M M) (f ββ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ββ[R] f)) f') m'",
" f m' * f' m = f' m * f m'",
... | [
" Dual.transpose ((dualTensorHom R M M) (f ββ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ββ[R] f)",
" ((Dual.transpose ((dualTensorHom R M M) (f ββ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m ββ[R] f)) f') m'",
" f m' * f' m = f' m * f m'",
... |
import Mathlib.Data.Set.Image
#align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780"
open Function
universe u v w
variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β Ξ± β Prop)
local infixl:50 " βΌ " => r
def Directed (f : ΞΉ β Ξ±) :=
β x y, β z, ... | Mathlib/Order/Directed.lean | 77 | 80 | theorem directedOn_image {s : Set Ξ²} {f : Ξ² β Ξ±} :
DirectedOn r (f '' s) β DirectedOn (f β»ΒΉ'o r) s := by |
simp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp,
forall_apply_eq_imp_iffβ, Order.Preimage]
| [
" DirectedOn r s β Directed r Subtype.val",
" (β x β s, β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1 β s, β a_2, r a a_2 β§ a_2 β s β§ r a_1 a_2",
" (β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1, r x a_1 β§ a_1 β s β§ r a a_1",
" Directed r f β DirectedOn r (Set.range f)",
" DirectedOn r (f '' s) β Di... | [
" DirectedOn r s β Directed r Subtype.val",
" (β x β s, β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1 β s, β a_2, r a a_2 β§ a_2 β s β§ r a_1 a_2",
" (β y β s, β z β s, r x z β§ r y z) β β a β s, β a_1, r x a_1 β§ a_1 β s β§ r a a_1",
" Directed r f β DirectedOn r (Set.range f)"
] |
import Mathlib.Data.Fintype.Basic
import Mathlib.ModelTheory.Substructures
#align_import model_theory.elementary_maps from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15"
open FirstOrder
namespace FirstOrder
namespace Language
open Structure
variable (L : Language) (M : Type*) (N : T... | Mathlib/ModelTheory/ElementaryMaps.lean | 272 | 302 | theorem isElementary_of_exists (f : M βͺ[L] N)
(htv :
β (n : β) (Ο : L.BoundedFormula Empty (n + 1)) (x : Fin n β M) (a : N),
Ο.Realize default (Fin.snoc (f β x) a : _ β N) β
β b : M, Ο.Realize default (Fin.snoc (f β x) (f b) : _ β N)) :
β {n} (Ο : L.Formula (Fin n)) (x : Fin n β M), Ο.Re... |
suffices h : β (n : β) (Ο : L.BoundedFormula Empty n) (xs : Fin n β M),
Ο.Realize (f β default) (f β xs) β Ο.Realize default xs by
intro n Ο x
exact Ο.realize_relabel_sum_inr.symm.trans (_root_.trans (h n _ _) Ο.realize_relabel_sum_inr)
refine fun n Ο => Ο.recOn ?_ ?_ ?_ ?_ ?_
Β· exact fun {_} _ => ... | [
" Ο.Realize ((constantMap β Sum.inr) β x) β Ο.Realize x",
" Ο.Realize ((constantMap β Sum.inr) β x) β\n N β¨ (((L.lhomWithConstants M).onBoundedFormula Ο).subst (Constants.term β Sum.inr β x)).alls",
" M β¨ (((L.lhomWithConstants M).onBoundedFormula Ο).subst (Constants.term β Sum.inr β x)).alls β Ο.Realize x",... | [
" Ο.Realize ((constantMap β Sum.inr) β x) β Ο.Realize x",
" Ο.Realize ((constantMap β Sum.inr) β x) β\n N β¨ (((L.lhomWithConstants M).onBoundedFormula Ο).subst (Constants.term β Sum.inr β x)).alls",
" M β¨ (((L.lhomWithConstants M).onBoundedFormula Ο).subst (Constants.term β Sum.inr β x)).alls β Ο.Realize x",... |
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 | 116 | 135 | theorem cg_iff_empty_or_exists_nat_generating_family {N : L.Substructure M} :
N.CG β N = (β
: Set M) β¨ β s : β β M, closure L (range s) = N := by |
rw [cg_def]
constructor
Β· rintro β¨S, Scount, hSβ©
rcases eq_empty_or_nonempty (N : Set M) with h | h
Β· exact Or.intro_left _ h
obtain β¨f, h'β© :=
(Scount.union (Set.countable_singleton h.some)).exists_eq_range
(singleton_nonempty h.some).inr
refine Or.intro_right _ β¨f, ?_β©
rw [β h... | [
" (β S, S.Finite β§ (closure L).toFun S = N) β N.FG",
" ((closure L).toFun t').FG",
" ((closure L).toFun βt).FG",
" N.FG β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (cl... | [
" (β S, S.Finite β§ (closure L).toFun S = N) β N.FG",
" ((closure L).toFun t').FG",
" ((closure L).toFun βt).FG",
" N.FG β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (closure L).toFun (range s) = N",
" (β S, S.Finite β§ (closure L).toFun S = N) β β n s, (cl... |
import Mathlib.Algebra.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 | 75 | 76 | theorem Continuous.div_const (hf : Continuous f) (y : Gβ) : Continuous fun x => f x / y := by |
simpa only [div_eq_mul_inv] using hf.mul continuous_const
| [
" Tendsto (fun a => f a / y) l (π (x / y))",
" ContinuousOn (fun x => f x / y) s",
" Continuous fun x => f x / y"
] | [
" Tendsto (fun a => f a / y) l (π (x / y))",
" ContinuousOn (fun x => f x / y) s"
] |
import Mathlib.Analysis.Convex.Hull
#align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8"
open Set
variable {ΞΉ : Sort*} {π E : Type*}
section OrderedSemiring
variable (π) [OrderedSemiring π] [AddCommMonoid E] [Module π E] {s t sβ sβ tβ tβ u : Set ... | Mathlib/Analysis/Convex/Join.lean | 70 | 71 | theorem convexJoin_singleton_right (s : Set E) (y : E) :
convexJoin π s {y} = β x β s, segment π x y := by | simp [convexJoin]
| [
" x β convexJoin π s t β β a β s, β b β t, x β segment π a b",
" β iβ β t, β iβ β s, segment π iβ iβ = convexJoin π t s",
" convexJoin π β
t = β
",
" convexJoin π s β
= β
",
" convexJoin π {x} t = β y β t, segment π x y",
" convexJoin π s {y} = β x β s, segment π x y"
] | [
" x β convexJoin π s t β β a β s, β b β t, x β segment π a b",
" β iβ β t, β iβ β s, segment π iβ iβ = convexJoin π t s",
" convexJoin π β
t = β
",
" convexJoin π s β
= β
",
" convexJoin π {x} t = β y β t, segment π x y"
] |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNR... | Mathlib/Probability/IdentDistrib.lean | 132 | 135 | theorem measure_mem_eq (h : IdentDistrib f g ΞΌ Ξ½) {s : Set Ξ³} (hs : MeasurableSet s) :
ΞΌ (f β»ΒΉ' s) = Ξ½ (g β»ΒΉ' s) := by |
rw [β Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, β
Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
| [
" AEMeasurable (u β g) Ξ½",
" Measure.map (u β f) ΞΌ = Measure.map (u β g) Ξ½",
" AEMeasurable u (Measure.map g Ξ½)",
" ΞΌ (f β»ΒΉ' s) = Ξ½ (g β»ΒΉ' s)"
] | [
" AEMeasurable (u β g) Ξ½",
" Measure.map (u β f) ΞΌ = Measure.map (u β g) Ξ½",
" AEMeasurable u (Measure.map g Ξ½)"
] |
import Mathlib.Algebra.Module.Zlattice.Basic
import Mathlib.NumberTheory.NumberField.Embeddings
import Mathlib.NumberTheory.NumberField.FractionalIdeal
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
variable (K : Type*) [F... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean | 274 | 279 | theorem normAtPlace_smul (w : InfinitePlace K) (x : E K) (c : β) :
normAtPlace w (c β’ x) = |c| * normAtPlace w x := by |
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
split_ifs
Β· rw [Prod.smul_fst, Pi.smul_apply, norm_smul, Real.norm_eq_abs]
Β· rw [Prod.smul_snd, Pi.smul_apply, norm_smul, Real.norm_eq_abs, Complex.norm_eq_abs]
| [
" Nontrivial (({ w // w.IsReal } β β) Γ ({ w // w.IsComplex } β β))",
" finrank β (({ w // w.IsReal } β β) Γ ({ w // w.IsComplex } β β)) = finrank β K",
" Function.Injective β(mixedEmbedding K)",
" (fun x => if hw : w.IsReal then βx.1 β¨w, hwβ©β else βx.2 β¨w, β―β©β) 0 = 0",
" { toFun := fun x => if hw : w.IsRea... | [
" Nontrivial (({ w // w.IsReal } β β) Γ ({ w // w.IsComplex } β β))",
" finrank β (({ w // w.IsReal } β β) Γ ({ w // w.IsComplex } β β)) = finrank β K",
" Function.Injective β(mixedEmbedding K)",
" (fun x => if hw : w.IsReal then βx.1 β¨w, hwβ©β else βx.2 β¨w, β―β©β) 0 = 0",
" { toFun := fun x => if hw : w.IsRea... |
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv
noncomputable section
open scoped Manifold
open Bundle Set Topology
section SpecificFunctions
variable {π : Type*} [NontriviallyNormedField π] {E : Type*} [NormedAddCommGroup E]
[NormedSpace π E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π E H)... | Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean | 285 | 288 | theorem tangentMap_prod_fst {p : TangentBundle (I.prod I') (M Γ M')} :
tangentMap (I.prod I') I Prod.fst p = β¨p.proj.1, p.2.1β© := by |
-- Porting note: `rfl` wasn't needed
simp [tangentMap]; rfl
| [
" HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst π (TangentSpace I x.1) (TangentSpace I' x.2))",
" HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst π (TangentSpace I x.1) (TangentSpace I' x.2)) (range β(I.prod I'))\n (β(extChartAt (I.prod I') x) x... | [
" HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst π (TangentSpace I x.1) (TangentSpace I' x.2))",
" HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst π (TangentSpace I x.1) (TangentSpace I' x.2)) (range β(I.prod I'))\n (β(extChartAt (I.prod I') x) x... |
import Mathlib.Data.Set.Lattice
import Mathlib.Init.Set
import Mathlib.Control.Basic
import Mathlib.Lean.Expr.ExtraRecognizers
#align_import data.set.functor from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u
open Function
namespace Set
variable {Ξ± Ξ² : Type u} {s : Set Ξ±} ... | Mathlib/Data/Set/Functor.lean | 135 | 139 | theorem coe_eq_image_val (t : Set s) :
@Lean.Internal.coeM Set s Ξ± _ Set.monad t = (t : Set Ξ±) := by |
change β (x β t), {x.1} = _
ext
simp
| [
" Lean.Internal.coeM t = Subtype.val '' t",
" β x β t, {βx} = Subtype.val '' t",
" xβ β β x β t, {βx} β xβ β Subtype.val '' t"
] | [] |
import Mathlib.Algebra.CharZero.Lemmas
import Mathlib.Algebra.GroupWithZero.Commute
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Ring.Pow
import Mathlib.Algebra.Ring.Int
#align_import algebra.order.field.power from "leanprover-community/mathlib"@"acb3d204d4ee883eb686f45d486a2a6811a01329"
... | Mathlib/Algebra/Order/Field/Power.lean | 155 | 159 | theorem Odd.zpow_neg_iff (hn : Odd n) : a ^ n < 0 β a < 0 := by |
refine β¨lt_imp_lt_of_le_imp_le (zpow_nonneg Β· _), fun ha β¦ ?_β©
obtain β¨k, rflβ© := hn
rw [zpow_add_oneβ ha.ne]
exact mul_neg_of_pos_of_neg (Even.zpow_pos (even_two_mul _) ha.ne) ha
| [
" 0 β€ a ^ n",
" 0 β€ a ^ (k + k)",
" a β 0 β¨ k + k β 0 β¨ k = 0 β§ k = 0",
" 0 β€ a ^ k * a ^ k",
" 0 < a ^ n β a β 0",
" 0 < a ^ (k + k) β a β 0",
" k β 0",
" a ^ n < 0 β a < 0",
" a ^ n < 0",
" a ^ (2 * k + 1) < 0",
" a ^ (2 * k) * a < 0"
] | [
" 0 β€ a ^ n",
" 0 β€ a ^ (k + k)",
" a β 0 β¨ k + k β 0 β¨ k = 0 β§ k = 0",
" 0 β€ a ^ k * a ^ k",
" 0 < a ^ n β a β 0",
" 0 < a ^ (k + k) β a β 0",
" k β 0"
] |
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.extend_deriv from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] {F : Type*} [NormedAddCommGroup F]
[NormedSpace β F]
open Filter Set Metric Contin... | Mathlib/Analysis/Calculus/FDeriv/Extend.lean | 111 | 140 | theorem has_deriv_at_interval_left_endpoint_of_tendsto_deriv {s : Set β} {e : E} {a : β} {f : β β E}
(f_diff : DifferentiableOn β f s) (f_lim : ContinuousWithinAt f s a) (hs : s β π[>] a)
(f_lim' : Tendsto (fun x => deriv f x) (π[>] a) (π e)) : HasDerivWithinAt f e (Ici a) a := by |
/- This is a specialization of `has_fderiv_at_boundary_of_tendsto_fderiv`. To be in the setting of
this theorem, we need to work on an open interval with closure contained in `s βͺ {a}`, that we
call `t = (a, b)`. Then, we check all the assumptions of this theorem and we apply it. -/
obtain β¨b, ab : a < b, ... | [
" HasFDerivWithinAt f f' (closure s) x",
" β β¦c : ββ¦, 0 < c β βαΆ (x_1 : E) in π[closure s] x, βf x_1 - f x - f' (x_1 - x)β β€ c * βx_1 - xβ",
" βαΆ (x_1 : E) in π[closure s] x, βf x_1 - f x - f' (x_1 - x)β β€ Ξ΅ * βx_1 - xβ",
" β Ξ΄ > 0, β y β s, dist y x < Ξ΄ β βfderiv β f y - f'β < Ξ΅",
" y β {x_1 | (fun x_2 =... | [
" HasFDerivWithinAt f f' (closure s) x",
" β β¦c : ββ¦, 0 < c β βαΆ (x_1 : E) in π[closure s] x, βf x_1 - f x - f' (x_1 - x)β β€ c * βx_1 - xβ",
" βαΆ (x_1 : E) in π[closure s] x, βf x_1 - f x - f' (x_1 - x)β β€ Ξ΅ * βx_1 - xβ",
" β Ξ΄ > 0, β y β s, dist y x < Ξ΄ β βfderiv β f y - f'β < Ξ΅",
" y β {x_1 | (fun x_2 =... |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Order.Filter.Pointwise
import Mathlib.Topology.Algebra.MulAction
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Topology.ContinuousFunction.Basic
import Mathlib.Algebra.Group.ULift
#align_import topology.algebra.monoid from "leanprover-community/mathli... | Mathlib/Topology/Algebra/Monoid.lean | 150 | 152 | theorem le_nhds_mul (a b : M) : π a * π b β€ π (a * b) := by |
rw [β mapβ_mul, β map_uncurry_prod, β nhds_prod_eq]
exact continuous_mul.tendsto _
| [
" ContinuousMul (ULift.{u, u_3} M)",
" Continuous fun p => p.1 * p.2",
" Continuous fun p => p.1.down * p.2.down",
" π a * π b β€ π (a * b)",
" map (Function.uncurry fun x x_1 => x * x_1) (π (a, b)) β€ π (a * b)"
] | [
" ContinuousMul (ULift.{u, u_3} M)",
" Continuous fun p => p.1 * p.2",
" Continuous fun p => p.1.down * p.2.down"
] |
import Mathlib.Algebra.Group.NatPowAssoc
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Induction
import Mathlib.Algebra.Polynomial.Eval
namespace Polynomial
section MulActionWithZero
variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S β]
[Mu... | Mathlib/Algebra/Polynomial/Smeval.lean | 61 | 63 | theorem smeval_monomial (n : β) :
(monomial n r).smeval x = r β’ x ^ n := by |
simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index]
| [
" p.smeval x = p.sum (smul_pow x)",
" (C r).smeval x = r β’ x ^ 0",
" ((monomial n) r).smeval x = r β’ x ^ n"
] | [
" p.smeval x = p.sum (smul_pow x)",
" (C r).smeval x = r β’ x ^ 0"
] |
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan
non... | Mathlib/AlgebraicTopology/DoldKan/Normalized.lean | 83 | 86 | theorem PInftyToNormalizedMooreComplex_naturality {X Y : SimplicialObject A} (f : X βΆ Y) :
AlternatingFaceMapComplex.map f β« PInftyToNormalizedMooreComplex Y =
PInftyToNormalizedMooreComplex X β« NormalizedMooreComplex.map f := by |
aesop_cat
| [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) β« X.Ξ΄ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow β« X.Ξ΄ j.succ = 0",
" j β Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... | [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) β« X.Ξ΄ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow β« X.Ξ΄ j.succ = 0",
" j β Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... |
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Computability.Primrec
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Linarith
#align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383"
open Nat
def ack : β β β β β
| 0, n => n + 1
| m + 1, 0 ... | Mathlib/Computability/Ackermann.lean | 78 | 78 | theorem ack_succ_succ (m n : β) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by | rw [ack]
| [
" ack 0 n = n + 1",
" ack (m + 1) 0 = ack m 1",
" ack (m + 1) (n + 1) = ack m (ack (m + 1) n)"
] | [
" ack 0 n = n + 1",
" ack (m + 1) 0 = ack m 1"
] |
import Mathlib.Data.Fin.VecNotation
import Mathlib.SetTheory.Cardinal.Basic
#align_import model_theory.basic from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768"
set_option autoImplicit true
universe u v u' v' w w'
open Cardinal
open Cardinal
namespace FirstOrder
-- intended to b... | Mathlib/ModelTheory/Basic.lean | 95 | 100 | theorem lift_mk {i : β} :
Cardinal.lift.{v,u} #(Sequenceβ aβ aβ aβ i)
= #(Sequenceβ (ULift.{v,u} aβ) (ULift.{v,u} aβ) (ULift.{v,u} aβ) i) := by |
rcases i with (_ | _ | _ | i) <;>
simp only [Sequenceβ, mk_uLift, Nat.succ_ne_zero, IsEmpty.forall_iff, Nat.succ.injEq,
add_eq_zero, OfNat.ofNat_ne_zero, and_false, one_ne_zero, mk_eq_zero, lift_zero]
| [
" lift.{v, u} #(Sequenceβ aβ aβ aβ i) = #(Sequenceβ (ULift.{v, u} aβ) (ULift.{v, u} aβ) (ULift.{v, u} aβ) i)",
" lift.{v, u} #(Sequenceβ aβ aβ aβ 0) = #(Sequenceβ (ULift.{v, u} aβ) (ULift.{v, u} aβ) (ULift.{v, u} aβ) 0)",
" lift.{v, u} #(Sequenceβ aβ aβ aβ (0 + 1)) = #(Sequenceβ (ULift.{v, u} aβ) (ULift.{v, u} ... | [] |
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.function.simple_func from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
noncomputable section
open Set hiding restrict restrict_apply
open Filter ENNReal
open Function (support)
open scoped Cla... | Mathlib/MeasureTheory/Function/SimpleFunc.lean | 129 | 130 | theorem exists_range_iff {f : Ξ± ββ Ξ²} {p : Ξ² β Prop} : (β y β f.range, p y) β β x, p (f x) := by |
simpa only [mem_range, exists_prop] using Set.exists_range_iff
| [
" f = g",
" { toFun := toFunβ, measurableSet_fiber' := measurableSet_fiber'β, finite_range' := finite_range'β } = g",
" { toFun := toFunβΒΉ, measurableSet_fiber' := measurableSet_fiber'βΒΉ, finite_range' := finite_range'βΒΉ } =\n { toFun := toFunβ, measurableSet_fiber' := measurableSet_fiber'β, finite_range' :=... | [
" f = g",
" { toFun := toFunβ, measurableSet_fiber' := measurableSet_fiber'β, finite_range' := finite_range'β } = g",
" { toFun := toFunβΒΉ, measurableSet_fiber' := measurableSet_fiber'βΒΉ, finite_range' := finite_range'βΒΉ } =\n { toFun := toFunβ, measurableSet_fiber' := measurableSet_fiber'β, finite_range' :=... |
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv
noncomputable section
open scoped Manifold
open Bundle Set Topology
section SpecificFunctions
variable {π : Type*} [NontriviallyNormedField π] {E : Type*} [NormedAddCommGroup E]
[NormedSpace π E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π E H)... | Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean | 184 | 187 | theorem hasMFDerivAt_const (c : M') (x : M) :
HasMFDerivAt I I' (fun _ : M => c) x (0 : TangentSpace I x βL[π] TangentSpace I' c) := by |
refine β¨continuous_const.continuousAt, ?_β©
simp only [writtenInExtChartAt, (Β· β Β·), hasFDerivWithinAt_const]
| [
" HasMFDerivAt I I' (fun x => c) x 0",
" HasFDerivWithinAt (writtenInExtChartAt I I' x fun x => c) 0 (range βI) (β(extChartAt I x) x)"
] | [] |
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.Ring
#align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Finset
namespace Nat
variable (p : β β Prop)
section Count
variable [DecidablePred p]
def count (n : β) : β :=
(List.range n).... | Mathlib/Data/Nat/Count.lean | 133 | 137 | theorem count_injective {m n : β} (hm : p m) (hn : p n) (heq : count p m = count p n) : m = n := by |
by_contra! h : m β n
wlog hmn : m < n
Β· exact this hn hm heq.symm h.symm (h.lt_or_lt.resolve_left hmn)
Β· simpa [heq] using count_strict_mono hm hmn
| [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... | [
" count p 0 = 0",
" Fintype { i // i < n β§ p i }",
" β (x : β), x β filter p (range n) β x β fun x => x < n β§ p x",
" x β filter p (range n) β x β fun x => x < n β§ p x",
" x < n β§ p x β x β fun x => x < n β§ p x",
" count p n = (filter p (range n)).card",
" (List.filter (fun b => decide (p b)) (List.rang... |
import Mathlib.Analysis.Calculus.Deriv.Inv
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.PolynomialExp
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9... | Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean | 53 | 54 | theorem pos_of_pos {x : β} (hx : 0 < x) : 0 < expNegInvGlue x := by |
simp [expNegInvGlue, not_le.2 hx, exp_pos]
| [
" expNegInvGlue x = 0",
" 0 < expNegInvGlue x"
] | [
" expNegInvGlue x = 0"
] |
import Mathlib.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section OpenMap
variable [Topo... | Mathlib/Topology/Maps.lean | 338 | 340 | theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by |
rw [β image_univ]
exact hf _ isOpen_univ
| [
" IsOpen (id '' s)",
" IsOpen (g β f '' s)",
" IsOpen (g '' (f '' s))",
" IsOpen (range f)",
" IsOpen (f '' univ)"
] | [
" IsOpen (id '' s)",
" IsOpen (g β f '' s)",
" IsOpen (g '' (f '' s))"
] |
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 | 146 | 148 | theorem aeval_wittPolynomial {A : Type*} [CommRing A] [Algebra R A] (f : β β A) (n : β) :
aeval f (W_ R n) = β i β range (n + 1), (p : A) ^ i * f i ^ p ^ (n - i) := by |
simp [wittPolynomial, AlgHom.map_sum, aeval_monomial, Finsupp.prod_single_index]
| [
" 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.Group.Finset
import Mathlib.Data.Finset.NatAntidiagonal
#align_import algebra.big_operators.nat_antidiagonal from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
variable {M N : Type*} [CommMonoid M] [AddCommMonoid N]
namespace Finset
namespace Nat
t... | Mathlib/Algebra/BigOperators/NatAntidiagonal.lean | 42 | 45 | theorem prod_antidiagonal_succ' {n : β} {f : β Γ β β M} : (β p β antidiagonal (n + 1), f p) =
f (n + 1, 0) * β p β antidiagonal n, f (p.1, p.2 + 1) := by |
rw [β prod_antidiagonal_swap, prod_antidiagonal_succ, β prod_antidiagonal_swap]
rfl
| [
" β p β antidiagonal (n + 1), f p = f (0, n + 1) * β p β antidiagonal n, f (p.1 + 1, p.2)",
" f (0, n + 1) *\n β x β antidiagonal n,\n f (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Function.Embedding.refl β)) x) =\n f (0, n + 1) * β p β antidiagonal n, f (p.1 + 1, p.2)",
" β p β ... | [
" β p β antidiagonal (n + 1), f p = f (0, n + 1) * β p β antidiagonal n, f (p.1 + 1, p.2)",
" f (0, n + 1) *\n β x β antidiagonal n,\n f (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Function.Embedding.refl β)) x) =\n f (0, n + 1) * β p β antidiagonal n, f (p.1 + 1, p.2)",
" β p β ... |
import Mathlib.Data.Nat.Defs
import Mathlib.Data.Option.Basic
import Mathlib.Data.List.Defs
import Mathlib.Init.Data.List.Basic
import Mathlib.Init.Data.List.Instances
import Mathlib.Init.Data.List.Lemmas
import Mathlib.Logic.Unique
import Mathlib.Order.Basic
import Mathlib.Tactic.Common
#align_import data.list.basic... | Mathlib/Data/List/Basic.lean | 137 | 138 | theorem mem_map_of_involutive {f : Ξ± β Ξ±} (hf : Involutive f) {a : Ξ±} {l : List Ξ±} :
a β map f l β f a β l := by | rw [mem_map, hf.exists_mem_and_apply_eq_iff]
| [
" a = b β¨ a β b β§ a β l",
" a β [b, c] β a = b β¨ a = c",
" (β y, y β l β§ f y = x) β f x β l",
" f (f y) β l",
" a β map f l β f a β l"
] | [
" a = b β¨ a β b β§ a β l",
" a β [b, c] β a = b β¨ a = c",
" (β y, y β l β§ f y = x) β f x β l",
" f (f y) β l"
] |
import Mathlib.Data.Set.Prod
import Mathlib.Logic.Function.Conjugate
#align_import data.set.function from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207"
variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} {Ο : Ξ± β Type*}
open Equiv Equiv.Perm Function
namespace Set
section restrict
def restrict (... | Mathlib/Data/Set/Function.lean | 139 | 143 | theorem range_extend {f : Ξ± β Ξ²} (hf : Injective f) (g : Ξ± β Ξ³) (g' : Ξ² β Ξ³) :
range (extend f g g') = range g βͺ g' '' (range f)αΆ := by |
refine (range_extend_subset _ _ _).antisymm ?_
rintro z (β¨x, rflβ© | β¨y, hy, rflβ©)
exacts [β¨f x, hf.extend_apply _ _ _β©, β¨y, extend_apply' _ _ _ hyβ©]
| [
" s.restrict f '' (Subtype.val β»ΒΉ' t) = f '' (t β© s)",
" (range f).restrict (extend f g g') = fun x => g (Exists.choose β―)",
" (range f)αΆ.restrict (extend f g g') = g' β Subtype.val",
" range (extend f g g') β range g βͺ g' '' (range f)αΆ",
" extend f g g' y β range g βͺ g' '' (range f)αΆ",
" (if h : β a, f a... | [
" s.restrict f '' (Subtype.val β»ΒΉ' t) = f '' (t β© s)",
" (range f).restrict (extend f g g') = fun x => g (Exists.choose β―)",
" (range f)αΆ.restrict (extend f g g') = g' β Subtype.val",
" range (extend f g g') β range g βͺ g' '' (range f)αΆ",
" extend f g g' y β range g βͺ g' '' (range f)αΆ",
" (if h : β a, f a... |
import Mathlib.Init.Function
import Mathlib.Logic.Function.Basic
import Mathlib.Tactic.Inhabit
#align_import data.prod.basic from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408"
variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*}
@[simp]
theorem Prod.map_apply (f : Ξ± β Ξ³) (g : Ξ² β Ξ΄... | Mathlib/Data/Prod/Basic.lean | 122 | 123 | theorem ext_iff {p q : Ξ± Γ Ξ²} : p = q β p.1 = q.1 β§ p.2 = q.2 := by |
rw [mk.inj_iff]
| [
" Function.Injective (mk a)",
" bβ = bβ",
" Function.Injective fun a => (a, b)",
" p = q β p.fst = q.fst β§ p.snd = q.snd"
] | [
" Function.Injective (mk a)",
" bβ = bβ",
" Function.Injective fun a => (a, b)"
] |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.Finsupp.Order
#align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
open Finset
variable {Ξ± Ξ² ΞΉ : Type*}
namespace Finsupp
def toMultiset : (Ξ± ββ β) β+ Multiset Ξ± where
toFun f := Finsupp.sum f... | Mathlib/Data/Finsupp/Multiset.lean | 61 | 63 | theorem toMultiset_sum_single (s : Finset ΞΉ) (n : β) :
Finsupp.toMultiset (β i β s, single i n) = n β’ s.val := by |
simp_rw [toMultiset_sum, Finsupp.toMultiset_single, sum_nsmul, sum_multiset_singleton]
| [
" toMultiset (single a n) = n β’ {a}",
" 0 β’ {a} = 0",
" toMultiset (β i β s, single i n) = n β’ s.val"
] | [
" toMultiset (single a n) = n β’ {a}",
" 0 β’ {a} = 0"
] |
import Mathlib.Algebra.MvPolynomial.Degrees
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v w
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/Variables.lean | 115 | 119 | theorem vars_add_of_disjoint [DecidableEq Ο] (h : Disjoint p.vars q.vars) :
(p + q).vars = p.vars βͺ q.vars := by |
refine (vars_add_subset p q).antisymm fun x hx => ?_
simp only [vars_def, Multiset.disjoint_toFinset] at h hx β’
rwa [degrees_add_of_disjoint h, Multiset.toFinset_union]
| [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = β
",
" ((monomial s) r).vars = s.support",
" (C r).vars = β
",
" (X n).vars = {n}",
" i β p.vars β β d β p.support, i β d.support",
" x v = 0",
" v β f.vars",
" (p + q).vars β p.vars βͺ q.vars",
" x β p.vars βͺ q.... | [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = β
",
" ((monomial s) r).vars = s.support",
" (C r).vars = β
",
" (X n).vars = {n}",
" i β p.vars β β d β p.support, i β d.support",
" x v = 0",
" v β f.vars",
" (p + q).vars β p.vars βͺ q.vars",
" x β p.vars βͺ q.... |
import Mathlib.Algebra.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 | 58 | 62 | theorem Ioc_add_bij : BijOn (Β· + d) (Ioc a b) (Ioc (a + d) (b + d)) := by |
rw [β Ioi_inter_Iic, β Ioi_inter_Iic]
exact
(Ioi_add_bij a d).inter_mapsTo (fun x hx => add_le_add_right hx _) fun x hx =>
le_of_add_le_add_right hx.2
| [
" 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.Data.DFinsupp.Basic
import Mathlib.Data.Finset.Pointwise
import Mathlib.LinearAlgebra.Basis.VectorSpace
#align_import algebra.group.unique_prods from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
@[to_additive
"Let `G` be a Type with addition, let `A B : Finset G` ... | Mathlib/Algebra/Group/UniqueProds.lean | 67 | 68 | theorem of_subsingleton [Subsingleton G] : UniqueMul A B a0 b0 := by |
simp [UniqueMul, eq_iff_true_of_subsingleton]
| [
" UniqueMul A B a0 b0"
] | [] |
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.Tactic.ByContra
import Mathlib.Topology.Algebra.Polynomial
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.Analysis.Complex.Arg
#align_import ring_theory.polynomial.cyclotomic.eval from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf16... | Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean | 70 | 111 | theorem cyclotomic_pos {n : β} (hn : 2 < n) {R} [LinearOrderedCommRing R] (x : R) :
0 < eval x (cyclotomic n R) := by |
induction' n using Nat.strong_induction_on with n ih
have hn' : 0 < n := pos_of_gt hn
have hn'' : 1 < n := one_lt_two.trans hn
have := prod_cyclotomic_eq_geom_sum hn' R
apply_fun eval x at this
rw [β cons_self_properDivisors hn'.ne', Finset.erase_cons_of_ne _ hn''.ne', Finset.prod_cons,
eval_mul, eval_... | [
" eval 1 (cyclotomic p R) = βp",
" evalβ f 1 (cyclotomic p R) = βp",
" eval 1 (cyclotomic (p ^ (k + 1)) R) = βp",
" evalβ f 1 (cyclotomic (p ^ (k + 1)) R) = βp",
" 0 < eval (-1) (cyclotomic n R)",
" 0 < eval (β(-1)) (cyclotomic n β€)",
" 0 < eval (β(-1)) (cyclotomic n β)",
" 0 < eval (-1) (cyclotomic n... | [
" eval 1 (cyclotomic p R) = βp",
" evalβ f 1 (cyclotomic p R) = βp",
" eval 1 (cyclotomic (p ^ (k + 1)) R) = βp",
" evalβ f 1 (cyclotomic (p ^ (k + 1)) R) = βp",
" 0 < eval (-1) (cyclotomic n R)",
" 0 < eval (β(-1)) (cyclotomic n β€)",
" 0 < eval (β(-1)) (cyclotomic n β)",
" 0 < eval (-1) (cyclotomic n... |
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Functor.EpiMono
#align_import category_theory.adjunction.evaluation from "leanprover-community/mathlib"@"937c692d73f5130c7fecd3fd32e81419f4e04eb7"
namespace CategoryTheory
open CategoryTheory.Limits
universe vβ vβ uβ uβ
variable... | Mathlib/CategoryTheory/Adjunction/Evaluation.lean | 140 | 145 | theorem NatTrans.epi_iff_epi_app {F G : C β₯€ D} (Ξ· : F βΆ G) : Epi Ξ· β β c, Epi (Ξ·.app c) := by |
constructor
Β· intro h c
exact (inferInstance : Epi (((evaluation _ _).obj c).map Ξ·))
Β· intros
apply NatTrans.epi_of_epi_app
| [
" β β¦X Y : Cβ¦ (f_1 : X βΆ Y),\n ((fun d =>\n { obj := fun t => β fun x => d, map := fun {X Y} f => Sigma.desc fun g => Sigma.ΞΉ (fun x => d) (g β« f),\n map_id := β―, map_comp := β― })\n xβ).map\n f_1 β«\n (fun e => Sigma.desc fun h => f β« Sigma.ΞΉ (fun x => ... | [
" β β¦X Y : Cβ¦ (f_1 : X βΆ Y),\n ((fun d =>\n { obj := fun t => β fun x => d, map := fun {X Y} f => Sigma.desc fun g => Sigma.ΞΉ (fun x => d) (g β« f),\n map_id := β―, map_comp := β― })\n xβ).map\n f_1 β«\n (fun e => Sigma.desc fun h => f β« Sigma.ΞΉ (fun x => ... |
import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence
import Mathlib.Algebra.ContinuedFractions.TerminatedStable
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Ring
#align_import algebra.continued_fractions.convergents_equiv from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40a... | Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean | 155 | 181 | theorem succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq :
convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1) := by |
cases s_succ_nth_eq : s.get? <| n + 1 with
| none =>
rw [squashSeq_eq_self_of_terminated s_succ_nth_eq,
convergents'Aux_stable_step_of_terminated s_succ_nth_eq]
| some gp_succ_n =>
induction n generalizing s gp_succ_n with
| zero =>
obtain β¨gp_head, s_head_eqβ© : β gp_head, s.head = some g... | [
" squashSeq s n = s",
" (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }",
" (squashSeq s n).get? m = s.get? m",
" (squashSeq s (n + 1)).tail = squashSeq s.tail n",
" (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m",
" convergents'Aux s (n + 2) = conve... | [
" squashSeq s n = s",
" (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }",
" (squashSeq s n).get? m = s.get? m",
" (squashSeq s (n + 1)).tail = squashSeq s.tail n",
" (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m"
] |
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd"
namespace Polynomial
open Polynomial Finsupp Finset
open... | Mathlib/Algebra/Polynomial/Reverse.lean | 50 | 52 | theorem revAtFun_inj {N : β} : Function.Injective (revAtFun N) := by |
intro a b hab
rw [β @revAtFun_invol N a, hab, revAtFun_invol]
| [
" revAtFun N (revAtFun N i) = i",
" (if (if i β€ N then N - i else i) β€ N then N - if i β€ N then N - i else i else if i β€ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i β€ N",
" i = i",
" Function.Injective (revAtFun N)",
" a = b"
] | [
" revAtFun N (revAtFun N i) = i",
" (if (if i β€ N then N - i else i) β€ N then N - if i β€ N then N - i else i else if i β€ N then N - i else i) = i",
" N - (N - i) = i",
" N - i = i",
" False",
" N - i β€ N",
" i = i"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.