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.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputab...
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
126
132
theorem iteratedFDerivWithin_succ_const (n : β„•) (c : F) (hs : UniqueDiffOn π•œ s) (hx : x ∈ s) : iteratedFDerivWithin π•œ (n + 1) (fun _ : E ↦ c) s x = 0 := by
ext m rw [iteratedFDerivWithin_succ_apply_right hs hx] rw [iteratedFDerivWithin_congr (fun y hy ↦ fderivWithin_const_apply c (hs y hy)) hx] rw [iteratedFDerivWithin_zero_fun hs hx] simp [ContinuousMultilinearMap.zero_apply (R := π•œ)]
[ " iteratedFDerivWithin π•œ i (fun x => 0) s x = 0", " iteratedFDerivWithin π•œ 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin π•œ (fun ...
[ " iteratedFDerivWithin π•œ i (fun x => 0) s x = 0", " iteratedFDerivWithin π•œ 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin π•œ (fun ...
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry #align_import analysis.normed_space.conformal_linear_map from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1" noncomputable section open Function LinearIsometry ContinuousLinearMap def IsConf...
Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean
84
89
theorem comp (hg : IsConformalMap g) (hf : IsConformalMap f) : IsConformalMap (g.comp f) := by
rcases hf with ⟨cf, hcf, lif, rfl⟩ rcases hg with ⟨cg, hcg, lig, rfl⟩ refine ⟨cg * cf, mul_ne_zero hcg hcf, lig.comp lif, ?_⟩ rw [smul_comp, comp_smul, mul_smul] rfl
[ " ContinuousLinearMap.id R M = 1 β€’ LinearIsometry.id.toContinuousLinearMap", " IsConformalMap (c β€’ f)", " IsConformalMap (c β€’ c' β€’ li.toContinuousLinearMap)", " β€–0 xβ€– = β€–xβ€–", " IsConformalMap (g.comp f)", " IsConformalMap (g.comp (cf β€’ lif.toContinuousLinearMap))", " IsConformalMap ((cg β€’ lig.toContinuo...
[ " ContinuousLinearMap.id R M = 1 β€’ LinearIsometry.id.toContinuousLinearMap", " IsConformalMap (c β€’ f)", " IsConformalMap (c β€’ c' β€’ li.toContinuousLinearMap)", " β€–0 xβ€– = β€–xβ€–" ]
import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.NormalClosure import Mathlib.RingTheory.Polynomial.SeparableDegree open scoped Classical Polynomial open FiniteDimensional Polynomial Interm...
Mathlib/FieldTheory/SeparableDegree.lean
168
172
theorem finSepDegree_self : finSepDegree F F = 1 := by
have : Cardinal.mk (Emb F F) = 1 := le_antisymm (Cardinal.le_one_iff_subsingleton.2 AlgHom.subsingleton) (Cardinal.one_le_iff_ne_zero.2 <| Cardinal.mk_ne_zero _) rw [finSepDegree, Nat.card, this, Cardinal.one_toNat]
[ " AlgebraicClosure K ≃ₐ[F] AlgebraicClosure E", " Algebra.IsAlgebraic E K", " βˆ€ (x : K), IsAlgebraic E x", " IsAlgebraic E x", " AlgebraicClosure K ≃ₐ[E] AlgebraicClosure E", " finSepDegree F F = 1" ]
[ " AlgebraicClosure K ≃ₐ[F] AlgebraicClosure E", " Algebra.IsAlgebraic E K", " βˆ€ (x : K), IsAlgebraic E x", " IsAlgebraic E x", " AlgebraicClosure K ≃ₐ[E] AlgebraicClosure E" ]
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
132
137
theorem tendsto_exp_div_rpow_atTop (s : ℝ) : Tendsto (fun x : ℝ => exp x / x ^ s) atTop atTop := by
cases' archimedean_iff_nat_lt.1 Real.instArchimedean s with n hn refine tendsto_atTop_mono' _ ?_ (tendsto_exp_div_pow_atTop n) filter_upwards [eventually_gt_atTop (0 : ℝ), eventually_ge_atTop (1 : ℝ)] with x hxβ‚€ hx₁ rw [div_le_div_left (exp_pos _) (pow_pos hxβ‚€ _) (rpow_pos_of_pos hxβ‚€ _), ← Real.rpow_natCast] ...
[ " Tendsto (fun x => x ^ y) atTop atTop", " βˆ€ (b : ℝ), βˆƒ i, βˆ€ (a : ℝ), i ≀ a β†’ b ≀ a ^ y", " βˆƒ i, βˆ€ (a : ℝ), i ≀ a β†’ b ≀ a ^ y", " βˆ€ (a : ℝ), max b 0 ^ (1 / y) ≀ a β†’ b ≀ a ^ y", " b ≀ x ^ y", " max b ?m.800 ≀ x ^ y", " max b ?m.800 = (max b 0 ^ (1 / y)) ^ y", " Tendsto (fun x => b ^ x) atTop (𝓝 0)", ...
[ " Tendsto (fun x => x ^ y) atTop atTop", " βˆ€ (b : ℝ), βˆƒ i, βˆ€ (a : ℝ), i ≀ a β†’ b ≀ a ^ y", " βˆƒ i, βˆ€ (a : ℝ), i ≀ a β†’ b ≀ a ^ y", " βˆ€ (a : ℝ), max b 0 ^ (1 / y) ≀ a β†’ b ≀ a ^ y", " b ≀ x ^ y", " max b ?m.800 ≀ x ^ y", " max b ?m.800 = (max b 0 ^ (1 / y)) ^ y", " Tendsto (fun x => b ^ x) atTop (𝓝 0)", ...
import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.Factors import Mathlib.Order.Interval.Finset.Nat #align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped Classical open Finset namespace Nat variable (n : β„•) d...
Mathlib/NumberTheory/Divisors.lean
89
91
theorem cons_self_properDivisors (h : n β‰  0) : cons n (properDivisors n) properDivisors.not_self_mem = divisors n := by
rw [cons_eq_insert, insert_self_properDivisors h]
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n β†’ a✝ < n.succ β†’ 1 ≀ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n β†’ a✝ < n β†’ 1 ≀ a✝...
[ " filter (fun x => x ∣ n) (range n.succ) = n.divisors", " a✝ ∈ filter (fun x => x ∣ n) (range n.succ) ↔ a✝ ∈ n.divisors", " a✝ ∣ n β†’ a✝ < n.succ β†’ 1 ≀ a✝", " filter (fun x => x ∣ n) (range n) = n.properDivisors", " a✝ ∈ filter (fun x => x ∣ n) (range n) ↔ a✝ ∈ n.properDivisors", " a✝ ∣ n β†’ a✝ < n β†’ 1 ≀ a✝...
import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ApproximatesLinearOn #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal n...
Mathlib/Analysis/Calculus/InverseFunctionTheorem/FDeriv.lean
86
96
theorem map_nhds_eq_of_surj [CompleteSpace E] [CompleteSpace F] {f : E β†’ F} {f' : E β†’L[π•œ] F} {a : E} (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) a) (h : LinearMap.range f' = ⊀) : map f (𝓝 a) = 𝓝 (f a) := by
let f'symm := f'.nonlinearRightInverseOfSurjective h set c : ℝβ‰₯0 := f'symm.nnnorm⁻¹ / 2 with hc have f'symm_pos : 0 < f'symm.nnnorm := f'.nonlinearRightInverseOfSurjective_nnnorm_pos h have cpos : 0 < c := by simp [hc, half_pos, inv_pos, f'symm_pos] obtain ⟨s, s_nhds, hs⟩ : βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f...
[ " βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c", " β€–f x - f y - f' (x - y)β€– ≀ ↑c * β€–x - yβ€–", " map f (𝓝 a) = 𝓝 (f a)", " 0 < c", " f'symm.nnnorm⁻¹ β‰  0" ]
[ " βˆƒ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c", " β€–f x - f y - f' (x - y)β€– ≀ ↑c * β€–x - yβ€–" ]
import Mathlib.Algebra.Lie.BaseChange import Mathlib.Algebra.Lie.Solvable import Mathlib.Algebra.Lie.Quotient import Mathlib.Algebra.Lie.Normalizer import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.Order.Filter.AtTopBot import Mathlib.RingTheory.Artinian import Mathlib.RingTheory.Nilpotent.Lemmas import Mat...
Mathlib/Algebra/Lie/Nilpotent.lean
493
496
theorem ucs_eq_self_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : β„•) : N₁.ucs k = N₁ := by
induction' k with k ih Β· simp Β· rwa [ucs_succ, ih]
[ " ucs k N₁ ≀ ucs k Nβ‚‚", " ucs 0 N₁ ≀ ucs 0 Nβ‚‚", " ucs (k + 1) N₁ ≀ ucs (k + 1) Nβ‚‚", " (ucs k N₁).normalizer ≀ (ucs k Nβ‚‚).normalizer", " ucs k N₁ = N₁", " ucs 0 N₁ = N₁", " ucs (k + 1) N₁ = N₁" ]
[ " ucs k N₁ ≀ ucs k Nβ‚‚", " ucs 0 N₁ ≀ ucs 0 Nβ‚‚", " ucs (k + 1) N₁ ≀ ucs (k + 1) Nβ‚‚", " (ucs k N₁).normalizer ≀ (ucs k Nβ‚‚).normalizer" ]
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
101
106
theorem card_Icc_finset (h : s βŠ† t) : (Icc s t).card = 2 ^ (t.card - s.card) := by
rw [← card_sdiff h, ← card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff] rintro u hu v hv (huv : s βŠ” u = s βŠ” v) rw [mem_coe, mem_powerset] at hu hv rw [← (disjoint_sdiff.mono_right hu : Disjoint s u).sup_sdiff_cancel_left, ← (disjoint_sdiff.mono_right hv : Disjoint s v).sup_sdiff_cancel_left, 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.Group.Submonoid.Membership import Mathlib.Algebra.Order.BigOperators.Group.List import Mathlib.Data.Set.Pointwise.SMul import Mathlib.Order.WellFoundedSet #align_import group_theory.submonoid.pointwise from "leanprover-community/mathlib"@"2bbc7e3884ba234309d2a43b19144105a753292e" open Set P...
Mathlib/Algebra/Group/Submonoid/Pointwise.lean
700
704
theorem submonoid_closure (hpos : βˆ€ x : Ξ±, x ∈ s β†’ 1 ≀ x) (h : s.IsPWO) : IsPWO (Submonoid.closure s : Set Ξ±) := by
rw [Submonoid.closure_eq_image_prod] refine (h.partiallyWellOrderedOn_sublistForallβ‚‚ (Β· ≀ Β·)).image_of_monotone_on ?_ exact fun l1 _ l2 hl2 h12 => h12.prod_le_prod' fun x hx => hpos x <| hl2 x hx
[ " (↑(closure s)).IsPWO", " (List.prod '' {l | βˆ€ x ∈ l, x ∈ s}).IsPWO", " βˆ€ a₁ ∈ {l | βˆ€ x ∈ l, x ∈ s},\n βˆ€ aβ‚‚ ∈ {l | βˆ€ x ∈ l, x ∈ s}, List.SublistForallβ‚‚ (fun x x_1 => x ≀ x_1) a₁ aβ‚‚ β†’ a₁.prod ≀ aβ‚‚.prod" ]
[]
import Mathlib.Data.Int.Interval import Mathlib.RingTheory.Binomial import Mathlib.RingTheory.HahnSeries.PowerSeries import Mathlib.RingTheory.HahnSeries.Summable import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.Localization.FractionRing #align_import ring_theory.laurent_series from "leanprov...
Mathlib/RingTheory/LaurentSeries.lean
112
121
theorem powerSeriesPart_eq_zero (x : LaurentSeries R) : x.powerSeriesPart = 0 ↔ x = 0 := by
constructor · contrapose! simp only [ne_eq] intro h rw [PowerSeries.ext_iff, not_forall] refine ⟨0, ?_⟩ simp [coeff_order_ne_zero h] · rintro rfl simp
[ " ((ofPowerSeries β„€ R) x).coeff ↑n = (PowerSeries.coeff R n) x", " powerSeriesPart 0 = 0", " (PowerSeries.coeff R n✝) (powerSeriesPart 0) = (PowerSeries.coeff R n✝) 0", " x.powerSeriesPart = 0 ↔ x = 0", " x.powerSeriesPart = 0 β†’ x = 0", " x β‰  0 β†’ x.powerSeriesPart β‰  0", " Β¬x = 0 β†’ Β¬x.powerSeriesPart = 0...
[ " ((ofPowerSeries β„€ R) x).coeff ↑n = (PowerSeries.coeff R n) x", " powerSeriesPart 0 = 0", " (PowerSeries.coeff R n✝) (powerSeriesPart 0) = (PowerSeries.coeff R n✝) 0" ]
import Mathlib.MeasureTheory.Measure.MeasureSpace import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Topology ENNReal MeasureTheory open Set Function Filter namespace Measur...
Mathlib/MeasureTheory/Measure/OpenPos.lean
97
100
theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) : F =ᡐ[ΞΌ] univ ↔ F = univ := by
refine ⟨fun h ↦ ?_, fun h ↦ by rw [h]⟩ rwa [ae_eq_univ, hF.isOpen_compl.measure_eq_zero_iff ΞΌ, compl_empty_iff] at h
[ " ΞΌ U = 0 ↔ U = βˆ…", " ΞΌ U = 0", " U =αΆ [ae ΞΌ] βˆ… ↔ U = βˆ…", " F =αΆ [ae ΞΌ] univ ↔ F = univ", " F =αΆ [ae ΞΌ] univ", " F = univ" ]
[ " ΞΌ U = 0 ↔ U = βˆ…", " ΞΌ U = 0", " U =αΆ [ae ΞΌ] βˆ… ↔ U = βˆ…" ]
import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.LinearAlgebra.Dimension.Constructions import Mathlib.LinearAlgebra.Dimension.Finite #align_import field_theory.finiteness from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f" universe u v open scoped Classical open Cardinal ...
Mathlib/FieldTheory/Finiteness.lean
103
112
theorem iff_fg : IsNoetherian K V ↔ Module.Finite K V := by
constructor Β· intro h exact ⟨⟨finsetBasisIndex K V, by convert (finsetBasis K V).span_eq simp⟩⟩ Β· rintro ⟨s, hs⟩ rw [IsNoetherian.iff_rank_lt_aleph0, ← rank_top, ← hs] exact lt_of_le_of_lt (rank_span_le _) s.finite_toSet.lt_aleph0
[ " IsNoetherian K V ↔ Module.rank K V < β„΅β‚€", " IsNoetherian K V ↔ (Basis.ofVectorSpaceIndex K V).Finite", " IsNoetherian K V β†’ (Basis.ofVectorSpaceIndex K V).Finite", " (Basis.ofVectorSpaceIndex K V).Finite", " (Basis.ofVectorSpaceIndex K V).Finite β†’ IsNoetherian K V", " IsNoetherian K V", " IsNoetherian...
[ " IsNoetherian K V ↔ Module.rank K V < β„΅β‚€", " IsNoetherian K V ↔ (Basis.ofVectorSpaceIndex K V).Finite", " IsNoetherian K V β†’ (Basis.ofVectorSpaceIndex K V).Finite", " (Basis.ofVectorSpaceIndex K V).Finite", " (Basis.ofVectorSpaceIndex K V).Finite β†’ IsNoetherian K V", " IsNoetherian K V", " IsNoetherian...
import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {Ξ± : Type*} namespace WithTop @[simp] theorem preimage_coe_top : (some : Ξ± β†’ WithTop Ξ±) ⁻¹' {⊀} =...
Mathlib/Order/Interval/Set/WithBotTop.lean
89
90
theorem image_coe_Ioi : (some : Ξ± β†’ WithTop Ξ±) '' Ioi a = Ioo (a : WithTop Ξ±) ⊀ := by
rw [← preimage_coe_Ioi, image_preimage_eq_inter_range, range_coe, Ioi_inter_Iio]
[ " range some = Iio ⊀", " x ∈ range some ↔ x ∈ Iio ⊀", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊀ = univ", " some ⁻¹' Ico ↑a ⊀ = Ici a", " some ⁻¹' Ioo ↑a ⊀ = Ioi a", " some '' Ioi a = Ioo ↑a ⊀...
[ " range some = Iio ⊀", " x ∈ range some ↔ x ∈ Iio ⊀", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊀ = univ", " some ⁻¹' Ico ↑a ⊀ = Ici a", " some ⁻¹' Ioo ↑a ⊀ = Ioi a" ]
import Mathlib.Analysis.Convex.Gauge import Mathlib.Analysis.Convex.Normed open Metric Bornology Filter Set open scoped NNReal Topology Pointwise noncomputable section section Module variable {E : Type*} [AddCommGroup E] [Module ℝ E] def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β€’ x the...
Mathlib/Analysis/Convex/GaugeRescale.lean
63
67
theorem gauge_gaugeRescale (s : Set E) {t : Set E} (hta : Absorbent ℝ t) (htb : IsVonNBounded ℝ t) (x : E) : gauge t (gaugeRescale s t x) = gauge s x := by
rcases eq_or_ne x 0 with rfl | hx Β· simp Β· exact gauge_gaugeRescale' s ((gauge_pos hta htb).2 hx).ne'
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x", " gauge t (gaugeRescale s t 0) = gauge s 0" ]
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x" ]
import Mathlib.Data.Set.Pointwise.Interval import Mathlib.LinearAlgebra.AffineSpace.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.affine_space.affine_map from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901...
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
162
169
theorem ext_linear {f g : P1 →ᡃ[k] P2} (h₁ : f.linear = g.linear) {p : P1} (hβ‚‚ : f p = g p) : f = g := by
ext q have hgl : g.linear (q -α΅₯ p) = toFun g ((q -α΅₯ p) +α΅₯ q) -α΅₯ toFun g q := by simp have := f.map_vadd' q (q -α΅₯ p) rw [h₁, hgl, toFun_eq_coe, map_vadd, linearMap_vsub, hβ‚‚] at this simp at this exact this
[ " { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }", " f_linear v = g_linear v", " f_linear v +α΅₯ f p = g_linear v +α΅₯ f p", " f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2", "k : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Typ...
[ " { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }", " f_linear v = g_linear v", " f_linear v +α΅₯ f p = g_linear v +α΅₯ f p", " f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2", "k : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Typ...
import Mathlib.Data.List.Duplicate import Mathlib.Data.List.Sort #align_import data.list.nodup_equiv_fin from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace List variable {Ξ± : Type*} section Sublist
Mathlib/Data/List/NodupEquivFin.lean
116
137
theorem sublist_of_orderEmbedding_get?_eq {l l' : List Ξ±} (f : β„• β†ͺo β„•) (hf : βˆ€ ix : β„•, l.get? ix = l'.get? (f ix)) : l <+ l' := by
induction' l with hd tl IH generalizing l' f Β· simp have : some hd = _ := hf 0 rw [eq_comm, List.get?_eq_some] at this obtain ⟨w, h⟩ := this let f' : β„• β†ͺo β„• := OrderEmbedding.ofMapLEIff (fun i => f (i + 1) - (f 0 + 1)) fun a b => by dsimp only rw [Nat.sub_le_sub_iff_right, OrderEmbedding.le...
[ " l <+ l'", " [] <+ l'", " hd :: tl <+ l'", " (fun i => f (i + 1) - (f 0 + 1)) a ≀ (fun i => f (i + 1) - (f 0 + 1)) b ↔ a ≀ b", " f (a + 1) - (f 0 + 1) ≀ f (b + 1) - (f 0 + 1) ↔ a ≀ b", " f 0 + 1 ≀ f (b + 1)", " 0 < b + 1", " βˆ€ (ix : β„•), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)", " tl.get? ix =...
[]
import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.MulOpposite import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Finset.NoncommProd import Mathlib.Data.Int.Order.Lemmas #align_import group_theory.submonoid.membership fro...
Mathlib/Algebra/Group/Submonoid/Membership.lean
234
236
theorem mem_sup_left {S T : Submonoid M} : βˆ€ {x : M}, x ∈ S β†’ x ∈ S βŠ” T := by
rw [← SetLike.le_def] exact le_sup_left
[ " x ∈ ⨆ i, S i ↔ βˆƒ i, x ∈ S i", " x ∈ ⨆ i, S i β†’ βˆƒ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) β†’ βˆƒ i, x ∈ S i", " βˆƒ i, 1 ∈ S i", " βˆ€ (x y : M), (βˆƒ i, x ∈ S i) β†’ (βˆƒ i, y ∈ S i) β†’ βˆƒ i, x * y ∈ S i", " βˆƒ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ βˆƒ s ∈ S, x ∈ s", " x ∈ ↑(sSup S)...
[ " x ∈ ⨆ i, S i ↔ βˆƒ i, x ∈ S i", " x ∈ ⨆ i, S i β†’ βˆƒ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) β†’ βˆƒ i, x ∈ S i", " βˆƒ i, 1 ∈ S i", " βˆ€ (x y : M), (βˆƒ i, x ∈ S i) β†’ (βˆƒ i, y ∈ S i) β†’ βˆƒ i, x * y ∈ S i", " βˆƒ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ βˆƒ s ∈ S, x ∈ s", " x ∈ ↑(sSup S)...
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section IsFinit...
Mathlib/MeasureTheory/Measure/Typeclasses.lean
132
139
theorem Measure.isFiniteMeasure_map {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (f : Ξ± β†’ Ξ²) : IsFiniteMeasure (ΞΌ.map f) := by
by_cases hf : AEMeasurable f ΞΌ Β· constructor rw [map_apply_of_aemeasurable hf MeasurableSet.univ] exact measure_lt_top ΞΌ _ Β· rw [map_of_not_aemeasurable hf] exact MeasureTheory.isFiniteMeasureZero
[ " Β¬IsFiniteMeasure ΞΌ ↔ ΞΌ univ = ⊀", " ΞΌ univ = ⊀", " False", " (ΞΌ.restrict s) univ < ⊀", " ΞΌ tᢜ ≀ ΞΌ sᢜ + Ξ΅", " ΞΌ univ ≀ ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t", " ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) = ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t", " 0 univ < ⊀", " IsFiniteMeasure ΞΌ", " IsFiniteMeasure 0", " (ΞΌ + Ξ½) univ < ⊀", " ΞΌ univ < ⊀ ∧ ...
[ " Β¬IsFiniteMeasure ΞΌ ↔ ΞΌ univ = ⊀", " ΞΌ univ = ⊀", " False", " (ΞΌ.restrict s) univ < ⊀", " ΞΌ tᢜ ≀ ΞΌ sᢜ + Ξ΅", " ΞΌ univ ≀ ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t", " ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) = ΞΌ univ - ΞΌ s + Ξ΅ + ΞΌ t", " 0 univ < ⊀", " IsFiniteMeasure ΞΌ", " IsFiniteMeasure 0", " (ΞΌ + Ξ½) univ < ⊀", " ΞΌ univ < ⊀ ∧ ...
import Mathlib.Topology.Constructions import Mathlib.Topology.ContinuousOn #align_import topology.bases from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Set Filter Function Topology noncomputable section namespace TopologicalSpace universe u variable {Ξ± : Type u} {Ξ² : Type*} ...
Mathlib/Topology/Bases.lean
77
90
theorem IsTopologicalBasis.insert_empty {s : Set (Set Ξ±)} (h : IsTopologicalBasis s) : IsTopologicalBasis (insert βˆ… s) := by
refine ⟨?_, by rw [sUnion_insert, empty_union, h.sUnion_eq], ?_⟩ Β· rintro t₁ (rfl | h₁) tβ‚‚ (rfl | hβ‚‚) x ⟨hx₁, hxβ‚‚βŸ© Β· cases hx₁ Β· cases hx₁ Β· cases hxβ‚‚ Β· obtain ⟨t₃, h₃, hs⟩ := h.exists_subset_inter _ h₁ _ hβ‚‚ x ⟨hx₁, hxβ‚‚βŸ© exact ⟨t₃, .inr h₃, hs⟩ Β· rw [h.eq_generateFrom] refine le_antisym...
[ " IsTopologicalBasis (insert βˆ… s)", " ⋃₀ insert βˆ… s = univ", " βˆ€ t₁ ∈ insert βˆ… s, βˆ€ tβ‚‚ ∈ insert βˆ… s, βˆ€ x ∈ t₁ ∩ tβ‚‚, βˆƒ t₃ ∈ insert βˆ… s, x ∈ t₃ ∧ t₃ βŠ† t₁ ∩ tβ‚‚", " βˆƒ t₃ ∈ insert βˆ… s, x ∈ t₃ ∧ t₃ βŠ† βˆ… ∩ βˆ…", " βˆƒ t₃ ∈ insert βˆ… s, x ∈ t₃ ∧ t₃ βŠ† βˆ… ∩ tβ‚‚", " βˆƒ t₃ ∈ insert βˆ… s, x ∈ t₃ ∧ t₃ βŠ† t₁ ∩ βˆ…", " βˆƒ t₃ ∈ inser...
[]
import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.Seminorm import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Analysis.RCLike.Basic #align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d" ...
Mathlib/Analysis/Convex/Gauge.lean
86
89
theorem exists_lt_of_gauge_lt (absorbs : Absorbent ℝ s) (h : gauge s x < a) : βˆƒ b, 0 < b ∧ b < a ∧ x ∈ b β€’ s := by
obtain ⟨b, ⟨hb, hx⟩, hba⟩ := exists_lt_of_csInf_lt absorbs.gauge_set_nonempty h exact ⟨b, hb, hba, hx⟩
[ " gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ β€’ x ∈ s}", " 0 < r ∧ x ∈ r β€’ s ↔ r ∈ Ioi 0 ∧ r⁻¹ β€’ x ∈ s", " βˆƒ b, 0 < b ∧ b < a ∧ x ∈ b β€’ s" ]
[ " gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ β€’ x ∈ s}", " 0 < r ∧ x ∈ r β€’ s ↔ r ∈ Ioi 0 ∧ r⁻¹ β€’ x ∈ s" ]
import Mathlib.Data.List.Join #align_import data.list.permutation from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" -- Make sure we don't import algebra assert_not_exists Monoid open Nat variable {Ξ± Ξ² : Type*} namespace List theorem permutationsAux2_fst (t : Ξ±) (ts : List Ξ±) (r : L...
Mathlib/Data/List/Permutation.lean
83
87
theorem permutationsAux2_comp_append {t : Ξ±} {ts ys : List Ξ±} {r : List Ξ²} (f : List Ξ± β†’ Ξ²) : ((permutationsAux2 t [] r ys) fun x => f (x ++ ts)).2 = (permutationsAux2 t ts r ys f).2 := by
induction' ys with ys_hd _ ys_ih generalizing f Β· simp Β· simp [ys_ih fun xs => f (ys_hd :: xs)]
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, ...
Mathlib/Order/Directed.lean
66
67
theorem directedOn_range {f : ΞΉ β†’ Ξ±} : Directed r f ↔ DirectedOn r (Set.range f) := by
simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff]
[ " DirectedOn r s ↔ Directed r Subtype.val", " (βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆ€ a_1 ∈ s, βˆƒ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2", " (βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆƒ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1", " Directed r f ↔ DirectedOn r (Set.range f)" ]
[ " DirectedOn r s ↔ Directed r Subtype.val", " (βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆ€ a_1 ∈ s, βˆƒ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2", " (βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆƒ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1" ]
import Mathlib.Probability.ProbabilityMassFunction.Monad #align_import probability.probability_mass_function.constructions from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" universe u namespace PMF noncomputable section variable {Ξ± Ξ² Ξ³ : Type*} open scoped Classical open NNReal ENN...
Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
60
60
theorem mem_support_map_iff : b ∈ (map f p).support ↔ βˆƒ a ∈ p.support, f a = b := by
simp
[ " (map f p) b = βˆ‘' (a : Ξ±), if b = f a then p a else 0", " b ∈ (map f p).support ↔ b ∈ f '' p.support", " b ∈ (map f p).support ↔ βˆƒ a ∈ p.support, f a = b" ]
[ " (map f p) b = βˆ‘' (a : Ξ±), if b = f a then p a else 0", " b ∈ (map f p).support ↔ b ∈ f '' p.support" ]
import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Index import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.GroupAction.Quotient import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.SpecificGroups.Cyclic import Mathlib.Tactic.IntervalCases #align_import group_theory.p_gr...
Mathlib/GroupTheory/PGroup.lean
123
124
theorem powEquiv_symm_apply {n : β„•} (hn : p.Coprime n) (g : G) : (hG.powEquiv hn).symm g = g ^ (orderOf g).gcdB n := by
rw [← Nat.card_zpowers]; rfl
[ " g ^ p ^ k = 1", " g ^ p ^ n = 1", " card β†₯βŠ₯ = p ^ ?m.2806", " IsPGroup p G ↔ βˆƒ n, card G = p ^ n", " βˆƒ n, card G = p ^ n", " card G = p ^ (card G).factors.length", " βˆ€ q ∈ (card G).factors, q = p", " q = p", " IsPGroup p H", " βˆ€ (g : H), βˆƒ k, Ο• g ^ p ^ k = 1", " h ^ p ^ k = 1", " (hG.powEqui...
[ " g ^ p ^ k = 1", " g ^ p ^ n = 1", " card β†₯βŠ₯ = p ^ ?m.2806", " IsPGroup p G ↔ βˆƒ n, card G = p ^ n", " βˆƒ n, card G = p ^ n", " card G = p ^ (card G).factors.length", " βˆ€ q ∈ (card G).factors, q = p", " q = p", " IsPGroup p H", " βˆ€ (g : H), βˆƒ k, Ο• g ^ p ^ k = 1", " h ^ p ^ k = 1" ]
import Mathlib.Analysis.Convex.Gauge import Mathlib.Analysis.Convex.Normed open Metric Bornology Filter Set open scoped NNReal Topology Pointwise noncomputable section section Module variable {E : Type*} [AddCommGroup E] [Module ℝ E] def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β€’ x the...
Mathlib/Analysis/Convex/GaugeRescale.lean
69
73
theorem gauge_gaugeRescale_le (s t : Set E) (x : E) : gauge t (gaugeRescale s t x) ≀ gauge s x := by
by_cases hx : gauge t x = 0 Β· simp [gaugeRescale, hx, gauge_nonneg] Β· exact (gauge_gaugeRescale' s hx).le
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x", " gauge t (gaugeRescale s t 0) = gauge s 0", " ga...
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x", " gauge t (gaugeRescale s t 0) = gauge s 0" ]
import Batteries.Data.RBMap.Alter import Batteries.Data.List.Lemmas namespace Batteries namespace RBNode open RBColor attribute [simp] fold foldl foldr Any forM foldlM Ordered @[simp] theorem min?_reverse (t : RBNode Ξ±) : t.reverse.min? = t.max? := by unfold RBNode.max?; split <;> simp [RBNode.min?] unfold RB...
.lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean
92
100
theorem IsCut.congr [IsCut cmp cut] [TransCmp cmp] (H : cmp x y = .eq) : cut x = cut y := by
cases ey : cut y Β· exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans <| OrientedCmp.cmp_eq_gt.1 h) ey Β· cases ex : cut x Β· exact IsCut.le_lt_trans (fun h => nomatch H.symm.trans h) ex |>.symm.trans ey Β· rfl Β· refine IsCut.le_gt_trans (cmp := cmp) (fun h => ?_) ex |>.symm.trans ey cases H.s...
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
import Mathlib.Algebra.Group.Prod import Mathlib.Order.Cover #align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" assert_not_exists MonoidWithZero open Set namespace Function variable {Ξ± Ξ² A B M N P G : Type*} section One variable [One M] [One N] [One P] ...
Mathlib/Algebra/Group/Support.lean
127
129
theorem disjoint_mulSupport_iff {f : Ξ± β†’ M} {s : Set Ξ±} : Disjoint s (mulSupport f) ↔ EqOn f 1 s := by
rw [disjoint_comm, mulSupport_disjoint_iff]
[ " mulSupport f = s ↔ (βˆ€ x ∈ s, f x β‰  1) ∧ βˆ€ x βˆ‰ s, f x = 1", " f x = g x", " mulSupport (update f x y) = insert x (mulSupport f)", " a ∈ mulSupport (update f x y) ↔ a ∈ insert x (mulSupport f)", " a ∈ mulSupport (update f a y) ↔ a ∈ insert a (mulSupport f)", " mulSupport (update f x 1) = mulSupport f \\ {...
[ " mulSupport f = s ↔ (βˆ€ x ∈ s, f x β‰  1) ∧ βˆ€ x βˆ‰ s, f x = 1", " f x = g x", " mulSupport (update f x y) = insert x (mulSupport f)", " a ∈ mulSupport (update f x y) ↔ a ∈ insert x (mulSupport f)", " a ∈ mulSupport (update f a y) ↔ a ∈ insert a (mulSupport f)", " mulSupport (update f x 1) = mulSupport f \\ {...
import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Limits.Constructions.EpiMono import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import category_theory.glue_data from "l...
Mathlib/CategoryTheory/GlueData.lean
93
95
theorem t'_iji (i j : D.J) : D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd := by
rw [← Category.assoc, ← D.t_fac] simp
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd", " D.t' i j i = pullback.fst ≫ D.t i j ≫ inv pullback.snd", " D.t' i j i = (D.t' i j i ≫ pullback.snd) ≫ inv pullback.snd" ]
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd" ]
import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" universe u v noncompu...
Mathlib/FieldTheory/RatFunc/Basic.lean
117
118
theorem ofFractionRing_neg (p : FractionRing K[X]) : ofFractionRing (-p) = -ofFractionRing p := by
simp only [Neg.neg, RatFunc.neg]
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }", " { toFractionRing := -p } = -{ toFractionRing := p }" ]
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }" ]
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Finiteness import Mathlib.GroupTheory.GroupAction.Quotient #align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" namespace Subgroup open Ca...
Mathlib/GroupTheory/Index.lean
126
129
theorem relindex_mul_relindex (hHK : H ≀ K) (hKL : K ≀ L) : H.relindex K * K.relindex L = H.relindex L := by
rw [← relindex_subgroupOf hKL] exact relindex_mul_index fun x hx => hHK hx
[ " (comap f H).index = H.index", " βˆ€ (x y : G'), Setoid.r x y ↔ Setoid.r (f x) (f y)", " βˆ€ (x y : G'), x⁻¹ * y ∈ comap f H ↔ (f x)⁻¹ * f y ∈ H", " f (x⁻¹ * y) = (f x)⁻¹ * f y", " Function.Injective (Quotient.map' ⇑f β‹―)", " βˆ€ ⦃aβ‚‚ : G' β§Έ comap f H⦄, Quotient.map' ⇑f β‹― (Quotient.mk'' x) = Quotient.map' ⇑f β‹― a...
[ " (comap f H).index = H.index", " βˆ€ (x y : G'), Setoid.r x y ↔ Setoid.r (f x) (f y)", " βˆ€ (x y : G'), x⁻¹ * y ∈ comap f H ↔ (f x)⁻¹ * f y ∈ H", " f (x⁻¹ * y) = (f x)⁻¹ * f y", " Function.Injective (Quotient.map' ⇑f β‹―)", " βˆ€ ⦃aβ‚‚ : G' β§Έ comap f H⦄, Quotient.map' ⇑f β‹― (Quotient.mk'' x) = Quotient.map' ⇑f β‹― a...
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
76
84
theorem mem_of_nextOr_ne {xs : List Ξ±} {x d : Ξ±} (h : nextOr xs x d β‰  d) : x ∈ xs := by
induction' xs with y ys IH Β· simp at h cases' ys with z zs Β· simp at h Β· by_cases hx : x = y Β· simp [hx] Β· rw [nextOr_cons_of_ne _ _ _ _ hx] at h simpa [hx] using IH h
[ " (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.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
93
106
theorem exists_chain_of_le_chainHeight {n : β„•} (hn : ↑n ≀ s.chainHeight) : βˆƒ l ∈ s.subchain, length l = n := by
rcases (le_top : s.chainHeight ≀ ⊀).eq_or_lt with ha | ha <;> rw [chainHeight_eq_iSup_subtype] at ha Β· obtain ⟨_, ⟨⟨l, h₁, hβ‚‚βŸ©, rfl⟩, hβ‚ƒβŸ© := not_bddAbove_iff'.mp (WithTop.iSup_coe_eq_top.1 ha) n exact ⟨l.take n, ⟨h₁.take _, fun x h ↦ hβ‚‚ _ <| take_subset _ _ h⟩, (l.length_take n).trans <| min_eq...
[ " 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" ]
[ " a :: l ∈ s.subchain ↔ a ∈ s ∧ l ∈ s.subchain ∧ βˆ€ b ∈ l.head?, a < b", " [a] ∈ s.subchain ↔ a ∈ s" ]
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.SetTheory.Cardinal.Cofinality #align_import linear_algebra.basis from "leanprover-communit...
Mathlib/LinearAlgebra/Basis.lean
149
150
theorem repr_self_apply (j) [Decidable (i = j)] : b.repr (b i) j = if i = j then 1 else 0 := by
rw [repr_self, Finsupp.single_apply]
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
54
56
theorem pythagoreanTriple_comm {x y z : β„€} : PythagoreanTriple x y z ↔ PythagoreanTriple y x z := by
delta PythagoreanTriple rw [add_comm]
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z" ]
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2" ]
import Mathlib.Data.List.OfFn import Mathlib.Data.List.Range #align_import data.list.indexes from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero universe u v open Function namespace List variable {Ξ± : Type u} {Ξ² : Type v} section MapIdx -- Porting n...
Mathlib/Data/List/Indexes.lean
141
147
theorem mapIdx_append_one : βˆ€ (f : β„• β†’ Ξ± β†’ Ξ²) (l : List Ξ±) (e : Ξ±), mapIdx f (l ++ [e]) = mapIdx f l ++ [f l.length e] := by
intros f l e unfold mapIdx rw [mapIdxGo_append f l [e]] simp only [mapIdx.go, Array.size_toArray, mapIdxGo_length, length_nil, Nat.add_zero, Array.toList_eq, Array.push_data, Array.data_toArray]
[ " List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l", " List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []", " List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)", " List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ...
[ " List.oldMapIdxCore f n l = List.oldMapIdx (fun i a => f (i + n) a) l", " List.oldMapIdxCore f n [] = List.oldMapIdx (fun i a => f (i + n) a) []", " List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdx (fun i a => f (i + n) a) (hd :: tl)", " List.oldMapIdxCore f n (hd :: tl) = List.oldMapIdxCore (fun i a => f ...
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Preserves.Basic #align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac" noncomputable section universe v₁ vβ‚‚ u₁ uβ‚‚ -- Porting note: ne...
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean
232
235
theorem PreservesPushout.inr_iso_hom : pushout.inr ≫ (PreservesPushout.iso G f g).hom = G.map pushout.inr := by
delta PreservesPushout.iso simp
[ " G.map f ≫ G.map h = G.map g ≫ G.map k", " βˆ€ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β‹™ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β‹™ G)).symm.hom).obj\n ...
[ " G.map f ≫ G.map h = G.map g ≫ G.map k", " βˆ€ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g β‹™ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ΞΉ.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g β‹™ G)).symm.hom).obj\n ...
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
60
61
theorem PythagoreanTriple.zero : PythagoreanTriple 0 0 0 := by
simp only [PythagoreanTriple, zero_mul, zero_add]
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z" ]
import Mathlib.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.LinearAlgebra.StdBasis import Mathlib.RingTheory.AlgebraTower import Mathlib.Algebra.Algebra.Subalgebra.Tower #align_import linear_algebra.matrix.to_lin from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6" ...
Mathlib/LinearAlgebra/Matrix/ToLin.lean
102
110
theorem range_vecMulLinear (M : Matrix m n R) : LinearMap.range M.vecMulLinear = span R (range M) := by
letI := Classical.decEq m simp_rw [range_eq_map, ← iSup_range_stdBasis, Submodule.map_iSup, range_eq_map, ← Ideal.span_singleton_one, Ideal.span, Submodule.map_span, image_image, image_singleton, Matrix.vecMulLinear_apply, iSup_span, range_eq_iUnion, iUnion_singleton_eq_range, LinearMap.stdBasis, coe_s...
[ " ((LinearMap.stdBasis R (fun x => R) i) 1 α΅₯* M) j = M i j", " βˆ‘ i' : m, (if i = i' then 1 else 0) * M i' j = M i j", " βˆ‘ x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ = if i = x✝ then 1 else 0", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ =...
[ " ((LinearMap.stdBasis R (fun x => R) i) 1 α΅₯* M) j = M i j", " βˆ‘ i' : m, (if i = i' then 1 else 0) * M i' j = M i j", " βˆ‘ x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ = if i = x✝ then 1 else 0", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ =...
import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar #align_import measure_theory.measure.haar.inner_product_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open FiniteDimensional MeasureTheory MeasureTheory.Measure Set var...
Mathlib/MeasureTheory/Measure/Haar/InnerProductSpace.lean
61
66
theorem OrthonormalBasis.volume_parallelepiped (b : OrthonormalBasis ΞΉ ℝ F) : volume (parallelepiped b) = 1 := by
haveI : Fact (finrank ℝ F = finrank ℝ F) := ⟨rfl⟩ let o := (stdOrthonormalBasis ℝ F).toBasis.orientation rw [← o.measure_eq_volume] exact o.measure_orthonormalBasis b
[ " o.volumeForm.measure (parallelepiped ⇑b) = 1", " ΞΉ ≃ Fin n", " Fintype.card ΞΉ = n", " ⇑b = ⇑(b.reindex e) ∘ ⇑e", " b x = (⇑(b.reindex e) ∘ ⇑e) x", " o.volumeForm.measure = volume", " addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume", " volume (parallelepiped ⇑b) = 1" ]
[ " o.volumeForm.measure (parallelepiped ⇑b) = 1", " ΞΉ ≃ Fin n", " Fintype.card ΞΉ = n", " ⇑b = ⇑(b.reindex e) ∘ ⇑e", " b x = (⇑(b.reindex e) ∘ ⇑e) x", " o.volumeForm.measure = volume", " addHaarMeasure (stdOrthonormalBasis ℝ F).toBasis.parallelepiped = volume" ]
import Mathlib.Data.Countable.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Order.Disjointed import Mathlib.MeasureTheory.OuterMeasure.Defs #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set F...
Mathlib/MeasureTheory/OuterMeasure/Basic.lean
96
100
theorem measure_diff_null (ht : ΞΌ t = 0) : ΞΌ (s \ t) = ΞΌ s := (measure_mono diff_subset).antisymm <| calc ΞΌ s ≀ ΞΌ (s ∩ t) + ΞΌ (s \ t) := measure_le_inter_add_diff _ _ _ _ ≀ ΞΌ t + ΞΌ (s \ t) := by
gcongr; apply inter_subset_right _ = ΞΌ (s \ t) := by simp [ht]
[ " ΞΌ (⋃ i, s i) ≀ βˆ‘' (i : ΞΉ), ΞΌ (s i)", " (fun x x_1 => x ≀ x_1) (ΞΌ (⨆ i, t i)) (βˆ‘' (i : β„•), ΞΌ (t i))", " ΞΌ (⋃ i, t i) = ΞΌ (⋃ i, disjointed t i)", " βˆ‘' (i : β„•), ΞΌ (disjointed t i) ≀ βˆ‘' (i : β„•), ΞΌ (t i)", " disjointed t a✝ βŠ† t a✝", " ΞΌ (⋃ i ∈ I, s i) ≀ βˆ‘' (i : ↑I), ΞΌ (s ↑i)", " ΞΌ (⋃ x, s ↑x) ≀ βˆ‘' (i : ↑I)...
[ " ΞΌ (⋃ i, s i) ≀ βˆ‘' (i : ΞΉ), ΞΌ (s i)", " (fun x x_1 => x ≀ x_1) (ΞΌ (⨆ i, t i)) (βˆ‘' (i : β„•), ΞΌ (t i))", " ΞΌ (⋃ i, t i) = ΞΌ (⋃ i, disjointed t i)", " βˆ‘' (i : β„•), ΞΌ (disjointed t i) ≀ βˆ‘' (i : β„•), ΞΌ (t i)", " disjointed t a✝ βŠ† t a✝", " ΞΌ (⋃ i ∈ I, s i) ≀ βˆ‘' (i : ↑I), ΞΌ (s ↑i)", " ΞΌ (⋃ x, s ↑x) ≀ βˆ‘' (i : ↑I)...
import Mathlib.Algebra.Order.Archimedean import Mathlib.Order.Filter.AtTopBot import Mathlib.Tactic.GCongr #align_import order.filter.archimedean from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" variable {Ξ± R : Type*} open Filter Set Function @[simp] theorem Nat.comap_cast_atTop [S...
Mathlib/Order/Filter/Archimedean.lean
100
102
theorem Filter.Eventually.intCast_atBot [StrictOrderedRing R] [Archimedean R] {p : R β†’ Prop} (h : βˆ€αΆ  (x:R) in atBot, p x) : βˆ€αΆ  (n:β„€) in atBot, p n := by
rw [← Int.comap_cast_atBot (R := R)]; exact h.comap _
[ " ↑(-↑n) ≀ r", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto f l atTop", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto (Int.cast ∘ f) l atTop", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto f l atBot", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Int.cast ∘ f) l atBot", " βˆ€αΆ  (n : β„€) in atTop, p ↑n", "...
[ " ↑(-↑n) ≀ r", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto f l atTop", " Tendsto (fun n => ↑(f n)) l atTop ↔ Tendsto (Int.cast ∘ f) l atTop", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto f l atBot", " Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Int.cast ∘ f) l atBot", " βˆ€αΆ  (n : β„€) in atTop, p ↑n", "...
import Mathlib.Data.Fintype.List #align_import data.list.cycle from "leanprover-community/mathlib"@"7413128c3bcb3b0818e3e18720abc9ea3100fb49" assert_not_exists MonoidWithZero open List def Cycle (Ξ± : Type*) : Type _ := Quotient (IsRotated.setoid Ξ±) #align cycle Cycle namespace Cycle variable {Ξ± : Type*} --...
Mathlib/Data/List/Cycle.lean
601
602
theorem subsingleton_reverse_iff {s : Cycle Ξ±} : s.reverse.Subsingleton ↔ s.Subsingleton := by
simp [length_subsingleton_iff]
[ " (a :: l).rotate 1 = l ++ [a]", " C (Quotient.mk'' l)", " C (Quotient.mk'' [])", " βˆ€ (head : Ξ±) (tail : List Ξ±), C (Quotient.mk'' tail) β†’ C (Quotient.mk'' (head :: tail))", " βˆ€ (head : Ξ±) (tail : List Ξ±), C ↑tail β†’ C ↑(head :: tail)", " (reverse (Quot.mk Setoid.r x✝)).reverse = Quot.mk Setoid.r x✝", " ...
[ " (a :: l).rotate 1 = l ++ [a]", " C (Quotient.mk'' l)", " C (Quotient.mk'' [])", " βˆ€ (head : Ξ±) (tail : List Ξ±), C (Quotient.mk'' tail) β†’ C (Quotient.mk'' (head :: tail))", " βˆ€ (head : Ξ±) (tail : List Ξ±), C ↑tail β†’ C ↑(head :: tail)", " (reverse (Quot.mk Setoid.r x✝)).reverse = Quot.mk Setoid.r x✝" ]
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Group.TypeTags import Mathlib.Algebra.Ring.Hom.Defs import Mathlib.Algebra.Ring.Nat #align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" assert_not_e...
Mathlib/Data/Nat/Cast/Basic.lean
159
164
theorem ext_nat'' [MonoidWithZeroHomClass F β„• A] (f g : F) (h_pos : βˆ€ {n : β„•}, 0 < n β†’ f n = g n) : f = g := by
apply DFunLike.ext rintro (_ | n) Β· simp [map_zero f, map_zero g] Β· exact h_pos n.succ_pos
[ " f = g", " βˆ€ (x : β„•), f x = g x", " f 0 = g 0", " f (n + 1) = g (n + 1)" ]
[]
import Mathlib.Algebra.Polynomial.Mirror import Mathlib.Analysis.Complex.Polynomial #align_import data.polynomial.unit_trinomial from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" namespace Polynomial open scoped Polynomial open Finset section Semiring variable {R : Type*} [Semirin...
Mathlib/Algebra/Polynomial/UnitTrinomial.lean
95
97
theorem trinomial_leadingCoeff (hkm : k < m) (hmn : m < n) (hw : w β‰  0) : (trinomial k m n u v w).leadingCoeff = w := by
rw [leadingCoeff, trinomial_natDegree hkm hmn hw, trinomial_leading_coeff' hkm hmn]
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u", " (trinomial k m n u v w).natDegree = n", " (trinomial k m n u v w).coeff n β‰  0", " ↑i ≀ ↑n", " ↑i ≀ ↑i", " (trinomial k m n u v w).natTrailingDegree = k", " (trinomial k m n u v w...
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u", " (trinomial k m n u v w).natDegree = n", " (trinomial k m n u v w).coeff n β‰  0", " ↑i ≀ ↑n", " ↑i ≀ ↑i", " (trinomial k m n u v w).natTrailingDegree = k", " (trinomial k m n u v w...
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ΞΉ : Sort*} {π•œ E : Type*} section OrderedSemiring variable (π•œ) [OrderedSemiring π•œ] [AddCommMonoid E] [Module π•œ E] {s t s₁ sβ‚‚ t₁ tβ‚‚ u : Set ...
Mathlib/Analysis/Convex/Join.lean
36
37
theorem mem_convexJoin : x ∈ convexJoin π•œ s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, x ∈ segment π•œ a b := by
simp [convexJoin]
[ " x ∈ convexJoin π•œ s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, x ∈ segment π•œ a b" ]
[]
import Mathlib.GroupTheory.QuotientGroup #align_import algebra.char_zero.quotient from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46" variable {R : Type*} [DivisionRing R] [CharZero R] {p : R} namespace AddSubgroup theorem zsmul_mem_zmultiples_iff_exists_sub_div {r : R} {z : β„€} (hz :...
Mathlib/Algebra/CharZero/Quotient.lean
42
47
theorem nsmul_mem_zmultiples_iff_exists_sub_div {r : R} {n : β„•} (hn : n β‰  0) : n β€’ r ∈ AddSubgroup.zmultiples p ↔ βˆƒ k : Fin n, r - (k : β„•) β€’ (p / n : R) ∈ AddSubgroup.zmultiples p := by
rw [← natCast_zsmul r, zsmul_mem_zmultiples_iff_exists_sub_div (Int.natCast_ne_zero.mpr hn), Int.cast_natCast] rfl
[ " z β€’ r ∈ zmultiples p ↔ βˆƒ k, r - ↑k β€’ (p / ↑z) ∈ zmultiples p", " (βˆƒ k, k β€’ p = z β€’ r) ↔ βˆƒ k, r - ↑k β€’ (p / ↑z) ∈ zmultiples p", " (βˆƒ k, k β€’ p = z β€’ r) ↔ βˆƒ k k_1, k_1 β€’ p + ↑k β€’ p * (↑z)⁻¹ = r", "R : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : β„€\nhz : z β‰  0\nhz' : ↑z β‰  0\n| βˆƒ k k_1, k...
[ " z β€’ r ∈ zmultiples p ↔ βˆƒ k, r - ↑k β€’ (p / ↑z) ∈ zmultiples p", " (βˆƒ k, k β€’ p = z β€’ r) ↔ βˆƒ k, r - ↑k β€’ (p / ↑z) ∈ zmultiples p", " (βˆƒ k, k β€’ p = z β€’ r) ↔ βˆƒ k k_1, k_1 β€’ p + ↑k β€’ p * (↑z)⁻¹ = r", "R : Type u_1\ninst✝¹ : DivisionRing R\ninst✝ : CharZero R\np r : R\nz : β„€\nhz : z β‰  0\nhz' : ↑z β‰  0\n| βˆƒ k k_1, k...
import Mathlib.Data.Set.Prod import Mathlib.Logic.Equiv.Fin import Mathlib.ModelTheory.LanguageMap #align_import model_theory.syntax from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable (L : Language.{u, v}) {L' : L...
Mathlib/ModelTheory/Syntax.lean
284
290
theorem comp_onTerm {L'' : Language} (Ο† : L' β†’α΄Έ L'') (ψ : L β†’α΄Έ L') : ((Ο†.comp ψ).onTerm : L.Term Ξ± β†’ L''.Term Ξ±) = Ο†.onTerm ∘ ψ.onTerm := by
ext t induction' t with _ _ _ _ ih Β· rfl Β· simp_rw [onTerm, ih] rfl
[ " (LHom.id L).onTerm = id", " (LHom.id L).onTerm t = id t", " (LHom.id L).onTerm (var a✝) = id (var a✝)", " (LHom.id L).onTerm (func _f✝ _ts✝) = id (func _f✝ _ts✝)", " (func ((LHom.id L).onFunction _f✝) fun i => id (_ts✝ i)) = id (func _f✝ _ts✝)", " (Ο†.comp ψ).onTerm = Ο†.onTerm ∘ ψ.onTerm", " (Ο†.comp ψ)...
[ " (LHom.id L).onTerm = id", " (LHom.id L).onTerm t = id t", " (LHom.id L).onTerm (var a✝) = id (var a✝)", " (LHom.id L).onTerm (func _f✝ _ts✝) = id (func _f✝ _ts✝)", " (func ((LHom.id L).onFunction _f✝) fun i => id (_ts✝ i)) = id (func _f✝ _ts✝)" ]
import Mathlib.LinearAlgebra.Basis import Mathlib.Algebra.Module.LocalizedModule import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Localization.Integer #align_import ring_theory.localization.module from "leanprover-community/mathlib"@"2e59a6de168f95d16b16d217b808a36290398c0a" open nonZ...
Mathlib/RingTheory/Localization/Module.lean
56
71
theorem LinearIndependent.of_isLocalizedModule {ΞΉ : Type*} {v : ΞΉ β†’ M} (hv : LinearIndependent R v) : LinearIndependent Rβ‚› (f ∘ v) := by
rw [linearIndependent_iff'] at hv ⊒ intro t g hg i hi choose! a g' hg' using IsLocalization.exist_integer_multiples S t g have h0 : f (βˆ‘ i ∈ t, g' i β€’ v i) = 0 := by apply_fun ((a : R) β€’ Β·) at hg rw [smul_zero, Finset.smul_sum] at hg rw [map_sum, ← hg] refine Finset.sum_congr rfl fun i hi => ?_...
[ " x ∈ span Rβ‚› (⇑f '' v)", " f (m, s).1 ∈ ↑(span R (⇑f '' v))", " (↑R f) (m, s).1 ∈ ↑(map (↑R f) ⊀)", " LinearIndependent Rβ‚› (⇑f ∘ v)", " βˆ€ (s : Finset ΞΉ) (g : ΞΉ β†’ Rβ‚›), βˆ‘ i ∈ s, g i β€’ (⇑f ∘ v) i = 0 β†’ βˆ€ i ∈ s, g i = 0", " g i = 0", " f (βˆ‘ i ∈ t, g' i β€’ v i) = 0", " βˆ‘ x ∈ t, f (g' x β€’ v x) = βˆ‘ x ∈ t, ↑a...
[ " x ∈ span Rβ‚› (⇑f '' v)", " f (m, s).1 ∈ ↑(span R (⇑f '' v))", " (↑R f) (m, s).1 ∈ ↑(map (↑R f) ⊀)" ]
import Mathlib.Algebra.DirectLimit import Mathlib.Algebra.CharP.Algebra import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.FieldTheory.SplittingField.Construction #align_import field_theory.is_alg_closed.algebraic_closure from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87" univ...
Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean
85
94
theorem spanEval_ne_top : spanEval k β‰  ⊀ := by
rw [Ideal.ne_top_iff_one, spanEval, Ideal.span, ← Set.image_univ, Finsupp.mem_span_image_iff_total] rintro ⟨v, _, hv⟩ replace hv := congr_arg (toSplittingField k v.support) hv rw [AlgHom.map_one, Finsupp.total_apply, Finsupp.sum, AlgHom.map_sum, Finset.sum_eq_zero] at hv Β· exact zero_ne_one hv intro j ...
[ " (toSplittingField k s) (evalXSelf k f) = 0", " Polynomial.evalβ‚‚ (algebraMap k (∏ x ∈ s, ↑x).SplittingField)\n (rootOfSplits (algebraMap k (∏ x ∈ s, ↑x).SplittingField) β‹― β‹―) ↑f =\n 0", " spanEval k β‰  ⊀", " Β¬βˆƒ l ∈ Finsupp.supported (MvPolynomial (MonicIrreducible k) k) (MvPolynomial (MonicIrreducible ...
[ " (toSplittingField k s) (evalXSelf k f) = 0", " Polynomial.evalβ‚‚ (algebraMap k (∏ x ∈ s, ↑x).SplittingField)\n (rootOfSplits (algebraMap k (∏ x ∈ s, ↑x).SplittingField) β‹― β‹―) ↑f =\n 0" ]
import Mathlib.ModelTheory.FinitelyGenerated import Mathlib.ModelTheory.DirectLimit import Mathlib.ModelTheory.Bundled #align_import model_theory.fraisse from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398" universe u v w w' open scoped FirstOrder open Set CategoryTheory namespace Fir...
Mathlib/ModelTheory/Fraisse.lean
169
182
theorem age.countable_quotient [h : Countable M] : (Quotient.mk' '' L.age M).Countable := by
classical refine (congr_arg _ (Set.ext <| Quotient.forall.2 fun N => ?_)).mp (countable_range fun s : Finset M => ⟦⟨closure L (s : Set M), inferInstance⟩⟧) constructor · rintro ⟨s, hs⟩ use Bundled.of (closure L (s : Set M)) exact ⟨⟨(fg_iff_structure_fg _).1 (fg_closure s.finite_toSet), ⟨Substructur...
[ " (Quotient.mk' '' L.age M).Countable", " (⟦N⟧ ∈ range fun s => ⟦{ Ξ± := β†₯((closure L).toFun ↑s), str := inferInstance }⟧) ↔ ⟦N⟧ ∈ Quotient.mk' '' L.age M", " (⟦N⟧ ∈ range fun s => ⟦{ Ξ± := β†₯((closure L).toFun ↑s), str := inferInstance }⟧) β†’ ⟦N⟧ ∈ Quotient.mk' '' L.age M", " ⟦N⟧ ∈ Quotient.mk' '' L.age M", " ...
[]
import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Asymptotics.SpecificAsymptotics import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Metric S...
Mathlib/Analysis/Complex/RemovableSingularity.lean
34
43
theorem analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt {f : β„‚ β†’ E} {c : β„‚} (hd : βˆ€αΆ  z in 𝓝[β‰ ] c, DifferentiableAt β„‚ f z) (hc : ContinuousAt f c) : AnalyticAt β„‚ f c := by
rcases (nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with ⟨R, hR0, hRs⟩ lift R to ℝβ‰₯0 using hR0.le replace hc : ContinuousOn f (closedBall c R) := by refine fun z hz => ContinuousAt.continuousWithinAt ?_ rcases eq_or_ne z c with (rfl | hne) exacts [hc, (hRs ⟨hz, hne⟩).continuousAt] exa...
[ " AnalyticAt β„‚ f c", " ContinuousOn f (closedBall c ↑R)", " ContinuousAt f z" ]
[]
import Mathlib.AlgebraicTopology.DoldKan.Faces import Mathlib.CategoryTheory.Idempotents.Basic #align_import algebraic_topology.dold_kan.projections from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Pread...
Mathlib/AlgebraicTopology/DoldKan/Projections.lean
100
101
theorem Q_f_0_eq (q : β„•) : ((Q q).f 0 : X _[0] ⟢ X _[0]) = 0 := by
simp only [HomologicalComplex.sub_f_apply, HomologicalComplex.id_f, Q, P_f_0_eq, sub_self]
[ " (P q).f 0 = πŸ™ (K[X].X 0)", " (P 0).f 0 = πŸ™ (K[X].X 0)", " (P (q + 1)).f 0 = πŸ™ (K[X].X 0)", " P q + Q q = πŸ™ K[X]", " P q + (πŸ™ K[X] - P q) = πŸ™ K[X]", " Q (q + 1) = Q q - P q ≫ HΟƒ q", " πŸ™ K[X] - (P q + P q ≫ HΟƒ q) = πŸ™ K[X] - P q - P q ≫ HΟƒ q", " (Q q).f 0 = 0" ]
[ " (P q).f 0 = πŸ™ (K[X].X 0)", " (P 0).f 0 = πŸ™ (K[X].X 0)", " (P (q + 1)).f 0 = πŸ™ (K[X].X 0)", " P q + Q q = πŸ™ K[X]", " P q + (πŸ™ K[X] - P q) = πŸ™ K[X]", " Q (q + 1) = Q q - P q ≫ HΟƒ q", " πŸ™ K[X] - (P q + P q ≫ HΟƒ q) = πŸ™ K[X] - P q - P q ≫ HΟƒ q" ]
import Mathlib.AlgebraicTopology.DoldKan.FunctorN #align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan non...
Mathlib/AlgebraicTopology/DoldKan/Normalized.lean
77
78
theorem PInftyToNormalizedMooreComplex_comp_inclusionOfMooreComplexMap (X : SimplicialObject A) : PInftyToNormalizedMooreComplex X ≫ inclusionOfMooreComplexMap X = PInfty := by
aesop_cat
[ " (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.Ξ΄ j.succ = 0", " (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow ≫ X.Ξ΄ j.succ = 0", " j ∈ Finset.univ", " (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)", " (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)", " (No...
[ " (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.Ξ΄ j.succ = 0", " (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow ≫ X.Ξ΄ j.succ = 0", " j ∈ Finset.univ", " (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)", " (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)", " (No...
import Mathlib.Dynamics.Flow import Mathlib.Tactic.Monotonicity #align_import dynamics.omega_limit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function Filter Topology section omegaLimit variable {Ο„ : Type*} {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} def omegaLimit [Topol...
Mathlib/Dynamics/OmegaLimit.lean
142
144
theorem mem_omegaLimit_iff_frequentlyβ‚‚ (y : Ξ²) : y ∈ Ο‰ f Ο• s ↔ βˆ€ n ∈ 𝓝 y, βˆƒαΆ  t in f, (Ο• t '' s ∩ n).Nonempty := by
simp_rw [mem_omegaLimit_iff_frequently, image_inter_nonempty_iff]
[ " Ο‰ f₁ (fun t x => Ο• (m t) x) s βŠ† Ο‰ fβ‚‚ Ο• s", " closure (image2 (fun t x => Ο• (m t) x) (m ⁻¹' u) s) βŠ† closure (image2 Ο• u s)", " closure (image2 Ο• ((fun t => m t) '' (m ⁻¹' u)) s) βŠ† closure (image2 Ο• u s)", " MapsTo gb (Ο‰ f Ο• s) (Ο‰ f Ο•' s')", " βˆ€ ⦃x : β⦄, (βˆ€ i ∈ f, x ∈ closure (image2 Ο• i s)) β†’ βˆ€ i ∈ f, gb x...
[ " Ο‰ f₁ (fun t x => Ο• (m t) x) s βŠ† Ο‰ fβ‚‚ Ο• s", " closure (image2 (fun t x => Ο• (m t) x) (m ⁻¹' u) s) βŠ† closure (image2 Ο• u s)", " closure (image2 Ο• ((fun t => m t) '' (m ⁻¹' u)) s) βŠ† closure (image2 Ο• u s)", " MapsTo gb (Ο‰ f Ο• s) (Ο‰ f Ο•' s')", " βˆ€ ⦃x : β⦄, (βˆ€ i ∈ f, x ∈ closure (image2 Ο• i s)) β†’ βˆ€ i ∈ f, gb x...
import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Complex #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" noncomputable secti...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
90
101
theorem cos_eq_cos_iff {x y : β„‚} : cos x = cos y ↔ βˆƒ k : β„€, y = 2 * k * Ο€ + x ∨ y = 2 * k * Ο€ - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by
rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : β„‚) β‰  0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (βˆƒ k : β„€, y = 2 * k * Ο€ + x) ∨ βˆƒ k : β„€, y = 2 * k * Ο€ - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm...
[ " ΞΈ.cos = 0 ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 ↔ cexp (2 * ΞΈ * I) = -1", " cexp (ΞΈ * I - -ΞΈ * I) = -1 ↔ cexp (2 * ΞΈ * I) = -1", " (βˆƒ n, 2 * I * ΞΈ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * ΞΈ = ↑π * I + ↑x * (2 * ↑π * I) ↔ ΞΈ = (2 * ↑x +...
[ " ΞΈ.cos = 0 ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 ↔ cexp (2 * ΞΈ * I) = -1", " cexp (ΞΈ * I - -ΞΈ * I) = -1 ↔ cexp (2 * ΞΈ * I) = -1", " (βˆƒ n, 2 * I * ΞΈ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * ΞΈ = ↑π * I + ↑x * (2 * ↑π * I) ↔ ΞΈ = (2 * ↑x +...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.GeomSum import Mathlib.Data.Fintype.BigOperators import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.PowerSeries.WellKnown import Mathlib.Tactic.FieldSimp #align_import number_theory.bernoulli from "leanprover-community/mat...
Mathlib/NumberTheory/Bernoulli.lean
137
150
theorem sum_bernoulli' (n : β„•) : (βˆ‘ k ∈ range n, (n.choose k : β„š) * bernoulli' k) = n := by
cases' n with n Β· simp suffices ((n + 1 : β„š) * βˆ‘ k ∈ range n, ↑(n.choose k) / (n - k + 1) * bernoulli' k) = βˆ‘ x ∈ range n, ↑(n.succ.choose x) * bernoulli' x by rw_mod_cast [sum_range_succ, bernoulli'_def, ← this, choose_succ_self_right] ring simp_rw [mul_sum, ← mul_assoc] refine sum_congr r...
[ " bernoulli' n = 1 - βˆ‘ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k", " βˆ‘ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1", " βˆ‘ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0", " ↑(n.choose x) / (↑n - ↑...
[ " bernoulli' n = 1 - βˆ‘ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k", " βˆ‘ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1", " βˆ‘ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0", " ↑(n.choose x) / (↑n - ↑...
import Mathlib.Algebra.Regular.Basic import Mathlib.LinearAlgebra.Matrix.MvPolynomial import Mathlib.LinearAlgebra.Matrix.Polynomial import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matr...
Mathlib/LinearAlgebra/Matrix/Adjugate.lean
119
122
theorem cramer_row_self (i : n) (h : βˆ€ j, b j = A j i) : A.cramer b = Pi.single i A.det := by
rw [← transpose_transpose A, det_transpose] convert cramer_transpose_row_self Aα΅€ i exact funext h
[ " IsLinearMap Ξ± A.cramerMap", " βˆ€ (x y : n β†’ Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y", " βˆ€ (c : Ξ±) (x : n β†’ Ξ±), A.cramerMap (c β€’ x) = c β€’ A.cramerMap x", " A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝", " A.cramerMap (c✝ β€’ x✝) = c✝ β€’ A.cramerMap x✝", " A.cramerMap (x✝ + y✝) i = ...
[ " IsLinearMap Ξ± A.cramerMap", " βˆ€ (x y : n β†’ Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y", " βˆ€ (c : Ξ±) (x : n β†’ Ξ±), A.cramerMap (c β€’ x) = c β€’ A.cramerMap x", " A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝", " A.cramerMap (c✝ β€’ x✝) = c✝ β€’ A.cramerMap x✝", " A.cramerMap (x✝ + y✝) i = ...
import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set #align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set namespace OrderIso section Preorder variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²] @[simp] theorem preimage_I...
Mathlib/Order/Interval/Set/OrderIso.lean
30
32
theorem preimage_Ici (e : Ξ± ≃o Ξ²) (b : Ξ²) : e ⁻¹' Ici b = Ici (e.symm b) := by
ext x simp [← e.le_iff_le]
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)", " ⇑e ⁻¹' Ici b = Ici (e.symm b)", " x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)" ]
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² Ξ³ : Type*} section DenselyOrdered variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] [OrderTopology Ξ±] [DenselyOrdered Ξ±] {a b : Ξ±} {s : Set Ξ±} theorem closure_Ioi' {a : Ξ±} (h : (Io...
Mathlib/Topology/Order/DenselyOrdered.lean
111
112
theorem interior_Ico [NoMinOrder Ξ±] {a b : Ξ±} : interior (Ico a b) = Ioo a b := by
rw [← Ici_inter_Iio, interior_inter, interior_Ici, interior_Iio, Ioi_inter_Iio]
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
import Mathlib.Order.Interval.Set.ProjIcc import Mathlib.Topology.Algebra.Order.Field import Mathlib.Topology.Bornology.Hom import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.lipschitz from "leanprove...
Mathlib/Topology/MetricSpace/Lipschitz.lean
41
44
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} : LipschitzWith K f ↔ βˆ€ x y, dist (f x) (f y) ≀ K * dist x y := by
simp only [LipschitzWith, edist_nndist, dist_nndist] norm_cast
[ " LipschitzWith K f ↔ βˆ€ (x y : Ξ±), dist (f x) (f y) ≀ ↑K * dist x y", " (βˆ€ (x y : Ξ±), ↑(nndist (f x) (f y)) ≀ ↑K * ↑(nndist x y)) ↔ βˆ€ (x y : Ξ±), ↑(nndist (f x) (f y)) ≀ ↑K * ↑(nndist x y)" ]
[]
import Mathlib.Algebra.Star.Order import Mathlib.Topology.Instances.NNReal import Mathlib.Topology.Order.MonotoneContinuity #align_import data.real.sqrt from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004" open Set Filter open scoped Filter NNReal Topology namespace NNReal variable {x y...
Mathlib/Data/Real/Sqrt.lean
97
98
theorem sqrt_mul (x y : ℝβ‰₯0) : sqrt (x * y) = sqrt x * sqrt y := by
rw [sqrt_eq_iff_eq_sq, mul_pow, sq_sqrt, sq_sqrt]
[ " sqrt x * sqrt x = x", " sqrt (x * x) = x", " sqrt x = 0 ↔ x = 0", " sqrt x = 1 ↔ x = 1", " sqrt 0 = 0", " sqrt 1 = 1", " sqrt x ≀ 1 ↔ x ≀ 1", " 1 ≀ sqrt x ↔ 1 ≀ x", " sqrt (x * y) = sqrt x * sqrt y" ]
[ " sqrt x * sqrt x = x", " sqrt (x * x) = x", " sqrt x = 0 ↔ x = 0", " sqrt x = 1 ↔ x = 1", " sqrt 0 = 0", " sqrt 1 = 1", " sqrt x ≀ 1 ↔ x ≀ 1", " 1 ≀ sqrt x ↔ 1 ≀ x" ]
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
207
208
theorem preimage_add_const_Ioo : (fun x => x + a) ⁻¹' Ioo b c = Ioo (b - a) (c - a) := by
simp [← Ioi_inter_Iio]
[ " (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 => x + a) ⁻¹' Ico b c ...
[ " (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 => x + a) ⁻¹' Ico b c ...
import Mathlib.Algebra.BigOperators.Associated import Mathlib.Data.ZMod.Basic import Mathlib.Data.Nat.PrimeFin import Mathlib.RingTheory.Coprime.Lemmas namespace ZMod variable {n m : β„•} def unitsMap (hm : n ∣ m) : (ZMod m)Λ£ β†’* (ZMod n)Λ£ := Units.map (castHom hm (ZMod n)) lemma unitsMap_def (hm : n ∣ m) : unitsM...
Mathlib/Data/ZMod/Units.lean
38
63
theorem unitsMap_surjective [hm : NeZero m] (h : n ∣ m) : Function.Surjective (unitsMap h) := by
suffices βˆ€ x : β„•, x.Coprime n β†’ βˆƒ k : β„•, (x + k * n).Coprime m by intro x have ⟨k, hk⟩ := this x.val.val (val_coe_unit_coprime x) refine ⟨unitOfCoprime _ hk, Units.ext ?_⟩ have : NeZero n := ⟨fun hn ↦ hm.out (eq_zero_of_zero_dvd (hn β–Έ h))⟩ simp [unitsMap_def] intro x hx let ps := m.primeFacto...
[ " (unitsMap hm).comp (unitsMap hd) = unitsMap β‹―", " (Units.map ↑(castHom hm (ZMod n))).comp (Units.map ↑(castHom hd (ZMod m))) = Units.map ↑(castHom β‹― (ZMod n))", " Units.map ((↑(castHom hm (ZMod n))).comp ↑(castHom hd (ZMod m))) = Units.map ↑(castHom β‹― (ZMod n))", " unitsMap β‹― = MonoidHom.id (ZMod n)Λ£", " ...
[ " (unitsMap hm).comp (unitsMap hd) = unitsMap β‹―", " (Units.map ↑(castHom hm (ZMod n))).comp (Units.map ↑(castHom hd (ZMod m))) = Units.map ↑(castHom β‹― (ZMod n))", " Units.map ((↑(castHom hm (ZMod n))).comp ↑(castHom hd (ZMod m))) = Units.map ↑(castHom β‹― (ZMod n))", " unitsMap β‹― = MonoidHom.id (ZMod n)Λ£" ]
import Mathlib.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adjunction.Evaluation import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adhesive import Mathlib.CategoryTheory.Sites.ConcreteSheafification #align_import category_theory.sites.subsheaf from "leanprover-community/mathl...
Mathlib/CategoryTheory/Sites/Subsheaf.lean
122
130
theorem Subpresheaf.eq_top_iff_isIso : G = ⊀ ↔ IsIso G.ΞΉ := by
constructor Β· rintro rfl infer_instance Β· intro H ext U x apply iff_true_iff.mpr rw [← IsIso.inv_hom_id_apply (G.ΞΉ.app U) x] exact ((inv (G.ΞΉ.app U)) x).2
[ " x ∈ F.map x✝¹ ⁻¹' (fun U => ⊀) V", " { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.map (πŸ™ X) =\n πŸ™ ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.obj X)", " ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.map (πŸ™ X) ⟨x, property✝⟩) =...
[ " x ∈ F.map x✝¹ ⁻¹' (fun U => ⊀) V", " { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.map (πŸ™ X) =\n πŸ™ ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.obj X)", " ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, β‹―βŸ© }.map (πŸ™ X) ⟨x, property✝⟩) =...
import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" namespace Set variable {Ξ± Ξ² : Type*} {s t : Set Ξ±} noncomputable def encard (s : Set Ξ±) : β„•βˆž := PartENat.withTopEquiv (PartENat.card s) @[simp] theorem encard_uni...
Mathlib/Data/Set/Card.lean
78
80
theorem encard_eq_coe_toFinset_card (s : Set Ξ±) [Fintype s] : encard s = s.toFinset.card := by
have h := toFinite s rw [h.encard_eq_coe_toFinset_card, toFinite_toFinset]
[ " univ.encard = s.encard", " univ.encard = PartENat.withTopEquiv (PartENat.card Ξ±)", " s.encard = ↑h.toFinset.card", " s.encard = ↑s.toFinset.card" ]
[ " univ.encard = s.encard", " univ.encard = PartENat.withTopEquiv (PartENat.card Ξ±)", " s.encard = ↑h.toFinset.card" ]
import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.GroupAction.Basic namespace MulAction universe u v variable {Ξ± : Type v} variable {G : Type u} [Group G] [MulAction G Ξ±] variable {M : Type u} [Monoid M] [MulAction M Ξ±] @[to_additive "If the action is periodic, t...
Mathlib/GroupTheory/GroupAction/Period.lean
117
120
theorem period_bounded_of_exponent_pos (exp_pos : 0 < Monoid.exponent M) (m : M) : BddAbove (Set.range (fun a : Ξ± => period m a)) := by
use Monoid.exponent M simpa [upperBounds] using period_le_exponent exp_pos _
[ " m ^ 1 β€’ a = a", " period m a ∣ orderOf m", " period m a ∣ Monoid.exponent M", " BddAbove (Set.range fun a => period m a)", " Monoid.exponent M ∈ upperBounds (Set.range fun a => period m a)" ]
[ " m ^ 1 β€’ a = a", " period m a ∣ orderOf m", " period m a ∣ Monoid.exponent M" ]
import Mathlib.Algebra.Star.Basic import Mathlib.Data.Set.Finite import Mathlib.Data.Set.Pointwise.Basic #align_import algebra.star.pointwise from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" namespace Set open Pointwise local postfix:max "⋆" => star variable {Ξ± : Type*} {s t : Set...
Mathlib/Algebra/Star/Pointwise.lean
115
117
theorem star_singleton {Ξ² : Type*} [InvolutiveStar Ξ²] (x : Ξ²) : ({x} : Set Ξ²)⋆ = {x⋆} := by
ext1 y rw [mem_star, mem_singleton_iff, mem_singleton_iff, star_eq_iff_star_eq, eq_comm]
[ " a⋆ ∈ s⋆ ↔ a ∈ s", " star '' s = s⋆", " star '' s = star ⁻¹' s", " Function.LeftInverse star star", " Function.RightInverse star star", " xβœβ‹†β‹† = x✝", " s⋆⋆ = s", " s⋆ βŠ† t ↔ s βŠ† t⋆", " {x}⋆ = {x⋆}", " y ∈ {x}⋆ ↔ y ∈ {x⋆}" ]
[ " a⋆ ∈ s⋆ ↔ a ∈ s", " star '' s = s⋆", " star '' s = star ⁻¹' s", " Function.LeftInverse star star", " Function.RightInverse star star", " xβœβ‹†β‹† = x✝", " s⋆⋆ = s", " s⋆ βŠ† t ↔ s βŠ† t⋆" ]
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : ...
Mathlib/MeasureTheory/Group/Convolution.lean
65
67
theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by
unfold mconv simp
[ " dirac 1 βˆ— ΞΌ = ΞΌ", " map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) ΞΌ = ΞΌ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2", " ΞΌ βˆ— dirac 1 = ΞΌ", " map (fun x => x.1 * x.2) (ΞΌ.prod (dirac 1)) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) ΞΌ...
[ " dirac 1 βˆ— ΞΌ = ΞΌ", " map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) ΞΌ = ΞΌ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2", " ΞΌ βˆ— dirac 1 = ΞΌ", " map (fun x => x.1 * x.2) (ΞΌ.prod (dirac 1)) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) ΞΌ...
import Mathlib.Data.Set.Finite import Mathlib.Order.Partition.Finpartition #align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" namespace Setoid variable {Ξ± : Type*} theorem eq_of_mem_eqv_class {c : Set (Set Ξ±)} (H : βˆ€ a, βˆƒ! b ∈ c, a ∈ b) {x b b'} ...
Mathlib/Data/Setoid/Partition.lean
67
71
theorem classes_ker_subset_fiber_set {Ξ² : Type*} (f : Ξ± β†’ Ξ²) : (Setoid.ker f).classes βŠ† Set.range fun y => { x | f x = y } := by
rintro s ⟨x, rfl⟩ rw [Set.mem_range] exact ⟨f x, rfl⟩
[ " x ∈ s", " (ker f).classes βŠ† Set.range fun y => {x | f x = y}", " {x_1 | (ker f).Rel x_1 x} ∈ Set.range fun y => {x | f x = y}", " βˆƒ y, {x | f x = y} = {x_1 | (ker f).Rel x_1 x}" ]
[ " x ∈ s" ]
import Mathlib.Analysis.Convolution import Mathlib.Analysis.Calculus.BumpFunction.Normed import Mathlib.MeasureTheory.Integral.Average import Mathlib.MeasureTheory.Covering.Differentiation import Mathlib.MeasureTheory.Covering.BesicovitchVectorSpace import Mathlib.MeasureTheory.Measure.Haar.Unique #align_import analy...
Mathlib/Analysis/Calculus/BumpFunction/Convolution.lean
110
139
theorem ae_convolution_tendsto_right_of_locallyIntegrable {ΞΉ} {Ο† : ΞΉ β†’ ContDiffBump (0 : G)} {l : Filter ΞΉ} {K : ℝ} (hΟ† : Tendsto (fun i ↦ (Ο† i).rOut) l (𝓝 0)) (h'Ο† : βˆ€αΆ  i in l, (Ο† i).rOut ≀ K * (Ο† i).rIn) (hg : LocallyIntegrable g ΞΌ) : βˆ€α΅ xβ‚€ βˆ‚ΞΌ, Tendsto (fun i ↦ ((Ο† i).normed ΞΌ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€) ...
have : IsAddHaarMeasure μ := ⟨⟩ -- By Lebesgue differentiation theorem, the average of `g` on a small ball converges -- almost everywhere to the value of `g` as the radius shrinks to zero. -- We will see that this set of points satisfies the desired conclusion. filter_upwards [(Besicovitch.vitaliFamily μ).ae...
[ " (↑φ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€ = integral ΞΌ ↑φ β€’ g xβ‚€", " (Ο†.normed ΞΌ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€ = g xβ‚€", " ∫ (t : G), ((lsmul ℝ ℝ) (Ο†.normed ΞΌ t)) (g xβ‚€) βˆ‚ΞΌ = g xβ‚€", " 0 ≀ Ξ΅", " βˆ€α΅ (xβ‚€ : G) βˆ‚ΞΌ, Tendsto (fun i => ((Ο† i).normed ΞΌ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€) l (𝓝 (g xβ‚€))", " Tendsto (fun i => ((Ο† i).normed ΞΌ ⋆[lsmul ℝ ...
[ " (↑φ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€ = integral ΞΌ ↑φ β€’ g xβ‚€", " (Ο†.normed ΞΌ ⋆[lsmul ℝ ℝ, ΞΌ] g) xβ‚€ = g xβ‚€", " ∫ (t : G), ((lsmul ℝ ℝ) (Ο†.normed ΞΌ t)) (g xβ‚€) βˆ‚ΞΌ = g xβ‚€", " 0 ≀ Ξ΅" ]
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section WithDivisionRing variable {K : Type*}...
Mathlib/Algebra/ContinuedFractions/Translations.lean
116
117
theorem exists_conts_b_of_denom {B : K} (nth_denom_eq : g.denominators n = B) : βˆƒ conts, g.continuants n = conts ∧ conts.b = B := by
simpa
[ " βˆƒ conts, g.continuants n = conts ∧ conts.a = A", " βˆƒ conts, g.continuants n = conts ∧ conts.b = B" ]
[ " βˆƒ conts, g.continuants n = conts ∧ conts.a = A" ]
import Mathlib.Analysis.Calculus.LocalExtr.Rolle import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Topology.Algebra.Polynomial #align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" namespace Polynomial theorem card_roots_toFinset_...
Mathlib/Analysis/Calculus/LocalExtr/Polynomial.lean
91
94
theorem card_rootSet_le_derivative {F : Type*} [CommRing F] [Algebra F ℝ] (p : F[X]) : Fintype.card (p.rootSet ℝ) ≀ Fintype.card (p.derivative.rootSet ℝ) + 1 := by
simpa only [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe, derivative_map] using card_roots_toFinset_le_derivative (p.map (algebraMap F ℝ))
[ " p.roots.toFinset.card ≀ ((derivative p).roots.toFinset \\ p.roots.toFinset).card + 1", " 0 ≀ ((derivative (C (p.coeff 0))).roots.toFinset \\ βˆ…).card + 1", " derivative p β‰  derivative 0", " βˆƒ z ∈ (derivative p).roots.toFinset, x < z ∧ z < y", " z ∈ (derivative p).roots.toFinset", " βˆ‘ x ∈ p.roots.toFinset...
[ " p.roots.toFinset.card ≀ ((derivative p).roots.toFinset \\ p.roots.toFinset).card + 1", " 0 ≀ ((derivative (C (p.coeff 0))).roots.toFinset \\ βˆ…).card + 1", " derivative p β‰  derivative 0", " βˆƒ z ∈ (derivative p).roots.toFinset, x < z ∧ z < y", " z ∈ (derivative p).roots.toFinset", " βˆ‘ x ∈ p.roots.toFinset...
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
48
49
theorem expand_eq_sum {f : R[X]} : expand R p f = f.sum fun e a => C a * (X ^ p) ^ e := by
simp [expand, evalβ‚‚]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e" ]
[]
import Mathlib.Algebra.MonoidAlgebra.Basic #align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951" variable {k G : Type*} [Semiring k] namespace AddMonoidAlgebra section variable [AddCancelCommMonoid G] noncomputable def divOf (x : k[G]) (g...
Mathlib/Algebra/MonoidAlgebra/Division.lean
77
79
theorem divOf_zero (x : k[G]) : x /α΅’αΆ  0 = x := by
refine Finsupp.ext fun _ => ?_ -- Porting note: `ext` doesn't work simp only [AddMonoidAlgebra.divOf_apply, zero_add]
[ " x /α΅’αΆ  0 = x", " (x /α΅’αΆ  0) x✝ = x x✝" ]
[]
import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.Tactic.FieldSimp #align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open AffineMap variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE] def ...
Mathlib/LinearAlgebra/AffineSpace/Slope.lean
62
63
theorem sub_smul_slope_vadd (f : k β†’ PE) (a b : k) : (b - a) β€’ slope f a b +α΅₯ f a = f b := by
rw [sub_smul_slope, vsub_vadd]
[ " slope f a a = 0", " (b - a) β€’ slope f a b = f b -α΅₯ f a", " (a - a) β€’ slope f a a = f a -α΅₯ f a", " (b - a) β€’ slope f a b +α΅₯ f a = f b" ]
[ " slope f a a = 0", " (b - a) β€’ slope f a b = f b -α΅₯ f a", " (a - a) β€’ slope f a a = f a -α΅₯ f a" ]
import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set #align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set namespace OrderIso section Preorder variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²] @[simp] theorem preimage_I...
Mathlib/Order/Interval/Set/OrderIso.lean
58
59
theorem preimage_Ioc (e : Ξ± ≃o Ξ²) (a b : Ξ²) : e ⁻¹' Ioc a b = Ioc (e.symm a) (e.symm b) := by
simp [← Ioi_inter_Iic]
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)", " ⇑e ⁻¹' Ici b = Ici (e.symm b)", " x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)", " ⇑e ⁻¹' Iio b = Iio (e.symm b)", " x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)", " ⇑e ⁻¹' Ioi b = Ioi (e.symm b)", " x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"...
[ " ⇑e ⁻¹' Iic b = Iic (e.symm b)", " x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)", " ⇑e ⁻¹' Ici b = Ici (e.symm b)", " x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)", " ⇑e ⁻¹' Iio b = Iio (e.symm b)", " x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)", " ⇑e ⁻¹' Ioi b = Ioi (e.symm b)", " x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"...
import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.Bicategory.Coherence namespace CategoryTheory namespace Bicategory open Category open scoped Bicategory open Mathlib.Tactic.BicategoryCoherence (bicategoricalComp bicategoricalIsoComp) universe w v u variable {B : Type u} [Bicategory...
Mathlib/CategoryTheory/Bicategory/Adjunction.lean
205
206
theorem rightZigzagIso_inv : (rightZigzagIso Ξ· Ξ΅).inv = leftZigzag Ξ΅.inv Ξ·.inv := by
simp [bicategoricalComp, bicategoricalIsoComp]
[ " rightZigzag Ξ· Ξ΅ βŠ—β‰« rightZigzag Ξ· Ξ΅ = rightZigzag Ξ· Ξ΅", " (g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g) βŠ—β‰« g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g = g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g", " (g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g) βŠ—β‰« g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g = g ◁ Ξ· βŠ—β‰« (Ξ΅ β–· g β–· πŸ™ a ≫ (πŸ™ b ≫ g) ◁ Ξ·) βŠ—β‰« Ξ΅ β–· g", " g ◁ Ξ· ≫ (Ξ±_ g f g).inv ≫ Ξ΅ β–· g ≫ (Ξ»_ g).hom ≫ (ρ_ g).inv ≫ g ◁ Ξ· ≫ (Ξ±_ g f g).inv ≫ Ξ΅ β–· g =\n g ◁ Ξ· ≫...
[ " rightZigzag Ξ· Ξ΅ βŠ—β‰« rightZigzag Ξ· Ξ΅ = rightZigzag Ξ· Ξ΅", " (g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g) βŠ—β‰« g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g = g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g", " (g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g) βŠ—β‰« g ◁ Ξ· βŠ—β‰« Ξ΅ β–· g = g ◁ Ξ· βŠ—β‰« (Ξ΅ β–· g β–· πŸ™ a ≫ (πŸ™ b ≫ g) ◁ Ξ·) βŠ—β‰« Ξ΅ β–· g", " g ◁ Ξ· ≫ (Ξ±_ g f g).inv ≫ Ξ΅ β–· g ≫ (Ξ»_ g).hom ≫ (ρ_ g).inv ≫ g ◁ Ξ· ≫ (Ξ±_ g f g).inv ≫ Ξ΅ β–· g =\n g ◁ Ξ· ≫...
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b...
Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
217
231
theorem isBoundedLinearMap_prod_multilinear {E : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (E i)] [βˆ€ i, NormedSpace π•œ (E i)] : IsBoundedLinearMap π•œ fun p : ContinuousMultilinearMap π•œ E F Γ— ContinuousMultilinearMap π•œ E G => p.1.prod p.2 where map_add p₁ pβ‚‚ := by
ext : 1; rfl map_smul c p := by ext : 1; rfl bound := by refine ⟨1, zero_lt_one, fun p ↦ ?_⟩ rw [one_mul] apply ContinuousMultilinearMap.opNorm_le_bound _ (norm_nonneg _) _ intro m rw [ContinuousMultilinearMap.prod_apply, norm_prod_le_iff] constructor Β· exact (p.1.le_opNorm m).trans (mu...
[ " (p₁ + pβ‚‚).1.prod (p₁ + pβ‚‚).2 = p₁.1.prod p₁.2 + pβ‚‚.1.prod pβ‚‚.2", " ((p₁ + pβ‚‚).1.prod (p₁ + pβ‚‚).2) x✝ = (p₁.1.prod p₁.2 + pβ‚‚.1.prod pβ‚‚.2) x✝", " (c β€’ p).1.prod (c β€’ p).2 = c β€’ p.1.prod p.2", " ((c β€’ p).1.prod (c β€’ p).2) x✝ = (c β€’ p.1.prod p.2) x✝", " βˆƒ M, 0 < M ∧ βˆ€ (x : ContinuousMultilinearMap π•œ E F Γ— Co...
[]
import Mathlib.AlgebraicGeometry.OpenImmersion import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact import Mathlib.CategoryTheory.MorphismProperty.Composition import Mathlib.RingTheory.LocalProperties universe v u open CategoryTheory namespace AlgebraicGeometry class IsClosedImmersion {X Y : Scheme} (f : X ⟢...
Mathlib/AlgebraicGeometry/Morphisms/ClosedImmersion.lean
79
89
theorem spec_of_surjective {R S : CommRingCat} (f : R ⟢ S) (h : Function.Surjective f) : IsClosedImmersion (Scheme.specMap f) where base_closed := PrimeSpectrum.closedEmbedding_comap_of_surjective _ _ h surj_on_stalks x := by
erw [← localRingHom_comp_stalkIso, CommRingCat.coe_comp, CommRingCat.coe_comp] apply Function.Surjective.comp (Function.Surjective.comp _ _) _ Β· exact (ConcreteCategory.bijective_of_isIso (StructureSheaf.stalkIso S x).inv).2 Β· exact surjective_localRingHom_of_surjective f h x.asIdeal Β· let g := (St...
[ " IsClosedImmersion (f ≫ g)", " Function.Surjective ⇑(PresheafedSpace.stalkMap (f ≫ g).val x)", " Function.Surjective ⇑(PresheafedSpace.stalkMap g.val (f.val.base x) ≫ PresheafedSpace.stalkMap f.val x)", " MorphismProperty.RespectsIso @IsClosedImmersion", " βˆ€ {X Y Z : Scheme} (e : X β‰… Y) (f : Y ⟢ Z), IsClos...
[ " IsClosedImmersion (f ≫ g)", " Function.Surjective ⇑(PresheafedSpace.stalkMap (f ≫ g).val x)", " Function.Surjective ⇑(PresheafedSpace.stalkMap g.val (f.val.base x) ≫ PresheafedSpace.stalkMap f.val x)", " MorphismProperty.RespectsIso @IsClosedImmersion", " βˆ€ {X Y Z : Scheme} (e : X β‰… Y) (f : Y ⟢ Z), IsClos...
import Mathlib.FieldTheory.PrimitiveElement import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.G...
Mathlib/RingTheory/Norm.lean
118
121
theorem PowerBasis.norm_gen_eq_coeff_zero_minpoly (pb : PowerBasis R S) : norm R pb.gen = (-1) ^ pb.dim * coeff (minpoly R pb.gen) 0 := by
rw [norm_eq_matrix_det pb.basis, det_eq_sign_charpoly_coeff, charpoly_leftMulMatrix, Fintype.card_fin]
[ " (norm R) x = 1", " (if H : βˆƒ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk β‹―.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk β‹―.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (βˆƒ s, Nonempty (Basis { x // x ∈ s } R S)) β†’ Module.Finite R S", " Module.Finite R S", " (norm R) ...
[ " (norm R) x = 1", " (if H : βˆƒ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk β‹―.some) else 1) ((lmul R S) x) = 1", " (detAux (Trunc.mk β‹―.some)) ((lmul R S) x) = 1", " 1 ((lmul R S) x) = 1", " (βˆƒ s, Nonempty (Basis { x // x ∈ s } R S)) β†’ Module.Finite R S", " Module.Finite R S", " (norm R) ...
import Batteries.Data.RBMap.Basic import Mathlib.Init.Data.Nat.Notation import Mathlib.Mathport.Rename import Mathlib.Tactic.TypeStar import Mathlib.Util.CompileInductive #align_import data.tree from "leanprover-community/mathlib"@"ed989ff568099019c6533a4d94b27d852a5710d8" inductive Tree.{u} (Ξ± : Type u) : Type ...
Mathlib/Data/Tree/Basic.lean
94
96
theorem numLeaves_pos (x : Tree Ξ±) : 0 < x.numLeaves := by
rw [numLeaves_eq_numNodes_succ] exact x.numNodes.zero_lt_succ
[ " x.numLeaves = x.numNodes + 1", " nil.numLeaves = nil.numNodes + 1", " (node a✝² a✝¹ a✝).numLeaves = (node a✝² a✝¹ a✝).numNodes + 1", " 0 < x.numLeaves", " 0 < x.numNodes + 1" ]
[ " x.numLeaves = x.numNodes + 1", " nil.numLeaves = nil.numNodes + 1", " (node a✝² a✝¹ a✝).numLeaves = (node a✝² a✝¹ a✝).numNodes + 1" ]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
87
89
theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by
simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
[ " HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x" ]
[]
import Mathlib.Data.Set.Lattice #align_import data.set.accumulate from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" variable {Ξ± Ξ² Ξ³ : Type*} {s : Ξ± β†’ Set Ξ²} {t : Ξ± β†’ Set Ξ³} namespace Set def Accumulate [LE Ξ±] (s : Ξ± β†’ Set Ξ²) (x : Ξ±) : Set Ξ² := ⋃ y ≀ x, s y #align set.accumulate S...
Mathlib/Data/Set/Accumulate.lean
56
61
theorem iUnion_accumulate [Preorder Ξ±] : ⋃ x, Accumulate s x = ⋃ x, s x := by
apply Subset.antisymm · simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate] intro z x x' ⟨_, hz⟩ exact ⟨x', hz⟩ · exact iUnion_mono fun i => subset_accumulate
[ " z ∈ Accumulate s x ↔ βˆƒ y ≀ x, z ∈ s y", " ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y = ⋃ y, ⋃ (_ : y ≀ x), s y", " ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y βŠ† ⋃ y, ⋃ (_ : y ≀ x), s y", " ⋃ y, ⋃ (_ : y ≀ x), s y βŠ† ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y", " ⋃ x, Accumulate s x = ⋃ x, s x", " ⋃ x, Accumulate s x βŠ† ⋃ x, s x",...
[ " z ∈ Accumulate s x ↔ βˆƒ y ≀ x, z ∈ s y", " ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y = ⋃ y, ⋃ (_ : y ≀ x), s y", " ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y βŠ† ⋃ y, ⋃ (_ : y ≀ x), s y", " ⋃ y, ⋃ (_ : y ≀ x), s y βŠ† ⋃ y, ⋃ (_ : y ≀ x), Accumulate s y" ]
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.Tactic.PPWithUniv import Mathlib.Data.Set.Defs #align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace CategoryTheory -- morphism levels be...
Mathlib/CategoryTheory/Types.lean
170
172
theorem eqToHom_map_comp_apply (p : X = Y) (q : Y = Z) (x : F.obj X) : F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom <| p.trans q) x := by
aesop_cat
[ " f = g", " f x = g x", " Mono (β†Ύf)", " β†Ύf ≫ inv (β†Ύf) = πŸ™ Ξ±", " F.map (f ≫ g) a = F.map g (F.map f a)", " F.map (πŸ™ X) a = a", " F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom β‹―) x" ]
[ " f = g", " f x = g x", " Mono (β†Ύf)", " β†Ύf ≫ inv (β†Ύf) = πŸ™ Ξ±", " F.map (f ≫ g) a = F.map g (F.map f a)", " F.map (πŸ™ X) a = a" ]
import Mathlib.Data.Matrix.Basis import Mathlib.RingTheory.TensorProduct.Basic #align_import ring_theory.matrix_algebra from "leanprover-community/mathlib"@"6c351a8fb9b06e5a542fdf427bfb9f46724f9453" suppress_compilation universe u v w open TensorProduct open TensorProduct open Algebra.TensorProduct open Matri...
Mathlib/RingTheory/MatrixAlgebra.lean
113
121
theorem right_inv (M : Matrix n n A) : (toFunAlgHom R A n) (invFun R A n M) = M := by
simp only [invFun, AlgHom.map_sum, stdBasisMatrix, apply_ite ↑(algebraMap R A), smul_eq_mul, mul_boole, toFunAlgHom_apply, RingHom.map_zero, RingHom.map_one, Matrix.map_apply, Pi.smul_def] convert Finset.sum_product (Ξ² := Matrix n n A) conv_lhs => rw [matrix_eq_sum_std_basis M] refine Finset.sum_congr ...
[ " βˆ€ (a₁ aβ‚‚ : A) (b₁ bβ‚‚ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * aβ‚‚) βŠ—β‚œ[R] (b₁ * bβ‚‚)) =\n (toFunLinear R A n) (a₁ βŠ—β‚œ[R] b₁) * (toFunLinear R A n) (aβ‚‚ βŠ—β‚œ[R] bβ‚‚)", " (toFunLinear R A n) ((aβ‚βœ * aβ‚‚βœ) βŠ—β‚œ[R] (bβ‚βœ * bβ‚‚βœ)) =\n (toFunLinear R A n) (aβ‚βœ βŠ—β‚œ[R] bβ‚βœ) * (toFunLinear R A n) (aβ‚‚βœ βŠ—β‚œ[R] bβ‚‚βœ)", "...
[ " βˆ€ (a₁ aβ‚‚ : A) (b₁ bβ‚‚ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * aβ‚‚) βŠ—β‚œ[R] (b₁ * bβ‚‚)) =\n (toFunLinear R A n) (a₁ βŠ—β‚œ[R] b₁) * (toFunLinear R A n) (aβ‚‚ βŠ—β‚œ[R] bβ‚‚)", " (toFunLinear R A n) ((aβ‚βœ * aβ‚‚βœ) βŠ—β‚œ[R] (bβ‚βœ * bβ‚‚βœ)) =\n (toFunLinear R A n) (aβ‚βœ βŠ—β‚œ[R] bβ‚βœ) * (toFunLinear R A n) (aβ‚‚βœ βŠ—β‚œ[R] bβ‚‚βœ)", "...
import Mathlib.Tactic.Linarith.Datatypes import Mathlib.Tactic.Zify import Mathlib.Tactic.CancelDenoms.Core import Batteries.Data.RBMap.Basic import Mathlib.Data.HashMap import Mathlib.Control.Basic set_option autoImplicit true namespace Linarith open Lean hiding Rat open Elab Tactic Meta open Qq partial def ...
Mathlib/Tactic/Linarith/Preprocessing.lean
273
273
theorem without_one_mul [MulOneClass M] {a b : M} (h : 1 * a = b) : a = b := by
rwa [one_mul] at h
[ " a = b" ]
[]
import Mathlib.Order.Filter.Cofinite import Mathlib.Order.Filter.CountableInter import Mathlib.Order.Filter.CardinalInter import Mathlib.SetTheory.Cardinal.Ordinal import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.Order.Filter.Bases open Set Filter Cardinal universe u variable {ΞΉ : Type u} {Ξ± Ξ² : Type u}...
Mathlib/Order/Filter/Cocardinal.lean
70
72
theorem frequently_cocardinal {p : Ξ± β†’ Prop} : (βˆƒαΆ  x in cocardinal Ξ± hreg, p x) ↔ c ≀ # { x | p x } := by
simp only [Filter.Frequently, eventually_cocardinal, not_not,coe_setOf, not_lt]
[ " Filter Ξ±", " βˆ€ (S : Set (Set Ξ±)), #↑S < c β†’ (βˆ€ s ∈ S, s ∈ {s | #↑s < c}) β†’ ⋃₀ S ∈ {s | #↑s < c}", " ⨆ s_1, #↑↑s_1 < c", " βˆ€ t ∈ {s | #↑s < c}, βˆ€ s βŠ† t, s ∈ {s | #↑s < c}", " cocardinal Ξ± isRegular_aleph0 = cofinite", " β‹‚β‚€ S ∈ cocardinal Ξ± hreg", " #↑(⋃₀ (compl '' S)) < c", " #↑(compl '' S) * ⨆ s, #↑...
[ " Filter Ξ±", " βˆ€ (S : Set (Set Ξ±)), #↑S < c β†’ (βˆ€ s ∈ S, s ∈ {s | #↑s < c}) β†’ ⋃₀ S ∈ {s | #↑s < c}", " ⨆ s_1, #↑↑s_1 < c", " βˆ€ t ∈ {s | #↑s < c}, βˆ€ s βŠ† t, s ∈ {s | #↑s < c}", " cocardinal Ξ± isRegular_aleph0 = cofinite", " β‹‚β‚€ S ∈ cocardinal Ξ± hreg", " #↑(⋃₀ (compl '' S)) < c", " #↑(compl '' S) * ⨆ s, #↑...
import Batteries.Data.Char import Batteries.Data.List.Lemmas import Batteries.Data.String.Basic import Batteries.Tactic.Lint.Misc import Batteries.Tactic.SeqFocus namespace String attribute [ext] ext theorem lt_trans {s₁ sβ‚‚ s₃ : String} : s₁ < sβ‚‚ β†’ sβ‚‚ < s₃ β†’ s₁ < s₃ := List.lt_trans' (Ξ± := Char) Nat.lt_trans ...
.lake/packages/batteries/Batteries/Data/String/Lemmas.lean
134
143
theorem utf8GetAux_add_right_cancel (s : List Char) (i p n : Nat) : utf8GetAux s ⟨i + n⟩ ⟨p + n⟩ = utf8GetAux s ⟨i⟩ ⟨p⟩ := by
apply utf8InductionOn s ⟨i⟩ ⟨p⟩ (motive := fun s i => utf8GetAux s ⟨i.byteIdx + n⟩ ⟨p + n⟩ = utf8GetAux s i ⟨p⟩) <;> simp [utf8GetAux] intro c cs ⟨i⟩ h ih simp [Pos.ext_iff, Pos.addChar_eq] at h ⊒ simp [Nat.add_right_cancel_iff, h] rw [Nat.add_right_comm] exact ih
[ " utf8Len (cs₁ ++ csβ‚‚) = utf8Len cs₁ + utf8Len csβ‚‚", " utf8Len ([] ++ csβ‚‚) = utf8Len [] + utf8Len csβ‚‚", " utf8Len (head✝ :: tail✝ ++ csβ‚‚) = utf8Len (head✝ :: tail✝) + utf8Len csβ‚‚", " utf8Len (cs₁.reverseAux csβ‚‚) = utf8Len cs₁ + utf8Len csβ‚‚", " utf8Len ([].reverseAux csβ‚‚) = utf8Len [] + utf8Len csβ‚‚", " utf...
[ " utf8Len (cs₁ ++ csβ‚‚) = utf8Len cs₁ + utf8Len csβ‚‚", " utf8Len ([] ++ csβ‚‚) = utf8Len [] + utf8Len csβ‚‚", " utf8Len (head✝ :: tail✝ ++ csβ‚‚) = utf8Len (head✝ :: tail✝) + utf8Len csβ‚‚", " utf8Len (cs₁.reverseAux csβ‚‚) = utf8Len cs₁ + utf8Len csβ‚‚", " utf8Len ([].reverseAux csβ‚‚) = utf8Len [] + utf8Len csβ‚‚", " utf...
import Batteries.Data.Array.Lemmas namespace ByteArray @[ext] theorem ext : {a b : ByteArray} β†’ a.data = b.data β†’ a = b | ⟨_⟩, ⟨_⟩, rfl => rfl theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data[i] := rfl @[simp] theorem uset_eq_set (a : ByteArray) {i : USize} (h : i.toNat < a.size...
.lake/packages/batteries/Batteries/Data/ByteArray.lean
84
87
theorem get_append_right {a b : ByteArray} (hle : a.size ≀ i) (h : i < (a ++ b).size) (h' : i - a.size < b.size := Nat.sub_lt_left_of_lt_add hle (size_append .. β–Έ h)) : (a ++ b)[i] = b[i - a.size] := by
simp [getElem_eq_data_getElem]; exact Array.get_append_right hle
[ " ↑i < (a.set i v).size", " (a ++ b).data = a.data ++ b.data", " (a.append b).data = a.data ++ b.data", " a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data", " (a ++ b).size = a.size + b.size", " (a.data ++ b.data).size = a.data.size + b.data.size", " (a ++ b)...
[ " ↑i < (a.set i v).size", " (a ++ b).data = a.data ++ b.data", " (a.append b).data = a.data ++ b.data", " a.data ++ b.data ++ a.data.extract (a.data.size + b.data.size) a.data.size = a.data ++ b.data", " (a ++ b).size = a.size + b.size", " (a.data ++ b.data).size = a.data.size + b.data.size", " (a ++ b)...
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.Geometry.RingedSpace.LocallyRingedSpace #align_import algebraic_geometry.open_immersion.basic from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" -- Porting note: due to `PresheafedSpace`, `SheafedSpace` and `Locally...
Mathlib/Geometry/RingedSpace/OpenImmersion.lean
133
141
theorem isoRestrict_hom_ofRestrict : H.isoRestrict.hom ≫ Y.ofRestrict _ = f := by
-- Porting note: `ext` did not pick up `NatTrans.ext` refine PresheafedSpace.Hom.ext _ _ rfl <| NatTrans.ext _ _ <| funext fun x => ?_ simp only [isoRestrict_hom_c_app, NatTrans.comp_app, eqToHom_refl, ofRestrict_c_app, Category.assoc, whiskerRight_id'] erw [Category.comp_id, comp_c_app, f.c.naturality_ass...
[]
[]
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic import Mathlib.CategoryTheory.Monoidal.Functorial import Mathlib.CategoryTheory.Monoidal.Types.Basic import Mathlib.LinearAlgebra.DirectSum.Finsupp import Mathlib.CategoryTheory.Linear.LinearFunctor #align_import algebra.category.Module.adjunctions from "leanpr...
Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean
112
129
theorem left_unitality (X : Type u) : (Ξ»_ ((free R).obj X)).hom = (Ξ΅ R βŠ— πŸ™ ((free R).obj X)) ≫ (ΞΌ R (πŸ™_ (Type u)) X).hom ≫ map (free R).obj (Ξ»_ X).hom := by
-- Porting note (#11041): broken ext apply TensorProduct.ext apply LinearMap.ext_ring apply Finsupp.lhom_ext' intro x apply LinearMap.ext_ring apply Finsupp.ext intro x' -- Porting note (#10934): used to be dsimp [Ξ΅, ΞΌ] let q : X β†’β‚€ R := ((Ξ»_ (of R (X β†’β‚€ R))).hom) (1 βŠ—β‚œ[R] Finsupp.single x 1) cha...
[ " βˆ€ (X : Type u),\n { obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (πŸ™ X) =\n πŸ™ ({ obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)", " { obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (πŸ™ X✝...
[ " βˆ€ (X : Type u),\n { obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (πŸ™ X) =\n πŸ™ ({ obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)", " { obj := fun X => of R (X β†’β‚€ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (πŸ™ X✝...
import Mathlib.Data.List.Chain #align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" variable {Ξ± : Type*} (l : List Ξ±) (R : Ξ± β†’ Ξ± β†’ Prop) [DecidableRel R] {a b : Ξ±} namespace List @[simp] theorem destutter'_nil : destutter' R a [] = [a] := rfl #align ...
Mathlib/Data/List/Destutter.lean
64
70
theorem destutter'_sublist (a) : l.destutter' R a <+ a :: l := by
induction' l with b l hl generalizing a Β· simp rw [destutter'] split_ifs Β· exact Sublist.consβ‚‚ a (hl b) Β· exact (hl a).trans ((l.sublist_cons b).cons_cons a)
[ " destutter' R b (a :: l) = b :: destutter' R a l", " destutter' R b (a :: l) = destutter' R b l", " destutter' R a [b] = if R a b then [a, b] else [a]", " destutter' R a [b] = [a, b]", " destutter' R a [b] = [a]", " destutter' R a l <+ a :: l", " destutter' R a [] <+ [a]", " destutter' R a (b :: l) <...
[ " destutter' R b (a :: l) = b :: destutter' R a l", " destutter' R b (a :: l) = destutter' R b l", " destutter' R a [b] = if R a b then [a, b] else [a]", " destutter' R a [b] = [a, b]", " destutter' R a [b] = [a]" ]
import Mathlib.Algebra.CharP.Two import Mathlib.Algebra.CharP.Reduced import Mathlib.Algebra.NeZero import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.GroupTheory.SpecificGroups.Cyclic import Mathlib.NumberTheory.Divisors import Mathlib.RingTheory.IntegralDomain import Mathlib.Tactic.Zify #align_import rin...
Mathlib/RingTheory/RootsOfUnity/Basic.lean
131
133
theorem rootsOfUnity.coe_pow [CommMonoid R] (ΞΆ : rootsOfUnity k R) (m : β„•) : (((ΞΆ ^ m :) : RΛ£) : R) = ((ΞΆ : RΛ£) : R) ^ m := by
rw [Subgroup.coe_pow, Units.val_pow_eq_pow_val]
[ " a✝ * b✝ ∈ {ΞΆ | ΞΆ ^ ↑k = 1}", " x✝¹⁻¹ ∈ { carrier := {ΞΆ | ΞΆ ^ ↑k = 1}, mul_mem' := β‹―, one_mem' := β‹― }.carrier", " ΞΆ ∈ rootsOfUnity k M ↔ ↑΢ ^ ↑k = 1", " ΞΆ ^ ↑k = 1 ↔ ↑΢ ^ ↑k = 1", " rootsOfUnity 1 M = βŠ₯", " x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ βŠ₯", " rootsOfUnity k M ≀ rootsOfUnity l M", " rootsOfUnity k M ≀ ...
[ " a✝ * b✝ ∈ {ΞΆ | ΞΆ ^ ↑k = 1}", " x✝¹⁻¹ ∈ { carrier := {ΞΆ | ΞΆ ^ ↑k = 1}, mul_mem' := β‹―, one_mem' := β‹― }.carrier", " ΞΆ ∈ rootsOfUnity k M ↔ ↑΢ ^ ↑k = 1", " ΞΆ ^ ↑k = 1 ↔ ↑΢ ^ ↑k = 1", " rootsOfUnity 1 M = βŠ₯", " x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ βŠ₯", " rootsOfUnity k M ≀ rootsOfUnity l M", " rootsOfUnity k M ≀ ...
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMa...
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
391
410
theorem HasStrictFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by
replace hg := hg.prod_map' hg replace hfg := hfg.prod_mk_nhds hfg have : (fun p : F Γ— F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p : F Γ— F => f' (g p.1 - g p.2) - (p.1 - p.2) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine th...
[ " HasStrictFDerivAt g (↑f'.symm) a", " (fun p => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p => f' (g p.1 - g p.2) - (p.1 - p.2)", " ↑f'.symm (f' (g x.1 - g x.2) - (x.1 - x.2)) = g x.1 - g x.2 - f'.symm (x.1 - x.2)", " (fun p => f' (g p.1 - g p.2) - (p.1 - p.2)) =o[𝓝 (a, a)] fun p => p.1 - p.2",...
[]
import Mathlib.Data.List.Basic #align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" -- Make sure we don't import algebra assert_not_exists Monoid variable {Ξ± Ξ² : Type*} namespace List attribute [simp] join -- Porting note (#10618): simp can prove this -- @...
Mathlib/Data/List/Join.lean
105
109
theorem take_sum_join' (L : List (List Ξ±)) (i : β„•) : L.join.take (Nat.sum ((L.map length).take i)) = (L.take i).join := by
induction L generalizing i Β· simp Β· cases i <;> simp [take_append, *]
[ " [l].join = l", " (l :: L).join = [] ↔ βˆ€ (l_1 : List Ξ±), l_1 ∈ l :: L β†’ l_1 = []", " (L₁ ++ Lβ‚‚).join = L₁.join ++ Lβ‚‚.join", " ([] ++ Lβ‚‚).join = [].join ++ Lβ‚‚.join", " (head✝ :: tail✝ ++ Lβ‚‚).join = (head✝ :: tail✝).join ++ Lβ‚‚.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
[ " [l].join = l", " (l :: L).join = [] ↔ βˆ€ (l_1 : List Ξ±), l_1 ∈ l :: L β†’ l_1 = []", " (L₁ ++ Lβ‚‚).join = L₁.join ++ Lβ‚‚.join", " ([] ++ Lβ‚‚).join = [].join ++ Lβ‚‚.join", " (head✝ :: tail✝ ++ Lβ‚‚).join = (head✝ :: tail✝).join ++ Lβ‚‚.join", " (L.concat l).join = L.join ++ l", " (filter (fun l => !l.isEmpty) ([]...
import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.Nat.Prime #align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u variable (R : Type u) section Semiring variable [Semiring R] class inductive Ex...
Mathlib/Algebra/CharP/ExpChar.lean
82
83
theorem ringExpChar.eq_one (R : Type*) [NonAssocSemiring R] [CharZero R] : ringExpChar R = 1 := by
rw [ringExpChar, ringChar.eq_zero, max_eq_right zero_le_one]
[ " ExpChar (R Γ— S) p", " ExpChar (R Γ— S) 1", " p = q", " 1 = q", " ringExpChar R = q", " ringExpChar R = 1", " max 0 1 = 1", " max q 1 = q" ]
[ " ExpChar (R Γ— S) p", " ExpChar (R Γ— S) 1", " p = q", " 1 = q", " ringExpChar R = q", " ringExpChar R = 1", " max 0 1 = 1", " max q 1 = q" ]
import Mathlib.SetTheory.Game.Basic import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834" universe u open SetTheory PGame open scoped NaturalOps PGame namespace Ordinal noncomputable def toPGame : Ordin...
Mathlib/SetTheory/Game/Ordinal.lean
58
59
theorem toPGame_rightMoves (o : Ordinal) : o.toPGame.RightMoves = PEmpty := by
rw [toPGame, RightMoves]
[ " let_fun this := β‹―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).Ξ±", " o.toPGame.RightMoves = PEmpty.{u_1 + 1}" ]
[ " let_fun this := β‹―;\n o.toPGame = mk (Quotient.out o).Ξ± PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim", " o.toPGame.LeftMoves = (Quotient.out o).Ξ±" ]
import Mathlib.Order.ConditionallyCompleteLattice.Finset import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54" assert_not_exists MonoidWithZero open Set namespace Nat open scoped Classical noncomputable instance : ...
Mathlib/Data/Nat/Lattice.lean
59
62
theorem sInf_empty : sInf βˆ… = 0 := by
rw [sInf_eq_zero] right rfl
[ " sInf s = 0 ↔ 0 ∈ s ∨ s = βˆ…", " sInf βˆ… = 0 ↔ 0 ∈ βˆ… ∨ βˆ… = βˆ…", " sInf βˆ… = 0", " 0 ∈ βˆ… ∨ βˆ… = βˆ…", " βˆ… = βˆ…" ]
[ " sInf s = 0 ↔ 0 ∈ s ∨ s = βˆ…", " sInf βˆ… = 0 ↔ 0 ∈ βˆ… ∨ βˆ… = βˆ…" ]
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
109
110
theorem projIcc_eq_right (h : a < b) : projIcc a b h.le x = ⟨b, right_mem_Icc.2 h.le⟩ ↔ b ≀ x := by
simp [projIcc, Subtype.ext_iff, max_min_distrib_left, h.le, h.not_le]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIcc a b β‹― x = ⟨b, β‹―βŸ© ↔ b ≀ x" ]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a" ]
import Mathlib.Data.Stream.Defs import Mathlib.Logic.Function.Basic import Mathlib.Init.Data.List.Basic import Mathlib.Data.List.Basic #align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" set_option autoImplicit true open Nat Function Option namespace Stre...
Mathlib/Data/Stream/Init.lean
94
94
theorem head_drop (a : Stream' Ξ±) (n : β„•) : (a.drop n).head = a.get n := by
simp
[ " (s.head :: s.tail) i = s i", " (s.head :: s.tail) 0 = s 0", " (s.head :: s.tail) (n✝ + 1) = s (n✝ + 1)", " drop n (drop m s) = drop (n + m) s", " (drop n (drop m s)).get n✝ = (drop (n + m) s).get n✝", " (drop i s).tail = drop (i + 1) s", " (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝", " (drop n...
[ " (s.head :: s.tail) i = s i", " (s.head :: s.tail) 0 = s 0", " (s.head :: s.tail) (n✝ + 1) = s (n✝ + 1)", " drop n (drop m s) = drop (n + m) s", " (drop n (drop m s)).get n✝ = (drop (n + m) s).get n✝", " (drop i s).tail = drop (i + 1) s", " (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝", " (drop n...