Context
stringlengths
57
92.3k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
18
3.69k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
import Mathlib.Data.Real.Sqrt import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Analysis.NormedSpace.Basic #align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb" section local notation "οΏ½...
Mathlib/Analysis/RCLike/Basic.lean
662
664
theorem ofNat_mul_im (n : β„•) [n.AtLeastTwo] (z : K) : im (OfNat.ofNat n * z) = OfNat.ofNat n * im z := by
rw [← ofReal_ofNat, im_ofReal_mul]
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
1,415
1,416
theorem ContDiff.sub {f g : E β†’ F} (hf : ContDiff π•œ n f) (hg : ContDiff π•œ n g) : ContDiff π•œ n fun x => f x - g x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Data.Complex.Abs import Mathlib.Data.Complex.BigOperators import Mathlib.Data.Nat.Choose.Sum #align_import data.complex.exponential from "leanprover-community/mathlib"@"a8b2226cfb0a79f5986492053fc49b1a0c6aeffb" open CauSeq Finset IsAbsoluteValue open ...
Mathlib/Data/Complex/Exponential.lean
720
720
theorem cos_two_mul' : cos (2 * x) = cos x ^ 2 - sin x ^ 2 := by
rw [two_mul, cos_add, ← sq, ← sq]
import Mathlib.Analysis.Normed.Group.InfiniteSum import Mathlib.Analysis.Normed.MulAction import Mathlib.Topology.Algebra.Order.LiminfLimsup import Mathlib.Topology.PartialHomeomorph #align_import analysis.asymptotics.asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open ...
Mathlib/Analysis/Asymptotics/Asymptotics.lean
897
898
theorem isBigOWith_neg_right : (IsBigOWith c l f fun x => -g' x) ↔ IsBigOWith c l f g' := by
simp only [IsBigOWith_def, norm_neg]
import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Int.ModEq import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Index import Mathlib.Order.Interval.Finset.Nat import Mat...
Mathlib/GroupTheory/OrderOfElement.lean
177
180
theorem pow_orderOf_eq_one (x : G) : x ^ orderOf x = 1 := by
convert Eq.trans _ (isPeriodicPt_minimalPeriod (x * Β·) 1) -- Porting note(#12129): additional beta reduction needed in the middle of the rewrite rw [orderOf, mul_left_iterate]; beta_reduce; rw [mul_one]
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.Localization.NormTrace #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a" open scoped NumberField open Finset NumberField Algebra FiniteDimensional namespace RingOfIn...
Mathlib/NumberTheory/NumberField/Norm.lean
90
99
theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
classical have hint : IsIntegral β„€ (∏ Οƒ ∈ univ.erase (AlgEquiv.refl : L ≃ₐ[K] L), Οƒ x) := IsIntegral.prod _ (fun Οƒ _ => ((RingOfIntegers.isIntegral_coe x).map Οƒ)) refine ⟨⟨_, hint⟩, ?_⟩ ext rw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms] simp [← Finset.mul_prod_erase _ _ (mem_univ Al...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Log import Mathlib.Data.List.Indexes import Mathlib.Data.List.Palindrome import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith impo...
Mathlib/Data/Nat/Digits.lean
876
881
theorem digits_one (b n) (n0 : 0 < n) (nb : n < b) : Nat.digits b n = [n] ∧ 1 < b ∧ 0 < n := by
have b2 : 1 < b := lt_iff_add_one_le.mpr (le_trans (add_le_add_right (lt_iff_add_one_le.mp n0) 1) nb) refine ⟨?_, b2, n0⟩ rw [Nat.digits_def' b2 n0, Nat.mod_eq_of_lt nb, (Nat.div_eq_zero_iff ((zero_le n).trans_lt nb)).2 nb, Nat.digits_zero]
import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.GroupAction.Quotient import Mathlib.GroupTheory.QuotientGroup import Mathlib.Topology.Algebra.Monoid import Mathlib.Topology.Algebra.Constructions #align_import topology.algebra.group.basic from "leanprover-community/mathlib"@"3b1890e71632be9e3...
Mathlib/Topology/Algebra/Group/Basic.lean
672
673
theorem inv_mem_nhds_one {S : Set G} (hS : S ∈ (𝓝 1 : Filter G)) : S⁻¹ ∈ 𝓝 (1 : G) := by
rwa [← nhds_one_symm'] at hS
import Mathlib.Algebra.BigOperators.Associated import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.Factors import Mathlib.RingTheory.Noetherian import Mathlib.RingTheory.Multiplicity #align_import ring_theory.unique_factorization_domain from "leanprover-community/mathli...
Mathlib/RingTheory/UniqueFactorizationDomain.lean
1,849
1,852
theorem dvd_count_pow [Nontrivial Ξ±] [DecidableEq (Associates Ξ±)] {a : Associates Ξ±} (ha : a β‰  0) {p : Associates Ξ±} (hp : Irreducible p) (k : β„•) : k ∣ count p (a ^ k).factors := by
rw [count_pow ha hp] apply dvd_mul_right
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Star.Unitary import Mathlib.Data.Nat.ModEq import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.Tactic.Monotonicity #align_import number_theory.pell_matiyasevic from "leanprover-community/mathlib"@"795b501869b9f...
Mathlib/NumberTheory/PellMatiyasevic.lean
606
619
theorem xn_modEq_x2n_sub_lem {n j} (h : j ≀ n) : xn a1 (2 * n - j) + xn a1 j ≑ 0 [MOD xn a1 n] := by
have h1 : xz a1 n ∣ d a1 * yz a1 n * yz a1 (n - j) + xz a1 j := by rw [yz_sub _ h, mul_sub_left_distrib, sub_add_eq_add_sub] exact dvd_sub (by delta xz; delta yz rw [mul_comm (xn _ _ : β„€)] exact mod_cast (xn_modEq_x2n_add_lem _ n j)) ((dvd_mul_right _ _).mu...
import Mathlib.Algebra.Order.Module.Defs import Mathlib.Data.DFinsupp.Basic #align_import data.dfinsupp.order from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset variable {ΞΉ : Type*} {Ξ± : ΞΉ β†’ Type*} namespace DFinsupp section Zero variable [βˆ€ i, Zero (Ξ± i)] instance [βˆ€...
Mathlib/Data/DFinsupp/Order.lean
320
323
theorem support_sup : (f βŠ” g).support = f.support βˆͺ g.support := by
ext simp only [Finset.mem_union, mem_support_iff, sup_apply, Ne, ← bot_eq_zero] rw [_root_.sup_eq_bot_iff, not_and_or]
import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Filter.Extr import Mathlib.Tactic.GCongr #align_import analysis.convex.function from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open scoped Classical open LinearMap Set Convex Pointwise variable {π•œ E F Ξ± Ξ² ΞΉ : Type*} secti...
Mathlib/Analysis/Convex/Function.lean
940
946
theorem StrictConvexOn.translate_right (hf : StrictConvexOn π•œ s f) (c : E) : StrictConvexOn π•œ ((fun z => c + z) ⁻¹' s) (f ∘ fun z => c + z) := ⟨hf.1.translate_preimage_right _, fun x hx y hy hxy a b ha hb hab => calc f (c + (a β€’ x + b β€’ y)) = f (a β€’ (c + x) + b β€’ (c + y)) := by
rw [smul_add, smul_add, add_add_add_comm, Convex.combo_self hab] _ < a β€’ f (c + x) + b β€’ f (c + y) := hf.2 hx hy ((add_right_injective c).ne hxy) ha hb hab⟩
import Mathlib.CategoryTheory.Functor.Const import Mathlib.CategoryTheory.DiscreteCategory import Mathlib.CategoryTheory.Yoneda import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.limits.cones from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" -- morphism le...
Mathlib/CategoryTheory/Limits/Cones.lean
181
184
theorem Cocone.w {F : J β₯€ C} (c : Cocone F) {j j' : J} (f : j ⟢ j') : F.map f ≫ c.ΞΉ.app j' = c.ΞΉ.app j := by
rw [c.ΞΉ.naturality f] apply comp_id
import Mathlib.Topology.Algebra.InfiniteSum.Basic import Mathlib.Topology.Algebra.UniformGroup noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section TopologicalGroup variable [CommGroup Ξ±] [TopologicalSpace Ξ±] [TopologicalGroup Ξ±] variable {f g : Ξ² β†’ Ξ±} {a a₁...
Mathlib/Topology/Algebra/InfiniteSum/Group.lean
150
154
theorem tprod_inv : ∏' b, (f b)⁻¹ = (∏' b, f b)⁻¹ := by
by_cases hf : Multipliable f Β· exact hf.hasProd.inv.tprod_eq Β· simp [tprod_eq_one_of_not_multipliable hf, tprod_eq_one_of_not_multipliable (mt Multipliable.of_inv hf)]
import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Strict import Mathlib.Topology.Connected.PathConnected import Mathlib.Topology.Algebra.Affine import Mathlib.Topology.Algebra.Module.Basic #align_import analysis.convex.topology from "leanprover-community/mathlib"@"0e3aacdc98d25e0afe035c452d876...
Mathlib/Analysis/Convex/Topology.lean
213
218
theorem Convex.add_smul_sub_mem_interior' {s : Set E} (hs : Convex π•œ s) {x y : E} (hx : x ∈ closure s) (hy : y ∈ interior s) {t : π•œ} (ht : t ∈ Ioc (0 : π•œ) 1) : x + t β€’ (y - x) ∈ interior s := by
simpa only [sub_smul, smul_sub, one_smul, add_sub, add_comm] using hs.combo_interior_closure_mem_interior hy hx ht.1 (sub_nonneg.mpr ht.2) (add_sub_cancel _ _)
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Int import Mathlib.Algebra.Group.Nat import Mathlib.Algebra.Group.Opposite import Mathlib.Algebra.Group.Units import Mathlib.Data.List.Perm import Mathlib.Data.List.ProdSigma import Mathlib.Data.List.Range import Mathlib.Data.List.Rotate #align_im...
Mathlib/Algebra/BigOperators/Group/List.lean
289
290
theorem get?_zero_mul_tail_prod (l : List M) : (l.get? 0).getD 1 * l.tail.prod = l.prod := by
cases l <;> simp
import Mathlib.Topology.Compactness.SigmaCompact import Mathlib.Topology.Connected.TotallyDisconnected import Mathlib.Topology.Inseparable #align_import topology.separation from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Function Set Filter Topology TopologicalSpace open scoped...
Mathlib/Topology/Separation.lean
1,495
1,501
theorem isOpen_iff_ultrafilter' [CompactSpace X] (U : Set X) : IsOpen U ↔ βˆ€ F : Ultrafilter X, F.lim ∈ U β†’ U ∈ F.1 := by
rw [isOpen_iff_ultrafilter] refine ⟨fun h F hF => h F.lim hF F F.le_nhds_lim, ?_⟩ intro cond x hx f h rw [← Ultrafilter.lim_eq_iff_le_nhds.2 h] at hx exact cond _ hx
import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.SetLike.Fintype import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.Order.Atoms.Finite import Mathlib.Data.Set.Lattice #align_import group_theory.sylow from "leanprove...
Mathlib/GroupTheory/Sylow.lean
548
556
theorem card_normalizer_modEq_card [Fintype G] {p : β„•} {n : β„•} [hp : Fact p.Prime] {H : Subgroup G} (hH : Fintype.card H = p ^ n) : card (normalizer H) ≑ card G [MOD p ^ (n + 1)] := by
have : H.subgroupOf (normalizer H) ≃ H := (subgroupOfEquivOfLe le_normalizer).toEquiv simp only [← Nat.card_eq_fintype_card] at hH ⊒ rw [card_eq_card_quotient_mul_card_subgroup H, card_eq_card_quotient_mul_card_subgroup (H.subgroupOf (normalizer H)), Nat.card_congr this, hH, pow_succ'] simp only [Nat.c...
import Mathlib.Algebra.Associated import Mathlib.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Algebra.Ring.Int import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Order.Bounds.Basic #align_import data.nat.prime from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82...
Mathlib/Data/Nat/Prime.lean
324
335
theorem minFac_has_prop {n : β„•} (n1 : n β‰  1) : minFacProp n (minFac n) := by
by_cases n0 : n = 0 Β· simp [n0, minFacProp, GE.ge] have n2 : 2 ≀ n := by revert n0 n1 rcases n with (_ | _ | _) <;> simp [succ_le_succ] simp only [minFac_eq, Nat.isUnit_iff] by_cases d2 : 2 ∣ n <;> simp [d2] Β· exact ⟨le_rfl, d2, fun k k2 _ => k2⟩ Β· refine minFacAux_has_prop n2 3 0 rfl fun m...
import Mathlib.Data.Nat.Cast.WithTop import Mathlib.RingTheory.Prime import Mathlib.RingTheory.Polynomial.Content import Mathlib.RingTheory.Ideal.Quotient #align_import ring_theory.eisenstein_criterion from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" open Polynomial Ideal.Quotient v...
Mathlib/RingTheory/EisensteinCriterion.lean
72
78
theorem isUnit_of_natDegree_eq_zero_of_isPrimitive {p q : R[X]} -- Porting note: stated using `IsPrimitive` which is defeq to old statement. (hu : IsPrimitive (p * q)) (hpm : p.natDegree = 0) : IsUnit p := by
rw [eq_C_of_degree_le_zero (natDegree_eq_zero_iff_degree_le_zero.1 hpm), isUnit_C] refine hu _ ?_ rw [← eq_C_of_degree_le_zero (natDegree_eq_zero_iff_degree_le_zero.1 hpm)] exact dvd_mul_right _ _
import Mathlib.Order.Filter.Interval import Mathlib.Order.Interval.Set.Pi import Mathlib.Tactic.TFAE import Mathlib.Tactic.NormNum import Mathlib.Topology.Order.LeftRight import Mathlib.Topology.Order.OrderClosed #align_import topology.order.basic from "leanprover-community/mathlib"@"3efd324a3a31eaa40c9d5bfc669c4fafe...
Mathlib/Topology/Order/Basic.lean
466
471
theorem dense_of_exists_between [Nontrivial Ξ±] {s : Set Ξ±} (h : βˆ€ ⦃a b⦄, a < b β†’ βˆƒ c ∈ s, a < c ∧ c < b) : Dense s := by
refine dense_iff_inter_open.2 fun U U_open U_nonempty => ?_ obtain ⟨a, b, hab, H⟩ : βˆƒ a b : Ξ±, a < b ∧ Ioo a b βŠ† U := U_open.exists_Ioo_subset U_nonempty obtain ⟨x, xs, hx⟩ : βˆƒ x ∈ s, a < x ∧ x < b := h hab exact ⟨x, ⟨H hx, xs⟩⟩
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
1,144
1,150
theorem mkHom_f_succ_succ (n : β„•) : (mkHom P Q zero one one_zero_comm succ).f (n + 2) = (succ n ⟨(mkHom P Q zero one one_zero_comm succ).f n, (mkHom P Q zero one one_zero_comm succ).f (n + 1), (mkHom P Q zero one one_zero_comm succ).comm n (n + 1)⟩).1 := by
dsimp [mkHom, mkHomAux]
import Mathlib.Topology.Constructions #align_import topology.continuous_on from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" open Set Filter Function Topology Filter variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} variable [TopologicalSpace Ξ±] @[simp] theorem nhds_bind_nhdsW...
Mathlib/Topology/ContinuousOn.lean
830
832
theorem continuousWithinAt_compl_self {f : Ξ± β†’ Ξ²} {a : Ξ±} : ContinuousWithinAt f {a}ᢜ a ↔ ContinuousAt f a := by
rw [compl_eq_univ_diff, continuousWithinAt_diff_self, continuousWithinAt_univ]
import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Algebra.Group.Int import Mathlib.Data.Int.Lemmas import Mathlib.Data.Set.Subsingleton import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Order.GaloisConnection import Mathlib.Tactic.Abel import Mathlib.Tactic.Linarith...
Mathlib/Algebra/Order/Floor.lean
802
803
theorem floor_add_nat (a : Ξ±) (n : β„•) : ⌊a + nβŒ‹ = ⌊aβŒ‹ + n := by
rw [← Int.cast_natCast, floor_add_int]
import Mathlib.MeasureTheory.Measure.Doubling import Mathlib.MeasureTheory.Covering.Vitali import Mathlib.MeasureTheory.Covering.Differentiation #align_import measure_theory.covering.density_theorem from "leanprover-community/mathlib"@"5f6e827d81dfbeb6151d7016586ceeb0099b9655" noncomputable section open Set Filt...
Mathlib/MeasureTheory/Covering/DensityTheorem.lean
146
151
theorem ae_tendsto_measure_inter_div (S : Set Ξ±) (K : ℝ) : βˆ€α΅ x βˆ‚ΞΌ.restrict S, βˆ€ {ΞΉ : Type*} {l : Filter ΞΉ} (w : ΞΉ β†’ Ξ±) (Ξ΄ : ΞΉ β†’ ℝ) (Ξ΄lim : Tendsto Ξ΄ l (𝓝[>] 0)) (xmem : βˆ€αΆ  j in l, x ∈ closedBall (w j) (K * Ξ΄ j)), Tendsto (fun j => ΞΌ (S ∩ closedBall (w j) (Ξ΄ j)) / ΞΌ (closedBall (w j) (Ξ΄ j))) l (𝓝 1) :...
filter_upwards [(vitaliFamily ΞΌ K).ae_tendsto_measure_inter_div S] with x hx ΞΉ l w Ξ΄ Ξ΄lim xmem using hx.comp (tendsto_closedBall_filterAt ΞΌ _ _ Ξ΄lim xmem)
import Mathlib.Data.Nat.Prime import Mathlib.Data.PNat.Basic #align_import data.pnat.prime from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f" namespace PNat open Nat def gcd (n m : β„•+) : β„•+ := ⟨Nat.gcd (n : β„•) (m : β„•), Nat.gcd_pos_of_pos_left (m : β„•) n.pos⟩ #align pnat.gcd PNat.gc...
Mathlib/Data/PNat/Prime.lean
257
260
theorem Coprime.symm {m n : β„•+} : m.Coprime n β†’ n.Coprime m := by
unfold Coprime rw [gcd_comm] simp
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
488
491
theorem pow_of_dvd (h : IsPrimitiveRoot ΞΆ k) {p : β„•} (hp : p β‰  0) (hdiv : p ∣ k) : IsPrimitiveRoot (ΞΆ ^ p) (k / p) := by
suffices orderOf (ΞΆ ^ p) = k / p by exact this β–Έ IsPrimitiveRoot.orderOf (ΞΆ ^ p) rw [orderOf_pow' _ hp, ← eq_orderOf h, Nat.gcd_eq_right hdiv]
import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f" noncomputable section open scoped Classical open Topology ENNReal MeasureTheory NNReal open Set Filter TopologicalSpace ENNReal EMetric Meas...
Mathlib/MeasureTheory/Function/L1Space.lean
196
199
theorem HasFiniteIntegral.add_measure {f : Ξ± β†’ Ξ²} (hΞΌ : HasFiniteIntegral f ΞΌ) (hΞ½ : HasFiniteIntegral f Ξ½) : HasFiniteIntegral f (ΞΌ + Ξ½) := by
simp only [HasFiniteIntegral, lintegral_add_measure] at * exact add_lt_top.2 ⟨hμ, hν⟩
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.Algebra.Module.Opposites #align_import linear_algebra.clifford_algebra.conjugation from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M]...
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
295
298
theorem submodule_comap_pow_reverse (p : Submodule R (CliffordAlgebra Q)) (n : β„•) : (p ^ n).comap (reverse : CliffordAlgebra Q β†’β‚—[R] CliffordAlgebra Q) = p.comap (reverse : CliffordAlgebra Q β†’β‚—[R] CliffordAlgebra Q) ^ n := by
simp_rw [← submodule_map_reverse_eq_comap, submodule_map_pow_reverse]
import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Data.Complex.Basic import Mathlib.Data.Real.Archimedean #align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Zsqrtd Complex open sc...
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
217
219
theorem toComplex_div_im (x y : β„€[i]) : ((x / y : β„€[i]) : β„‚).im = round (x / y : β„‚).im := by
rw [div_def, ← @Rat.round_cast ℝ _ _, ← @Rat.round_cast ℝ _ _] simp [-Rat.round_cast, mul_assoc, div_eq_mul_inv, mul_add, add_mul]
import Mathlib.Data.Finset.Pointwise #align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259" open MulOpposite open Pointwise variable {Ξ± : Type*} [DecidableEq Ξ±] namespace Finset section CommGroup variable [CommGroup Ξ±] (e : Ξ±) (x : F...
Mathlib/Combinatorics/Additive/ETransform.lean
88
92
theorem mulDysonETransform.smul_finset_snd_subset_fst : e β€’ (mulDysonETransform e x).2 βŠ† (mulDysonETransform e x).1 := by
dsimp rw [smul_finset_inter, smul_inv_smul, inter_comm] exact inter_subset_union
import Mathlib.Algebra.Category.ModuleCat.Free import Mathlib.Topology.Category.Profinite.CofilteredLimit import Mathlib.Topology.Category.Profinite.Product import Mathlib.Topology.LocallyConstant.Algebra import Mathlib.Init.Data.Bool.Lemmas universe u namespace Profinite namespace NobelingProof variable {I : Ty...
Mathlib/Topology/Category/Profinite/Nobeling.lean
129
139
theorem proj_eq_of_subset (h : βˆ€ i, J i β†’ K i) : Ο€ (Ο€ C K) J = Ο€ C J := by
ext x refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩ Β· obtain ⟨y, ⟨z, hz, rfl⟩, rfl⟩ := h refine ⟨z, hz, (?_ : _ = (Proj J ∘ Proj K) z)⟩ rw [proj_comp_of_subset J K h] Β· obtain ⟨y, hy, rfl⟩ := h dsimp [Ο€] rw [← Set.image_comp] refine ⟨y, hy, ?_⟩ rw [proj_comp_of_subset J K h]
import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.BigOperators.RingEquiv import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.Algebra.Module.Pi import Mathlib.Algebra.Star.BigOperators...
Mathlib/Data/Matrix/Basic.lean
939
939
theorem star_dotProduct : star v ⬝α΅₯ w = star (star w ⬝α΅₯ v) := by
simp [dotProduct]
import Mathlib.Order.Filter.SmallSets import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Compactness.Compact import Mathlib.Topology.NhdsSet import Mathlib.Algebra.Group.Defs #align_import topology.uniform_space.basic from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c" open Set F...
Mathlib/Topology/UniformSpace/Basic.lean
763
765
theorem UniformSpace.mem_nhds_iff {x : Ξ±} {s : Set Ξ±} : s ∈ 𝓝 x ↔ βˆƒ V ∈ 𝓀 Ξ±, ball x V βŠ† s := by
rw [nhds_eq_comap_uniformity, mem_comap] simp_rw [ball]
import Mathlib.Logic.Relation import Mathlib.Data.List.Forall2 import Mathlib.Data.List.Lex import Mathlib.Data.List.Infix #align_import data.list.chain from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" -- Make sure we haven't imported `Data.Nat.Order.Basic` assert_not_exists OrderedSu...
Mathlib/Data/List/Chain.lean
82
83
theorem chain_append_singleton_iff_forallβ‚‚ : Chain R a (l ++ [b]) ↔ Forallβ‚‚ R (a :: l) (l ++ [b]) := by
simp [chain_iff_forallβ‚‚]
import Mathlib.Data.Set.Card import Mathlib.Order.Minimal import Mathlib.Data.Matroid.Init set_option autoImplicit true open Set def Matroid.ExchangeProperty {Ξ± : Type _} (P : Set Ξ± β†’ Prop) : Prop := βˆ€ X Y, P X β†’ P Y β†’ βˆ€ a ∈ X \ Y, βˆƒ b ∈ Y \ X, P (insert b (X \ {a})) def Matroid.ExistsMaximalSubsetProperty {...
Mathlib/Data/Matroid/Basic.lean
739
742
theorem basis_iff' : M.Basis I X ↔ (M.Indep I ∧ I βŠ† X ∧ βˆ€ J, M.Indep J β†’ I βŠ† J β†’ J βŠ† X β†’ I = J) ∧ X βŠ† M.E := by
simp [Basis, mem_maximals_setOf_iff, and_assoc, and_congr_left_iff, and_imp, and_congr_left_iff, and_congr_right_iff, @Imp.swap (_ βŠ† X)]
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.CategoryTheory.Monoidal.Discrete import Mathlib.CategoryTheory.Monoidal.CoherenceLemmas import Mathlib.CategoryTheory.Limits.Shapes.Terminal import Mathlib.Algebra.PUnitInstances #align_import category_theory.monoidal.Mon_ from "leanprover-community/...
Mathlib/CategoryTheory/Monoidal/Mon_.lean
84
85
theorem assoc_flip : (M.X ◁ M.mul) ≫ M.mul = (Ξ±_ M.X M.X M.X).inv ≫ (M.mul β–· M.X) ≫ M.mul := by
simp
import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.PSub import Mathlib.Data.Nat.Size import Mathlib.Data.Num.Bitwise #align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" set_opti...
Mathlib/Data/Num/Lemmas.lean
870
871
theorem cast_inj [LinearOrderedSemiring Ξ±] {m n : Num} : (m : Ξ±) = n ↔ m = n := by
rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.Prod import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.LinearCombination import Mathlib.Lean.Expr.ExtraRecognizers import Mathlib.Data.Set.Subsingleton #align_import lin...
Mathlib/LinearAlgebra/LinearIndependent.lean
1,075
1,087
theorem eq_of_linearIndependent_of_span_subtype [Nontrivial R] {s t : Set M} (hs : LinearIndependent R (fun x => x : s β†’ M)) (h : t βŠ† s) (hst : s βŠ† span R t) : s = t := by
let f : t β†ͺ s := ⟨fun x => ⟨x.1, h x.2⟩, fun a b hab => Subtype.coe_injective (Subtype.mk.inj hab)⟩ have h_surj : Surjective f := by apply surjective_of_linearIndependent_of_span hs f _ convert hst <;> simp [f, comp] show s = t apply Subset.antisymm _ h intro x hx rcases h_surj ⟨x, hx⟩ with ⟨y,...
import Mathlib.Algebra.NeZero import Mathlib.Data.Nat.Defs import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic.Common #align_import data.fin.basic from "leanprover-community/mathlib"@"3a2b5524a138b5d0b818b858b516d4ac8a484b03" assert_not_exists Monoid universe u v open Fin Na...
Mathlib/Data/Fin/Basic.lean
1,774
1,786
theorem modNat_rev (i : Fin (m * n)) : i.rev.modNat = i.modNat.rev := by
ext have H₁ : i % n + 1 ≀ n := i.modNat.is_lt have Hβ‚‚ : i / n < m := i.divNat.is_lt simp only [coe_modNat, val_rev] calc (m * n - (i + 1)) % n = (m * n - ((i / n) * n + i % n + 1)) % n := by rw [Nat.div_add_mod'] _ = ((m - i / n - 1) * n + (n - (i % n + 1))) % n := by rw [Nat.mul_sub_right_dist...
import Mathlib.Topology.Defs.Induced import Mathlib.Topology.Basic #align_import topology.order from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Function Set Filter Topology universe u v w namespace TopologicalSpace variable {Ξ± : Type u} inductive GenerateOpen (g : Set (Set ...
Mathlib/Topology/Order.lean
987
988
theorem isClosed_iSup_iff {s : Set Ξ±} : IsClosed[⨆ i, t i] s ↔ βˆ€ i, IsClosed[t i] s := by
simp [← @isOpen_compl_iff _ _ (⨆ i, t i), ← @isOpen_compl_iff _ _ (t _), isOpen_iSup_iff]
import Mathlib.Data.Set.Function import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Core import Mathlib.Tactic.Attr.Core #align_import logic.equiv.local_equiv from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" open Lean Meta Elab Tactic def mfld_cfg : Simps.Config where attrs :=...
Mathlib/Logic/Equiv/PartialEquiv.lean
720
721
theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) := by
mfld_set_tac
import Mathlib.Algebra.Group.Indicator import Mathlib.Data.Finset.Piecewise import Mathlib.Data.Finset.Preimage #align_import algebra.big_operators.basic from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" -- TODO -- assert_not_exists AddCommMonoidWithOne assert_not_exists MonoidWithZero...
Mathlib/Algebra/BigOperators/Group/Finset.lean
464
468
theorem prod_filter_mul_prod_filter_not (s : Finset Ξ±) (p : Ξ± β†’ Prop) [DecidablePred p] [βˆ€ x, Decidable (Β¬p x)] (f : Ξ± β†’ Ξ²) : (∏ x ∈ s.filter p, f x) * ∏ x ∈ s.filter fun x => Β¬p x, f x = ∏ x ∈ s, f x := by
have := Classical.decEq Ξ± rw [← prod_union (disjoint_filter_filter_neg s s p), filter_union_filter_neg_eq]
import Mathlib.Algebra.Polynomial.Splits #align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222" noncomputable section @[ext] structure Cubic (R : Type*) where (a b c d : R) #align cubic Cubic namespace Cubic open Cubic Polynomial open Polynom...
Mathlib/Algebra/CubicDiscriminant.lean
231
233
theorem leadingCoeff_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.leadingCoeff = P.d := by
rw [of_c_eq_zero ha hb hc, leadingCoeff_C]
import Mathlib.CategoryTheory.Subobject.Limits #align_import algebra.homology.image_to_kernel from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u w open CategoryTheory CategoryTheory.Limits variable {ΞΉ : Type*} variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] o...
Mathlib/Algebra/Homology/ImageToKernel.lean
127
132
theorem imageToKernel_comp_mono {D : V} (h : C ⟢ D) [Mono h] (w) : imageToKernel f (g ≫ h) w = imageToKernel f g ((cancel_mono h).mp (by simpa using w : (f ≫ g) ≫ h = 0 ≫ h)) ≫ (Subobject.isoOfEq _ _ (kernelSubobject_comp_mono g h)).inv := by
ext simp
import Mathlib.Init.Core import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0" noncomputable section open Affine section AffineSpace...
Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
620
623
theorem collinear_insert_of_mem_affineSpan_pair {p₁ pβ‚‚ p₃ : P} (h : p₁ ∈ line[k, pβ‚‚, p₃]) : Collinear k ({p₁, pβ‚‚, p₃} : Set P) := by
rw [collinear_insert_iff_of_mem_affineSpan h] exact collinear_pair _ _ _
import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.LinearAlgebra.Ray import Mathlib.Tactic.GCongr #align_import analysis.convex.segment from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963" ...
Mathlib/Analysis/Convex/Segment.lean
308
313
theorem sameRay_of_mem_segment [StrictOrderedCommRing π•œ] [AddCommGroup E] [Module π•œ E] {x y z : E} (h : x ∈ [y -[π•œ] z]) : SameRay π•œ (x - y) (z - x) := by
rw [segment_eq_image'] at h rcases h with ⟨θ, ⟨hΞΈβ‚€, hΞΈβ‚βŸ©, rfl⟩ simpa only [add_sub_cancel_left, ← sub_sub, sub_smul, one_smul] using (SameRay.sameRay_nonneg_smul_left (z - y) hΞΈβ‚€).nonneg_smul_right (sub_nonneg.2 hθ₁)
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
122
128
theorem hasPDF_of_map_eq_withDensity {X : Ξ© β†’ E} {β„™ : Measure Ξ©} {ΞΌ : Measure E} (hX : AEMeasurable X β„™) (f : E β†’ ℝβ‰₯0∞) (hf : AEMeasurable f ΞΌ) (h : map X β„™ = ΞΌ.withDensity f) : HasPDF X β„™ ΞΌ := by
refine ⟨hX, ?_, ?_⟩ <;> rw [h] · rw [withDensity_congr_ae hf.ae_eq_mk] exact haveLebesgueDecomposition_withDensity μ hf.measurable_mk · exact withDensity_absolutelyContinuous μ f
import Batteries.Classes.Order import Batteries.Control.ForInStep.Basic namespace Batteries namespace BinomialHeap namespace Imp inductive HeapNode (Ξ± : Type u) where | nil : HeapNode Ξ± | node (a : Ξ±) (child sibling : HeapNode Ξ±) : HeapNode Ξ± deriving Repr @[simp] def HeapNode.realSize : HeapNode Ξ± β†’ ...
.lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean
259
263
theorem Heap.realSize_tail? {s : Heap Ξ±} : s.tail? le = some s' β†’ s.realSize = s'.realSize + 1 := by
simp only [Heap.tail?]; intro eq match eqβ‚‚ : s.deleteMin le, eq with | some (a, tl), rfl => exact realSize_deleteMin eqβ‚‚
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Factorial.DoubleFactorial #align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74" noncomputable section open Polynomial namespace P...
Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
103
107
theorem coeff_hermite_self (n : β„•) : coeff (hermite n) n = 1 := by
induction' n with n ih Β· apply coeff_C Β· rw [coeff_hermite_succ_succ, ih, coeff_hermite_of_lt, mul_zero, sub_zero] simp
import Mathlib.Tactic.Linarith import Mathlib.CategoryTheory.Skeletal import Mathlib.Data.Fintype.Sort import Mathlib.Order.Category.NonemptyFinLinOrd import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import algebraic_topology.simplex_category from "leanprover-community/mathlib"@"e8ac6315bcfcbaf2d19a046719c3b5...
Mathlib/AlgebraicTopology/SimplexCategory.lean
658
668
theorem iso_eq_iso_refl {x : SimplexCategory} (e : x β‰… x) : e = Iso.refl x := by
have h : (Finset.univ : Finset (Fin (x.len + 1))).card = x.len + 1 := Finset.card_fin (x.len + 1) have eq₁ := Finset.orderEmbOfFin_unique' h fun i => Finset.mem_univ ((orderIsoOfIso e) i) have eqβ‚‚ := Finset.orderEmbOfFin_unique' h fun i => Finset.mem_univ ((orderIsoOfIso (Iso.refl x)) i) -- Porting note: t...
import Mathlib.Algebra.ModEq import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Periodic import Mathlib.Data.Int.SuccPred import Mathlib.GroupTheory.QuotientGroup import Mathlib.Order.Circular import Mathlib.Data.List.TFAE import Mathlib.Data.Set.Lattice #align_import a...
Mathlib/Algebra/Order/ToIntervalMod.lean
480
481
theorem toIcoMod_add_right' (a b : Ξ±) : toIcoMod hp (a + p) b = toIcoMod hp a b + p := by
simpa only [one_zsmul] using toIcoMod_add_zsmul' hp a b 1
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
250
252
theorem sumCoords_self_apply : b.sumCoords (b i) = 1 := by
simp only [Basis.sumCoords, LinearMap.id_coe, LinearEquiv.coe_coe, id, Basis.repr_self, Function.comp_apply, Finsupp.coe_lsum, LinearMap.coe_comp, Finsupp.sum_single_index]
import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.SetLike.Fintype import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.Order.Atoms.Finite import Mathlib.Data.Set.Lattice #align_import group_theory.sylow from "leanprove...
Mathlib/GroupTheory/Sylow.lean
763
770
theorem characteristic_of_normal {p : β„•} [Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G) (h : (P : Subgroup G).Normal) : (P : Subgroup G).Characteristic := by
haveI := Sylow.unique_of_normal P h rw [characteristic_iff_map_eq] intro Ξ¦ show (Ξ¦ β€’ P).toSubgroup = P.toSubgroup congr simp [eq_iff_true_of_subsingleton]
import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Set.Finite #align_import order.filter.basic from "leanprover-community/mathlib"@"d4f691b9e5f94cfc64639973f3544c95f8d5d494" set_option autoImplicit true open Function Set Order open scoped Classical universe u v w x y structure Filter (Ξ± : Type*) where...
Mathlib/Order/Filter/Basic.lean
1,319
1,321
theorem Eventually.and_frequently {p q : Ξ± β†’ Prop} {f : Filter Ξ±} (hp : βˆ€αΆ  x in f, p x) (hq : βˆƒαΆ  x in f, q x) : βˆƒαΆ  x in f, p x ∧ q x := by
simpa only [and_comm] using hq.and_eventually hp
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_...
Mathlib/Analysis/InnerProductSpace/PiL2.lean
787
792
theorem DirectSum.IsInternal.collectedOrthonormalBasis_mem [DecidableEq ΞΉ] (h : DirectSum.IsInternal A) {Ξ± : ΞΉ β†’ Type*} [βˆ€ i, Fintype (Ξ± i)] (hV : OrthogonalFamily π•œ (fun i => A i) fun i => (A i).subtypeβ‚—α΅’) (v : βˆ€ i, OrthonormalBasis (Ξ± i) π•œ (A i)) (a : Ξ£i, Ξ± i) : h.collectedOrthonormalBasis hV v a ∈ ...
simp [DirectSum.IsInternal.collectedOrthonormalBasis]
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
48
52
theorem gaugeRescale_self_apply {s : Set E} (hsa : Absorbent ℝ s) (hsb : IsVonNBounded ℝ s) (x : E) : gaugeRescale s s x = x := by
rcases eq_or_ne x 0 with rfl | hx; Β· simp rw [gaugeRescale, div_self, one_smul] exact ((gauge_pos hsa hsb).2 hx).ne'
import Mathlib.CategoryTheory.Sites.Sieves #align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe w v₁ vβ‚‚ u₁ uβ‚‚ namespace CategoryTheory open Opposite CategoryTheory Category Limits Sieve namespace Presieve variable {C : Type ...
Mathlib/CategoryTheory/Sites/IsSheafFor.lean
195
202
theorem extend_agrees {x : FamilyOfElements P R} (t : x.Compatible) {f : Y ⟢ X} (hf : R f) : x.sieveExtend f (le_generate R Y hf) = x f hf := by
have h := (le_generate R Y hf).choose_spec unfold FamilyOfElements.sieveExtend rw [t h.choose (πŸ™ _) _ hf _] Β· simp Β· rw [id_comp] exact h.choose_spec.choose_spec.2
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Ring.Subsemiring.Basic #align_import ring_theory.subring.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca" universe u v w variable {R : Type u} {S : Type v} {T : Type w} [Ring R] namespace Subring instance ...
Mathlib/Algebra/Ring/Subring/Basic.lean
919
946
theorem mem_closure_iff {s : Set R} {x} : x ∈ closure s ↔ x ∈ AddSubgroup.closure (Submonoid.closure s : Set R) := ⟨fun h => closure_induction h (fun x hx => AddSubgroup.subset_closure <| Submonoid.subset_closure hx) (AddSubgroup.zero_mem _) (AddSubgroup.subset_closure (Submonoid.one_mem (Submonoi...
simp rw [f]; apply AddSubgroup.neg_mem _ hx) (by rw [mul_zero x]; apply AddSubgroup.zero_mem _) (fun q₁ qβ‚‚ ihq₁ ihqβ‚‚ => by rw [mul_add x q₁ qβ‚‚]; apply AddSubgroup.add_mem _ ihq₁ ihqβ‚‚) fun z hz => by have f : x * -z = -(x * z) := by simp rw [f]; apply AddSubgroup.neg_...
import Mathlib.Init.Data.Prod import Mathlib.Data.Seq.WSeq #align_import data.seq.parallel from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" universe u v namespace Computation open Stream' variable {Ξ± : Type u} {Ξ² : Type v} def parallel.aux2 : List (Computation Ξ±) β†’ Sum Ξ± (List (Com...
Mathlib/Data/Seq/Parallel.lean
189
266
theorem exists_of_mem_parallel {S : WSeq (Computation Ξ±)} {a} (h : a ∈ parallel S) : βˆƒ c ∈ S, a ∈ c := by
suffices βˆ€ C, a ∈ C β†’ βˆ€ (l : List (Computation Ξ±)) (S), corec parallel.aux1 (l, S) = C β†’ βˆƒ c, (c ∈ l ∨ c ∈ S) ∧ a ∈ c from let ⟨c, h1, h2⟩ := this _ h [] S rfl ⟨c, h1.resolve_left <| List.not_mem_nil _, h2⟩ let F : List (Computation Ξ±) β†’ Sum Ξ± (List (Computation Ξ±)) β†’ Prop := by intro l a ...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
867
871
theorem cos_pi_div_thirty_two : cos (Ο€ / 32) = √(2 + √(2 + √(2 + √2))) / 2 := by
trans cos (Ο€ / 2 ^ 5) Β· congr norm_num Β· simp
import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Group.Aut import Mathlib.Data.ZMod.Defs import Mathlib.Tactic.Ring #align_import algebra.quandle from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" open MulOpposite universe u v class Shelf (Ξ± : Type u) where act : ...
Mathlib/Algebra/Quandle.lean
232
236
theorem left_cancel_inv (x : R) {y y' : R} : x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y' := by
constructor Β· apply (act' x).symm.injective rintro rfl rfl
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
502
502
theorem sin_add_pi_div_two (x : ℝ) : sin (x + Ο€ / 2) = cos x := by
simp [sin_add]
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Data.Set.Finite #align_import order.conditionally_complete_lattice.finset from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c" open Set variable {ΞΉ Ξ± Ξ² Ξ³ : Type*} section ConditionallyCompleteLinearOrder variable [...
Mathlib/Order/ConditionallyCompleteLattice/Finset.lean
33
35
theorem Finset.Nonempty.csSup_mem {s : Finset α} (h : s.Nonempty) : sSup (s : Set α) ∈ s := by
rw [h.csSup_eq_max'] exact s.max'_mem _
import Mathlib.Data.Nat.Lattice import Mathlib.Logic.Denumerable import Mathlib.Logic.Function.Iterate import Mathlib.Order.Hom.Basic import Mathlib.Data.Set.Subsingleton #align_import order.order_iso_nat from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90" variable {Ξ± : Type*} namespa...
Mathlib/Order/OrderIsoNat.lean
58
62
theorem exists_not_acc_lt_of_not_acc {a : Ξ±} {r} (h : Β¬Acc r a) : βˆƒ b, Β¬Acc r b ∧ r b a := by
contrapose! h refine ⟨_, fun b hr => ?_⟩ by_contra hb exact h b hb hr
import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.NAry import Mathlib.Order.Directed #align_import order.bounds.basic from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010" open Function Set open OrderDual (toDual ofDual) universe u v w x variable {Ξ± : Type u} {Ξ² : Type v}...
Mathlib/Order/Bounds/Basic.lean
496
499
theorem bddAbove_iff_exists_ge [SemilatticeSup Ξ³] {s : Set Ξ³} (xβ‚€ : Ξ³) : BddAbove s ↔ βˆƒ x, xβ‚€ ≀ x ∧ βˆ€ y ∈ s, y ≀ x := by
rw [bddAbove_def, exists_ge_and_iff_exists] exact Monotone.ball fun x _ => monotone_le
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical.Basic import Mathlib.Algebra.Order.Nonneg.Field import Mathlib.Algebra.Order.Nonneg.Floor import Mathlib.Data.Real.Pointwise import Mathlib.Order.ConditionallyCompleteLattice.Group imp...
Mathlib/Data/Real/NNReal.lean
550
551
theorem coe_iInf {ΞΉ : Sort*} (s : ΞΉ β†’ ℝβ‰₯0) : (↑(β¨… i, s i) : ℝ) = β¨… i, ↑(s i) := by
rw [iInf, iInf, coe_sInf, ← Set.range_comp]; rfl
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Analysis.Convex.Segment import Mathlib.Tactic.GCongr #align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Set open Convex Pointwise variable {π•œ E F : Type*} section OrderedSemiring va...
Mathlib/Analysis/Convex/Star.lean
367
369
theorem StarConvex.neg (hs : StarConvex π•œ x s) : StarConvex π•œ (-x) (-s) := by
rw [← image_neg] exact hs.is_linear_image IsLinearMap.isLinearMap_neg
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
264
268
theorem isNilpotent_toEnd_of_isNilpotent [IsNilpotent R L M] (x : L) : _root_.IsNilpotent (toEnd R L M x) := by
change βˆƒ k, toEnd R L M x ^ k = 0 have := exists_forall_pow_toEnd_eq_zero R L M tauto
import Mathlib.Geometry.Manifold.MFDeriv.Defs #align_import geometry.manifold.mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Topology Manifold open Set Bundle section DerivativesProperties variable {π•œ : Type*} [NontriviallyNormedFiel...
Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
460
462
theorem tangentMapWithin_univ : tangentMapWithin I I' f univ = tangentMap I I' f := by
ext p : 1 simp only [tangentMapWithin, tangentMap, mfld_simps]
import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Algebra.Group.Subsemigroup.Operations import Mathlib.Algebra.Group.Nat import Mathlib.GroupTheory.GroupAction.Defs #align_import group_theory.submonoid.operations from "leanprover-community/mathlib"@"cf8e77c636317b059a8ce20807a29cf3772a0640" assert_not_ex...
Mathlib/Algebra/Group/Submonoid/Operations.lean
1,211
1,214
theorem submonoidMap_surjective (f : M β†’* N) (M' : Submonoid M) : Function.Surjective (f.submonoidMap M') := by
rintro ⟨_, x, hx, rfl⟩ exact ⟨⟨x, hx⟩, rfl⟩
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {Ξ± : Type u} class OrderedAddCommGroup (Ξ± : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
816
816
theorem div_le_iff_le_mul' : a / b ≀ c ↔ a ≀ b * c := by
rw [div_le_iff_le_mul, mul_comm]
import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Data.Complex.Abs import Mathlib.Data.Complex.BigOperators import Mathlib.Data.Nat.Choose.Sum #align_import data.complex.exponential from "leanprover-community/mathlib"@"a8b2226cfb0a79f5986492053fc49b1a0c6aeffb" open CauSeq Finset IsAbsoluteValue open ...
Mathlib/Data/Complex/Exponential.lean
475
481
theorem sinh_three_mul : sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x := by
have h1 : x + 2 * x = 3 * x := by ring rw [← h1, sinh_add x (2 * x)] simp only [cosh_two_mul, sinh_two_mul] have h2 : cosh x * (2 * sinh x * cosh x) = 2 * sinh x * cosh x ^ 2 := by ring rw [h2, cosh_sq] ring
import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.Algebra.Module.Opposites #align_import linear_algebra.clifford_algebra.conjugation from "leanprover-community/mathlib"@"34020e531ebc4e8aac6d449d9eecbcd1508ea8d0" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M]...
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
234
237
theorem evenOdd_map_involute (n : ZMod 2) : (evenOdd Q n).map (involute : CliffordAlgebra Q →ₐ[R] CliffordAlgebra Q).toLinearMap = evenOdd Q n := by
simp_rw [evenOdd, Submodule.map_iSup, Submodule.map_pow, ΞΉ_range_map_involute]
import Mathlib.Data.Set.Basic #align_import order.circular from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829ce42efec" class Btw (Ξ± : Type*) where btw : Ξ± β†’ Ξ± β†’ Ξ± β†’ Prop #align has_btw Btw export Btw (btw) class SBtw (Ξ± : Type*) where sbtw : Ξ± β†’ Ξ± β†’ Ξ± β†’ Prop #align has_sbtw SBtw ...
Mathlib/Order/Circular.lean
369
371
theorem compl_cIcc {a b : α} : (cIcc a b)ᢜ = cIoo b a := by
ext rw [Set.mem_cIoo, sbtw_iff_not_btw, cIcc, mem_compl_iff, mem_setOf]
import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.Finsupp import Mathlib.Tactic.FinCases #align_import linear_algebra.affine_space.combination from ...
Mathlib/LinearAlgebra/AffineSpace/Combination.lean
320
322
theorem sum_smul_const_vsub_eq_neg_weightedVSub (w : ΞΉ β†’ k) (pβ‚‚ : ΞΉ β†’ P) (p₁ : P) (h : βˆ‘ i ∈ s, w i = 0) : (βˆ‘ i ∈ s, w i β€’ (p₁ -α΅₯ pβ‚‚ i)) = -s.weightedVSub pβ‚‚ w := by
rw [sum_smul_vsub_eq_weightedVSub_sub, s.weightedVSub_apply_const _ _ h, zero_sub]
import Mathlib.Algebra.Algebra.Subalgebra.Operations import Mathlib.Algebra.Ring.Fin import Mathlib.RingTheory.Ideal.Quotient #align_import ring_theory.ideal.quotient_operations from "leanprover-community/mathlib"@"b88d81c84530450a8989e918608e5960f015e6c8" universe u v w namespace Ideal open Function RingHom var...
Mathlib/RingTheory/Ideal/QuotientOperations.lean
676
679
theorem quotientEquivAlgOfEq_symm {I J : Ideal A} (h : I = J) : (quotientEquivAlgOfEq R₁ h).symm = quotientEquivAlgOfEq R₁ h.symm := by
ext rfl
import Mathlib.Init.Control.Combinators import Mathlib.Init.Function import Mathlib.Tactic.CasesM import Mathlib.Tactic.Attr.Core #align_import control.basic from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" universe u v w variable {Ξ± Ξ² Ξ³ : Type u} section Monad variable {m : Type u...
Mathlib/Control/Basic.lean
83
85
theorem map_bind (x : m Ξ±) {g : Ξ± β†’ m Ξ²} {f : Ξ² β†’ Ξ³} : f <$> (x >>= g) = x >>= fun a => f <$> g a := by
rw [← bind_pure_comp, bind_assoc]; simp [bind_pure_comp]
import Mathlib.Data.Fin.VecNotation import Mathlib.SetTheory.Cardinal.Basic #align_import model_theory.basic from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768" set_option autoImplicit true universe u v u' v' w w' open Cardinal open Cardinal namespace FirstOrder -- intended to b...
Mathlib/ModelTheory/Basic.lean
698
700
theorem ofInjective_toHom [L.IsAlgebraic] {f : M β†’[L] N} (hf : Function.Injective f) : (ofInjective hf).toHom = f := by
ext; simp
import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.group_with_zero.units.lemmas from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" assert_not_exis...
Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
49
52
theorem eq_on_invβ‚€ (f g : F') (h : f a = g a) : f a⁻¹ = g a⁻¹ := by
rcases eq_or_ne a 0 with (rfl | ha) Β· rw [inv_zero, map_zero, map_zero] Β· exact (IsUnit.mk0 a ha).eq_on_inv f g h
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
202
205
theorem lintegral_eq_measure_univ {X : Ξ© β†’ E} [HasPDF X β„™ ΞΌ] : ∫⁻ x, pdf X β„™ ΞΌ x βˆ‚ΞΌ = β„™ Set.univ := by
rw [← set_lintegral_univ, ← map_eq_set_lintegral_pdf X β„™ ΞΌ MeasurableSet.univ, map_apply_of_aemeasurable (HasPDF.aemeasurable X β„™ ΞΌ) MeasurableSet.univ, Set.preimage_univ]
import Mathlib.CategoryTheory.Sites.Subsheaf import Mathlib.CategoryTheory.Sites.CompatibleSheafification import Mathlib.CategoryTheory.Sites.LocallyInjective #align_import category_theory.sites.surjective from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe v u w v' u' w' open ...
Mathlib/CategoryTheory/Sites/LocallySurjective.lean
101
105
theorem isLocallySurjective_iff_imagePresheaf_sheafify_eq_top {F G : Cα΅’α΅– β₯€ A} (f : F ⟢ G) : IsLocallySurjective J f ↔ (imagePresheaf (whiskerRight f (forget A))).sheafify J = ⊀ := by
simp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj, Set.top_eq_univ, Set.mem_univ, iff_true_iff] exact ⟨fun H _ => H.imageSieve_mem, fun H => ⟨H _⟩⟩
import Mathlib.FieldTheory.Minpoly.Field #align_import ring_theory.power_basis from "leanprover-community/mathlib"@"d1d69e99ed34c95266668af4e288fc1c598b9a7f" open Polynomial open Polynomial variable {R S T : Type*} [CommRing R] [Ring S] [Algebra R S] variable {A B : Type*} [CommRing A] [CommRing B] [IsDomain B]...
Mathlib/RingTheory/PowerBasis.lean
132
135
theorem exists_eq_aeval' (pb : PowerBasis R S) (y : S) : βˆƒ f : R[X], y = aeval pb.gen f := by
nontriviality S obtain ⟨f, _, hf⟩ := exists_eq_aeval pb y exact ⟨f, hf⟩
import Mathlib.Algebra.Lie.OfAssociative import Mathlib.Algebra.Lie.IdealOperations #align_import algebra.lie.abelian from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" universe u v w w₁ wβ‚‚ class LieModule.IsTrivial (L : Type v) (M : Type w) [Bracket L M] [Zero M] : Prop where triv...
Mathlib/Algebra/Lie/Abelian.lean
318
326
theorem LieSubmodule.lie_abelian_iff_lie_self_eq_bot : IsLieAbelian I ↔ ⁅I, I⁆ = βŠ₯ := by
simp only [_root_.eq_bot_iff, lieIdeal_oper_eq_span, LieSubmodule.lieSpan_le, LieSubmodule.bot_coe, Set.subset_singleton_iff, Set.mem_setOf_eq, exists_imp] refine ⟨fun h z x y hz => hz.symm.trans (((I : LieSubalgebra R L).coe_bracket x y).symm.trans ((coe_zero_iff_zero _ _).mpr (by ...
import Mathlib.Data.Complex.Module import Mathlib.Data.Complex.Order import Mathlib.Data.Complex.Exponential import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.InfiniteSum.Module import Mathlib.Topology.Instances.RealVectorSpace #align_import analysis.complex.basic from "leanprover-community/mathlib...
Mathlib/Analysis/Complex/Basic.lean
309
313
theorem restrictScalars_one_smulRight' (x : E) : ContinuousLinearMap.restrictScalars ℝ ((1 : β„‚ β†’L[β„‚] β„‚).smulRight x : β„‚ β†’L[β„‚] E) = reCLM.smulRight x + I β€’ imCLM.smulRight x := by
ext ⟨a, b⟩ simp [mk_eq_add_mul_I, mul_smul, smul_comm I b x]
import Mathlib.Data.Int.Bitwise import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.Symmetric #align_import linear_algebra.matrix.zpow from "leanprover-community/mathlib"@"03fda9112aa6708947da13944a19310684bfdfcb" open Matrix namespace Matrix variable {n' : Type*} [Decidab...
Mathlib/LinearAlgebra/Matrix/ZPow.lean
325
325
theorem one_div_pow {A : M} (n : β„•) : (1 / A) ^ n = 1 / A ^ n := by
simp only [one_div, inv_pow']
import Mathlib.Data.Option.NAry import Mathlib.Data.Seq.Computation #align_import data.seq.seq from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace Stream' universe u v w def IsSeq {Ξ± : Type u} (s : Stream' (Option Ξ±)) : Prop := βˆ€ {n : β„•}, s n = none β†’ s (n + 1) = none #al...
Mathlib/Data/Seq/Seq.lean
174
178
theorem ge_stable (s : Seq Ξ±) {aβ‚™ : Ξ±} {n m : β„•} (m_le_n : m ≀ n) (s_nth_eq_some : s.get? n = some aβ‚™) : βˆƒ aβ‚˜ : Ξ±, s.get? m = some aβ‚˜ := have : s.get? n β‰  none := by
simp [s_nth_eq_some] have : s.get? m β‰  none := mt (s.le_stable m_le_n) this Option.ne_none_iff_exists'.mp this
import Mathlib.Order.Filter.Lift import Mathlib.Topology.Defs.Filter #align_import topology.basic from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" noncomputable section open Set Filter universe u v w x def TopologicalSpace.ofClosed {X : Type u} (T : Set (Set X)) (empty_mem : βˆ… ∈...
Mathlib/Topology/Basic.lean
1,332
1,334
theorem mem_closure_iff_ultrafilter : x ∈ closure s ↔ βˆƒ u : Ultrafilter X, s ∈ u ∧ ↑u ≀ 𝓝 x := by
simp [closure_eq_cluster_pts, ClusterPt, ← exists_ultrafilter_iff, and_comm]
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
624
625
theorem preimage_mul_const_Ioc (a b : α) {c : α} (h : 0 < c) : (fun x => x * c) ⁻¹' Ioc a b = Ioc (a / c) (b / c) := by
simp [← Ioi_inter_Iic, h]
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R...
Mathlib/Algebra/Polynomial/Mirror.lean
82
97
theorem coeff_mirror (n : β„•) : p.mirror.coeff n = p.coeff (revAt (p.natDegree + p.natTrailingDegree) n) := by
by_cases h2 : p.natDegree < n Β· rw [coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])] by_cases h1 : n ≀ p.natDegree + p.natTrailingDegree Β· rw [revAt_le h1, coeff_eq_zero_of_lt_natTrailingDegree] exact (tsub_lt_iff_left h1).mpr (Nat.add_lt_add_right h2 _) Β· rw [← revAtFun_eq, revAtFun, i...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
360
365
theorem dist_sq_eq_dist_sq_add_dist_sq_iff_angle_eq_pi_div_two (p1 p2 p3 : P) : dist p1 p3 * dist p1 p3 = dist p1 p2 * dist p1 p2 + dist p3 p2 * dist p3 p2 ↔ ∠ p1 p2 p3 = Ο€ / 2 := by
erw [dist_comm p3 p2, dist_eq_norm_vsub V p1 p3, dist_eq_norm_vsub V p1 p2, dist_eq_norm_vsub V p2 p3, ← norm_sub_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two, vsub_sub_vsub_cancel_right p1, ← neg_vsub_eq_vsub_rev p2 p3, norm_neg]
import Mathlib.Probability.Kernel.CondDistrib #align_import probability.kernel.condexp from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d" open MeasureTheory Set Filter TopologicalSpace open scoped ENNReal MeasureTheory ProbabilityTheory namespace ProbabilityTheory variable {Ξ© F : Ty...
Mathlib/Probability/Kernel/Condexp.lean
141
147
theorem _root_.MeasureTheory.Integrable.norm_integral_condexpKernel [NormedSpace ℝ F] (hf_int : Integrable f ΞΌ) : Integrable (fun Ο‰ => β€–βˆ« y, f y βˆ‚condexpKernel ΞΌ m Ο‰β€–) ΞΌ := by
rw [condexpKernel] convert Integrable.norm_integral_condDistrib (aemeasurable_id'' ΞΌ (inf_le_right : m βŠ“ mΞ© ≀ mΞ©)) aemeasurable_id (hf_int.comp_snd_map_prod_id (inf_le_right : m βŠ“ mΞ© ≀ mΞ©)) using 1
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-...
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
600
603
theorem iterate_pos_eq_iff {x : ℝ} {m : β„€} {n : β„•} (hn : 0 < n) : f^[n] x = x + n * m ↔ f x = x + m := by
simpa only [nsmul_eq_mul, add_right_iterate] using (f.commute_add_int m).iterate_pos_eq_iff_map_eq f.monotone (strictMono_id.add_const (m : ℝ)) hn
import Mathlib.NumberTheory.FLT.Basic import Mathlib.NumberTheory.PythagoreanTriples import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.LinearCombination #align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" noncomputable section open scope...
Mathlib/NumberTheory/FLT/Four.lean
141
149
theorem exists_pos_odd_minimal {a b c : β„€} (h : Fermat42 a b c) : βˆƒ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0 := by
obtain ⟨a0, b0, c0, hf, hc⟩ := exists_odd_minimal h rcases lt_trichotomy 0 c0 with (h1 | h1 | h1) · use a0, b0, c0 · exfalso exact ne_zero hf.1 h1.symm · use a0, b0, -c0, neg_of_minimal hf, hc exact neg_pos.mpr h1
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Regular.Pow import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Data.Finsupp.Antidiagonal import Mathlib.Order.SymmDiff import Mathlib.RingTheory.Adjoin.Basic #align_import data.mv_polynomial.basic fr...
Mathlib/Algebra/MvPolynomial/Basic.lean
1,547
1,549
theorem aeval_unique (Ο† : MvPolynomial Οƒ R →ₐ[R] S₁) : Ο† = aeval (Ο† ∘ X) := by
ext i simp
import Mathlib.Algebra.Algebra.Unitization import Mathlib.Algebra.Star.NonUnitalSubalgebra import Mathlib.Algebra.Star.Subalgebra import Mathlib.GroupTheory.GroupAction.Ring section Subalgebra variable {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] def Subalgebra.toNonUnitalSubalgebra (S : Subalgebr...
Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
73
75
theorem NonUnitalSubalgebra.toSubalgebra_toNonUnitalSubalgebra (S : NonUnitalSubalgebra R A) (h1 : (1 : A) ∈ S) : (NonUnitalSubalgebra.toSubalgebra S h1).toNonUnitalSubalgebra = S := by
cases S; rfl
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Logic.Unique import Mathlib.Tactic.Nontriviality import Mathlib.Tactic.Lift #align_import algebra.group.units from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" assert_not_exists Multiplicative a...
Mathlib/Algebra/Group/Units.lean
304
305
theorem inv_mul_cancel_right (a : Ξ±) (b : Ξ±Λ£) : a * ↑b⁻¹ * b = a := by
rw [mul_assoc, inv_mul, mul_one]
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.NormedSpace.RCLike import Mathlib.Order.Filter.Curry #align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b" open Filter open scoped uniformity Filter Topology section d...
Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
556
564
theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l) (hf : βˆ€αΆ  n in l, βˆ€ x : π•œ, HasDerivAt (f n) (f' n x) x) (hfg : βˆ€ x : π•œ, Tendsto (fun n => f n x) l (𝓝 (g x))) : βˆ€ x : π•œ, HasDerivAt g (g' x) x := by
intro x have hf : βˆ€αΆ  n in l, βˆ€ x : π•œ, x ∈ Set.univ β†’ HasDerivAt (f n) (f' n x) x := by filter_upwards [hf] with n h x _ using h x have hfg : βˆ€ x : π•œ, x ∈ Set.univ β†’ Tendsto (fun n => f n x) l (𝓝 (g x)) := by simp [hfg] have hf' : TendstoUniformlyOn f' g' l Set.univ := by rwa [tendstoUniformlyOn_univ] ...
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Choose.Sum import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f" namespace PowerS...
Mathlib/RingTheory/PowerSeries/WellKnown.lean
123
125
theorem invOneSubPow_val_zero_eq_invUnitSub_one : (invOneSubPow 0).val = invUnitsSub (1 : SΛ£) := by
simp [invOneSubPow, invUnitsSub]
import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Data.Complex.Abs import Mathlib.Data.Complex.BigOperators import Mathlib.Data.Nat.Choose.Sum #align_import data.complex.exponential from "leanprover-community/mathlib"@"a8b2226cfb0a79f5986492053fc49b1a0c6aeffb" open CauSeq Finset IsAbsoluteValue open ...
Mathlib/Data/Complex/Exponential.lean
453
455
theorem sinh_sq : sinh x ^ 2 = cosh x ^ 2 - 1 := by
rw [← cosh_sq_sub_sinh_sq x] ring