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" ]