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.Algebra.BigOperators.Group.Multiset
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Multiset.Antidiagonal
import Mathlib.Data.Multiset.Sections
#align_import algebra.big_operators.multiset.lemmas from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
variab... | Mathlib/Algebra/BigOperators/Ring/Multiset.lean | 99 | 102 | theorem multiset_sum_right (a : Ξ±) (h : β b β s, Commute a b) : Commute a s.sum := by |
induction s using Quotient.inductionOn
rw [quot_mk_to_coe, sum_coe]
exact Commute.list_sum_right _ _ h
| [
" Commute a s.sum",
" Commute a (sum β¦aββ§)",
" Commute a aβ.sum"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 192 | 193 | theorem preimage_add_const_Icc : (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a) := by |
simp [β Ici_inter_Iic]
| [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)",
" (fun x => x + a) β»ΒΉ' Icc b c = Icc (b - a) (c - a)"
] | [
" (fun x => a + x) β»ΒΉ' Icc b c = Icc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ico b c = Ico (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioc b c = Ioc (b - a) (c - a)",
" (fun x => a + x) β»ΒΉ' Ioo b c = Ioo (b - a) (c - a)"
] |
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 | 90 | 91 | theorem digits_zero (b : β) : digits b 0 = [] := by |
rcases b with (_ | β¨_ | β¨_β©β©) <;> simp [digits, digitsAux0, digitsAux1]
| [
" (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.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def Οβ : MulChar (ZMod 4) β€... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 66 | 71 | theorem Οβ_int_eq_if_mod_four (n : β€) :
Οβ n = if n % 2 = 0 then 0 else if n % 4 = 1 then 1 else -1 := by |
have help : β m : β€, 0 β€ m β m < 4 β Οβ m = if m % 2 = 0 then 0 else if m = 1 then 1 else -1 := by
decide
rw [β Int.emod_emod_of_dvd n (by decide : (2 : β€) β£ 4), β ZMod.intCast_mod n 4]
exact help (n % 4) (Int.emod_nonneg n (by norm_num)) (Int.emod_lt n (by norm_num))
| [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... | [
" β (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β― }.toFun y",
" β (a : ZMod 4), Β¬IsUnit a β (β{ toFun := ![0, 1, 0, -1], map_one' := β―, map_mul' := β― }).toFun a = 0",
" Οβ.IsQua... |
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 | 211 | 213 | theorem xInTermsOfW_eq [Invertible (p : R)] {n : β} : xInTermsOfW p R n =
(X n - β i β range n, C ((p: R) ^ i) * xInTermsOfW p R i ^ p ^ (n - i)) * C ((β
p : R) ^ n) := by |
rw [xInTermsOfW, β Fin.sum_univ_eq_sum_range]
| [
" 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.MeasureTheory.Covering.DensityTheorem
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import measure_theory.covering.one_dim from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
open Set MeasureTheory IsUnifLocDoublingMeasure Filter
open scoped Topology
names... | Mathlib/MeasureTheory/Covering/OneDim.lean | 51 | 59 | theorem tendsto_Icc_vitaliFamily_left (x : β) :
Tendsto (fun y => Icc y x) (π[<] x) ((vitaliFamily (volume : Measure β) 1).filterAt x) := by |
refine (VitaliFamily.tendsto_filterAt_iff _).2 β¨?_, ?_β©
Β· filter_upwards [self_mem_nhdsWithin] with y hy using Icc_mem_vitaliFamily_at_left hy
Β· intro Ξ΅ Ξ΅pos
have : x β Ioc (x - Ξ΅) x := β¨by linarith, le_refl _β©
filter_upwards [Icc_mem_nhdsWithin_Iio this] with y hy
rw [closedBall_eq_Icc]
exact Ic... | [
" Icc x y β (vitaliFamily volume 1).setsAt x",
" Metric.closedBall ((x + y) / 2) ((y - x) / 2) β (vitaliFamily volume 1).setsAt x",
" 0 < (y - x) / 2",
" dist x ((x + y) / 2) β€ 1 * ((y - x) / 2)",
" (x + y) / 2 - x β€ 1 * ((y - x) / 2)",
" 0 β€ (x + y) / 2 - x",
" Tendsto (fun y => Icc x y) (π[>] x) ((vi... | [
" Icc x y β (vitaliFamily volume 1).setsAt x",
" Metric.closedBall ((x + y) / 2) ((y - x) / 2) β (vitaliFamily volume 1).setsAt x",
" 0 < (y - x) / 2",
" dist x ((x + y) / 2) β€ 1 * ((y - x) / 2)",
" (x + y) / 2 - x β€ 1 * ((y - x) / 2)",
" 0 β€ (x + y) / 2 - x",
" Tendsto (fun y => Icc x y) (π[>] x) ((vi... |
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 | 47 | 57 | theorem sin_eq_zero_iff {ΞΈ : β} : sin ΞΈ = 0 β β k : β€, ΞΈ = k * Ο := by |
rw [β Complex.cos_sub_pi_div_two, cos_eq_zero_iff]
constructor
Β· rintro β¨k, hkβ©
use k + 1
field_simp [eq_add_of_sub_eq hk]
ring
Β· rintro β¨k, rflβ©
use k - 1
field_simp
ring
| [
" ΞΈ.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.Topology.Order
#align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d"
open Set Filter Function
open TopologicalSpace Topology Filter
variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β Y} {g : Y β Z}
section Inducing
variable [To... | Mathlib/Topology/Maps.lean | 122 | 124 | theorem tendsto_nhds_iff {f : ΞΉ β Y} {l : Filter ΞΉ} {y : Y} (hg : Inducing g) :
Tendsto f l (π y) β Tendsto (g β f) l (π (g y)) := by |
rw [hg.nhds_eq_comap, tendsto_comap_iff]
| [
" instβΒ² = TopologicalSpace.induced (g β f) instβ",
" Inducing (g β f) β Inducing f",
" Inducing f",
" instβΒ² β€ induced f instβΒΉ",
" induced f instβΒΉ β€ instβΒ²",
" induced f instβΒΉ β€ induced f (induced g instβ)",
" πΛ’ s = comap f (πΛ’ (f '' s))",
" MapClusterPt (f x) l f β ClusterPt x l",
" (π (f x... | [
" instβΒ² = TopologicalSpace.induced (g β f) instβ",
" Inducing (g β f) β Inducing f",
" Inducing f",
" instβΒ² β€ induced f instβΒΉ",
" induced f instβΒΉ β€ instβΒ²",
" induced f instβΒΉ β€ induced f (induced g instβ)",
" πΛ’ s = comap f (πΛ’ (f '' s))",
" MapClusterPt (f x) l f β ClusterPt x l",
" (π (f x... |
import Mathlib.Analysis.Calculus.FDeriv.Add
variable {π ΞΉ : Type*} [DecidableEq ΞΉ] [Fintype ΞΉ] [NontriviallyNormedField π]
variable {E : ΞΉ β Type*} [β i, NormedAddCommGroup (E i)] [β i, NormedSpace π (E i)]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π F]
@[fun_prop]
| Mathlib/Analysis/Calculus/FDeriv/Pi.lean | 17 | 29 | theorem hasFDerivAt_update (x : β i, E i) {i : ΞΉ} (y : E i) :
HasFDerivAt (Function.update x i) (.pi (Pi.single i (.id π (E i)))) y := by |
set l := (ContinuousLinearMap.pi (Pi.single i (.id π (E i))))
have update_eq : Function.update x i = (fun _ β¦ x) + l β (Β· - x i) := by
ext t j
dsimp [l, Pi.single, Function.update]
split_ifs with hji
Β· subst hji
simp
Β· simp
rw [update_eq]
convert (hasFDerivAt_const _ _).add (l.hasFDe... | [
" HasFDerivAt (Function.update x i) (ContinuousLinearMap.pi (Pi.single i (ContinuousLinearMap.id π (E i)))) y",
" HasFDerivAt (Function.update x i) l y",
" Function.update x i = (fun x_1 => x) + βl β fun x_1 => x_1 - x i",
" Function.update x i t j = ((fun x_1 => x) + βl β fun x_1 => x_1 - x i) t j",
" (if... | [] |
import Mathlib.Algebra.Ring.Defs
import Mathlib.Algebra.Group.Ext
local macro:max "local_hAdd[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HAdd.hAdd : $type β $type β $type))
local macro:max "local_hMul[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HMul.hMul : $type β $typ... | Mathlib/Algebra/Ring/Ext.lean | 405 | 407 | theorem toNonUnitalNonAssocSemiring_injective :
Function.Injective (@toNonUnitalNonAssocSemiring R) := by |
rintro β¨β© β¨β© _; congr
| [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" instβ = instβ",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... |
import Mathlib.Logic.Relation
import Mathlib.Data.List.Forall2
import Mathlib.Data.List.Lex
import Mathlib.Data.List.Infix
#align_import data.list.chain from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734"
-- Make sure we haven't imported `Data.Nat.Order.Basic`
assert_not_exists OrderedSu... | Mathlib/Data/List/Chain.lean | 101 | 106 | theorem chain_pmap_of_chain {S : Ξ² β Ξ² β Prop} {p : Ξ± β Prop} {f : β a, p a β Ξ²}
(H : β a b ha hb, R a b β S (f a ha) (f b hb)) {a : Ξ±} {l : List Ξ±} (hlβ : Chain R a l)
(ha : p a) (hlβ : β a β l, p a) : Chain S (f a ha) (List.pmap f l hlβ) := by |
induction' l with lh lt l_ih generalizing a
Β· simp
Β· simp [H _ _ _ _ (rel_of_chain_cons hlβ), l_ih (chain_of_chain_cons hlβ)]
| [
" Chain (fun x y => x β a :: l β§ y β l β§ R x y) a l",
" Chain (fun x y => x β [aβ] β§ y β [] β§ R x y) aβ []",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) a (b :: l)",
" a β a :: b :: l β§ b β b :: l β§ R a b",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) b l",
" Chain R a [b] β R a... | [
" Chain (fun x y => x β a :: l β§ y β l β§ R x y) a l",
" Chain (fun x y => x β [aβ] β§ y β [] β§ R x y) aβ []",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) a (b :: l)",
" a β a :: b :: l β§ b β b :: l β§ R a b",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) b l",
" Chain R a [b] β R a... |
import Mathlib.Probability.ConditionalProbability
import Mathlib.MeasureTheory.Measure.Count
#align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4"
noncomputable section
open ProbabilityTheory
open MeasureTheory MeasurableSpace
namespace ProbabilityT... | Mathlib/Probability/CondCount.lean | 100 | 101 | theorem condCount_inter_self (hs : s.Finite) : condCount s (s β© t) = condCount s t := by |
rw [condCount, cond_inter_self _ hs.measurableSet]
| [
" condCount β
= 0",
" (condCount s) β
= 0",
" s.Finite",
" False",
" (condCount Set.univ) s = Measure.count s / β(Fintype.card Ξ©)",
" Measure.count s / Measure.count Set.univ = Measure.count s / β(Fintype.card Ξ©)",
" Measure.count Set.univ = β(Fintype.card Ξ©)",
" β x : Ξ©, 1 = β(Fintype.card Ξ©)",
" M... | [
" condCount β
= 0",
" (condCount s) β
= 0",
" s.Finite",
" False",
" (condCount Set.univ) s = Measure.count s / β(Fintype.card Ξ©)",
" Measure.count s / Measure.count Set.univ = Measure.count s / β(Fintype.card Ξ©)",
" Measure.count Set.univ = β(Fintype.card Ξ©)",
" β x : Ξ©, 1 = β(Fintype.card Ξ©)",
" M... |
import Mathlib.Algebra.Group.Conj
import Mathlib.Algebra.Group.Pi.Lemmas
import Mathlib.Algebra.Group.Subsemigroup.Operations
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Set.Image
import Mathlib.Order.Atoms
import Mathlib.Tactic.ApplyFun
#align_import g... | Mathlib/Algebra/Group/Subgroup/Basic.lean | 169 | 173 | theorem exists_inv_mem_iff_exists_mem {P : G β Prop} :
(β x : G, x β H β§ P xβ»ΒΉ) β β x β H, P x := by |
constructor <;>
Β· rintro β¨x, x_in, hxβ©
exact β¨xβ»ΒΉ, inv_mem x_in, by simp [hx]β©
| [
" |x| β H β x β H",
" x / y β H",
" x * yβ»ΒΉ β H",
" x ^ βn β K",
" x ^ n β K",
" x ^ -[n+1] β K",
" (x ^ (n + 1))β»ΒΉ β K",
" (β x β H, P xβ»ΒΉ) β β x β H, P x",
" (β x β H, P xβ»ΒΉ) β β x β H, P x",
" β x β H, P x",
" P xβ»ΒΉ",
" (β x β H, P x) β β x β H, P xβ»ΒΉ",
" β x β H, P xβ»ΒΉ",
" P xβ»ΒΉβ»ΒΉ"
] | [
" |x| β H β x β H",
" x / y β H",
" x * yβ»ΒΉ β H",
" x ^ βn β K",
" x ^ n β K",
" x ^ -[n+1] β K",
" (x ^ (n + 1))β»ΒΉ β K"
] |
import Mathlib.Data.Nat.Bitwise
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Game.Impartial
#align_import set_theory.game.nim from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
noncomputable section
universe u
namespace SetTheory
open scoped PGame
namespace PGame... | Mathlib/SetTheory/Game/Nim.lean | 78 | 80 | theorem moveRight_nim_hEq (o : Ordinal) :
have : IsWellOrder (Quotient.out o).Ξ± (Β· < Β·) := inferInstance
HEq (nim o).moveRight fun i : o.out.Ξ± => nim (typein (Β· < Β·) i) := by | rw [nim_def]; rfl
| [
" let_fun this := β―;\n nim o =\n mk (Quotient.out o).Ξ± (Quotient.out o).Ξ± (fun oβ => nim (typein (fun x x_1 => x < x_1) oβ)) fun oβ =>\n nim (typein (fun x x_1 => x < x_1) oβ)",
" let_fun this := β―;\n (mk (Quotient.out o).Ξ± (Quotient.out o).Ξ±\n (fun oβ =>\n let_fun x := β―;\n nim (type... | [
" let_fun this := β―;\n nim o =\n mk (Quotient.out o).Ξ± (Quotient.out o).Ξ± (fun oβ => nim (typein (fun x x_1 => x < x_1) oβ)) fun oβ =>\n nim (typein (fun x x_1 => x < x_1) oβ)",
" let_fun this := β―;\n (mk (Quotient.out o).Ξ± (Quotient.out o).Ξ±\n (fun oβ =>\n let_fun x := β―;\n nim (type... |
import Mathlib.Algebra.Group.Subgroup.Pointwise
import Mathlib.Data.Set.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.GroupTheory.Coset
#align_import group_theory.double_coset from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
-- Porting note: removed import
-- import Mathlib.Tac... | Mathlib/GroupTheory/DoubleCoset.lean | 93 | 102 | theorem bot_rel_eq_leftRel (H : Subgroup G) :
(setoid β(β₯ : Subgroup G) βH).Rel = (QuotientGroup.leftRel H).Rel := by |
ext a b
rw [rel_iff, Setoid.Rel, QuotientGroup.leftRel_apply]
constructor
Β· rintro β¨a, rfl : a = 1, b, hb, rflβ©
change aβ»ΒΉ * (1 * a * b) β H
rwa [one_mul, inv_mul_cancel_left]
Β· rintro (h : aβ»ΒΉ * b β H)
exact β¨1, rfl, aβ»ΒΉ * b, h, by rw [one_mul, mul_inv_cancel_left]β©
| [
" doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t",
" b β doset a s t β β x β s, β y β t, b = x * a * y",
" doset b βH βK = doset a βH βK",
" doset (h * a * k) βH βK = doset a βH βK",
" b β doset a βH βK",
" β x β βH, β y β βK, b = x * a * y",
" b = yβ»ΒΉ * l * a * (r * r'β»ΒΉ)",
" doset a βH βK =... | [
" doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t",
" b β doset a s t β β x β s, β y β t, b = x * a * y",
" doset b βH βK = doset a βH βK",
" doset (h * a * k) βH βK = doset a βH βK",
" b β doset a βH βK",
" β x β βH, β y β βK, b = x * a * y",
" b = yβ»ΒΉ * l * a * (r * r'β»ΒΉ)",
" doset a βH βK =... |
import Mathlib.Analysis.SpecialFunctions.Complex.Arg
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Complex
open Set Filter Bornology
open scop... | Mathlib/Analysis/SpecialFunctions/Complex/Log.lean | 86 | 90 | theorem log_ofReal_mul {r : β} (hr : 0 < r) {x : β} (hx : x β 0) :
log (r * x) = Real.log r + log x := by |
replace hx := Complex.abs.ne_zero_iff.mpr hx
simp_rw [log, map_mul, abs_ofReal, arg_real_mul _ hr, abs_of_pos hr, Real.log_mul hr.ne' hx,
ofReal_add, add_assoc]
| [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -Ο < x.log.im",
" x.log.im β€ Ο",
" cexp x.log = x",
" x β Set.range cexp β x β {0}αΆ",
" cexp x β {0}αΆ",
" (cexp x).log = x",
" x = y",
" (βx.log).re = (βx).log.re",
" (βx.log).im = (βx).log.im",
" (βx).log.re = x.log",
" (βr * x).log = βr.log... | [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -Ο < x.log.im",
" x.log.im β€ Ο",
" cexp x.log = x",
" x β Set.range cexp β x β {0}αΆ",
" cexp x β {0}αΆ",
" (cexp x).log = x",
" x = y",
" (βx.log).re = (βx).log.re",
" (βx.log).im = (βx).log.im",
" (βx).log.re = x.log"
] |
import Mathlib.CategoryTheory.Limits.Types
import Mathlib.CategoryTheory.Functor.Currying
import Mathlib.CategoryTheory.Limits.FunctorCategory
#align_import category_theory.limits.colimit_limit from "leanprover-community/mathlib"@"59382264386afdbaf1727e617f5fdda511992eb9"
universe vβ vβ v uβ uβ u
open CategoryTh... | Mathlib/CategoryTheory/Limits/ColimitLimit.lean | 97 | 105 | theorem ΞΉ_colimitLimitToLimitColimit_Ο_apply [Small.{v} J] [Small.{v} K] (F : J Γ K β₯€ Type v)
(j : J) (k : K) (f) : limit.Ο (curry.obj F β colim) j
(colimitLimitToLimitColimit F (colimit.ΞΉ (curry.obj (Prod.swap K J β F) β lim) k f)) =
colimit.ΞΉ ((curry.obj F).obj j) k (limit.Ο ((curry.obj (Prod.swap K... |
dsimp [colimitLimitToLimitColimit]
rw [Types.Limit.lift_Ο_apply]
dsimp only
rw [Types.Colimit.ΞΉ_desc_apply]
dsimp
| [
" β β¦X Y : Kβ¦ (f : X βΆ Y),\n (curry.obj (Prod.swap K J β F) β lim).map f β«\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) X β«\n ((Functor.c... | [
" β β¦X Y : Kβ¦ (f : X βΆ Y),\n (curry.obj (Prod.swap K J β F) β lim).map f β«\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο ((curry.obj (Prod.swap K J β F)).obj k) j β« colimit.ΞΉ ((curry.obj F).obj j) k) X β«\n ((Functor.c... |
import Mathlib.Init.Core
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0"
noncomputable section
open Affine
section AffineSpace... | Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean | 100 | 115 | theorem AffineIndependent.finrank_vectorSpan_image_finset [DecidableEq P]
{p : ΞΉ β P} (hi : AffineIndependent k p) {s : Finset ΞΉ} {n : β} (hc : Finset.card s = n + 1) :
finrank k (vectorSpan k (s.image p : Set P)) = n := by |
classical
have hi' := hi.range.mono (Set.image_subset_range p βs)
have hc' : (s.image p).card = n + 1 := by rwa [s.card_image_of_injective hi.injective]
have hn : (s.image p).Nonempty := by simp [hc', β Finset.card_pos]
rcases hn with β¨pβ, hpββ©
have hpβ' : pβ β p '' s := by simpa using hpβ
rw [affineInde... | [
" _root_.Finite ΞΉ",
" finrank k β₯(vectorSpan k β(Finset.image p s)) = n",
" (Finset.image p s).card = n + 1",
" (Finset.image p s).Nonempty",
" pβ β p '' βs",
" (Finset.image (fun p => p -α΅₯ pβ) ((Finset.image p s).erase pβ)).card = n",
" (Finset.image p s).card - 1 = n"
] | [
" _root_.Finite ΞΉ"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.special_functions.pow.asymptotics from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
set_option linter.uppercaseLean3 false
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter C... | Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean | 210 | 220 | theorem isBigO_cpow_rpow (hl : IsBoundedUnder (Β· β€ Β·) l fun x => |(g x).im|) :
(fun x => f x ^ g x) =O[l] fun x => abs (f x) ^ (g x).re :=
calc
(fun x => f x ^ g x) =O[l]
(show Ξ± β β from fun x => abs (f x) ^ (g x).re / Real.exp (arg (f x) * im (g x))) :=
isBigO_of_le _ fun x => (abs_cpow_le _ _... |
simp only [ofReal_one, div_one]
rfl
| [
" (fun x => rexp ((f x).arg * (g x).im)) =Ξ[l] fun x => 1",
" βαΆ (x : β) in Filter.map (fun x => |(f x).arg * (g x).im|) l, (fun x x_1 => x β€ x_1) x (Ο * b)",
" βαΆ (a : Ξ±) in l, (fun x x_1 => x β€ x_1) |(f a).arg * (g a).im| (Ο * b)",
" (fun x x_1 => x β€ x_1) |(f x).arg * (g x).im| (Ο * b)",
" (fun x x_1 => ... | [
" (fun x => rexp ((f x).arg * (g x).im)) =Ξ[l] fun x => 1",
" βαΆ (x : β) in Filter.map (fun x => |(f x).arg * (g x).im|) l, (fun x x_1 => x β€ x_1) x (Ο * b)",
" βαΆ (a : Ξ±) in l, (fun x x_1 => x β€ x_1) |(f a).arg * (g a).im| (Ο * b)",
" (fun x x_1 => x β€ x_1) |(f x).arg * (g x).im| (Ο * b)",
" (fun x x_1 => ... |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.RowCol
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.LinearAlgebra.Alternating.Basic
#align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30... | Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean | 94 | 94 | theorem det_isEmpty [IsEmpty n] {A : Matrix n n R} : det A = 1 := by | simp [det_apply]
| [
" M.det = β Ο : Perm n, ββ(sign Ο) * β i : n, M (Ο i) i",
" (diagonal d).det = β i : n, d i",
" β Ο : Perm n, ββ(sign Ο) * β i : n, diagonal d (Ο i) i = β i : n, d i",
" β b β univ, b β 1 β ββ(sign b) * β i : n, diagonal d (b i) i = 0",
" ββ(sign Ο) * β i : n, diagonal d (Ο i) i = 0",
" β i : n, diagonal ... | [
" M.det = β Ο : Perm n, ββ(sign Ο) * β i : n, M (Ο i) i",
" (diagonal d).det = β i : n, d i",
" β Ο : Perm n, ββ(sign Ο) * β i : n, diagonal d (Ο i) i = β i : n, d i",
" β b β univ, b β 1 β ββ(sign b) * β i : n, diagonal d (b i) i = 0",
" ββ(sign Ο) * β i : n, diagonal d (Ο i) i = 0",
" β i : n, diagonal ... |
import Mathlib.RingTheory.WittVector.InitTail
#align_import ring_theory.witt_vector.truncated from "leanprover-community/mathlib"@"acbe099ced8be9c9754d62860110295cde0d7181"
open Function (Injective Surjective)
noncomputable section
variable {p : β} [hp : Fact p.Prime] (n : β) (R : Type*)
local notation "π" =>... | Mathlib/RingTheory/WittVector/Truncated.lean | 118 | 122 | theorem out_injective : Injective (@out p n R _) := by |
intro x y h
ext i
rw [WittVector.ext_iff] at h
simpa only [coeff_out] using h βi
| [
" coeff i x = coeff i y",
" (mk p fun i => coeff i x) = x",
" coeff i (mk p fun i => coeff i x) = coeff i x",
" x.out.coeff βi = coeff i x",
" { coeff := fun i => if h : i < n then coeff β¨i, hβ© x else 0 }.coeff βi = coeff i x",
" (if h : βi < n then coeff β¨βi, hβ© x else 0) = coeff i x",
" Injective out"... | [
" coeff i x = coeff i y",
" (mk p fun i => coeff i x) = x",
" coeff i (mk p fun i => coeff i x) = coeff i x",
" x.out.coeff βi = coeff i x",
" { coeff := fun i => if h : i < n then coeff β¨i, hβ© x else 0 }.coeff βi = coeff i x",
" (if h : βi < n then coeff β¨βi, hβ© x else 0) = coeff i x"
] |
import Mathlib.MeasureTheory.Covering.Differentiation
import Mathlib.MeasureTheory.Covering.VitaliFamily
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.MeasureTheory.Measure.Regular
import Mathlib.SetTheory.Ordinal.Arithmetic
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Data.Set.Pairwise.Lat... | Mathlib/MeasureTheory/Covering/Besicovitch.lean | 195 | 200 | theorem hlast' (i : Fin N.succ) (h : 1 β€ Ο) : a.r (last N) β€ Ο * a.r i := by |
rcases lt_or_le i (last N) with (H | H)
Β· exact (a.hlast i H).2
Β· have : i = last N := top_le_iff.1 H
rw [this]
exact le_mul_of_one_le_left (a.rpos _).le h
| [
" (fun x => 1) i β€ dist (default i) (default (last 0)) β§ (fun x => 1) (last 0) β€ Ο * (fun x => 1) i",
" dist (default i) (default (last 0)) β€ (fun x => 1) i + (fun x => 1) (last 0)",
" dist (a.c i) (a.c (last N)) β€ a.r i + a.r (last N)",
" a.r (last N) β€ Ο * a.r i",
" a.r (last N) β€ Ο * a.r (last N)"
] | [
" (fun x => 1) i β€ dist (default i) (default (last 0)) β§ (fun x => 1) (last 0) β€ Ο * (fun x => 1) i",
" dist (default i) (default (last 0)) β€ (fun x => 1) i + (fun x => 1) (last 0)",
" dist (a.c i) (a.c (last N)) β€ a.r i + a.r (last N)"
] |
import Mathlib.Order.Filter.Bases
import Mathlib.Order.Filter.Ultrafilter
open Set
variable {Ξ± Ξ² : Type*} {l : Filter Ξ±}
namespace Filter
protected def Subsingleton (l : Filter Ξ±) : Prop := β s β l, Set.Subsingleton s
theorem HasBasis.subsingleton_iff {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set Ξ±} (h : l.HasBasis p ... | Mathlib/Order/Filter/Subsingleton.lean | 58 | 61 | theorem subsingleton_iff_bot_or_pure : l.Subsingleton β l = β₯ β¨ β a, l = pure a := by |
refine β¨fun hl β¦ ?_, ?_β©
Β· exact (eq_or_neBot l).imp_right (@Subsingleton.exists_eq_pure _ _ Β· hl)
Β· rintro (rfl | β¨a, rflβ©) <;> simp
| [
" β a, l = pure a",
" l β€ pure a",
" l.Subsingleton β l = β₯ β¨ β a, l = pure a",
" l = β₯ β¨ β a, l = pure a",
" (l = β₯ β¨ β a, l = pure a) β l.Subsingleton",
" β₯.Subsingleton",
" (pure a).Subsingleton"
] | [
" β a, l = pure a",
" l β€ pure a"
] |
import Mathlib.Algebra.MvPolynomial.PDeriv
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.RingTheory.Polynomial.Pochhammer
#align_import ring_theory.polynomial.bernstein from "le... | Mathlib/RingTheory/Polynomial/Bernstein.lean | 86 | 90 | theorem eval_at_0 (n Ξ½ : β) : (bernsteinPolynomial R n Ξ½).eval 0 = if Ξ½ = 0 then 1 else 0 := by |
rw [bernsteinPolynomial]
split_ifs with h
Β· subst h; simp
Β· simp [zero_pow h]
| [
" bernsteinPolynomial β€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n Ξ½ = 0",
" Polynomial.map f (bernsteinPolynomial R n Ξ½) = bernsteinPolynomial S n Ξ½",
" (bernsteinPolynomial R n Ξ½).comp (1 - X) = bernsteinPolynomial R n (n - Ξ½)",
" bernsteinPol... | [
" bernsteinPolynomial β€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n Ξ½ = 0",
" Polynomial.map f (bernsteinPolynomial R n Ξ½) = bernsteinPolynomial S n Ξ½",
" (bernsteinPolynomial R n Ξ½).comp (1 - X) = bernsteinPolynomial R n (n - Ξ½)",
" bernsteinPol... |
import Mathlib.Algebra.Algebra.Operations
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.Algebra.DirectSum.Algebra
#align_import algebra.direct_sum.internal from "leanprover-community/mathlib"@"9936c3dfc04e5876f4368aeb2e60f8d8358d095a"
open DirectSum
variable {ΞΉ : Type*} {Ο S R : Type*}
instance... | Mathlib/Algebra/DirectSum/Internal.lean | 74 | 80 | theorem SetLike.intCast_mem_graded [Zero ΞΉ] [AddGroupWithOne R] [SetLike Ο R]
[AddSubgroupClass Ο R] (A : ΞΉ β Ο) [SetLike.GradedOne A] (z : β€) : (z : R) β A 0 := by |
induction z
Β· rw [Int.ofNat_eq_coe, Int.cast_natCast]
exact SetLike.natCast_mem_graded _ _
Β· rw [Int.cast_negSucc]
exact neg_mem (SetLike.natCast_mem_graded _ _)
| [
" AddCommMonoid β₯(A i)",
" AddCommGroup β₯(A i)",
" (algebraMap S R) s β A 0",
" s β’ 1 β A 0",
" βn β A 0",
" β0 β A 0",
" 0 β A 0",
" β(nβ + 1) β A 0",
" βnβ + 1 β A 0",
" βz β A 0",
" β(Int.ofNat aβ) β A 0",
" βaβ β A 0",
" β(Int.negSucc aβ) β A 0",
" -β(aβ + 1) β A 0"
] | [
" AddCommMonoid β₯(A i)",
" AddCommGroup β₯(A i)",
" (algebraMap S R) s β A 0",
" s β’ 1 β A 0",
" βn β A 0",
" β0 β A 0",
" 0 β A 0",
" β(nβ + 1) β A 0",
" βnβ + 1 β A 0"
] |
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Nilpotent.Defs
#align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
open Function Set
variable ... | Mathlib/RingTheory/Nilpotent/Lemmas.lean | 25 | 29 | theorem RingHom.ker_isRadical_iff_reduced_of_surjective {S F} [CommSemiring R] [CommRing S]
[FunLike F R S] [RingHomClass F R S] {f : F} (hf : Function.Surjective f) :
(RingHom.ker f).IsRadical β IsReduced S := by |
simp_rw [isReduced_iff, hf.forall, IsNilpotent, β map_pow, β RingHom.mem_ker]
rfl
| [
" (ker f).IsRadical β IsReduced S",
" (ker f).IsRadical β β (x : R), (β n, x ^ n β ker f) β x β ker f"
] | [] |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Range
#align_import data.list.nat_antidiagonal from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
open List Function Nat
namespace List
namespace Nat
def antidiagonal (n : β) : List (β Γ β) :=
(range (n + 1)).map fun i β¦ (i,... | Mathlib/Data/List/NatAntidiagonal.lean | 95 | 100 | theorem map_swap_antidiagonal {n : β} :
(antidiagonal n).map Prod.swap = (antidiagonal n).reverse := by |
rw [antidiagonal, map_map, β List.map_reverse, range_eq_range', reverse_range', β
range_eq_range', map_map]
apply map_congr
simp (config := { contextual := true }) [Nat.sub_sub_self, Nat.lt_succ_iff]
| [
" x β antidiagonal n β x.1 + x.2 = n",
" (β a β range (n + 1), (a, n - a) = x) β x.1 + x.2 = n",
" (β a β range (n + 1), (a, n - a) = x) β x.1 + x.2 = n",
" (i, n - i).1 + (i, n - i).2 = n",
" x.1 + x.2 = n β β a β range (n + 1), (a, n - a) = x",
" β a β range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x",
"... | [
" x β antidiagonal n β x.1 + x.2 = n",
" (β a β range (n + 1), (a, n - a) = x) β x.1 + x.2 = n",
" (β a β range (n + 1), (a, n - a) = x) β x.1 + x.2 = n",
" (i, n - i).1 + (i, n - i).2 = n",
" x.1 + x.2 = n β β a β range (n + 1), (a, n - a) = x",
" β a β range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x",
"... |
import Mathlib.MeasureTheory.Group.GeometryOfNumbers
import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean | 137 | 148 | theorem adjust_f {wβ : InfinitePlace K} (B : ββ₯0) (hf : β w, w β wβ β f w β 0) :
β g : InfinitePlace K β ββ₯0, (β w, w β wβ β g w = f w) β§ β w, (g w) ^ mult w = B := by |
let S := β w β Finset.univ.erase wβ, (f w) ^ mult w
refine β¨Function.update f wβ ((B * Sβ»ΒΉ) ^ (mult wβ : β)β»ΒΉ), ?_, ?_β©
Β· exact fun w hw => Function.update_noteq hw _ f
Β· rw [β Finset.mul_prod_erase Finset.univ _ (Finset.mem_univ wβ), Function.update_same,
Finset.prod_congr rfl fun w hw => by rw [Functio... | [
" (mixedEmbedding K) x β convexBodyLT K f β β (w : InfinitePlace K), w x < β(f w)",
" -x β convexBodyLT K f",
" (β (a : InfinitePlace K) (b : a.IsReal), |x.1 β¨a, bβ©| < β(f a)) β§\n β (a : InfinitePlace K) (b : a.IsComplex), Complex.abs (x.2 β¨a, bβ©) < β(f a)",
" NoAtoms volume",
" volume (convexBodyLT K f)... | [
" (mixedEmbedding K) x β convexBodyLT K f β β (w : InfinitePlace K), w x < β(f w)",
" -x β convexBodyLT K f",
" (β (a : InfinitePlace K) (b : a.IsReal), |x.1 β¨a, bβ©| < β(f a)) β§\n β (a : InfinitePlace K) (b : a.IsComplex), Complex.abs (x.2 β¨a, bβ©) < β(f a)",
" NoAtoms volume",
" volume (convexBodyLT K f)... |
import Mathlib.Topology.UniformSpace.Cauchy
import Mathlib.Topology.UniformSpace.Separation
import Mathlib.Topology.DenseEmbedding
#align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c"
open Filter Function Set Uniformity Topology
sec... | Mathlib/Topology/UniformSpace/UniformEmbedding.lean | 88 | 90 | theorem UniformInducing.cauchy_map_iff {f : Ξ± β Ξ²} (hf : UniformInducing f) {F : Filter Ξ±} :
Cauchy (map f F) β Cauchy F := by |
simp only [Cauchy, map_neBot_iff, prod_map_map_eq, map_le_iff_le_comap, β hf.comap_uniformity]
| [
" UniformInducing f β UniformSpace.comap f instβΒΉ = instβΒ²",
" (β (s : Set (Ξ± Γ Ξ±)), s β comap (fun x => (f x.1, f x.2)) (π€ Ξ²) β s β π€ Ξ±) β β (s : Set (Ξ± Γ Ξ±)), s β π€ Ξ± β s β π€ Ξ±",
" UniformInducing f β UniformContinuous f β§ comap (Prod.map f f) (π€ Ξ²) β€ π€ Ξ±",
" π€ Ξ± β€ comap (fun x => (f x.1, f x.2)) (π€... | [
" UniformInducing f β UniformSpace.comap f instβΒΉ = instβΒ²",
" (β (s : Set (Ξ± Γ Ξ±)), s β comap (fun x => (f x.1, f x.2)) (π€ Ξ²) β s β π€ Ξ±) β β (s : Set (Ξ± Γ Ξ±)), s β π€ Ξ± β s β π€ Ξ±",
" UniformInducing f β UniformContinuous f β§ comap (Prod.map f f) (π€ Ξ²) β€ π€ Ξ±",
" π€ Ξ± β€ comap (fun x => (f x.1, f x.2)) (π€... |
import Mathlib.Control.Traversable.Equiv
import Mathlib.Control.Traversable.Instances
import Batteries.Data.LazyList
import Mathlib.Lean.Thunk
#align_import data.lazy_list.basic from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
universe u
namespace LazyList
open Function
def listE... | Mathlib/Data/LazyList/Basic.lean | 143 | 147 | theorem append_nil {Ξ±} (xs : LazyList Ξ±) : xs.append (Thunk.pure LazyList.nil) = xs := by |
induction' xs using LazyList.rec with _ _ _ _ ih
Β· simp only [Thunk.pure, append, Thunk.get]
Β· simpa only [append, cons.injEq, true_and]
Β· ext; apply ih
| [
" LeftInverse toList ofList",
" (ofList xs).toList = xs",
" (ofList []).toList = []",
" (ofList (headβ :: tailβ)).toList = headβ :: tailβ",
" Function.RightInverse toList ofList",
" ofList xs.toList = xs",
" ofList nil.toList = nil",
" ofList (cons hβ tβ).toList = cons hβ tβ",
" { fn := fun x => tβ.... | [
" LeftInverse toList ofList",
" (ofList xs).toList = xs",
" (ofList []).toList = []",
" (ofList (headβ :: tailβ)).toList = headβ :: tailβ",
" Function.RightInverse toList ofList",
" ofList xs.toList = xs",
" ofList nil.toList = nil",
" ofList (cons hβ tβ).toList = cons hβ tβ",
" { fn := fun x => tβ.... |
import Mathlib.Order.Interval.Multiset
#align_import data.nat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
-- TODO
-- assert_not_exists Ring
open Finset Nat
variable (a b c : β)
namespace Nat
instance instLocallyFiniteOrder : LocallyFiniteOrder β where
finsetIcc a b... | Mathlib/Order/Interval/Finset/Nat.lean | 114 | 115 | theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by |
rw [Fintype.card_ofFinset, card_Icc]
| [
" x β (fun a b => { val := β(List.range' a (b + 1 - a)), nodup := β― }) a b β a β€ x β§ x β€ b",
" a β€ x β§ x < a + (b + 1 - a) β a β€ x β§ x β€ b",
" x β (fun a b => { val := β(List.range' a (b - a)), nodup := β― }) a b β a β€ x β§ x < b",
" a β€ x β§ x < a + (b - a) β a β€ x β§ x < b",
" x β (fun a b => { val := β(List.... | [
" x β (fun a b => { val := β(List.range' a (b + 1 - a)), nodup := β― }) a b β a β€ x β§ x β€ b",
" a β€ x β§ x < a + (b + 1 - a) β a β€ x β§ x β€ b",
" x β (fun a b => { val := β(List.range' a (b - a)), nodup := β― }) a b β a β€ x β§ x < b",
" a β€ x β§ x < a + (b - a) β a β€ x β§ x < b",
" x β (fun a b => { val := β(List.... |
import Mathlib.Logic.Relation
import Mathlib.Data.List.Forall2
import Mathlib.Data.List.Lex
import Mathlib.Data.List.Infix
#align_import data.list.chain from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734"
-- Make sure we haven't imported `Data.Nat.Order.Basic`
assert_not_exists OrderedSu... | Mathlib/Data/List/Chain.lean | 109 | 114 | theorem chain_of_chain_pmap {S : Ξ² β Ξ² β Prop} {p : Ξ± β Prop} (f : β a, p a β Ξ²) {l : List Ξ±}
(hlβ : β a β l, p a) {a : Ξ±} (ha : p a) (hlβ : Chain S (f a ha) (List.pmap f l hlβ))
(H : β a b ha hb, S (f a ha) (f b hb) β R a b) : Chain R a l := by |
induction' l with lh lt l_ih generalizing a
Β· simp
Β· simp [H _ _ _ _ (rel_of_chain_cons hlβ), l_ih _ _ (chain_of_chain_cons hlβ)]
| [
" Chain (fun x y => x β a :: l β§ y β l β§ R x y) a l",
" Chain (fun x y => x β [aβ] β§ y β [] β§ R x y) aβ []",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) a (b :: l)",
" a β a :: b :: l β§ b β b :: l β§ R a b",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) b l",
" Chain R a [b] β R a... | [
" Chain (fun x y => x β a :: l β§ y β l β§ R x y) a l",
" Chain (fun x y => x β [aβ] β§ y β [] β§ R x y) aβ []",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) a (b :: l)",
" a β a :: b :: l β§ b β b :: l β§ R a b",
" Chain (fun x y => x β a :: b :: l β§ y β b :: l β§ R x y) b l",
" Chain R a [b] β R a... |
import Mathlib.Init.Logic
import Mathlib.Tactic.AdaptationNote
import Mathlib.Tactic.Coe
set_option autoImplicit true
-- We align Lean 3 lemmas with lemmas in `Init.SimpLemmas` in Lean 4.
#align band_self Bool.and_self
#align band_tt Bool.and_true
#align band_ff Bool.and_false
#align tt_band Bool.true_and
#align f... | Mathlib/Init/Data/Bool/Lemmas.lean | 72 | 73 | theorem or_eq_true_eq_eq_true_or_eq_true (a b : Bool) :
((a || b) = true) = (a = true β¨ b = true) := by | simp
| [
" Β¬true = false",
" Β¬false = true",
" (Β¬b = true) = (b = false)",
" (Β¬b = false) = (b = true)",
" ((a && b) = true) = (a = true β§ b = true)",
" ((a || b) = true) = (a = true β¨ b = true)"
] | [
" Β¬true = false",
" Β¬false = true",
" (Β¬b = true) = (b = false)",
" (Β¬b = false) = (b = true)",
" ((a && b) = true) = (a = true β§ b = true)"
] |
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 | 130 | 136 | theorem range_extend_subset (f : Ξ± β Ξ²) (g : Ξ± β Ξ³) (g' : Ξ² β Ξ³) :
range (extend f g g') β range g βͺ g' '' (range f)αΆ := by |
classical
rintro _ β¨y, rflβ©
rw [extend_def]
split_ifs with h
exacts [Or.inl (mem_range_self _), Or.inr (mem_image_of_mem _ h)]
| [
" 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"
] |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Topology.Algebra.Star
noncomputable section
open Filter Finset Function
open scoped Topology
variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*}
section ProdDomain
variable [CommMonoid Ξ±] [TopologicalSpace Ξ±]
@[to_additive]
| Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean | 33 | 35 | theorem hasProd_pi_single [DecidableEq Ξ²] (b : Ξ²) (a : Ξ±) : HasProd (Pi.mulSingle b a) a := by |
convert hasProd_ite_eq b a
simp [Pi.mulSingle_apply]
| [
" HasProd (Pi.mulSingle b a) a",
" Pi.mulSingle b a xβ = if xβ = b then a else 1"
] | [] |
import Mathlib.MeasureTheory.Integral.Periodic
import Mathlib.Data.ZMod.Quotient
#align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Function Filter MeasureTheory MeasureTheory.Measure Metric
open scoped MeasureTheory Pointwise Top... | Mathlib/MeasureTheory/Group/AddCircle.lean | 54 | 92 | theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCircle T)
(hu : IsOfFinAddOrder u) (hI : I =α΅[volume] ball x (T / (2 * addOrderOf u))) :
IsAddFundamentalDomain (AddSubgroup.zmultiples u) I := by |
set G := AddSubgroup.zmultiples u
set n := addOrderOf u
set B := ball x (T / (2 * n))
have hn : 1 β€ (n : β) := by norm_cast; linarith [hu.addOrderOf_pos]
refine IsAddFundamentalDomain.mk_of_measure_univ_le ?_ ?_ ?_ ?_
Β· -- `NullMeasurableSet I volume`
exact measurableSet_ball.nullMeasurableSet.congr hI... | [
" closedBall x Ξ΅ =αΆ [ae volume] ball x Ξ΅",
" 2 * Ξ΅ β€ T",
" 2 * Ξ΅ β€ 0",
" volume (closedBall x Ξ΅) β€ volume (ball x Ξ΅)",
" Tendsto (fun Ξ΄ => volume (closedBall x Ξ΄)) (π[<] Ξ΅) (π (volume (closedBall x Ξ΅)))",
" Tendsto (fun Ξ΄ => ENNReal.ofReal (min T (2 * Ξ΄))) (π[<] Ξ΅) (π (ENNReal.ofReal (min T (2 * Ξ΅))))"... | [
" closedBall x Ξ΅ =αΆ [ae volume] ball x Ξ΅",
" 2 * Ξ΅ β€ T",
" 2 * Ξ΅ β€ 0",
" volume (closedBall x Ξ΅) β€ volume (ball x Ξ΅)",
" Tendsto (fun Ξ΄ => volume (closedBall x Ξ΄)) (π[<] Ξ΅) (π (volume (closedBall x Ξ΅)))",
" Tendsto (fun Ξ΄ => ENNReal.ofReal (min T (2 * Ξ΄))) (π[<] Ξ΅) (π (ENNReal.ofReal (min T (2 * Ξ΅))))"... |
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 | 35 | 38 | theorem prod_antidiagonal_swap {n : β} {f : β Γ β β M} :
β p β antidiagonal n, f p.swap = β p β antidiagonal n, f p := by |
conv_lhs => rw [β map_swap_antidiagonal, Finset.prod_map]
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)"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Order.Antichain
import Mathlib.Order.Interval.Finset.Nat
#align_import data.finset.slice from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Finset Nat
variable {Ξ± : Type*} {ΞΉ : Sort*} {ΞΊ : ΞΉ β Sort*}
namespace Set
... | Mathlib/Data/Finset/Slice.lean | 70 | 72 | theorem sized_iUnionβ {f : β i, ΞΊ i β Set (Finset Ξ±)} :
(β (i) (j), f i j).Sized r β β i j, (f i j).Sized r := by |
simp only [Set.sized_iUnion]
| [
" Sized r β
",
" Sized r {s} β s.card = r",
" Sized r (β i, f i) β β (i : ΞΉ), Sized r (f i)",
" (β β¦x : Finset Ξ±β¦ (x_1 : ΞΉ), x β f x_1 β x.card = r) β β (i : ΞΉ) β¦x : Finset Ξ±β¦, x β f i β x.card = r",
" Sized r (β i, β j, f i j) β β (i : ΞΉ) (j : ΞΊ i), Sized r (f i j)"
] | [
" Sized r β
",
" Sized r {s} β s.card = r",
" Sized r (β i, f i) β β (i : ΞΉ), Sized r (f i)",
" (β β¦x : Finset Ξ±β¦ (x_1 : ΞΉ), x β f x_1 β x.card = r) β β (i : ΞΉ) β¦x : Finset Ξ±β¦, x β f i β x.card = r"
] |
import Mathlib.CategoryTheory.Subobject.Lattice
#align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d"
universe v u
noncomputable section
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite
var... | Mathlib/CategoryTheory/Subobject/Limits.lean | 50 | 52 | theorem equalizerSubobject_arrow :
(equalizerSubobjectIso f g).hom β« equalizer.ΞΉ f g = (equalizerSubobject f g).arrow := by |
simp [equalizerSubobjectIso]
| [
" (equalizerSubobjectIso f g).hom β« equalizer.ΞΉ f g = (equalizerSubobject f g).arrow"
] | [] |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.Ring.Regular
import Mathlib.Tactic.Common
#align_import algebra.gcd_monoid.basic from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
variable {Ξ± : Type*}
-- Porting note: mathlib3 had a `@[protect_proj]` here, but adding `protect... | Mathlib/Algebra/GCDMonoid/Basic.lean | 172 | 181 | theorem normalize_eq_normalize {a b : Ξ±} (hab : a β£ b) (hba : b β£ a) :
normalize a = normalize b := by |
nontriviality Ξ±
rcases associated_of_dvd_dvd hab hba with β¨u, rflβ©
refine by_cases (by rintro rfl; simp only [zero_mul]) fun ha : a β 0 => ?_
suffices a * β(normUnit a) = a * βu * β(normUnit a) * βuβ»ΒΉ by
simpa only [normalize_apply, mul_assoc, normUnit_mul ha u.ne_zero, normUnit_coe_units]
calc
a * β... | [
" (fun x => x * β(normUnit x)) 0 = 0",
" 0 * β1 = 0",
" { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun 1 = 1",
" 1 * β(normUnit 1) = 1",
" β1 = 1",
" { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun (x * y) =\n { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun x ... | [
" (fun x => x * β(normUnit x)) 0 = 0",
" 0 * β1 = 0",
" { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun 1 = 1",
" 1 * β(normUnit 1) = 1",
" β1 = 1",
" { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun (x * y) =\n { toFun := fun x => x * β(normUnit x), map_zero' := β― }.toFun x ... |
import Mathlib.Data.List.Basic
#align_import data.list.count from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
assert_not_exists Set.range
assert_not_exists GroupWithZero
assert_not_exists Ring
open Nat
variable {Ξ± : Type*} {l : List Ξ±}
namespace List
section Count
variable [Dec... | Mathlib/Data/List/Count.lean | 90 | 93 | theorem count_cons' (a b : Ξ±) (l : List Ξ±) :
count a (b :: l) = count a l + if a = b then 1 else 0 := by |
simp only [count, beq_iff_eq, countP_cons, Nat.add_right_inj]
simp only [eq_comm]
| [
" count a (b :: l) = count a l + if a = b then 1 else 0",
" (if b = a then 1 else 0) = if a = b then 1 else 0"
] | [] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Logic.Relation
#align_import algebra.homology.complex_shape from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
noncomputable section
open scoped Classical
@[ext]
structure ComplexShape (ΞΉ : Type*) where
Rel : ΞΉ β ΞΉ β Prop
nex... | Mathlib/Algebra/Homology/ComplexShape.lean | 154 | 158 | theorem next_eq' (c : ComplexShape ΞΉ) {i j : ΞΉ} (h : c.Rel i j) : c.next i = j := by |
apply c.next_eq _ h
rw [next]
rw [dif_pos]
exact Exists.choose_spec β¨j, hβ©
| [
" c.symm.symm = c",
" c.symm.symm.Rel xβΒΉ xβ β c.Rel xβΒΉ xβ",
" jβ = j'β",
" iβ = i'β",
" Subsingleton { j // c.Rel i j }",
" β (a b : { j // c.Rel i j }), a = b",
" β¨j, rijβ© = β¨k, rikβ©",
" j = k",
" Subsingleton { i // c.Rel i j }",
" β (a b : { i // c.Rel i j }), a = b",
" β¨i, rikβ© = β¨j, rjkβ©"... | [
" c.symm.symm = c",
" c.symm.symm.Rel xβΒΉ xβ β c.Rel xβΒΉ xβ",
" jβ = j'β",
" iβ = i'β",
" Subsingleton { j // c.Rel i j }",
" β (a b : { j // c.Rel i j }), a = b",
" β¨j, rijβ© = β¨k, rikβ©",
" j = k",
" Subsingleton { i // c.Rel i j }",
" β (a b : { i // c.Rel i j }), a = b",
" β¨i, rikβ© = β¨j, rjkβ©"... |
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing
import Mathlib.AlgebraicGeometry.OpenImmersion
#align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1"
set_option linter.uppercaseLean3 false
noncomputable section
universe u
open Topologica... | Mathlib/AlgebraicGeometry/Gluing.lean | 325 | 328 | theorem glued_cover_cocycle_snd (x y z : π°.J) :
gluedCoverT' π° x y z β« gluedCoverT' π° y z x β« gluedCoverT' π° z x y β« pullback.snd =
pullback.snd := by |
apply pullback.hom_ext <;> simp [pullback.condition]
| [
" pullback pullback.fst pullback.fst βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback (pullback.fst β« π°.map y) (π°.map z)",
" (pullback.fst β« π°.map x) β« π X = (pullbackSym... | [
" pullback pullback.fst pullback.fst βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback pullback.fst pullback.fst",
" pullback (pullback.fst β« π°.map x) (π°.map z) βΆ pullback (pullback.fst β« π°.map y) (π°.map z)",
" (pullback.fst β« π°.map x) β« π X = (pullbackSym... |
import Mathlib.Data.Fintype.List
#align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49"
assert_not_exists MonoidWithZero
namespace List
variable {Ξ± : Type*} [DecidableEq Ξ±]
def nextOr : β (_ : List Ξ±) (_ _ : Ξ±), Ξ±
| [], _, default => default
| [_], _, d... | Mathlib/Data/List/Cycle.lean | 94 | 106 | theorem nextOr_mem {xs : List Ξ±} {x d : Ξ±} (hd : d β xs) : nextOr xs x d β xs := by |
revert hd
suffices β xs' : List Ξ±, (β x β xs, x β xs') β d β xs' β nextOr xs x d β xs' by
exact this xs fun _ => id
intro xs' hxs' hd
induction' xs with y ys ih
Β· exact hd
cases' ys with z zs
Β· exact hd
rw [nextOr]
split_ifs with h
Β· exact hxs' _ (mem_cons_of_mem _ (mem_cons_self _ _))
Β· exac... | [
" (y :: xs).nextOr x d = xs.nextOr x d",
" [y].nextOr x d = [].nextOr x d",
" (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d",
" xs.nextOr x d = xs.nextOr x d'",
" [].nextOr x d = [].nextOr x d'",
" (y :: ys).nextOr x d = (y :: ys).nextOr x d'",
" [y].nextOr x d = [y].nextOr x d'",
" (y :: z :: zs).... | [
" (y :: xs).nextOr x d = xs.nextOr x d",
" [y].nextOr x d = [].nextOr x d",
" (y :: z :: zs).nextOr x d = (z :: zs).nextOr x d",
" xs.nextOr x d = xs.nextOr x d'",
" [].nextOr x d = [].nextOr x d'",
" (y :: ys).nextOr x d = (y :: ys).nextOr x d'",
" [y].nextOr x d = [y].nextOr x d'",
" (y :: z :: zs).... |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.RingTheory.EuclideanDomain
#align_import data.polynomial.field_division from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
noncomputable section
open Polynomial
namespace Polynomial
u... | Mathlib/Algebra/Polynomial/FieldDivision.lean | 65 | 76 | theorem eval_iterate_derivative_rootMultiplicity {p : R[X]} {t : R} :
(derivative^[p.rootMultiplicity t] p).eval t =
(p.rootMultiplicity t).factorial β’ (p /β (X - C t) ^ p.rootMultiplicity t).eval t := by |
set m := p.rootMultiplicity t with hm
conv_lhs => rw [β p.pow_mul_divByMonic_rootMultiplicity_eq t, β hm]
rw [iterate_derivative_mul, eval_finset_sum, sum_eq_single_of_mem _ (mem_range.mpr m.succ_pos)]
Β· rw [m.choose_zero_right, one_smul, eval_mul, m.sub_zero, iterate_derivative_X_sub_pow_self,
eval_natC... | [
" rootMultiplicity t (derivative p) = rootMultiplicity t p - 1",
" rootMultiplicity t (derivative p) = m - 1",
" Β¬(X - C t) ^ m β£ derivative p",
" Β¬X - C t β£ C βm * g",
" Β¬eval t (C βm * g) = 0",
" (X - C t) ^ m β£ derivative p",
" (X - C t) ^ m β£ 0",
" rootMultiplicity t (derivative p) β€ m - 1",
" e... | [
" rootMultiplicity t (derivative p) = rootMultiplicity t p - 1",
" rootMultiplicity t (derivative p) = m - 1",
" Β¬(X - C t) ^ m β£ derivative p",
" Β¬X - C t β£ C βm * g",
" Β¬eval t (C βm * g) = 0",
" (X - C t) ^ m β£ derivative p",
" (X - C t) ^ m β£ 0",
" rootMultiplicity t (derivative p) β€ m - 1"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.NumberTheory.Bernoulli
#align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a"
noncomputable section... | Mathlib/NumberTheory/BernoulliPolynomials.lean | 57 | 63 | theorem bernoulli_def (n : β) : bernoulli n =
β i β range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by |
rw [β sum_range_reflect, add_succ_sub_one, add_zero, bernoulli]
apply sum_congr rfl
rintro x hx
rw [mem_range_succ_iff] at hx
rw [choose_symm hx, tsub_tsub_cancel_of_le hx]
| [
" bernoulli n = β i β range (n + 1), (monomial i) (_root_.bernoulli (n - i) * β(n.choose i))",
" β i β range (n + 1), (monomial (n - i)) (_root_.bernoulli i * β(n.choose i)) =\n β j β range (n + 1), (monomial (n - j)) (_root_.bernoulli (n - (n - j)) * β(n.choose (n - j)))",
" β x β range (n + 1),\n (monom... | [] |
import Mathlib.MeasureTheory.Decomposition.Lebesgue
import Mathlib.MeasureTheory.Measure.Complex
import Mathlib.MeasureTheory.Decomposition.Jordan
import Mathlib.MeasureTheory.Measure.WithDensityVectorMeasure
noncomputable section
open scoped Classical MeasureTheory NNReal ENNReal
open Set
variable {Ξ± Ξ² : Type*... | Mathlib/MeasureTheory/Decomposition/SignedLebesgue.lean | 131 | 145 | theorem singularPart_mutuallySingular (s : SignedMeasure Ξ±) (ΞΌ : Measure Ξ±) :
s.toJordanDecomposition.posPart.singularPart ΞΌ ββ
s.toJordanDecomposition.negPart.singularPart ΞΌ := by |
by_cases hl : s.HaveLebesgueDecomposition ΞΌ
Β· obtain β¨i, hi, hpos, hnegβ© := s.toJordanDecomposition.mutuallySingular
rw [s.toJordanDecomposition.posPart.haveLebesgueDecomposition_add ΞΌ] at hpos
rw [s.toJordanDecomposition.negPart.haveLebesgueDecomposition_add ΞΌ] at hneg
rw [add_apply, add_eq_zero_iff] ... | [
" (-s).toJordanDecomposition.posPart.HaveLebesgueDecomposition ΞΌ",
" s.toJordanDecomposition.negPart.HaveLebesgueDecomposition ΞΌ",
" (-s).toJordanDecomposition.negPart.HaveLebesgueDecomposition ΞΌ",
" s.toJordanDecomposition.posPart.HaveLebesgueDecomposition ΞΌ",
" (r β’ s).toJordanDecomposition.posPart.HaveLe... | [
" (-s).toJordanDecomposition.posPart.HaveLebesgueDecomposition ΞΌ",
" s.toJordanDecomposition.negPart.HaveLebesgueDecomposition ΞΌ",
" (-s).toJordanDecomposition.negPart.HaveLebesgueDecomposition ΞΌ",
" s.toJordanDecomposition.posPart.HaveLebesgueDecomposition ΞΌ",
" (r β’ s).toJordanDecomposition.posPart.HaveLe... |
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.Algebra.Module.Torsion
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Filtration
import Mathlib.RingTheory.Nakayama
#align_import ring_theory.ideal.cota... | Mathlib/RingTheory/Ideal/Cotangent.lean | 63 | 65 | theorem map_toCotangent_ker : I.toCotangent.ker.map I.subtype = I ^ 2 := by |
rw [Ideal.toCotangent, Submodule.ker_mkQ, pow_two, Submodule.map_smul'' I β€ (Submodule.subtype I),
Algebra.id.smul_eq_mul, Submodule.map_subtype_top]
| [
" AddCommGroup I.Cotangent",
" AddCommGroup (β₯I β§Έ I β’ β€)",
" Module (R β§Έ I) I.Cotangent",
" Module (R β§Έ I) (β₯I β§Έ I β’ β€)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2"
] | [
" AddCommGroup I.Cotangent",
" AddCommGroup (β₯I β§Έ I β’ β€)",
" Module (R β§Έ I) I.Cotangent",
" Module (R β§Έ I) (β₯I β§Έ I β’ β€)"
] |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ββ₯0β) (π Ξ± Ξ² : Type*)
namespace WithLp
section DistNorm
section Dist
variable [Dist Ξ±] [Dist Ξ²]
open scoped C... | Mathlib/Analysis/NormedSpace/ProdLp.lean | 240 | 243 | theorem prod_dist_eq_sup (f g : WithLp β (Ξ± Γ Ξ²)) :
dist f g = dist f.fst g.fst β dist f.snd g.snd := by |
dsimp [dist]
exact if_neg ENNReal.top_ne_zero
| [
" dist f g = (if dist f.1 g.1 = 0 then 0 else 1) + if dist f.2 g.2 = 0 then 0 else 1",
" dist f g = dist f.1 g.1 β dist f.2 g.2",
" (if β€ = 0 then (if dist f.1 g.1 = 0 then 0 else 1) + if dist f.2 g.2 = 0 then 0 else 1\n else if β€ = β€ then dist f.1 g.1 β dist f.2 g.2 else (dist f.1 g.1 ^ 0 + dist f.2 g.2 ^ 0... | [
" dist f g = (if dist f.1 g.1 = 0 then 0 else 1) + if dist f.2 g.2 = 0 then 0 else 1"
] |
import Mathlib.Combinatorics.Quiver.Cast
import Mathlib.Combinatorics.Quiver.Symmetric
#align_import combinatorics.quiver.single_obj from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Quiver
-- Porting note: Removed `deriving Unique`.
@[nolint unusedArguments]
def SingleObj ... | Mathlib/Combinatorics/Quiver/SingleObj.lean | 139 | 142 | theorem pathToList_listToPath (l : List Ξ±) : pathToList (listToPath l) = l := by |
induction' l with a l ih
Β· rfl
Β· change a :: pathToList (listToPath l) = a :: l; rw [ih]
| [
" toPrefunctor.symm (f βq g) = toPrefunctor.symm g β toPrefunctor.symm f",
" listToPath (pathToList p) = Path.cast β― β― p",
" listToPath (pathToList Path.nil) = Path.cast β― β― Path.nil",
" listToPath (pathToList (p.cons a)) = Path.cast β― β― (p.cons a)",
" (listToPath (pathToList p)).cons a = p.cons a",
" pat... | [
" toPrefunctor.symm (f βq g) = toPrefunctor.symm g β toPrefunctor.symm f",
" listToPath (pathToList p) = Path.cast β― β― p",
" listToPath (pathToList Path.nil) = Path.cast β― β― Path.nil",
" listToPath (pathToList (p.cons a)) = Path.cast β― β― (p.cons a)",
" (listToPath (pathToList p)).cons a = p.cons a"
] |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' uβ' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {Mβ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 271 | 276 | theorem rank_pi [Finite Ξ·] : Module.rank R (β i, Ο i) =
Cardinal.sum fun i => Module.rank R (Ο i) := by |
cases nonempty_fintype Ξ·
let B i := chooseBasis R (Ο i)
let b : Basis _ R (β i, Ο i) := Pi.basis fun i => B i
simp [β b.mk_eq_rank'', fun i => (B i).mk_eq_rank'']
| [
" Module.rank R (ΞΉ ββ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)",
" Module.rank R (ΞΉ ββ M) = #ΞΉ * Module.rank R M",
" Module.rank R (ΞΉ ββ R) = lift.{u, w} #ΞΉ",
" Module.rank R (ΞΉ ββ R) = #ΞΉ",
" Module.rank R (β¨ (i : ΞΉ), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ΞΉ ββ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)",
" Module.rank R (ΞΉ ββ M) = #ΞΉ * Module.rank R M",
" Module.rank R (ΞΉ ββ R) = lift.{u, w} #ΞΉ",
" Module.rank R (ΞΉ ββ R) = #ΞΉ",
" Module.rank R (β¨ (i : ΞΉ), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Topology.Algebra.Nonarchimedean.Basic
open Filter Topology
namespace NonarchimedeanGroup
variable {Ξ± G : Type*}
variable [CommGroup G] [UniformSpace G] [UniformGroup G] [NonarchimedeanGroup G]
@[to_additive "Let `G` be a nonarchimedean additive ab... | Mathlib/Topology/Algebra/InfiniteSum/Nonarchimedean.lean | 31 | 48 | theorem cauchySeq_prod_of_tendsto_cofinite_one {f : Ξ± β G} (hf : Tendsto f cofinite (π 1)) :
CauchySeq (fun s β¦ β i β s, f i) := by |
/- Let `U` be a neighborhood of `1`. It suffices to show that there exists `s : Finset Ξ±` such
that for any `t : Finset Ξ±` disjoint from `s`, we have `β i β t, f i β U`. -/
apply cauchySeq_finset_iff_prod_vanishing.mpr
intro U hU
-- Since `G` is nonarchimedean, `U` contains an open subgroup `V`.
rcases is_... | [
" CauchySeq fun s => β i β s, f i",
" β e β π 1, β s, β (t : Finset Ξ±), Disjoint t s β β b β t, f b β e",
" β s, β (t : Finset Ξ±), Disjoint t s β β b β t, f b β U",
" β (t : Finset Ξ±), Disjoint t (Set.Finite.toFinset β―) β β b β t, f b β U",
" β b β t, f b β U",
" β b β t, f b β βV",
" β c β t, f c β βV... | [] |
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic
import Mathlib.MeasureTheory.Integral.MeanInequalities
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9"
open Filter
open scoped ENNReal Topology
namespace MeasureTheory
variable ... | Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean | 54 | 63 | theorem snorm_add_le {f g : Ξ± β E} (hf : AEStronglyMeasurable f ΞΌ) (hg : AEStronglyMeasurable g ΞΌ)
(hp1 : 1 β€ p) : snorm (f + g) p ΞΌ β€ snorm f p ΞΌ + snorm g p ΞΌ := by |
by_cases hp0 : p = 0
Β· simp [hp0]
by_cases hp_top : p = β
Β· simp [hp_top, snormEssSup_add_le]
have hp1_real : 1 β€ p.toReal := by
rwa [β ENNReal.one_toReal, ENNReal.toReal_le_toReal ENNReal.one_ne_top hp_top]
repeat rw [snorm_eq_snorm' hp0 hp_top]
exact snorm'_add_le hf hg hp1_real
| [
" (β«β» (a : Ξ±), ββ(f + g) aββ ^ q βΞΌ) ^ (1 / q) β€\n (β«β» (a : Ξ±), ((fun a => ββf aββ) + fun a => ββg aββ) a ^ q βΞΌ) ^ (1 / q)",
" ββ(f + g) aββ β€ ((fun a => ββf aββ) + fun a => ββg aββ) a",
" snormEssSup (f + g) ΞΌ β€ snormEssSup f ΞΌ + snormEssSup g ΞΌ",
" (fun x => ββ(f + g) xββ) x β€ ((fun x => ββf xββ) + fun ... | [
" (β«β» (a : Ξ±), ββ(f + g) aββ ^ q βΞΌ) ^ (1 / q) β€\n (β«β» (a : Ξ±), ((fun a => ββf aββ) + fun a => ββg aββ) a ^ q βΞΌ) ^ (1 / q)",
" ββ(f + g) aββ β€ ((fun a => ββf aββ) + fun a => ββg aββ) a",
" snormEssSup (f + g) ΞΌ β€ snormEssSup f ΞΌ + snormEssSup g ΞΌ",
" (fun x => ββ(f + g) xββ) x β€ ((fun x => ββf xββ) + fun ... |
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
#align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
section
variable {Ξ± : Type*} [Group Ξ±] [LinearOrder Ξ±] [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· β€ Β·)]
-- TODO... | Mathlib/Algebra/Order/Group/MinMax.lean | 75 | 76 | theorem max_div_div_left' (a b c : Ξ±) : max (a / b) (a / c) = a / min b c := by |
simp only [div_eq_mul_inv, max_mul_mul_left, max_inv_inv']
| [
" max a 1 / max aβ»ΒΉ 1 = a",
" max aβ»ΒΉ 1 = aβ»ΒΉ * max a 1",
" min (a / c) (b / c) = min a b / c",
" max (a / c) (b / c) = max a b / c",
" min (a / b) (a / c) = a / max b c",
" max (a / b) (a / c) = a / min b c"
] | [
" max a 1 / max aβ»ΒΉ 1 = a",
" max aβ»ΒΉ 1 = aβ»ΒΉ * max a 1",
" min (a / c) (b / c) = min a b / c",
" max (a / c) (b / c) = max a b / c",
" min (a / b) (a / c) = a / max b c"
] |
import Mathlib.LinearAlgebra.CliffordAlgebra.Basic
import Mathlib.Data.ZMod.Basic
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import linear_algebra.clifford_algebra.grading from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0"
namespace CliffordAlgebra
variable {R M : Type*} [Co... | Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean | 35 | 37 | theorem one_le_evenOdd_zero : 1 β€ evenOdd Q 0 := by |
refine le_trans ?_ (le_iSup _ β¨0, Nat.cast_zeroβ©)
exact (pow_zero _).ge
| [
" 1 β€ evenOdd Q 0",
" 1 β€ LinearMap.range (ΞΉ Q) ^ ββ¨0, β―β©"
] | [] |
import Mathlib.Order.Filter.Bases
import Mathlib.Order.Filter.Ultrafilter
open Set
variable {Ξ± Ξ² : Type*} {l : Filter Ξ±}
namespace Filter
protected def Subsingleton (l : Filter Ξ±) : Prop := β s β l, Set.Subsingleton s
theorem HasBasis.subsingleton_iff {ΞΉ : Sort*} {p : ΞΉ β Prop} {s : ΞΉ β Set Ξ±} (h : l.HasBasis p ... | Mathlib/Order/Filter/Subsingleton.lean | 70 | 71 | theorem subsingleton_iff_exists_singleton_mem [Nonempty Ξ±] : l.Subsingleton β β a, {a} β l := by |
simp only [subsingleton_iff_exists_le_pure, le_pure_iff]
| [
" β a, l = pure a",
" l β€ pure a",
" l.Subsingleton β l = β₯ β¨ β a, l = pure a",
" l = β₯ β¨ β a, l = pure a",
" (l = β₯ β¨ β a, l = pure a) β l.Subsingleton",
" β₯.Subsingleton",
" (pure a).Subsingleton",
" l.Subsingleton β β a, l β€ pure a",
" β₯.Subsingleton β β a, β₯ β€ pure a",
" l.Subsingleton β β a, ... | [
" β a, l = pure a",
" l β€ pure a",
" l.Subsingleton β l = β₯ β¨ β a, l = pure a",
" l = β₯ β¨ β a, l = pure a",
" (l = β₯ β¨ β a, l = pure a) β l.Subsingleton",
" β₯.Subsingleton",
" (pure a).Subsingleton",
" l.Subsingleton β β a, l β€ pure a",
" β₯.Subsingleton β β a, β₯ β€ pure a"
] |
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
#align_import analysis.ODE.gronwall from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] {F : Type*} [NormedAddCommGroup F]
[NormedSpace β F]
open Metric Set Asymptotics Fil... | Mathlib/Analysis/ODE/Gronwall.lean | 96 | 101 | theorem gronwallBound_continuous_Ξ΅ (Ξ΄ K x : β) : Continuous fun Ξ΅ => gronwallBound Ξ΄ K Ξ΅ x := by |
by_cases hK : K = 0
Β· simp only [gronwallBound_K0, hK]
exact continuous_const.add (continuous_id.mul continuous_const)
Β· simp only [gronwallBound_of_K_ne_0 hK]
exact continuous_const.add ((continuous_id.mul continuous_const).mul continuous_const)
| [
" HasDerivAt (gronwallBound Ξ΄ K Ξ΅) (K * gronwallBound Ξ΄ K Ξ΅ x + Ξ΅) x",
" HasDerivAt (gronwallBound Ξ΄ 0 Ξ΅) (0 * gronwallBound Ξ΄ 0 Ξ΅ x + Ξ΅) x",
" HasDerivAt (fun x => Ξ΄ + Ξ΅ * x) Ξ΅ x",
" Ξ΅ = Ξ΅ * 1",
" HasDerivAt (fun x => Ξ΄ * rexp (K * x) + Ξ΅ / K * (rexp (K * x) - 1))\n (K * (Ξ΄ * rexp (K * x) + Ξ΅ / K * (rex... | [
" HasDerivAt (gronwallBound Ξ΄ K Ξ΅) (K * gronwallBound Ξ΄ K Ξ΅ x + Ξ΅) x",
" HasDerivAt (gronwallBound Ξ΄ 0 Ξ΅) (0 * gronwallBound Ξ΄ 0 Ξ΅ x + Ξ΅) x",
" HasDerivAt (fun x => Ξ΄ + Ξ΅ * x) Ξ΅ x",
" Ξ΅ = Ξ΅ * 1",
" HasDerivAt (fun x => Ξ΄ * rexp (K * x) + Ξ΅ / K * (rexp (K * x) - 1))\n (K * (Ξ΄ * rexp (K * x) + Ξ΅ / K * (rex... |
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
variable {Ξ± Ξ² : Type*}
section Fold
variable (op : Ξ± β Ξ± β Ξ±) [hc : Std.Commutative op] [ha : Std.Associative op]
local notation a " * " b => ... | Mathlib/Data/Multiset/Fold.lean | 63 | 64 | theorem fold_cons_right (b a : Ξ±) (s : Multiset Ξ±) : (a ::β s).fold op b = s.fold op b * a := by |
simp [hc.comm]
| [
" List.foldl (fun x y => op y x) b l = List.foldl op b l",
" fold op b (a ::β s) = op (fold op b s) a"
] | [
" List.foldl (fun x y => op y x) b l = List.foldl op b l"
] |
import Mathlib.MeasureTheory.Measure.VectorMeasure
import Mathlib.MeasureTheory.Function.AEEqOfIntegral
#align_import measure_theory.measure.with_density_vector_measure from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
noncomputable section
open scoped Classical MeasureTheory NNReal ... | Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean | 112 | 122 | theorem withDensityα΅₯_smul {π : Type*} [NontriviallyNormedField π] [NormedSpace π E]
[SMulCommClass β π E] (f : Ξ± β E) (r : π) : ΞΌ.withDensityα΅₯ (r β’ f) = r β’ ΞΌ.withDensityα΅₯ f := by |
by_cases hf : Integrable f ΞΌ
Β· ext1 i hi
rw [withDensityα΅₯_apply (hf.smul r) hi, VectorMeasure.smul_apply, withDensityα΅₯_apply hf hi, β
integral_smul r f]
rfl
Β· by_cases hr : r = 0
Β· rw [hr, zero_smul, zero_smul, withDensityα΅₯_zero]
Β· rw [withDensityα΅₯, withDensityα΅₯, dif_neg hf, dif_neg, smul_z... | [
" (fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) β
= 0",
" HasSum (fun i => (fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) (s i))\n ((fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) (β i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then β« (x : Ξ±) in s... | [
" (fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) β
= 0",
" HasSum (fun i => (fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) (s i))\n ((fun s => if MeasurableSet s then β« (x : Ξ±) in s, f x βΞΌ else 0) (β i, s i))",
" HasSum (fun i => if MeasurableSet (s i) then β« (x : Ξ±) in s... |
import Mathlib.Data.Set.Finite
import Mathlib.GroupTheory.GroupAction.FixedPoints
import Mathlib.GroupTheory.Perm.Support
open Equiv List MulAction Pointwise Set Subgroup
variable {G Ξ± : Type*} [Group G] [MulAction G Ξ±] [DecidableEq Ξ±]
theorem finite_compl_fixedBy_closure_iff {S : Set G} :
(β g β closure S, ... | Mathlib/GroupTheory/Perm/ClosureSwap.lean | 47 | 55 | theorem SubmonoidClass.swap_mem_trans {a b c : Ξ±} {C} [SetLike C (Perm Ξ±)]
[SubmonoidClass C (Perm Ξ±)] (M : C) (hab : swap a b β M) (hbc : swap b c β M) :
swap a c β M := by |
obtain rfl | hab' := eq_or_ne a b
Β· exact hbc
obtain rfl | hac := eq_or_ne a c
Β· exact swap_self a βΈ one_mem M
rw [swap_comm, β swap_mul_swap_mul_swap hab' hac]
exact mul_mem (mul_mem hbc hab) hbc
| [
" (fixedBy Ξ± g)αΆ.Finite",
" (fixedBy Ξ± 1)αΆ.Finite",
" β (x : G), (fixedBy Ξ± x)αΆ.Finite β (fixedBy Ξ± xβ»ΒΉ)αΆ.Finite",
" (fixedBy Ξ± (g * g'))αΆ β (fixedBy Ξ± g)αΆ βͺ (fixedBy Ξ± g')αΆ",
" {x, y}.Finite",
" z β fixedBy Ξ± (swap x y)",
" z β x",
" z β y",
" False",
" (fixedBy Ξ± Ο)αΆ.Finite",
" (fixedBy Ξ± (swa... | [
" (fixedBy Ξ± g)αΆ.Finite",
" (fixedBy Ξ± 1)αΆ.Finite",
" β (x : G), (fixedBy Ξ± x)αΆ.Finite β (fixedBy Ξ± xβ»ΒΉ)αΆ.Finite",
" (fixedBy Ξ± (g * g'))αΆ β (fixedBy Ξ± g)αΆ βͺ (fixedBy Ξ± g')αΆ",
" {x, y}.Finite",
" z β fixedBy Ξ± (swap x y)",
" z β x",
" z β y",
" False",
" (fixedBy Ξ± Ο)αΆ.Finite",
" (fixedBy Ξ± (swa... |
namespace Nat
@[reducible] def Coprime (m n : Nat) : Prop := gcd m n = 1
instance (m n : Nat) : Decidable (Coprime m n) := inferInstanceAs (Decidable (_ = 1))
theorem coprime_iff_gcd_eq_one : Coprime m n β gcd m n = 1 := .rfl
theorem Coprime.gcd_eq_one : Coprime m n β gcd m n = 1 := id
theorem Coprime.symm ... | .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean | 46 | 47 | theorem Coprime.gcd_mul_right_cancel (m : Nat) (H : Coprime k n) : gcd (m * k) n = gcd m n := by |
rw [Nat.mul_comm m k, H.gcd_mul_left_cancel m]
| [
" k β£ m",
" k β£ n * m",
" ((k * m).gcd n).Coprime k",
" (m * k).gcd n = m.gcd n"
] | [
" k β£ m",
" k β£ n * m",
" ((k * m).gcd n).Coprime k"
] |
import Mathlib.Algebra.Homology.ComplexShape
import Mathlib.CategoryTheory.Subobject.Limits
import Mathlib.CategoryTheory.GradedObject
import Mathlib.Algebra.Homology.ShortComplex.Basic
#align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347"
... | Mathlib/Algebra/Homology/HomologicalComplex.lean | 722 | 724 | theorem of_d_ne {i j : Ξ±} (h : i β j + 1) : (of X d sq).d i j = 0 := by |
dsimp [of]
rw [dif_neg h]
| [
" X i = X (j + 1)",
" (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) i j = 0",
" (if h : i = j + 1 then eqToHom β― β« d j else 0) = 0",
" (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) i j β«\n (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) j k =\n 0",
" (fun i j => if ... | [
" X i = X (j + 1)",
" (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) i j = 0",
" (if h : i = j + 1 then eqToHom β― β« d j else 0) = 0",
" (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) i j β«\n (fun i j => if h : i = j + 1 then eqToHom β― β« d j else 0) j k =\n 0",
" (fun i j => if ... |
import Mathlib.Data.List.Basic
namespace List
variable {Ξ± Ξ² : Type*}
@[simp]
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) :
reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
#align list.reduce_option_cons_of_some... | Mathlib/Data/List/ReduceOption.lean | 49 | 53 | theorem reduceOption_length_eq {l : List (Option Ξ±)} :
l.reduceOption.length = (l.filter Option.isSome).length := by |
induction' l with hd tl hl
Β· simp_rw [reduceOption_nil, filter_nil, length]
Β· cases hd <;> simp [hl]
| [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... | [
" (some x :: l).reduceOption = x :: l.reduceOption",
" (none :: l).reduceOption = l.reduceOption",
" (map (Option.map f) l).reduceOption = map f l.reduceOption",
" (map (Option.map f) []).reduceOption = map f [].reduceOption",
" (map (Option.map f) (hd :: tl)).reduceOption = map f (hd :: tl).reduceOption",
... |
import Mathlib.MeasureTheory.Measure.MeasureSpace
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function
variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³]
variable {ΞΌ ΞΌβ ΞΌβ ΞΌβ Ξ½ Ξ½' Ξ½... | Mathlib/MeasureTheory/Measure/Restrict.lean | 104 | 107 | theorem restrict_apply' (hs : MeasurableSet s) : ΞΌ.restrict s t = ΞΌ (t β© s) := by |
rw [β toOuterMeasure_apply,
Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs,
OuterMeasure.restrict_apply s t _, toOuterMeasure_apply]
| [
" ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t β© s') + ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t \\ s')",
" ΞΌ (s β© t) = ΞΌ (s β© t β© s') + ΞΌ ((s β© t) \\ s')",
" (ΞΌ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) ΞΌ.toOuterMeasure",
" (ΞΌ.restri... | [
" ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) t =\n ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t β© s') + ((OuterMeasure.restrict s) ΞΌ.toOuterMeasure) (t \\ s')",
" ΞΌ (s β© t) = ΞΌ (s β© t β© s') + ΞΌ ((s β© t) \\ s')",
" (ΞΌ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) ΞΌ.toOuterMeasure",
" (ΞΌ.restri... |
import Mathlib.MeasureTheory.Measure.Typeclasses
#align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480"
open Set
namespace MeasureTheory
namespace Measure
noncomputable instance instSub {Ξ± : Type*} [MeasurableSpace Ξ±] : Sub (Measure Ξ±) :=
β¨fun ... | Mathlib/MeasureTheory/Measure/Sub.lean | 100 | 102 | theorem sub_add_cancel_of_le [IsFiniteMeasure Ξ½] (hβ : Ξ½ β€ ΞΌ) : ΞΌ - Ξ½ + Ξ½ = ΞΌ := by |
ext1 s h_s_meas
rw [add_apply, sub_apply h_s_meas hβ, tsub_add_cancel_of_le (hβ s)]
| [
" ΞΌ β€ 0 + Ξ½",
" (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s",
" (fun t x => ΞΌ t - Ξ½ t) β
β― = 0",
" (fun t x => ΞΌ t - Ξ½ t) (β i, g i) β― = β' (i : β), (fun t x => ΞΌ t - Ξ½ t) (g i) β―",
" β' (i : β), ΞΌ (g i) - β' (i : β), Ξ½ (g i) = β' (i : β), (ΞΌ (g i) - Ξ½ (g i))",
" β' (i : β), Ξ½ (g i) β β€",
" Ξ½ (β i, g i) β β€",
" Ξ½ + measure... | [
" ΞΌ β€ 0 + Ξ½",
" (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s",
" (fun t x => ΞΌ t - Ξ½ t) β
β― = 0",
" (fun t x => ΞΌ t - Ξ½ t) (β i, g i) β― = β' (i : β), (fun t x => ΞΌ t - Ξ½ t) (g i) β―",
" β' (i : β), ΞΌ (g i) - β' (i : β), Ξ½ (g i) = β' (i : β), (ΞΌ (g i) - Ξ½ (g i))",
" β' (i : β), Ξ½ (g i) β β€",
" Ξ½ (β i, g i) β β€",
" Ξ½ + measure... |
import Mathlib.MeasureTheory.Constructions.Pi
import Mathlib.MeasureTheory.Integral.Lebesgue
open scoped Classical ENNReal
open Set Function Equiv Finset
noncomputable section
namespace MeasureTheory
section LMarginal
variable {Ξ΄ Ξ΄' : Type*} {Ο : Ξ΄ β Type*} [β x, MeasurableSpace (Ο x)]
variable {ΞΌ : β i, Measu... | Mathlib/MeasureTheory/Integral/Marginal.lean | 144 | 153 | theorem lmarginal_singleton (f : (β i, Ο i) β ββ₯0β) (i : Ξ΄) :
β«β―β«β»_{i}, f βΞΌ = fun x => β«β» xα΅’, f (Function.update x i xα΅’) βΞΌ i := by |
let Ξ± : Type _ := ({i} : Finset Ξ΄)
let e := (MeasurableEquiv.piUnique fun j : Ξ± β¦ Ο j).symm
ext1 x
calc (β«β―β«β»_{i}, f βΞΌ) x
= β«β» (y : Ο (default : Ξ±)), f (updateFinset x {i} (e y)) βΞΌ (default : Ξ±) := by
simp_rw [lmarginal, measurePreserving_piUnique (fun j : ({i} : Finset Ξ΄) β¦ ΞΌ j) |>.symm _
... | [
" Measurable (β«β―β«β»_s, f βΞΌ)",
" Measurable (uncurry fun x y => f (updateFinset x s y))",
" Measurable fun a => updateFinset a.1 s a.2",
" β (a : Ξ΄), Measurable fun x => updateFinset x.1 s x.2 a",
" Measurable fun x => updateFinset x.1 s x.2 i",
" Measurable fun x => x.2 β¨i, β―β©",
" Measurable fun x => x.... | [
" Measurable (β«β―β«β»_s, f βΞΌ)",
" Measurable (uncurry fun x y => f (updateFinset x s y))",
" Measurable fun a => updateFinset a.1 s a.2",
" β (a : Ξ΄), Measurable fun x => updateFinset x.1 s x.2 a",
" Measurable fun x => updateFinset x.1 s x.2 i",
" Measurable fun x => x.2 β¨i, β―β©",
" Measurable fun x => x.... |
import Mathlib.Algebra.Polynomial.Div
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Ideal.QuotientOperations
#align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87"
set_option linter.uppercaseLean3 false
open Polynomial
... | Mathlib/RingTheory/Polynomial/Quotient.lean | 87 | 91 | theorem quotient_map_C_eq_zero {I : Ideal R} :
β a β I, ((Quotient.mk (map (C : R β+* R[X]) I : Ideal R[X])).comp C) a = 0 := by |
intro a ha
rw [RingHom.comp_apply, Quotient.eq_zero_iff_mem]
exact mem_map_of_mem _ ha
| [
" β a β I, ((Quotient.mk (map C I)).comp C) a = 0",
" ((Quotient.mk (map C I)).comp C) a = 0",
" C a β map C I"
] | [] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Polynomial.IntegralNormalization
#align_import ring_theory.algebraic from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
universe u v w
open scoped Classical
open Polynomi... | Mathlib/RingTheory/Algebraic.lean | 113 | 115 | theorem isAlgebraic_one [Nontrivial R] : IsAlgebraic R (1 : A) := by |
rw [β _root_.map_one (algebraMap R A)]
exact isAlgebraic_algebraMap 1
| [
" S.IsAlgebraic β Algebra.IsAlgebraic R β₯S",
" (β x β S, _root_.IsAlgebraic R x) β Algebra.IsAlgebraic R β₯S",
" (β (x : β₯S), _root_.IsAlgebraic R βx) β β (x : β₯S), _root_.IsAlgebraic R x",
" (aeval βx) p = 0 β (aeval x) p = 0",
"R : Type u\nA : Type v\ninstβΒ² : CommRing R\ninstβΒΉ : Ring A\ninstβ : Algebra R... | [
" S.IsAlgebraic β Algebra.IsAlgebraic R β₯S",
" (β x β S, _root_.IsAlgebraic R x) β Algebra.IsAlgebraic R β₯S",
" (β (x : β₯S), _root_.IsAlgebraic R βx) β β (x : β₯S), _root_.IsAlgebraic R x",
" (aeval βx) p = 0 β (aeval x) p = 0",
"R : Type u\nA : Type v\ninstβΒ² : CommRing R\ninstβΒΉ : Ring A\ninstβ : Algebra R... |
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.LinearAlgebra.Basic
import Mathlib.LinearAlgebra.GeneralLinearGroup
#align_import linear_algebra.affine_space.affine_equiv from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901fe9326d83"
open Function Set
open Affine
-- Porting not... | Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean | 80 | 86 | theorem toAffineMap_injective : Injective (toAffineMap : (Pβ βα΅[k] Pβ) β Pβ βα΅[k] Pβ) := by |
rintro β¨e, el, hβ© β¨e', el', h'β© H
-- Porting note: added `AffineMap.mk.injEq`
simp only [toAffineMap_mk, AffineMap.mk.injEq, Equiv.coe_inj,
LinearEquiv.toLinearMap_inj] at H
congr
exacts [H.1, H.2]
| [
" Injective toAffineMap",
" { toEquiv := e, linear := el, map_vadd' := h } = { toEquiv := e', linear := el', map_vadd' := h' }",
" el = el'"
] | [] |
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.SpecialFunctions.NonIntegrable
import Mathlib.Analysis.Analytic.Basic
#align_import measure_theory.integral.circle_integral from "leanprover-communit... | Mathlib/MeasureTheory/Integral/CircleIntegral.lean | 153 | 154 | theorem image_circleMap_Ioc (c : β) (R : β) : circleMap c R '' Ioc 0 (2 * Ο) = sphere c |R| := by |
rw [β range_circleMap, β (periodic_circleMap c R).image_Ioc Real.two_pi_pos 0, zero_add]
| [
" circleMap c R (ΞΈ + 2 * Ο) = circleMap c R ΞΈ",
" circleMap c R ΞΈ - c = circleMap 0 R ΞΈ",
" Complex.abs (circleMap 0 R ΞΈ) = |R|",
" circleMap c R ΞΈ β sphere c |R|",
" circleMap c R ΞΈ β sphere c R",
" circleMap c R ΞΈ β ball c R",
" range (circleMap c R) = c +α΅₯ R β’ range fun ΞΈ => cexp (βΞΈ * I)",
" (c +α΅₯... | [
" circleMap c R (ΞΈ + 2 * Ο) = circleMap c R ΞΈ",
" circleMap c R ΞΈ - c = circleMap 0 R ΞΈ",
" Complex.abs (circleMap 0 R ΞΈ) = |R|",
" circleMap c R ΞΈ β sphere c |R|",
" circleMap c R ΞΈ β sphere c R",
" circleMap c R ΞΈ β ball c R",
" range (circleMap c R) = c +α΅₯ R β’ range fun ΞΈ => cexp (βΞΈ * I)",
" (c +α΅₯... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Sum
#align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open scoped Classical
universe u v
namespace ... | Mathlib/Combinatorics/HalesJewett.lean | 179 | 180 | theorem apply_of_ne_none {Ξ± ΞΉ} (l : Line Ξ± ΞΉ) (x : Ξ±) (i : ΞΉ) (h : l.idxFun i β none) :
some (l x i) = l.idxFun i := by | rw [l.apply, Option.getD_of_ne_none h]
| [
" Inhabited (ColorFocused C)",
" h β 0 β (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) β―.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i"
] | [
" Inhabited (ColorFocused C)",
" h β 0 β (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) β―.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x"
] |
import Mathlib.Data.Finset.Grade
import Mathlib.Order.Interval.Finset.Basic
#align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
variable {Ξ± Ξ² : Type*}
namespace Finset
section Decidable
variable [DecidableEq Ξ±] (s t : Finset Ξ±)
instance instLocally... | Mathlib/Data/Finset/Interval.lean | 110 | 111 | theorem card_Ico_finset (h : s β t) : (Ico s t).card = 2 ^ (t.card - s.card) - 1 := by |
rw [card_Ico_eq_card_Icc_sub_one, card_Icc_finset h]
| [
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s β€ u β§ u β€ t",
" u β t β§ s β u β s β€ u β§ u β€ t",
" u β (fun s t => filter (fun x => s β x) t.ssubsets) s t β s β€ u β§ u < t",
" u β t β§ s β u β s β€ u β§ u < t",
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s < u β§ u β€ t",
" u β t β§ ... | [
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s β€ u β§ u β€ t",
" u β t β§ s β u β s β€ u β§ u β€ t",
" u β (fun s t => filter (fun x => s β x) t.ssubsets) s t β s β€ u β§ u < t",
" u β t β§ s β u β s β€ u β§ u < t",
" u β (fun s t => filter (fun x => s β x) t.powerset) s t β s < u β§ u β€ t",
" u β t β§ ... |
import Mathlib.Algebra.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 | 114 | 117 | theorem fib_lt_fib_succ {n : β} (hn : 2 β€ n) : fib n < fib (n + 1) := by |
rcases exists_add_of_le hn with β¨n, rflβ©
rw [β tsub_pos_iff_lt, add_comm 2, add_right_comm, fib_add_two, add_tsub_cancel_right, fib_pos]
exact succ_pos n
| [
" (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"
] | [
" (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"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 70 | 72 | theorem eraseLead_add_C_mul_X_pow (f : R[X]) :
f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f := by |
rw [C_mul_X_pow_eq_monomial, eraseLead_add_monomial_natDegree_leadingCoeff]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f"
] | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0"
] |
import Mathlib.CategoryTheory.Adjunction.Opposites
import Mathlib.CategoryTheory.Comma.Presheaf
import Mathlib.CategoryTheory.Elements
import Mathlib.CategoryTheory.Limits.ConeCategory
import Mathlib.CategoryTheory.Limits.Final
import Mathlib.CategoryTheory.Limits.KanExtension
import Mathlib.CategoryTheory.Limits.Over... | Mathlib/CategoryTheory/Limits/Presheaf.lean | 121 | 126 | theorem restrictYonedaHomEquiv_natural (P : Cα΅α΅ β₯€ Type uβ) (Eβ Eβ : β°) (g : Eβ βΆ Eβ) {c : Cocone _}
(t : IsColimit c) (k : c.pt βΆ Eβ) :
restrictYonedaHomEquiv A P Eβ t (k β« g) =
restrictYonedaHomEquiv A P Eβ t k β« (restrictedYoneda A).map g := by |
ext x X
apply (assoc _ _ _).symm
| [
" (((restrictedYoneda yoneda).obj P).map f β« ((fun X => yonedaEquiv.toIso) Y).hom) x =\n (((fun X => yonedaEquiv.toIso) X).hom β« ((π (Cα΅α΅ β₯€ Type uβ)).obj P).map f) x",
" x.app Y (π Y.unop β« f.unop) = P.map f (x.app X (π X.unop))",
" x.app Y (π Y.unop β« f.unop) = x.app Y ((yoneda.op.obj X).unop.map f (π ... | [
" (((restrictedYoneda yoneda).obj P).map f β« ((fun X => yonedaEquiv.toIso) Y).hom) x =\n (((fun X => yonedaEquiv.toIso) X).hom β« ((π (Cα΅α΅ β₯€ Type uβ)).obj P).map f) x",
" x.app Y (π Y.unop β« f.unop) = P.map f (x.app X (π X.unop))",
" x.app Y (π Y.unop β« f.unop) = x.app Y ((yoneda.op.obj X).unop.map f (π ... |
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
#align_import linear_algebra.quadratic_form.prod from "leanprover-community/mathlib"@"9b2755b951bc323c962bd072cd447b375cf58101"
universe u v w
variable {ΞΉ : Type*} {R : Type*} {Mβ Mβ Nβ Nβ : Type*} {Mα΅’ Nα΅’ : ΞΉ β Type*}
namespace QuadraticForm
section Pro... | Mathlib/LinearAlgebra/QuadraticForm/Prod.lean | 257 | 261 | theorem pi_apply_single [Fintype ΞΉ] [DecidableEq ΞΉ]
(Q : β i, QuadraticForm R (Mα΅’ i)) (i : ΞΉ) (m : Mα΅’ i) :
pi Q (Pi.single i m) = Q i m := by |
rw [pi_apply, Fintype.sum_eq_single i fun j hj => ?_, Pi.single_eq_same]
rw [Pi.single_eq_of_ne hj, map_zero]
| [
" (pi Q) (Pi.single i m) = (Q i) m",
" (Q j) (Pi.single i m j) = 0"
] | [] |
import Mathlib.Analysis.BoxIntegral.Partition.Basic
#align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
noncomputable section
open scoped Classical
open Filter
open Function Set Filter
namespace BoxIntegral
variable {ΞΉ M : Type*} {... | Mathlib/Analysis/BoxIntegral/Partition/Split.lean | 139 | 144 | theorem disjoint_splitLower_splitUpper (I : Box ΞΉ) (i : ΞΉ) (x : β) :
Disjoint (I.splitLower i x) (I.splitUpper i x) := by |
rw [β disjoint_withBotCoe, coe_splitLower, coe_splitUpper]
refine (Disjoint.inf_left' _ ?_).inf_right' _
rw [Set.disjoint_left]
exact fun y (hle : y i β€ x) hlt => not_lt_of_le hle hlt
| [
" β(I.splitLower i x) = βI β© {y | y i β€ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = βI β© {y | y i β€ x}",
" (y β univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) β y β βI β© {y | y i β€ x}",
" ((β (x : ΞΉ), I.lower x < y x) β§ y i β€ x β§... | [
" β(I.splitLower i x) = βI β© {y | y i β€ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = βI β© {y | y i β€ x}",
" (y β univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) β y β βI β© {y | y i β€ x}",
" ((β (x : ΞΉ), I.lower x < y x) β§ y i β€ x β§... |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {Ξ± : Type v} {Ξ² : Type w}
namespace Matrix
def col (w : m β Ξ±) : Matrix m Unit Ξ± :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 129 | 132 | theorem col_mulVec [Fintype n] [NonUnitalNonAssocSemiring Ξ±] (M : Matrix m n Ξ±) (v : n β Ξ±) :
Matrix.col (M *α΅₯ v) = M * Matrix.col v := by |
ext
rfl
| [
" col (v + w) = col v + col w",
" col (v + w) iβ jβ = (col v + col w) iβ jβ",
" col (x β’ v) = x β’ col v",
" col (x β’ v) iβ jβ = (x β’ col v) iβ jβ",
" row (v + w) = row v + row w",
" row (v + w) iβ jβ = (row v + row w) iβ jβ",
" row (x β’ v) = x β’ row v",
" row (x β’ v) iβ jβ = (x β’ row v) iβ jβ",
" (c... | [
" col (v + w) = col v + col w",
" col (v + w) iβ jβ = (col v + col w) iβ jβ",
" col (x β’ v) = x β’ col v",
" col (x β’ v) iβ jβ = (x β’ col v) iβ jβ",
" row (v + w) = row v + row w",
" row (v + w) iβ jβ = (row v + row w) iβ jβ",
" row (x β’ v) = x β’ row v",
" row (x β’ v) iβ jβ = (x β’ row v) iβ jβ",
" (c... |
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.RingTheory.SimpleModule
#align_import representation_theory.maschke from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w
noncomputable section
open Module MonoidAlgeb... | Mathlib/RepresentationTheory/Maschke.lean | 129 | 133 | theorem equivariantProjection_condition (v : V) : (Ο.equivariantProjection G) (i v) = v := by |
rw [equivariantProjection_apply]
simp only [conjugate_i Ο i h]
rw [Finset.sum_const, Finset.card_univ, nsmul_eq_smul_cast k, smul_smul,
Invertible.invOf_mul_self, one_smul]
| [
" (Ο.conjugate g) (i v) = v",
" (sumOfConjugates G Ο) (MonoidAlgebra.single g 1 β’ v) = MonoidAlgebra.single g 1 β’ (sumOfConjugates G Ο) v",
" β x : G, MonoidAlgebra.single xβ»ΒΉ 1 β’ Ο (MonoidAlgebra.single x 1 β’ MonoidAlgebra.single g 1 β’ v) =\n β x : G, MonoidAlgebra.single g 1 β’ MonoidAlgebra.single xβ»ΒΉ 1 β’ ... | [
" (Ο.conjugate g) (i v) = v",
" (sumOfConjugates G Ο) (MonoidAlgebra.single g 1 β’ v) = MonoidAlgebra.single g 1 β’ (sumOfConjugates G Ο) v",
" β x : G, MonoidAlgebra.single xβ»ΒΉ 1 β’ Ο (MonoidAlgebra.single x 1 β’ MonoidAlgebra.single g 1 β’ v) =\n β x : G, MonoidAlgebra.single g 1 β’ MonoidAlgebra.single xβ»ΒΉ 1 β’ ... |
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Set.Card
import Mathlib.GroupTheory.Subgroup.Center
open MulAction ConjClasses
variable (G : Type*) [Group G]
| Mathlib/GroupTheory/ClassEquation.lean | 31 | 35 | theorem sum_conjClasses_card_eq_card [Fintype <| ConjClasses G] [Fintype G]
[β x : ConjClasses G, Fintype x.carrier] :
β x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G := by |
suffices (Ξ£ x : ConjClasses G, x.carrier) β G by simpa using (Fintype.card_congr this)
simpa [carrier_eq_preimage_mk] using Equiv.sigmaFiberEquiv ConjClasses.mk
| [
" β x : ConjClasses G, x.carrier.toFinset.card = Fintype.card G",
" (x : ConjClasses G) Γ βx.carrier β G"
] | [] |
import Mathlib.Algebra.Group.Defs
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f"
universe u v w x
variable {Ξ± : ... | Mathlib/Algebra/Ring/Defs.lean | 160 | 161 | theorem mul_add_one [LeftDistribClass Ξ±] (a b : Ξ±) : a * (b + 1) = a * b + a := by |
rw [mul_add, mul_one]
| [
" (a + b + c) * d = a * d + b * d + c * d",
" (a + 1) * b = a * b + b",
" a * (b + 1) = a * b + a"
] | [
" (a + b + c) * d = a * d + b * d + c * d",
" (a + 1) * b = a * b + b"
] |
import Mathlib.FieldTheory.Finite.Polynomial
import Mathlib.NumberTheory.Basic
import Mathlib.RingTheory.WittVector.WittPolynomial
#align_import ring_theory.witt_vector.structure_polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open MvPolynomial Set
open Finset (range)
o... | Mathlib/RingTheory/WittVector/StructurePolynomial.lean | 164 | 175 | theorem wittStructureRat_rec_aux (Ξ¦ : MvPolynomial idx β) (n : β) :
wittStructureRat p Ξ¦ n * C ((p : β) ^ n) =
bindβ (fun b => rename (fun i => (b, i)) (W_ β n)) Ξ¦ -
β i β range n, C ((p : β) ^ i) * wittStructureRat p Ξ¦ i ^ p ^ (n - i) := by |
have := xInTermsOfW_aux p β n
replace := congr_arg (bindβ fun k : β => bindβ (fun i => rename (Prod.mk i) (W_ β k)) Ξ¦) this
rw [AlgHom.map_mul, bindβ_C_right] at this
rw [wittStructureRat, this]; clear this
conv_lhs => simp only [AlgHom.map_sub, bindβ_X_right]
rw [sub_right_inj]
simp only [AlgHom.map_sum... | [
" (bindβ (wittStructureRat p Ξ¦)) (W_ β n) =\n (bindβ fun k => (bindβ fun i => (rename (Prod.mk i)) (W_ β k)) Ξ¦) ((bindβ (xInTermsOfW p β)) (W_ β n))",
" (bindβ (wittStructureRat p Ξ¦)) (W_ β n) =\n (bindβ fun i => (bindβ fun k => (bindβ fun i => (rename (Prod.mk i)) (W_ β k)) Ξ¦) (xInTermsOfW p β i)) (W_ β n)... | [
" (bindβ (wittStructureRat p Ξ¦)) (W_ β n) =\n (bindβ fun k => (bindβ fun i => (rename (Prod.mk i)) (W_ β k)) Ξ¦) ((bindβ (xInTermsOfW p β)) (W_ β n))",
" (bindβ (wittStructureRat p Ξ¦)) (W_ β n) =\n (bindβ fun i => (bindβ fun k => (bindβ fun i => (rename (Prod.mk i)) (W_ β k)) Ξ¦) (xInTermsOfW p β i)) (W_ β n)... |
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.LinearAlgebra.SesquilinearForm
import Mathlib.Topology.Algebra.Module.WeakDual
#align_import analysis.locally_convex.polar from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
variable {π E F : Type*}
open Topology
namespace Li... | Mathlib/Analysis/LocallyConvex/Polar.lean | 73 | 75 | theorem polar_eq_iInter {s : Set E} : B.polar s = β x β s, { y : F | βB x yβ β€ 1 } := by |
ext
simp only [polar_mem_iff, Set.mem_iInter, Set.mem_setOf_eq]
| [
" β(B xβΒΉ) 0β β€ 1",
" B.polar s = β x β s, {y | β(B x) yβ β€ 1}",
" xβ β B.polar s β xβ β β x β s, {y | β(B x) yβ β€ 1}"
] | [
" β(B xβΒΉ) 0β β€ 1"
] |
import Mathlib.LinearAlgebra.Contraction
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
#align_import linear_algebra.trace from "leanprover-community/mathlib"@"4cf7ca0e69e048b006674cf4499e5c7d296a89e0"
noncomputable section
universe u v w
namespace LinearMap
open Matrix
open FiniteDimensional
open Tensor... | Mathlib/LinearAlgebra/Trace.lean | 155 | 157 | theorem trace_eq_contract_of_basis' [Fintype ΞΉ] [DecidableEq ΞΉ] (b : Basis ΞΉ R M) :
LinearMap.trace R M = contractLeft R M ββ (dualTensorHomEquivOfBasis b).symm.toLinearMap := by |
simp [LinearEquiv.eq_comp_toLinearMap_symm, trace_eq_contract_of_basis b]
| [
" ((toMatrix b b) f).trace = ((toMatrix b b) ((id ββ f) ββ id)).trace",
" ((toMatrix b b) ((id ββ f) ββ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace",
" ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)... | [
" ((toMatrix b b) f).trace = ((toMatrix b b) ((id ββ f) ββ id)).trace",
" ((toMatrix b b) ((id ββ f) ββ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace",
" ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =\n ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b)... |
import Batteries.Data.HashMap.Basic
import Batteries.Data.Array.Lemmas
import Batteries.Data.Nat.Lemmas
namespace Batteries.HashMap
namespace Imp
attribute [-simp] Bool.not_eq_true
namespace Buckets
@[ext] protected theorem ext : β {bβ bβ : Buckets Ξ± Ξ²}, bβ.1.data = bβ.1.data β bβ = bβ
| β¨β¨_β©, _β©, β¨β¨_β©, _β©, rfl ... | .lake/packages/batteries/Batteries/Data/HashMap/WF.lean | 29 | 33 | theorem update_update (self : Buckets Ξ± Ξ²) (i d d' h h') :
(self.update i d h).update i d' h' = self.update i d' h := by |
simp only [update, Array.uset, Array.data_length]
congr 1
rw [Array.set_set]
| [
" β lβ lβ, self.val.data = lβ ++ self.val[i] :: lβ β§ lβ.length = i.toNat β§ (self.update i d h).val.data = lβ ++ d :: lβ",
" β lβ lβ,\n self.val.data = lβ ++ self.val.data.get β¨i.toNat, hβ© :: lβ β§\n lβ.length = i.toNat β§ (self.update i d h).val.data = lβ ++ d :: lβ",
" (self.update i d h).update i d' h' ... | [
" β lβ lβ, self.val.data = lβ ++ self.val[i] :: lβ β§ lβ.length = i.toNat β§ (self.update i d h).val.data = lβ ++ d :: lβ",
" β lβ lβ,\n self.val.data = lβ ++ self.val.data.get β¨i.toNat, hβ© :: lβ β§\n lβ.length = i.toNat β§ (self.update i d h).val.data = lβ ++ d :: lβ"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 92 | 99 | theorem min_firstDiff_le (x y z : β n, E n) (h : x β z) :
min (firstDiff x y) (firstDiff y z) β€ firstDiff x z := by |
by_contra! H
rw [lt_min_iff] at H
refine apply_firstDiff_ne h ?_
calc
x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1
_ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2
| [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x",
" min (firstDiff x y) (firstDiff y z) β€ firstDiff x z",
" False",
" x (firstDiff x z) = z (firstDiff x z)"
] | [
" x (firstDiff x y) β y (firstDiff x y)",
" x (Nat.find β―) β y (Nat.find β―)",
" x n = y n",
" x n = y n β Β¬x n β y n",
" firstDiff x y = firstDiff y x"
] |
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 | 131 | 143 | theorem equiv_directSum_zmod_of_finite [Finite G] :
β (ΞΉ : Type) (_ : Fintype ΞΉ) (p : ΞΉ β β) (_ : β i, Nat.Prime <| p i) (e : ΞΉ β β),
Nonempty <| G β+ β¨ i : ΞΉ, ZMod (p i ^ e i) := by |
cases nonempty_fintype G
obtain β¨n, ΞΉ, fΞΉ, p, hp, e, β¨fβ©β© := equiv_free_prod_directSum_zmod G
cases' n with n
Β· have : Unique (Fin Nat.zero ββ β€) :=
{ uniq := by simp only [Nat.zero_eq, eq_iff_true_of_subsingleton]; trivial }
exact β¨ΞΉ, fΞΉ, p, hp, e, β¨f.trans AddEquiv.uniqueProdβ©β©
Β· haveI := @Fintyp... | [
" (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.Data.ENat.Lattice
import Mathlib.Order.OrderIsoNat
import Mathlib.Tactic.TFAE
#align_import order.height from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
open List hiding le_antisymm
open OrderDual
universe u v
variable {Ξ± Ξ² : Type*}
namespace Set
section LT
varia... | Mathlib/Order/Height.lean | 142 | 144 | theorem chainHeight_eq_zero_iff : s.chainHeight = 0 β s = β
:= by |
rw [β not_iff_not, β Ne, β ENat.one_le_iff_ne_zero, one_le_chainHeight_iff,
nonempty_iff_ne_empty]
| [
" a :: l β s.subchain β a β s β§ l β s.subchain β§ β b β l.head?, a < b",
" [a] β s.subchain β a β s",
" β l β s.subchain, l.length = n",
" n β€ l.length",
" [βn β€ s.chainHeight, β l β s.subchain, l.length = n, β l β s.subchain, n β€ l.length].TFAE",
" βn β€ s.chainHeight β β l β s.subchain, l.length = n",
"... | [
" a :: l β s.subchain β a β s β§ l β s.subchain β§ β b β l.head?, a < b",
" [a] β s.subchain β a β s",
" β l β s.subchain, l.length = n",
" n β€ l.length",
" [βn β€ s.chainHeight, β l β s.subchain, l.length = n, β l β s.subchain, n β€ l.length].TFAE",
" βn β€ s.chainHeight β β l β s.subchain, l.length = n",
"... |
import Mathlib.LinearAlgebra.Isomorphisms
import Mathlib.LinearAlgebra.Projection
import Mathlib.Order.JordanHolder
import Mathlib.Order.CompactlyGenerated.Intervals
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import ring_theory.simple_module from "leanprover-community/mathlib"@"cce7f68a7eaadadf74c82bbac207... | Mathlib/RingTheory/SimpleModule.lean | 129 | 132 | theorem ker_toSpanSingleton_isMaximal {m : M} (hm : m β 0) :
Ideal.IsMaximal (ker (toSpanSingleton R M m)) := by |
rw [Ideal.isMaximal_def, β isSimpleModule_iff_isCoatom]
exact congr (quotKerEquivOfSurjective _ <| toSpanSingleton_surjective R hm)
| [
" β y, 0 β y",
" β₯ = β€",
" x β β₯ β x β β€",
" IsSimpleModule R β₯m β IsAtom m",
" IsSimpleModule R β₯m β IsSimpleOrder β(Set.Iic m)",
" IsSimpleModule R (M β§Έ m) β IsCoatom m",
" IsSimpleModule R (M β§Έ m) β IsSimpleOrder β(Set.Ici m)",
" Submodule R (M β§Έ m) βo β(Set.Ici m)",
" A β B β IsSimpleModule R (β₯... | [
" β y, 0 β y",
" β₯ = β€",
" x β β₯ β x β β€",
" IsSimpleModule R β₯m β IsAtom m",
" IsSimpleModule R β₯m β IsSimpleOrder β(Set.Iic m)",
" IsSimpleModule R (M β§Έ m) β IsCoatom m",
" IsSimpleModule R (M β§Έ m) β IsSimpleOrder β(Set.Ici m)",
" Submodule R (M β§Έ m) βo β(Set.Ici m)",
" A β B β IsSimpleModule R (β₯... |
import Mathlib.LinearAlgebra.Ray
import Mathlib.LinearAlgebra.Determinant
#align_import linear_algebra.orientation from "leanprover-community/mathlib"@"0c1d80f5a86b36c1db32e021e8d19ae7809d5b79"
noncomputable section
section OrderedCommSemiring
variable (R : Type*) [StrictOrderedCommSemiring R]
variable (M : Typ... | Mathlib/LinearAlgebra/Orientation.lean | 100 | 101 | theorem Orientation.reindex_refl : (Orientation.reindex R M <| Equiv.refl ΞΉ) = Equiv.refl _ := by |
rw [Orientation.reindex, AlternatingMap.domDomCongrβ_refl, Module.Ray.map_refl]
| [
" map ΞΉ (LinearEquiv.refl R M) = Equiv.refl (Orientation R M ΞΉ)",
" reindex R M (Equiv.refl ΞΉ) = Equiv.refl (Orientation R M ΞΉ)"
] | [
" map ΞΉ (LinearEquiv.refl R M) = Equiv.refl (Orientation R M ΞΉ)"
] |
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic
#align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open FiniteDimensional Complex
open scoped ... | Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean | 114 | 119 | theorem det_rotation (ΞΈ : Real.Angle) : LinearMap.det (o.rotation ΞΈ).toLinearMap = 1 := by |
haveI : Nontrivial V :=
FiniteDimensional.nontrivial_of_finrank_eq_succ (@Fact.out (finrank β V = 2) _)
obtain β¨x, hxβ© : β x, x β (0 : V) := exists_ne (0 : V)
rw [o.rotation_eq_matrix_toLin ΞΈ hx]
simpa [sq] using ΞΈ.cos_sq_add_sin_sq
| [
" β (x y : V),\n βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) yβ«_β =\n βͺx, yβ«_β",
" βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.r... | [
" β (x y : V),\n βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) yβ«_β =\n βͺx, yβ«_β",
" βͺ(ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β’ LinearMap.id + ΞΈ.sin β’ βo.r... |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Matrix.Basic
#align_import combinatorics.simple_graph.inc_matrix from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Finset Matrix SimpleGraph Sym2
open Matrix
namespace SimpleGraph... | Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean | 79 | 82 | theorem incMatrix_apply_mul_incMatrix_apply : G.incMatrix R a e * G.incMatrix R b e =
(G.incidenceSet a β© G.incidenceSet b).indicator 1 e := by |
classical simp only [incMatrix, Set.indicator_apply, ite_zero_mul_ite_zero, Pi.one_apply, mul_one,
Set.mem_inter_iff]
| [
" incMatrix R G a e = if e β G.incidenceSet a then 1 else 0",
" (if e β G.incidenceSet a then 1 e else 0) = if e β G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a β© G.incidenceSet b).indicator 1 e"
] | [
" incMatrix R G a e = if e β G.incidenceSet a then 1 else 0",
" (if e β G.incidenceSet a then 1 e else 0) = if e β G.incidenceSet a then 1 else 0"
] |
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
import Mathlib.CategoryTheory.Limits.ConcreteCategory
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer
import Mathlib.CategoryT... | Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean | 336 | 343 | theorem widePushout_exists_rep' {B : C} {Ξ± : Type _} [Nonempty Ξ±] {X : Ξ± β C}
(f : β j : Ξ±, B βΆ X j) [HasWidePushout.{v} B X f] [PreservesColimit (wideSpan B X f) (forget C)]
(x : β(widePushout B X f)) : β (i : Ξ±) (y : X i), ΞΉ f i y = x := by |
rcases Concrete.widePushout_exists_rep f x with (β¨y, rflβ© | β¨i, y, rflβ©)
Β· inhabit Ξ±
use default, f _ y
simp only [β arrow_ΞΉ _ default, comp_apply]
Β· use i, y
| [
" (β y, (head f) y = x) β¨ β i y, (ΞΉ f i) y = x",
" (β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y) β¨\n β i y_1, (ΞΉ f i) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" (head f) y = (colimit.ΞΉ (wideSpan B X f) none) y",
" (β y_1, (hea... | [
" (β y, (head f) y = x) β¨ β i y, (ΞΉ f i) y = x",
" (β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y) β¨\n β i y_1, (ΞΉ f i) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" β y_1, (head f) y_1 = (colimit.ΞΉ (wideSpan B X f) none) y",
" (head f) y = (colimit.ΞΉ (wideSpan B X f) none) y",
" (β y_1, (hea... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ΞΉ : Type*}
namespace Finset
section SigmaLift
variable {Ξ± Ξ² Ξ³ : ΞΉ β Type*} [DecidableEq ΞΉ]
def sigm... | Mathlib/Data/Finset/Sigma.lean | 156 | 173 | theorem mem_sigmaLift (f : β β¦iβ¦, Ξ± i β Ξ² i β Finset (Ξ³ i)) (a : Sigma Ξ±) (b : Sigma Ξ²)
(x : Sigma Ξ³) :
x β sigmaLift f a b β β (ha : a.1 = x.1) (hb : b.1 = x.1), x.2 β f (ha βΈ a.2) (hb βΈ b.2) := by |
obtain β¨β¨i, aβ©, j, bβ© := a, b
obtain rfl | h := Decidable.eq_or_ne i j
Β· constructor
Β· simp_rw [sigmaLift]
simp only [dite_eq_ite, ite_true, mem_map, Embedding.sigmaMk_apply, forall_exists_index,
and_imp]
rintro x hx rfl
exact β¨rfl, rfl, hxβ©
Β· rintro β¨β¨β©, β¨β©, hxβ©
rw [sigma... | [
" x β sigmaLift f a b β β (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd β f (ha βΈ a.snd) (hb βΈ b.snd)",
" x β sigmaLift f β¨i, aβ© β¨j, bβ© β\n β (ha : β¨i, aβ©.fst = x.fst) (hb : β¨j, bβ©.fst = x.fst), x.snd β f (ha βΈ β¨i, aβ©.snd) (hb βΈ β¨j, bβ©.snd)",
" x β sigmaLift f β¨i, aβ© β¨i, bβ© β\n β (ha : β¨i, aβ©.fst = x.f... | [] |
import Mathlib.Algebra.Polynomial.Monic
#align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722"
open Finset
open Multiset
open Polynomial
universe u w
variable {R : Type u} {ΞΉ : Type w}
namespace Polynomial
variable (s : Finset ΞΉ)
sectio... | Mathlib/Algebra/Polynomial/BigOperators.lean | 80 | 83 | theorem natDegree_list_prod_le (l : List S[X]) : natDegree l.prod β€ (l.map natDegree).sum := by |
induction' l with hd tl IH
Β· simp
Β· simpa using natDegree_mul_le.trans (add_le_add_left IH _)
| [
" natDegree 0 β€ 0",
" β (a : List S[X]), (Multiset.sum β¦aβ§).natDegree β€ foldr max β― 0 (Multiset.map natDegree β¦aβ§)",
" (β i β s, f i).natDegree β€ Finset.fold max 0 (natDegree β f) s",
" 0 β€ n β§ β x β s, (natDegree β f) x β€ n",
" l.sum.degree β€ (List.map natDegree l).maximum",
" βl.sum.natDegree β€ (List.ma... | [
" natDegree 0 β€ 0",
" β (a : List S[X]), (Multiset.sum β¦aβ§).natDegree β€ foldr max β― 0 (Multiset.map natDegree β¦aβ§)",
" (β i β s, f i).natDegree β€ Finset.fold max 0 (natDegree β f) s",
" 0 β€ n β§ β x β s, (natDegree β f) x β€ n",
" l.sum.degree β€ (List.map natDegree l).maximum",
" βl.sum.natDegree β€ (List.ma... |
import Mathlib.AlgebraicTopology.SimplexCategory
import Mathlib.CategoryTheory.Comma.Arrow
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Opposites
#align_import algebraic_topology.simplicial_object from "leanprover-community/mathlib"@"5ed51dc37c6b891b79314ee11a50adc2b1df6fd6"
o... | Mathlib/AlgebraicTopology/SimplicialObject.lean | 114 | 119 | theorem Ξ΄_comp_Ξ΄' {n} {i : Fin (n + 2)} {j : Fin (n + 3)} (H : Fin.castSucc i < j) :
X.Ξ΄ j β« X.Ξ΄ i =
X.Ξ΄ (Fin.castSucc i) β«
X.Ξ΄ (j.pred fun (hj : j = 0) => by simp [hj, Fin.not_lt_zero] at H) := by |
dsimp [Ξ΄]
simp only [β X.map_comp, β op_comp, SimplexCategory.Ξ΄_comp_Ξ΄' H]
| [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryα΅α΅ β₯€ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryα΅α΅ β₯€ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryα΅α΅ β₯€ C)",
" f.app = g.a... | [
" Category.{?u.61, max u v} (SimplicialObject C)",
" Category.{?u.61, max u v} (SimplexCategoryα΅α΅ β₯€ C)",
" HasLimitsOfShape J (SimplicialObject C)",
" HasLimitsOfShape J (SimplexCategoryα΅α΅ β₯€ C)",
" HasColimitsOfShape J (SimplicialObject C)",
" HasColimitsOfShape J (SimplexCategoryα΅α΅ β₯€ C)",
" f.app = g.a... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
#align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open AffineMap AffineEquiv
section
variable (R : Type*) {V V' P P' : Type*} [Ring R] [Invertible (2 : R)] [AddCommGroup V]
[Modu... | Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean | 129 | 130 | theorem right_vsub_midpoint (pβ pβ : P) : pβ -α΅₯ midpoint R pβ pβ = (β
2 : R) β’ (pβ -α΅₯ pβ) := by |
rw [midpoint_comm, left_vsub_midpoint]
| [
" (pointReflection R (midpoint R x y)) x = y",
" (pointReflection (midpoint R x y)) x = y",
" midpoint R x y = midpoint R y x",
" (pointReflection R (midpoint R x y)) y = x",
" (pointReflection (midpoint R x y)) y = x",
" midpoint R pβ pβ -α΅₯ pβ = β
2 β’ (pβ -α΅₯ pβ)",
" pβ -α΅₯ midpoint R pβ pβ = β
2 β’ (pβ -α΅₯ ... | [
" (pointReflection R (midpoint R x y)) x = y",
" (pointReflection (midpoint R x y)) x = y",
" midpoint R x y = midpoint R y x",
" (pointReflection R (midpoint R x y)) y = x",
" (pointReflection (midpoint R x y)) y = x",
" midpoint R pβ pβ -α΅₯ pβ = β
2 β’ (pβ -α΅₯ pβ)"
] |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : β}
theorem te... | Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean | 37 | 42 | theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux m = g.continuantsAux (n + 1) := by |
refine Nat.le_induction rfl (fun k hnk hk => ?_) _ n_lt_m
rcases Nat.exists_eq_add_of_lt hnk with β¨k, rflβ©
refine (continuantsAux_stable_step_of_terminated ?_).trans hk
exact terminated_stable (Nat.le_add_right _ _) terminated_at_n
| [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)"
] | [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)"
] |
import Mathlib.Algebra.IsPrimePow
import Mathlib.Data.Nat.Factorization.Basic
#align_import data.nat.factorization.prime_pow from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
variable {R : Type*} [CommMonoidWithZero R] (n p : R) (k : β)
theorem IsPrimePow.minFac_pow_factorization_eq ... | Mathlib/Data/Nat/Factorization/PrimePow.lean | 27 | 33 | theorem isPrimePow_of_minFac_pow_factorization_eq {n : β}
(h : n.minFac ^ n.factorization n.minFac = n) (hn : n β 1) : IsPrimePow n := by |
rcases eq_or_ne n 0 with (rfl | hn')
Β· simp_all
refine β¨_, _, (Nat.minFac_prime hn).prime, ?_, hβ©
simp [pos_iff_ne_zero, β Finsupp.mem_support_iff, Nat.support_factorization, hn',
Nat.minFac_prime hn, Nat.minFac_dvd]
| [
" n.minFac ^ n.factorization n.minFac = n",
" (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k",
" IsPrimePow n",
" IsPrimePow 0",
" 0 < n.factorization n.minFac"
] | [
" n.minFac ^ n.factorization n.minFac = n",
" (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k"
] |
import Mathlib.NumberTheory.LegendreSymbol.Basic
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
#align_import number_theory.legendre_symbol.quadratic_reciprocity from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Values
variable {p : β} [Fact p.Pri... | Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean | 150 | 153 | theorem quadratic_reciprocity_one_mod_four (hp : p % 4 = 1) (hq : q β 2) :
legendreSym q p = legendreSym p q := by |
rw [quadratic_reciprocity' (Prime.mod_two_eq_one_iff_ne_two.mp (odd_of_mod_four_eq_one hp)) hq,
pow_mul, neg_one_pow_div_two_of_one_mod_four hp, one_pow, one_mul]
| [
" legendreSym q βp * legendreSym p βq = (-1) ^ (p / 2 * (q / 2))",
" ββn = βn",
" β((-1) ^ (p / 2)) = (-1) ^ (p / 2)",
" legendreSym q βp = (-1) ^ (p / 2 * (q / 2)) * legendreSym p βq",
" legendreSym q βq = (-1) ^ (q / 2 * (q / 2)) * legendreSym q βq",
" legendreSym q βp = legendreSym p βq"
] | [
" legendreSym q βp * legendreSym p βq = (-1) ^ (p / 2 * (q / 2))",
" ββn = βn",
" β((-1) ^ (p / 2)) = (-1) ^ (p / 2)",
" legendreSym q βp = (-1) ^ (p / 2 * (q / 2)) * legendreSym p βq",
" legendreSym q βq = (-1) ^ (q / 2 * (q / 2)) * legendreSym q βq"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.