Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.57k
proof
stringlengths
5
7.36k
hint
bool
2 classes
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {Ξ±...
Mathlib/Topology/Algebra/WithZeroTopology.lean
136
139
theorem isOpen_iff {s : Set Ξ“β‚€} : IsOpen s ↔ (0 : Ξ“β‚€) βˆ‰ s ∨ βˆƒ Ξ³, Ξ³ β‰  0 ∧ Iio Ξ³ βŠ† s := by rw [isOpen_iff_mem_nhds, ← and_forall_ne (0 : Ξ“β‚€)]
rw [isOpen_iff_mem_nhds, ← and_forall_ne (0 : Ξ“β‚€)] simp (config := { contextual := true }) [nhds_of_ne_zero, imp_iff_not_or, hasBasis_nhds_zero.mem_iff]
true
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
61
65
theorem P_f_0_eq (q : β„•) : ((P q).f 0 : X _[0] ⟢ X _[0]) = πŸ™ _ := by induction' q with q hq
induction' q with q hq · rfl · simp only [P_succ, HomologicalComplex.add_f_apply, HomologicalComplex.comp_f, HomologicalComplex.id_f, id_comp, hq, Hσ_eq_zero, add_zero]
true
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
96
104
theorem weightedVSubOfPoint_eq_of_weights_eq (p : ΞΉ β†’ P) (j : ΞΉ) (w₁ wβ‚‚ : ΞΉ β†’ k) (hw : βˆ€ i, i β‰  j β†’ w₁ i = wβ‚‚ i) : s.weightedVSubOfPoint p (p j) w₁ = s.weightedVSubOfPoint p (p j) wβ‚‚ := by simp only [Finset.weightedVSubOfPoint_apply]
simp only [Finset.weightedVSubOfPoint_apply] congr ext i rcases eq_or_ne i j with h | h Β· simp [h] Β· simp [hw i h]
true
import Batteries.Data.UInt @[ext] theorem Char.ext : {a b : Char} β†’ a.val = b.val β†’ a = b | ⟨_,_⟩, ⟨_,_⟩, rfl => rfl theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val := ⟨congrArg _, Char.ext⟩ theorem Char.le_antisymm_iff {x y : Char} : x = y ↔ x ≀ y ∧ y ≀ x := Char.ext_iff.trans UInt32.le_antisymm_iff ...
.lake/packages/batteries/Batteries/Data/Char.lean
30
31
theorem csize_pos (c) : 0 < csize c := by
rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
true
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f ...
Mathlib/Data/ENNReal/Real.lean
609
610
theorem add_iInf {a : ℝβ‰₯0∞} : a + iInf f = β¨… b, a + f b := by
rw [add_comm, iInf_add]; simp [add_comm]
true
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
66
68
theorem gauge_def' : gauge s x = sInf {r ∈ Set.Ioi (0 : ℝ) | r⁻¹ β€’ x ∈ s} := by congrm sInf {r | ?_}
congrm sInf {r | ?_} exact and_congr_right fun hr => mem_smul_set_iff_inv_smul_memβ‚€ hr.ne' _ _
true
import Mathlib.Algebra.Group.Fin import Mathlib.Algebra.NeZero import Mathlib.Data.Nat.ModEq import Mathlib.Data.Fintype.Card #align_import data.zmod.defs from "leanprover-community/mathlib"@"3a2b5524a138b5d0b818b858b516d4ac8a484b03" def ZMod : β„• β†’ Type | 0 => β„€ | n + 1 => Fin (n + 1) #align zmod ZMod insta...
Mathlib/Data/ZMod/Defs.lean
124
127
theorem card (n : β„•) [Fintype (ZMod n)] : Fintype.card (ZMod n) = n := by cases n with
cases n with | zero => exact (not_finite (ZMod 0)).elim | succ n => convert Fintype.card_fin (n + 1) using 2
true
import Mathlib.Algebra.Ring.Prod import Mathlib.GroupTheory.OrderOfElement import Mathlib.Tactic.FinCases #align_import data.zmod.basic from "leanprover-community/mathlib"@"74ad1c88c77e799d2fea62801d1dbbd698cff1b7" assert_not_exists Submodule open Function namespace ZMod instance charZero : CharZero (ZMod 0) :=...
Mathlib/Data/ZMod/Basic.lean
183
186
theorem cast_eq_val [NeZero n] (a : ZMod n) : (cast a : R) = a.val := by cases n
cases n Β· cases NeZero.ne 0 rfl rfl
true
import Mathlib.Algebra.Group.Units import Mathlib.Algebra.GroupWithZero.Basic import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Nontriviality import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.group_with_zero.units.basic from "leanprover-community/...
Mathlib/Algebra/GroupWithZero/Units/Basic.lean
118
119
theorem mul_inverse_cancel_right (x y : Mβ‚€) (h : IsUnit x) : y * x * inverse x = y := by
rw [mul_assoc, mul_inverse_cancel x h, mul_one]
true
import Mathlib.CategoryTheory.Limits.Shapes.CommSq import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial import Mathlib.CategoryTheory.Limits.Shapes.Types import Mathlib.Topology.Category.TopCat.Limits.Pullbacks import Mathlib.CategoryTheory.Limits.FunctorCategory import Mathlib.CategoryTheory.Limits.Constructions...
Mathlib/CategoryTheory/Extensive.lean
102
112
theorem FinitaryExtensive.vanKampen [FinitaryExtensive C] {F : Discrete WalkingPair β₯€ C} (c : Cocone F) (hc : IsColimit c) : IsVanKampenColimit c := by let X := F.obj ⟨WalkingPair.left⟩
let X := F.obj ⟨WalkingPair.left⟩ let Y := F.obj ⟨WalkingPair.right⟩ have : F = pair X Y := by apply Functor.hext · rintro ⟨⟨⟩⟩ <;> rfl · rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ <;> simp clear_value X Y subst this exact FinitaryExtensive.van_kampen' c hc
true
import Mathlib.Analysis.Analytic.Composition #align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228" open scoped Classical Topology open Finset Filter namespace FormalMultilinearSeries variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} ...
Mathlib/Analysis/Analytic/Inverse.lean
97
148
theorem leftInv_comp (p : FormalMultilinearSeries π•œ E F) (i : E ≃L[π•œ] F) (h : p 1 = (continuousMultilinearCurryFin1 π•œ E F).symm i) : (leftInv p i).comp p = id π•œ E := by ext (n v)
ext (n v) match n with | 0 => simp only [leftInv_coeff_zero, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne, not_false_iff, zero_ne_one, comp_coeff_zero'] | 1 => simp only [leftInv_coeff_one, comp_coeff_one, h, id_apply_one, ContinuousLinearEquiv.coe_apply, ContinuousLinearEquiv.s...
true
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
119
120
theorem logb_pow {k : β„•} (hx : 0 < x) : logb b (x ^ k) = k * logb b x := by
rw [← rpow_natCast, logb_rpow_eq_mul_logb_of_pos hx]
true
import Mathlib.Data.Set.Image import Mathlib.Data.SProd #align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" open Function namespace Set section Prod variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {s s₁ sβ‚‚ : Set Ξ±} {t t₁ tβ‚‚ : Set Ξ²} {a : Ξ±} {b : Ξ²} theorem Subsingleton.pro...
Mathlib/Data/Set/Prod.lean
137
139
theorem inter_prod : (s₁ ∩ sβ‚‚) Γ—Λ’ t = s₁ Γ—Λ’ t ∩ sβ‚‚ Γ—Λ’ t := by ext ⟨x, y⟩
ext ⟨x, y⟩ simp only [← and_and_right, mem_inter_iff, mem_prod]
true
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups noncomputable section open ModularForm UpperHalfPlane Matrix namespace SlashInvariantForm theorem vAdd_width_periodic (N : β„•) (k n : β„€) (f : SlashInvariantForm (Gamma N) k) (z : ℍ) : f ...
Mathlib/NumberTheory/ModularForms/Identities.lean
34
37
theorem T_zpow_width_invariant (N : β„•) (k n : β„€) (f : SlashInvariantForm (Gamma N) k) (z : ℍ) : f (((ModularGroup.T ^ (N * n))) β€’ z) = f z := by rw [modular_T_zpow_smul z (N * n)]
rw [modular_T_zpow_smul z (N * n)] simpa only [Int.cast_mul, Int.cast_natCast] using vAdd_width_periodic N k n f z
true
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall #align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88" noncomputable section open RCLike Real ...
Mathlib/Analysis/InnerProductSpace/Calculus.lean
333
337
theorem hasStrictFDerivAt_euclidean : HasStrictFDerivAt f f' y ↔ βˆ€ i, HasStrictFDerivAt (fun x => f x i) (EuclideanSpace.proj i ∘L f') y := by rw [← (EuclideanSpace.equiv ΞΉ π•œ).comp_hasStrictFDerivAt_iff, hasStrictFDerivAt_pi']
rw [← (EuclideanSpace.equiv ΞΉ π•œ).comp_hasStrictFDerivAt_iff, hasStrictFDerivAt_pi'] rfl
true
import Mathlib.Algebra.Module.Submodule.Basic import Mathlib.Topology.Algebra.Monoid import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Algebra.Algebra.Pi #align_import order.filter.zero_and_bounded_at_filter from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" namespace Filt...
Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean
84
87
theorem ZeroAtFilter.boundedAtFilter [NormedAddCommGroup Ξ²] {l : Filter Ξ±} {f : Ξ± β†’ Ξ²} (hf : ZeroAtFilter l f) : BoundedAtFilter l f := by rw [ZeroAtFilter, ← Asymptotics.isLittleO_const_iff (one_ne_zero' ℝ)] at hf
rw [ZeroAtFilter, ← Asymptotics.isLittleO_const_iff (one_ne_zero' ℝ)] at hf exact hf.isBigO
true
import Mathlib.ModelTheory.Syntax import Mathlib.ModelTheory.Semantics import Mathlib.ModelTheory.Algebra.Ring.Basic import Mathlib.Algebra.Field.MinimalAxioms variable {K : Type*} namespace FirstOrder namespace Field open Language Ring Structure BoundedFormula inductive FieldAxiom : Type | addAssoc : Field...
Mathlib/ModelTheory/Algebra/Field/Basic.lean
81
86
theorem FieldAxiom.realize_toSentence_iff_toProp {K : Type*} [Add K] [Mul K] [Neg K] [Zero K] [One K] [CompatibleRing K] (ax : FieldAxiom) : (K ⊨ (ax.toSentence : Sentence Language.ring)) ↔ ax.toProp K := by cases ax <;>
cases ax <;> simp [Sentence.Realize, Formula.Realize, Fin.snoc]
true
import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.monotone_convergence from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter Set Function open scoped Classical open Filter Topology variable {Ξ± Ξ² : Type*} class SupConvergenceClass (Ξ± : Type*) [Preorde...
Mathlib/Topology/Order/MonotoneConvergence.lean
96
100
theorem tendsto_atTop_isLUB (h_mono : Monotone f) (ha : IsLUB (Set.range f) a) : Tendsto f atTop (𝓝 a) := by suffices Tendsto (rangeFactorization f) atTop atTop from
suffices Tendsto (rangeFactorization f) atTop atTop from (SupConvergenceClass.tendsto_coe_atTop_isLUB _ _ ha).comp this exact h_mono.rangeFactorization.tendsto_atTop_atTop fun b => b.2.imp fun a ha => ha.ge
true
import Mathlib.CategoryTheory.Subobject.MonoOver import Mathlib.CategoryTheory.Skeletal import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.Tactic.ApplyFun import Mathlib.Tactic.CategoryTheory.Elementwise #align_import category_theory.subobject.basic from "leanprover-community/mathlib"@"70fd9563a21e7b...
Mathlib/CategoryTheory/Subobject/Basic.lean
210
213
theorem arrow_congr {A : C} (X Y : Subobject A) (h : X = Y) : eqToHom (congr_arg (fun X : Subobject A => (X : C)) h) ≫ Y.arrow = X.arrow := by induction h
induction h simp
true
import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal #align_import set_theory.surreal.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" universe u namespace SetTheory open scoped PGame namespace PGame def Numeric : PGame β†’ Prop | ⟨_, _, L, R⟩ => (...
Mathlib/SetTheory/Surreal/Basic.lean
71
75
theorem numeric_def {x : PGame} : Numeric x ↔ (βˆ€ i j, x.moveLeft i < x.moveRight j) ∧ (βˆ€ i, Numeric (x.moveLeft i)) ∧ βˆ€ j, Numeric (x.moveRight j) := by
cases x; rfl
true
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
142
146
theorem isQuadratic_Ο‡β‚ˆ : Ο‡β‚ˆ.IsQuadratic := by intro a
intro a -- Porting note: was `decide!` fin_cases a all_goals decide
true
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.Data.Finset.Preimage import Mathlib.Data.Set.Finite import Mathlib.GroupTheory.GroupAction.BigOperators #align_import data.dfinsupp.basic from "leanpr...
Mathlib/Data/DFinsupp/Basic.lean
144
147
theorem mapRange_id (h : βˆ€ i, id (0 : β₁ i) = 0 := fun i => rfl) (g : Ξ β‚€ i : ΞΉ, β₁ i) : mapRange (fun i => (id : β₁ i β†’ β₁ i)) h g = g := by ext
ext rfl
true
import Mathlib.CategoryTheory.Abelian.Basic #align_import category_theory.idempotents.basic from "leanprover-community/mathlib"@"3a061790136d13594ec10c7c90d202335ac5d854" open CategoryTheory open CategoryTheory.Category open CategoryTheory.Limits open CategoryTheory.Preadditive open Opposite namespace Catego...
Mathlib/CategoryTheory/Idempotents/Basic.lean
143
154
theorem split_iff_of_iso {X X' : C} (Ο† : X β‰… X') (p : X ⟢ X) (p' : X' ⟢ X') (hpp' : p ≫ Ο†.hom = Ο†.hom ≫ p') : (βˆƒ (Y : C) (i : Y ⟢ X) (e : X ⟢ Y), i ≫ e = πŸ™ Y ∧ e ≫ i = p) ↔ βˆƒ (Y' : C) (i' : Y' ⟢ X') (e' : X' ⟢ Y'), i' ≫ e' = πŸ™ Y' ∧ e' ≫ i' = p' := by constructor
constructor Β· exact split_imp_of_iso Ο† p p' hpp' Β· apply split_imp_of_iso Ο†.symm p' p rw [← comp_id p, ← Ο†.hom_inv_id] slice_rhs 2 3 => rw [hpp'] slice_rhs 1 2 => erw [Ο†.inv_hom_id] simp only [id_comp] rfl
true
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
181
181
theorem normalize_gcd : normalize (s.gcd f) = s.gcd f := by
simp [gcd_def]
true
import Mathlib.Topology.Compactness.Compact open Set Filter Topology TopologicalSpace Classical variable {X : Type*} {Y : Type*} {ΞΉ : Type*} variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X} instance [WeaklyLocallyCompactSpace X] [WeaklyLocallyCompactSpace Y] : WeaklyLocallyCompactSpace (X Γ— Y) ...
Mathlib/Topology/Compactness/LocallyCompact.lean
40
45
theorem exists_compact_superset [WeaklyLocallyCompactSpace X] {K : Set X} (hK : IsCompact K) : βˆƒ K', IsCompact K' ∧ K βŠ† interior K' := by choose s hc hmem using fun x : X ↦ exists_compact_mem_nhds x
choose s hc hmem using fun x : X ↦ exists_compact_mem_nhds x rcases hK.elim_nhds_subcover _ fun x _ ↦ interior_mem_nhds.2 (hmem x) with ⟨I, -, hIK⟩ refine βŸ¨β‹ƒ x ∈ I, s x, I.isCompact_biUnion fun _ _ ↦ hc _, hIK.trans ?_⟩ exact iUnionβ‚‚_subset fun x hx ↦ interior_mono <| subset_iUnionβ‚‚ (s := fun x _ ↦ s x) x hx
true
import Mathlib.Data.Matrix.Basic import Mathlib.Data.PEquiv #align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" namespace PEquiv open Matrix universe u v variable {k l m n : Type*} variable {Ξ± : Type v} open Matrix def toMatrix [DecidableEq n] [Zer...
Mathlib/Data/Matrix/PEquiv.lean
142
148
theorem toMatrix_swap [DecidableEq n] [Ring Ξ±] (i j : n) : (Equiv.swap i j).toPEquiv.toMatrix = (1 : Matrix n n Ξ±) - (single i i).toMatrix - (single j j).toMatrix + (single i j).toMatrix + (single j i).toMatrix := by ext
ext dsimp [toMatrix, single, Equiv.swap_apply_def, Equiv.toPEquiv, one_apply] split_ifs <;> simp_all
true
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
149
164
theorem mem_permutationsAux2 {t : Ξ±} {ts : List Ξ±} {ys : List Ξ±} {l l' : List Ξ±} : l' ∈ (permutationsAux2 t ts [] ys (l ++ Β·)).2 ↔ βˆƒ l₁ lβ‚‚, lβ‚‚ β‰  [] ∧ ys = l₁ ++ lβ‚‚ ∧ l' = l ++ l₁ ++ t :: lβ‚‚ ++ ts := by induction' ys with y ys ih generalizing l
induction' ys with y ys ih generalizing l Β· simp (config := { contextual := true }) rw [permutationsAux2_snd_cons, show (fun x : List Ξ± => l ++ y :: x) = (l ++ [y] ++ Β·) by funext _; simp, mem_cons, ih] constructor Β· rintro (rfl | ⟨l₁, lβ‚‚, l0, rfl, rfl⟩) Β· exact ⟨[], y :: ys, by simp⟩ Β· exact ⟨y ...
true
import Mathlib.Init.Function import Mathlib.Logic.Function.Basic #align_import data.sigma.basic from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" open Function section Sigma variable {Ξ± α₁ Ξ±β‚‚ : Type*} {Ξ² : Ξ± β†’ Type*} {β₁ : α₁ β†’ Type*} {Ξ²β‚‚ : Ξ±β‚‚ β†’ Type*} namespace Sigma instance inst...
Mathlib/Data/Sigma/Basic.lean
70
71
theorem ext_iff {xβ‚€ x₁ : Sigma Ξ²} : xβ‚€ = x₁ ↔ xβ‚€.1 = x₁.1 ∧ HEq xβ‚€.2 x₁.2 := by
cases xβ‚€; cases x₁; exact Sigma.mk.inj_iff
true
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
115
117
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≀ 0) (y : ℝ) : x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * Ο€) := by
split_ifs with h <;> simp [rpow_def, *]; exact rpow_def_of_neg (lt_of_le_of_ne hx h) _
true
import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.measure.haar.normed_space from "leanprover-community/mathlib"@"b84aee748341da06a6d78491367e2c0e9f15e8a5" noncomputable sect...
Mathlib/MeasureTheory/Measure/Haar/NormedSpace.lean
105
107
theorem integral_comp_inv_smul_of_nonneg (f : E β†’ F) {R : ℝ} (hR : 0 ≀ R) : ∫ x, f (R⁻¹ β€’ x) βˆ‚ΞΌ = R ^ finrank ℝ E β€’ ∫ x, f x βˆ‚ΞΌ := by
rw [integral_comp_inv_smul ΞΌ f R, abs_of_nonneg (pow_nonneg hR _)]
true
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Adjunction.Limits import Mathlib.CategoryTheory.Limits.Shapes.CommSq import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial import Mathlib.CategoryTheory.Limits.FunctorCategory import Mathlib.CategoryTheory.Limits.Constructions.Fin...
Mathlib/CategoryTheory/Limits/VanKampen.lean
75
80
theorem mapPair_equifibered {F F' : Discrete WalkingPair β₯€ C} (Ξ± : F ⟢ F') : NatTrans.Equifibered Ξ± := by rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩
rintro ⟨⟨⟩⟩ ⟨j⟩ ⟨⟨rfl : _ = j⟩⟩ all_goals dsimp; simp only [Discrete.functor_map_id] exact IsPullback.of_horiz_isIso ⟨by simp only [Category.comp_id, Category.id_comp]⟩
true
import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.projective_space.basic from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23" variable (K V : Type*) [DivisionRing K] [AddCommGroup V] [Module K V] def projectivizationSetoid : Setoid { v : V // v β‰  0 } := (MulA...
Mathlib/LinearAlgebra/Projectivization/Basic.lean
137
139
theorem submodule_eq (v : β„™ K V) : v.submodule = K βˆ™ v.rep := by conv_lhs => rw [← v.mk_rep]
conv_lhs => rw [← v.mk_rep] rfl
true
import Mathlib.Algebra.Group.Submonoid.Pointwise #align_import group_theory.submonoid.inverses from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {M : Type*} namespace Submonoid @[to_additive] noncomputable instance [Monoid M] : Group (IsUnit.submonoid M) := { inferInstanc...
Mathlib/GroupTheory/Submonoid/Inverses.lean
73
76
theorem leftInv_leftInv_le : S.leftInv.leftInv ≀ S := by rintro x ⟨⟨y, z, hβ‚βŸ©, hβ‚‚ : x * y = 1⟩
rintro x ⟨⟨y, z, hβ‚βŸ©, hβ‚‚ : x * y = 1⟩ convert z.prop rw [← mul_one x, ← h₁, ← mul_assoc, hβ‚‚, one_mul]
true
import Mathlib.CategoryTheory.Idempotents.Basic import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Equivalence #align_import category_theory.idempotents.karoubi from "leanprover-community/mathlib"@"200eda15d8ff5669854ff6bcc10aaf37cb70498f" noncomputable section open CategoryT...
Mathlib/CategoryTheory/Idempotents/Karoubi.lean
94
94
theorem p_comm {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f ≫ Q.p := by
rw [p_comp, comp_p]
true
import Mathlib.LinearAlgebra.Matrix.Spectrum import Mathlib.LinearAlgebra.QuadraticForm.Basic #align_import linear_algebra.matrix.pos_def from "leanprover-community/mathlib"@"07992a1d1f7a4176c6d3f160209608be4e198566" open scoped ComplexOrder namespace Matrix variable {m n R π•œ : Type*} variable [Fintype m] [Fint...
Mathlib/LinearAlgebra/Matrix/PosDef.lean
81
87
theorem submatrix {M : Matrix n n R} (hM : M.PosSemidef) (e : m β†’ n) : (M.submatrix e e).PosSemidef := by classical
classical rw [(by simp : M = 1 * M * 1), submatrix_mul (heβ‚‚ := Function.bijective_id), submatrix_mul (heβ‚‚ := Function.bijective_id), submatrix_id_id] simpa only [conjTranspose_submatrix, conjTranspose_one] using conjTranspose_mul_mul_same hM (Matrix.submatrix 1 id e)
true
import Mathlib.Control.EquivFunctor import Mathlib.CategoryTheory.Groupoid import Mathlib.CategoryTheory.Whiskering import Mathlib.CategoryTheory.Types #align_import category_theory.core from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768" namespace CategoryTheory universe v₁ vβ‚‚ u₁ uβ‚‚ -...
Mathlib/CategoryTheory/Core.lean
52
53
theorem id_hom (X : C) : Iso.hom (coreCategory.id X) = @CategoryStruct.id C _ X := by
rfl
true
import Mathlib.ModelTheory.Syntax import Mathlib.ModelTheory.Semantics import Mathlib.Algebra.Ring.Equiv variable {Ξ± : Type*} namespace FirstOrder open FirstOrder inductive ringFunc : β„• β†’ Type | add : ringFunc 2 | mul : ringFunc 2 | neg : ringFunc 1 | zero : ringFunc 0 | one : ringFunc 0 deriving D...
Mathlib/ModelTheory/Algebra/Ring/Basic.lean
195
196
theorem realize_zero (v : Ξ± β†’ R) : Term.realize v (0 : ring.Term Ξ±) = 0 := by
simp [zero_def, funMap_zero, constantMap]
true
import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.Calculus.Monotone import Mathlib.Data.Set.Function import Mathlib.Algebra.Group.Basic import Mathlib.Tactic.WLOG #align_import analysis.bounded_variation from ...
Mathlib/Analysis/BoundedVariation.lean
127
130
theorem sum_le_of_monotoneOn_Iic (f : Ξ± β†’ E) {s : Set Ξ±} {n : β„•} {u : β„• β†’ Ξ±} (hu : MonotoneOn u (Iic n)) (us : βˆ€ i ≀ n, u i ∈ s) : (βˆ‘ i ∈ Finset.range n, edist (f (u (i + 1))) (f (u i))) ≀ eVariationOn f s := by
simpa using sum_le_of_monotoneOn_Icc f (m := 0) (hu.mono Icc_subset_Iic_self) fun i hi ↦ us i hi.2
true
import Mathlib.Algebra.Group.Equiv.TypeTags import Mathlib.GroupTheory.FreeAbelianGroup import Mathlib.GroupTheory.FreeGroup.IsFreeGroup import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import group_theory.free_abelian_group_finsupp from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e600...
Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean
87
89
theorem toFinsupp_toFreeAbelianGroup (f : X β†’β‚€ β„€) : FreeAbelianGroup.toFinsupp (Finsupp.toFreeAbelianGroup f) = f := by
rw [← AddMonoidHom.comp_apply, toFinsupp_comp_toFreeAbelianGroup, AddMonoidHom.id_apply]
true
import Mathlib.Topology.Constructions import Mathlib.Topology.Algebra.Monoid import Mathlib.Order.Filter.ListTraverse import Mathlib.Tactic.AdaptationNote #align_import topology.list from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" open TopologicalSpace Set Filter open Topology Filt...
Mathlib/Topology/List.lean
28
66
theorem nhds_list (as : List Ξ±) : 𝓝 as = traverse 𝓝 as := by refine nhds_mkOfNhds _ _ ?_ ?_
refine nhds_mkOfNhds _ _ ?_ ?_ Β· intro l induction l with | nil => exact le_rfl | cons a l ih => suffices List.cons <$> pure a <*> pure l ≀ List.cons <$> 𝓝 a <*> traverse 𝓝 l by simpa only [functor_norm] using this exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih Β· i...
true
import Mathlib.Probability.Martingale.BorelCantelli import Mathlib.Probability.ConditionalExpectation import Mathlib.Probability.Independence.Basic #align_import probability.borel_cantelli from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open scoped MeasureTheory ProbabilityTheory EN...
Mathlib/Probability/BorelCantelli.lean
74
105
theorem measure_limsup_eq_one {s : β„• β†’ Set Ξ©} (hsm : βˆ€ n, MeasurableSet (s n)) (hs : iIndepSet s ΞΌ) (hs' : (βˆ‘' n, ΞΌ (s n)) = ∞) : ΞΌ (limsup s atTop) = 1 := by rw [measure_congr (eventuallyEq_set.2 (ae_mem_limsup_atTop_iff ΞΌ <|
rw [measure_congr (eventuallyEq_set.2 (ae_mem_limsup_atTop_iff ΞΌ <| measurableSet_filtrationOfSet' hsm) : (limsup s atTop : Set Ξ©) =ᡐ[ΞΌ] {Ο‰ | Tendsto (fun n => βˆ‘ k ∈ Finset.range n, (ΞΌ[(s (k + 1)).indicator (1 : Ξ© β†’ ℝ)|filtrationOfSet hsm k]) Ο‰) atTop atTop})] suffices {Ο‰ | Tendsto (fun n => βˆ‘ k ...
true
import Mathlib.Data.Set.Pairwise.Basic import Mathlib.Order.Bounds.Basic import Mathlib.Order.Directed import Mathlib.Order.Hom.Set #align_import order.antichain from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" open Function Set section General variable {Ξ± Ξ² : Type*} {r r₁ rβ‚‚ : Ξ± β†’...
Mathlib/Order/Antichain.lean
120
124
theorem image_relEmbedding (hs : IsAntichain r s) (Ο† : r β†ͺr r') : IsAntichain r' (Ο† '' s) := by intro b hb b' hb' h₁ hβ‚‚
intro b hb b' hb' h₁ hβ‚‚ rw [Set.mem_image] at hb hb' obtain ⟨⟨a, has, rfl⟩, ⟨a', has', rfl⟩⟩ := hb, hb' exact hs has has' (fun haa' => h₁ (by rw [haa'])) (Ο†.map_rel_iff.mp hβ‚‚)
true
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set...
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
61
64
theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S
let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)]
true
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
104
107
theorem comp_differentiableAt_iff {f : G β†’ E} {x : G} : DifferentiableAt π•œ (iso ∘ f) x ↔ DifferentiableAt π•œ f x := by rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ,
rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ, iso.comp_differentiableWithinAt_iff]
true
import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {Ξ± : Type*} [DecidableEq Ξ±] {π’œ ℬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±} namespace Finset def nonMemberSubfamily (a : Ξ±) (π’œ : ...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
86
88
theorem memberSubfamily_union (a : Ξ±) (π’œ ℬ : Finset (Finset Ξ±)) : (π’œ βˆͺ ℬ).memberSubfamily a = π’œ.memberSubfamily a βˆͺ ℬ.memberSubfamily a := by
simp_rw [memberSubfamily, filter_union, image_union]
true
import Mathlib.CategoryTheory.Category.Grpd import Mathlib.CategoryTheory.Groupoid import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Homotopy.Path import Mathlib.Data.Set.Subsingleton #align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473...
Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean
200
202
theorem transAssocReparamAux_mem_I (t : I) : transAssocReparamAux t ∈ I := by unfold transAssocReparamAux
unfold transAssocReparamAux split_ifs <;> constructor <;> linarith [unitInterval.le_one t, unitInterval.nonneg t]
true
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
113
114
theorem card_fintype_Ico : Fintype.card (Set.Ico a b) = b - a := by
rw [← card_Ico, Fintype.card_ofFinset]
true
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Div #align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8" noncomputable ...
Mathlib/Algebra/Polynomial/RingDivision.lean
427
436
theorem le_rootMultiplicity_iff {p : R[X]} (p0 : p β‰  0) {a : R} {n : β„•} : n ≀ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p := by classical
classical rw [rootMultiplicity_eq_nat_find_of_nonzero p0, @Nat.le_find_iff _ (_)] simp_rw [Classical.not_not] refine ⟨fun h => ?_, fun h m hm => (pow_dvd_pow _ hm).trans h⟩ cases' n with n; · rw [pow_zero] apply one_dvd; · exact h n n.lt_succ_self
true
import Mathlib.AlgebraicGeometry.Spec import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.CategoryTheory.Elementwise #align_import algebraic_geometry.Scheme from "leanprover-community/mathlib"@"88474d1b5af6d37c2ab728b757771bced7f5194c" -- Explicit universe annotations were used in this file to improv...
Mathlib/AlgebraicGeometry/Scheme.lean
155
157
theorem congr_app {X Y : Scheme} {f g : X ⟢ Y} (e : f = g) (U) : f.val.c.app U = g.val.c.app U ≫ X.presheaf.map (eqToHom (by subst e; rfl)) := by
subst e; dsimp; simp
true
import Mathlib.Algebra.Homology.Single #align_import algebra.homology.augment from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open CategoryTheory Limits HomologicalComplex universe v u variable {V : Type u} [Category.{v} V] namespace ChainComplex @[simps]...
Mathlib/Algebra/Homology/Augment.lean
92
94
theorem augment_d_succ_succ (C : ChainComplex V β„•) {X : V} (f : C.X 0 ⟢ X) (w : C.d 1 0 ≫ f = 0) (i j : β„•) : (augment C f w).d (i + 1) (j + 1) = C.d i j := by
cases i <;> rfl
true
import Mathlib.Data.Int.GCD import Mathlib.Tactic.NormNum namespace Tactic namespace NormNum
Mathlib/Tactic/NormNum/GCD.lean
22
28
theorem int_gcd_helper' {d : β„•} {x y : β„€} (a b : β„€) (h₁ : (d : β„€) ∣ x) (hβ‚‚ : (d : β„€) ∣ y) (h₃ : x * a + y * b = d) : Int.gcd x y = d := by refine Nat.dvd_antisymm ?_ (Int.natCast_dvd_natCast.1 (Int.dvd_gcd h₁ hβ‚‚))
refine Nat.dvd_antisymm ?_ (Int.natCast_dvd_natCast.1 (Int.dvd_gcd h₁ hβ‚‚)) rw [← Int.natCast_dvd_natCast, ← h₃] apply dvd_add Β· exact Int.gcd_dvd_left.mul_right _ Β· exact Int.gcd_dvd_right.mul_right _
true
import Mathlib.Algebra.EuclideanDomain.Instances import Mathlib.RingTheory.Ideal.Colon import Mathlib.RingTheory.UniqueFactorizationDomain #align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940" universe u v variable {R : Type u} {M : Type v...
Mathlib/RingTheory/PrincipalIdealDomain.lean
109
111
theorem mem_iff_eq_smul_generator (S : Submodule R M) [S.IsPrincipal] {x : M} : x ∈ S ↔ βˆƒ s : R, x = s β€’ generator S := by
simp_rw [@eq_comm _ x, ← mem_span_singleton, span_singleton_generator]
true
import Mathlib.Probability.Kernel.Composition #align_import probability.kernel.invariance from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b" open MeasureTheory open scoped MeasureTheory ENNReal ProbabilityTheory namespace ProbabilityTheory variable {Ξ± Ξ² Ξ³ : Type*} {mΞ± : MeasurableSp...
Mathlib/Probability/Kernel/Invariance.lean
57
60
theorem const_bind_eq_comp_const (ΞΊ : kernel Ξ± Ξ²) (ΞΌ : Measure Ξ±) : const Ξ± (ΞΌ.bind ΞΊ) = ΞΊ βˆ˜β‚– const Ξ± ΞΌ := by ext a s hs
ext a s hs simp_rw [comp_apply' _ _ _ hs, const_apply, Measure.bind_apply hs (kernel.measurable _)]
true
import Mathlib.MeasureTheory.Measure.Haar.Basic import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional open sco...
Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
57
65
theorem parallelepiped_basis_eq (b : Basis ΞΉ ℝ E) : parallelepiped b = {x | βˆ€ i, b.repr x i ∈ Set.Icc 0 1} := by classical
classical ext x simp_rw [mem_parallelepiped_iff, mem_setOf_eq, b.ext_elem_iff, _root_.map_sum, _root_.map_smul, Finset.sum_apply', Basis.repr_self, Finsupp.smul_single, smul_eq_mul, mul_one, Finsupp.single_apply, Finset.sum_ite_eq', Finset.mem_univ, ite_true, mem_Icc, Pi.le_def, Pi.zero_apply, Pi.one...
true
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Fintype.Card #align_import data.multiset.fintype from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" variable {Ξ± : Type*} [DecidableEq Ξ±] {m : Multiset Ξ±} def Multiset.ToType (m : Multiset Ξ±) : Type _ := (x : Ξ±) Γ— Fi...
Mathlib/Data/Multiset/Fintype.lean
122
126
theorem Multiset.toEnumFinset_mono {m₁ mβ‚‚ : Multiset Ξ±} (h : m₁ ≀ mβ‚‚) : m₁.toEnumFinset βŠ† mβ‚‚.toEnumFinset := by intro p
intro p simp only [Multiset.mem_toEnumFinset] exact gt_of_ge_of_gt (Multiset.le_iff_count.mp h p.1)
true
import Mathlib.Algebra.MvPolynomial.Supported import Mathlib.RingTheory.WittVector.Truncated #align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section namespace WittVector variable (p : β„•) [hp : Fact p.Prime] variable {k ...
Mathlib/RingTheory/WittVector/MulCoeff.lean
145
176
theorem mul_polyOfInterest_aux3 (n : β„•) : wittPolyProd p (n + 1) = -((p : 𝕄) ^ (n + 1) * X (0, n + 1)) * ((p : 𝕄) ^ (n + 1) * X (1, n + 1)) + (p : 𝕄) ^ (n + 1) * X (0, n + 1) * rename (Prod.mk (1 : Fin 2)) (wittPolynomial p β„€ (n + 1)) + (p : 𝕄) ^ (n + 1) * X (1, n + 1) * rename (Prod.mk (0 : Fin 2)) (wi...
-- a useful auxiliary fact have mvpz : (p : 𝕄) ^ (n + 1) = MvPolynomial.C ((p : β„€) ^ (n + 1)) := by norm_cast -- Porting note: the original proof applies `sum_range_succ` through a non-`conv` rewrite, -- but this does not work in Lean 4; the whole proof also times out very badly. The proof has been -- nearl...
true
import Mathlib.Data.Set.Lattice import Mathlib.Data.Set.Pairwise.Basic #align_import data.set.pairwise.lattice from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Set Order variable {Ξ± Ξ² Ξ³ ΞΉ ΞΉ' : Type*} {ΞΊ : Sort*} {r p q : Ξ± β†’ Ξ± β†’ Prop} section Pairwise variable {f g : ...
Mathlib/Data/Set/Pairwise/Lattice.lean
89
101
theorem PairwiseDisjoint.prod_left {f : ΞΉ Γ— ΞΉ' β†’ Ξ±} (hs : s.PairwiseDisjoint fun i => ⨆ i' ∈ t, f (i, i')) (ht : t.PairwiseDisjoint fun i' => ⨆ i ∈ s, f (i, i')) : (s Γ—Λ’ t : Set (ΞΉ Γ— ΞΉ')).PairwiseDisjoint f := by rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h
rintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h rw [mem_prod] at hi hj obtain rfl | hij := eq_or_ne i j Β· refine (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono ?_ ?_ Β· convert le_iSupβ‚‚ (Ξ± := Ξ±) i hi.1; rfl Β· convert le_iSupβ‚‚ (Ξ± := Ξ±) i hj.1; rfl Β· refine (hs hi.1 hj.1 hij).mono ?_ ?_ Β· convert le_iSupβ‚‚ (Ξ±...
true
import Mathlib.Algebra.CharP.ExpChar import Mathlib.Algebra.GeomSum import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.RingTheory.Polynomial.Content import Mathlib.RingTheory.UniqueFactorizationDomain #align_import ring_theory.polynomial.basic from "leanprover-commun...
Mathlib/RingTheory/Polynomial/Basic.lean
117
133
theorem degreeLT_eq_span_X_pow [DecidableEq R] {n : β„•} : degreeLT R n = Submodule.span R ↑((Finset.range n).image fun n => X ^ n : Finset R[X]) := by apply le_antisymm
apply le_antisymm Β· intro p hp replace hp := mem_degreeLT.1 hp rw [← Polynomial.sum_monomial_eq p, Polynomial.sum] refine Submodule.sum_mem _ fun k hk => ?_ have := WithBot.coe_lt_coe.1 ((Finset.sup_lt_iff <| WithBot.bot_lt_coe n).1 hp k hk) rw [← C_mul_X_pow_eq_monomial, C_mul'] refine ...
true
import Mathlib.Algebra.Group.Defs #align_import group_theory.eckmann_hilton from "leanprover-community/mathlib"@"41cf0cc2f528dd40a8f2db167ea4fb37b8fde7f3" universe u namespace EckmannHilton variable {X : Type u} local notation a " <" m:51 "> " b => m a b structure IsUnital (m : X β†’ X β†’ X) (e : X) extends Std...
Mathlib/GroupTheory/EckmannHilton.lean
64
69
theorem mul : m₁ = mβ‚‚ := by funext a b
funext a b calc m₁ a b = m₁ (mβ‚‚ a e₁) (mβ‚‚ e₁ b) := by { simp only [one h₁ hβ‚‚ distrib, h₁.left_id, h₁.right_id, hβ‚‚.left_id, hβ‚‚.right_id] } _ = mβ‚‚ a b := by simp only [distrib, h₁.left_id, h₁.right_id, hβ‚‚.left_id, hβ‚‚.right_id]
true
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) ...
Mathlib/Data/Option/NAry.lean
109
110
theorem map_uncurry (f : Ξ± β†’ Ξ² β†’ Ξ³) (x : Option (Ξ± Γ— Ξ²)) : x.map (uncurry f) = mapβ‚‚ f (x.map Prod.fst) (x.map Prod.snd) := by
cases x <;> rfl
true
import Mathlib.Analysis.SpecialFunctions.Complex.Log import Mathlib.RingTheory.RootsOfUnity.Basic #align_import ring_theory.roots_of_unity.complex from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f" namespace Complex open Polynomial Real open scoped Nat Real
Mathlib/RingTheory/RootsOfUnity/Complex.lean
33
50
theorem isPrimitiveRoot_exp_of_coprime (i n : β„•) (h0 : n β‰  0) (hi : i.Coprime n) : IsPrimitiveRoot (exp (2 * Ο€ * I * (i / n))) n := by rw [IsPrimitiveRoot.iff_def]
rw [IsPrimitiveRoot.iff_def] simp only [← exp_nat_mul, exp_eq_one_iff] have hn0 : (n : β„‚) β‰  0 := mod_cast h0 constructor Β· use i field_simp [hn0, mul_comm (i : β„‚), mul_comm (n : β„‚)] Β· simp only [hn0, mul_right_comm _ _ ↑n, mul_left_inj' two_pi_I_ne_zero, Ne, not_false_iff, mul_comm _ (i : β„‚), ← m...
true
import Mathlib.Topology.Order.LeftRightNhds open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² Ξ³ : Type*} section OrderTopology variable [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] [LinearOrder Ξ±] [LinearOrder Ξ²] [OrderTopology Ξ±] [OrderTopology Ξ²] theorem IsLUB.fr...
Mathlib/Topology/Order/IsLUB.lean
77
80
theorem isLUB_of_mem_closure {s : Set α} {a : α} (hsa : a ∈ upperBounds s) (hsf : a ∈ closure s) : IsLUB s a := by rw [mem_closure_iff_clusterPt, ClusterPt, inf_comm] at hsf
rw [mem_closure_iff_clusterPt, ClusterPt, inf_comm] at hsf exact isLUB_of_mem_nhds hsa (mem_principal_self s)
true
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory.Invariants universe v u noncomputable section open CategoryTheory Limits Representation variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G) namespace grou...
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
401
403
theorem map_one_of_isOneCocycle {f : G β†’ A} (hf : IsOneCocycle f) : f 1 = 0 := by
simpa only [mul_one, one_smul, self_eq_add_right] using hf 1 1
true
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
480
484
theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt
have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
true
import Mathlib.CategoryTheory.Limits.Shapes.SplitCoequalizer import Mathlib.CategoryTheory.Limits.Preserves.Basic #align_import category_theory.limits.preserves.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba" noncomputable section universe w v₁ vβ‚‚ u₁ uβ‚‚ open Cate...
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean
104
108
theorem PreservesEqualizer.iso_inv_ΞΉ : (PreservesEqualizer.iso G f g).inv ≫ G.map (equalizer.ΞΉ f g) = equalizer.ΞΉ (G.map f) (G.map g) := by rw [← Iso.cancel_iso_hom_left (PreservesEqualizer.iso G f g), ← Category.assoc, Iso.hom_inv_id]
rw [← Iso.cancel_iso_hom_left (PreservesEqualizer.iso G f g), ← Category.assoc, Iso.hom_inv_id] simp
true
import Batteries.Data.List.Lemmas import Batteries.Tactic.Classical import Mathlib.Tactic.TypeStar import Mathlib.Mathport.Rename #align_import data.list.tfae from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" namespace List def TFAE (l : List Prop) : Prop := βˆ€ x ∈ l, βˆ€ y ∈ l, x ↔ ...
Mathlib/Data/List/TFAE.lean
117
120
theorem tfae_not_iff {l : List Prop} : TFAE (l.map Not) ↔ TFAE l := by classical
classical simp only [TFAE, mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iffβ‚‚, Decidable.not_iff_not]
true
import Mathlib.Data.Finset.Sigma import Mathlib.Data.Fintype.Card #align_import data.finset.pi_induction from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" open Function variable {ΞΉ : Type*} {Ξ± : ΞΉ β†’ Type*} [Finite ΞΉ] [DecidableEq ΞΉ] [βˆ€ i, DecidableEq (Ξ± i)] namespace Finset
Mathlib/Data/Finset/PiInduction.lean
37
63
theorem induction_on_pi_of_choice (r : βˆ€ i, Ξ± i β†’ Finset (Ξ± i) β†’ Prop) (H_ex : βˆ€ (i) (s : Finset (Ξ± i)), s.Nonempty β†’ βˆƒ x ∈ s, r i x (s.erase x)) {p : (βˆ€ i, Finset (Ξ± i)) β†’ Prop} (f : βˆ€ i, Finset (Ξ± i)) (h0 : p fun _ ↦ βˆ…) (step : βˆ€ (g : βˆ€ i, Finset (Ξ± i)) (i : ΞΉ) (x : Ξ± i), r i x (g i) β†’ p g β†’...
cases nonempty_fintype ι induction' hs : univ.sigma f using Finset.strongInductionOn with s ihs generalizing f; subst s rcases eq_empty_or_nonempty (univ.sigma f) with he | hne · convert h0 using 1 simpa [funext_iff] using he · rcases sigma_nonempty.1 hne with ⟨i, -, hi⟩ rcases H_ex i (f i) hi with ⟨...
true
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProd...
Mathlib/RingTheory/Unramified/Basic.lean
201
207
theorem of_isLocalization : FormallyUnramified R Rβ‚˜ := by constructor
constructor intro Q _ _ I _ f₁ fβ‚‚ _ apply AlgHom.coe_ringHom_injective refine IsLocalization.ringHom_ext M ?_ ext simp
true
import Mathlib.Algebra.PUnitInstances import Mathlib.Tactic.Abel import Mathlib.Tactic.Ring import Mathlib.Order.Hom.Lattice #align_import algebra.ring.boolean_ring from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped symmDiff variable {Ξ± Ξ² Ξ³ : Type*} class BooleanRing (Ξ±) ...
Mathlib/Algebra/Ring/BooleanRing.lean
101
101
theorem sub_eq_add : a - b = a + b := by
rw [sub_eq_add_neg, add_right_inj, neg_eq]
true
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : β„•) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
114
115
theorem card_Ioc : (Ioc a b).card = b - a := by
rw [← Nat.card_Ioc, ← map_valEmbedding_Ioc, card_map]
true
import Mathlib.CategoryTheory.EqToHom #align_import category_theory.sums.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" namespace CategoryTheory universe v₁ u₁ -- morphism levels before object levels. See note [category_theory universes]. open Sum section variable (C : Ty...
Mathlib/CategoryTheory/Sums/Basic.lean
62
63
theorem hom_inl_inr_false {X : C} {Y : D} (f : Sum.inl X ⟢ Sum.inr Y) : False := by
cases f
true
import Mathlib.CategoryTheory.NatTrans import Mathlib.CategoryTheory.Iso #align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f" namespace CategoryTheory -- declare the `v`'s first; see note [CategoryTheory universes]. universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u...
Mathlib/CategoryTheory/Functor/Category.lean
125
125
theorem id_hcomp_app {H : E β₯€ C} (Ξ± : F ⟢ G) (X : E) : (πŸ™ H β—« Ξ±).app X = Ξ±.app _ := by
simp
true
import Mathlib.Order.Interval.Finset.Fin #align_import data.fintype.fin from "leanprover-community/mathlib"@"759575657f189ccb424b990164c8b1fa9f55cdfe" open Finset open Fintype namespace Fin variable {Ξ± Ξ² : Type*} {n : β„•} theorem map_valEmbedding_univ : (Finset.univ : Finset (Fin n)).map Fin.valEmbedding = Iio ...
Mathlib/Data/Fintype/Fin.lean
61
64
theorem card_filter_univ_succ' (p : Fin (n + 1) β†’ Prop) [DecidablePred p] : (univ.filter p).card = ite (p 0) 1 0 + (univ.filter (p ∘ Fin.succ)).card := by rw [Fin.univ_succ, filter_cons, card_disjUnion, filter_map, card_map]
rw [Fin.univ_succ, filter_cons, card_disjUnion, filter_map, card_map] split_ifs <;> simp
true
import Mathlib.Logic.Function.Basic import Mathlib.Tactic.MkIffOfInductiveProp #align_import data.sum.basic from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" universe u v w x variable {Ξ± : Type u} {Ξ±' : Type w} {Ξ² : Type v} {Ξ²' : Type x} {Ξ³ Ξ΄ : Type*} namespace Sum #align sum.foral...
Mathlib/Data/Sum/Basic.lean
54
55
theorem eq_left_iff_getLeft_eq {a : Ξ±} : x = inl a ↔ βˆƒ h, x.getLeft h = a := by
cases x <;> simp
true
import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Topology.MetricSpace.CauSeqFilter #align_import analysis.special_functions.exponential from "leanprover-community/mathlib"@"e1a18cad9cd462973d760af7de36b05776b8811c" open Filter RCLike ContinuousMultili...
Mathlib/Analysis/SpecialFunctions/Exponential.lean
67
72
theorem hasStrictFDerivAt_exp_zero_of_radius_pos (h : 0 < (expSeries 𝕂 𝔸).radius) : HasStrictFDerivAt (exp 𝕂) (1 : 𝔸 β†’L[𝕂] 𝔸) 0 := by convert (hasFPowerSeriesAt_exp_zero_of_radius_pos h).hasStrictFDerivAt
convert (hasFPowerSeriesAt_exp_zero_of_radius_pos h).hasStrictFDerivAt ext x change x = expSeries 𝕂 𝔸 1 fun _ => x simp [expSeries_apply_eq, Nat.factorial]
true
import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Constructions.EpiMono #align_import category_theory.limits.preserves.shapes.images from "leanprover-community/mathlib"@"fc78e3c190c72a109699385da6be2725e88df841" noncomputable section namespace CategoryTheory namespace Prese...
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean
62
63
theorem inv_comp_image_ΞΉ_map {X Y : A} (f : X ⟢ Y) : (iso L f).inv ≫ image.ΞΉ (L.map f) = L.map (image.ΞΉ f) := by
simp
true
import Mathlib.RingTheory.FiniteType import Mathlib.RingTheory.Localization.AtPrime import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Integer import Mathlib.RingTheory.Localization.Submodule import Mathlib.RingTheory.Nilpotent.Lemmas import Mathlib.RingTheory.RingHomProperties im...
Mathlib/RingTheory/LocalProperties.lean
181
189
theorem RingHom.PropertyIsLocal.respectsIso (hP : RingHom.PropertyIsLocal @P) : RingHom.RespectsIso @P := by apply hP.StableUnderComposition.respectsIso
apply hP.StableUnderComposition.respectsIso introv letI := e.toRingHom.toAlgebra -- Porting note: was `apply_with hP.holds_for_localization_away { instances := ff }` have : IsLocalization.Away (1 : R) S := by apply IsLocalization.away_of_isUnit_of_bijective _ isUnit_one e.bijective exact RingHom.Proper...
true
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (Ξ± Ξ² : Type*) := Ξ± β†’ Part Ξ² #align pfun PFun infixr:25 " β†’. " => PFun namespace PFun variable {Ξ± Ξ² Ξ³ Ξ΄ Ξ΅ ΞΉ : Type*} instance inhab...
Mathlib/Data/PFun.lean
189
190
theorem mem_res (f : Ξ± β†’ Ξ²) (s : Set Ξ±) (a : Ξ±) (b : Ξ²) : b ∈ res f s a ↔ a ∈ s ∧ f a = b := by
simp [res, @eq_comm _ b]
true
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
415
418
theorem fderiv.comp_deriv_of_eq (hl : DifferentiableAt π•œ l y) (hf : DifferentiableAt π•œ f x) (hy : y = f x) : deriv (l ∘ f) x = (fderiv π•œ l (f x) : F β†’ E) (deriv f x) := by
rw [hy] at hl; exact fderiv.comp_deriv x hl hf
true
import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.integer from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" variable {R : Type*} [CommSemiring R] {M : Submonoid R} {S : Type*} [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] open ...
Mathlib/RingTheory/Localization/Integer.lean
91
103
theorem exist_integer_multiples {ΞΉ : Type*} (s : Finset ΞΉ) (f : ΞΉ β†’ S) : βˆƒ b : M, βˆ€ i ∈ s, IsLocalization.IsInteger R ((b : R) β€’ f i) := by haveI := Classical.propDecidable
haveI := Classical.propDecidable refine ⟨∏ i ∈ s, (sec M (f i)).2, fun i hi => ⟨?_, ?_⟩⟩ Β· exact (∏ j ∈ s.erase i, (sec M (f j)).2) * (sec M (f i)).1 rw [RingHom.map_mul, sec_spec', ← mul_assoc, ← (algebraMap R S).map_mul, ← Algebra.smul_def] congr 2 refine _root_.trans ?_ (map_prod (Submonoid.subtype M) _...
true
import Mathlib.CategoryTheory.Sites.Sheaf import Mathlib.CategoryTheory.Sites.CoverLifting import Mathlib.CategoryTheory.Adjunction.FullyFaithful #align_import category_theory.sites.dense_subsite from "leanprover-community/mathlib"@"1d650c2e131f500f3c17f33b4d19d2ea15987f2c" universe w v u namespace CategoryTheory...
Mathlib/CategoryTheory/Sites/DenseSubsite.lean
124
128
theorem ext (β„± : SheafOfTypes K) (X : D) {s t : β„±.val.obj (op X)} (h : βˆ€ ⦃Y : C⦄ (f : G.obj Y ⟢ X), β„±.val.map f.op s = β„±.val.map f.op t) : s = t := by apply (β„±.cond (Sieve.coverByImage G X) (G.is_cover_of_isCoverDense K X)).isSeparatedFor.ext
apply (β„±.cond (Sieve.coverByImage G X) (G.is_cover_of_isCoverDense K X)).isSeparatedFor.ext rintro Y _ ⟨Z, f₁, fβ‚‚, ⟨rfl⟩⟩ simp [h fβ‚‚]
true
import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax #align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" section variable {Ξ± : Type*} [Group Ξ±] [LinearOrder Ξ±] [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· ≀ Β·)] -- TODO...
Mathlib/Algebra/Order/Group/MinMax.lean
69
70
theorem min_div_div_left' (a b c : Ξ±) : min (a / b) (a / c) = a / max b c := by
simp only [div_eq_mul_inv, min_mul_mul_left, min_inv_inv']
true
import Mathlib.Algebra.Group.Prod import Mathlib.Data.Set.Lattice #align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" assert_not_exists MonoidWithZero open Prod Decidable Function namespace Nat -- Porting note: no pp_nodot --@[pp_nodot] def pair (a b : ...
Mathlib/Data/Nat/Pairing.lean
93
100
theorem unpair_lt {n : β„•} (n1 : 1 ≀ n) : (unpair n).1 < n := by let s := sqrt n
let s := sqrt n simp only [unpair, ge_iff_le, Nat.sub_le_iff_le_add] by_cases h : n - s * s < s <;> simp [h] Β· exact lt_of_lt_of_le h (sqrt_le_self _) Β· simp at h have s0 : 0 < s := sqrt_pos.2 n1 exact lt_of_le_of_lt h (Nat.sub_lt n1 (Nat.mul_pos s0 s0))
true
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
56
59
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two (x y : V) : β€–x - yβ€– * β€–x - yβ€– = β€–xβ€– * β€–xβ€– + β€–yβ€– * β€–yβ€– ↔ angle x y = Ο€ / 2 := by rw [norm_sub_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero]
rw [norm_sub_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero] exact inner_eq_zero_iff_angle_eq_pi_div_two x y
true
import Mathlib.Topology.Separation #align_import topology.sober from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" open Set variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section genericPoint def IsGenericPoint (x : Ξ±) (S : Set Ξ±) : Prop := closure ({x} : Set Ξ±)...
Mathlib/Topology/Sober.lean
107
111
theorem isGenericPoint_iff_forall_closed (hS : IsClosed S) (hxS : x ∈ S) : IsGenericPoint x S ↔ βˆ€ Z : Set Ξ±, IsClosed Z β†’ x ∈ Z β†’ S βŠ† Z := by have : closure {x} βŠ† S := closure_minimal (singleton_subset_iff.2 hxS) hS
have : closure {x} βŠ† S := closure_minimal (singleton_subset_iff.2 hxS) hS simp_rw [IsGenericPoint, subset_antisymm_iff, this, true_and_iff, closure, subset_sInter_iff, mem_setOf_eq, and_imp, singleton_subset_iff]
true
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n ...
Mathlib/Data/Nat/Choose/Basic.lean
125
142
theorem choose_mul_factorial_mul_factorial : βˆ€ {n k}, k ≀ n β†’ choose n k * k ! * (n - k)! = n ! | 0, _, hk => by simp [Nat.eq_zero_of_le_zero hk] | n + 1, 0, _ => by simp | n + 1, succ k, hk => by rcases lt_or_eq_of_le hk with hk₁ | hk₁ Β· have h : choose n k * k.succ ! * (n - k)! = (k + 1) * n ! := by ...
rw [← choose_mul_factorial_mul_factorial (le_of_succ_le_succ hk)] simp [factorial_succ, Nat.mul_comm, Nat.mul_left_comm, Nat.mul_assoc] have h₁ : (n - k)! = (n - k) * (n - k.succ)! := by rw [← succ_sub_succ, succ_sub (le_of_lt_succ hk₁), factorial_succ] have hβ‚‚ : choose n (succ k) *...
true
import Mathlib.Algebra.Polynomial.Eval import Mathlib.RingTheory.Ideal.Quotient #align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24" open Submodule open Polynomial variable {R : Type*} [Ring R] variable {A : Type*} [CommRing A] variable {M : Type*} [...
Mathlib/LinearAlgebra/SModEq.lean
53
54
theorem bot : x ≑ y [SMOD (βŠ₯ : Submodule R M)] ↔ x = y := by
rw [SModEq.def, Submodule.Quotient.eq, mem_bot, sub_eq_zero]
true
import Mathlib.Algebra.Group.Basic import Mathlib.Order.Basic import Mathlib.Order.Monotone.Basic #align_import algebra.covariant_and_contravariant from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f" -- TODO: convert `ExistsMulOfLE`, `ExistsAddOfLE`? -- TODO: relationship with `Con/AddC...
Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean
281
286
theorem covariant_le_of_covariant_lt [PartialOrder N] : Covariant M N ΞΌ (Β· < Β·) β†’ Covariant M N ΞΌ (Β· ≀ Β·) := by intro h a b c bc
intro h a b c bc rcases bc.eq_or_lt with (rfl | bc) Β· exact le_rfl Β· exact (h _ bc).le
true
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
57
59
theorem mem_closure_ne_iff_frequently_within {z : Ξ±} {s : Set Ξ±} : z ∈ closure (s \ {z}) ↔ βˆƒαΆ  x in 𝓝[β‰ ] z, x ∈ s := by
simp [mem_closure_iff_frequently, frequently_nhdsWithin_iff]
true
import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Convex.Strict import Mathlib.Analysis.Normed.Order.Basic import Mathlib.Analysis.NormedSpace.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.NormedSpace.Ray #align_import analysis.convex.strict_convex_space from "leanprover-...
Mathlib/Analysis/Convex/StrictConvexSpace.lean
76
81
theorem strictConvex_closedBall [StrictConvexSpace π•œ E] (x : E) (r : ℝ) : StrictConvex π•œ (closedBall x r) := by rcases le_or_lt r 0 with hr | hr
rcases le_or_lt r 0 with hr | hr Β· exact (subsingleton_closedBall x hr).strictConvex rw [← vadd_closedBall_zero] exact (StrictConvexSpace.strictConvex_closedBall r hr).vadd _
true
import Mathlib.Order.Filter.CountableInter set_option autoImplicit true open Function Set Filter class HasCountableSeparatingOn (Ξ± : Type*) (p : Set Ξ± β†’ Prop) (t : Set Ξ±) : Prop where exists_countable_separating : βˆƒ S : Set (Set Ξ±), S.Countable ∧ (βˆ€ s ∈ S, p s) ∧ βˆ€ x ∈ t, βˆ€ y ∈ t, (βˆ€ s ∈ S, x ∈ s ↔ y ∈ s) ...
Mathlib/Order/Filter/CountableSeparatingOn.lean
158
172
theorem exists_subset_subsingleton_mem_of_forall_separating (p : Set Ξ± β†’ Prop) {s : Set Ξ±} [h : HasCountableSeparatingOn Ξ± p s] (hs : s ∈ l) (hl : βˆ€ U, p U β†’ U ∈ l ∨ Uᢜ ∈ l) : βˆƒ t, t βŠ† s ∧ t.Subsingleton ∧ t ∈ l := by rcases h.1 with ⟨S, hSc, hSp, hS⟩
rcases h.1 with ⟨S, hSc, hSp, hS⟩ refine ⟨s ∩ β‹‚β‚€ (S ∩ l.sets) ∩ β‹‚ (U ∈ S) (_ : Uᢜ ∈ l), Uᢜ, ?_, ?_, ?_⟩ Β· exact fun _ h ↦ h.1.1 Β· intro x hx y hy simp only [mem_sInter, mem_inter_iff, mem_iInter, mem_compl_iff] at hx hy refine hS x hx.1.1 y hy.1.1 (fun s hsS ↦ ?_) cases hl s (hSp s hsS) with | ...
true
import Mathlib.Algebra.Lie.Submodule #align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d" universe u v w w₁ wβ‚‚ namespace LieSubmodule variable {R : Type u} {L : Type v} {M : Type w} {Mβ‚‚ : Type w₁} variable [CommRing R] [LieRing L] [LieAlgebra ...
Mathlib/Algebra/Lie/IdealOperations.lean
96
100
theorem lie_le_iff : ⁅I, N⁆ ≀ N' ↔ βˆ€ x ∈ I, βˆ€ m ∈ N, ⁅x, m⁆ ∈ N' := by rw [lieIdeal_oper_eq_span, LieSubmodule.lieSpan_le]
rw [lieIdeal_oper_eq_span, LieSubmodule.lieSpan_le] refine ⟨fun h x hx m hm => h ⟨⟨x, hx⟩, ⟨m, hm⟩, rfl⟩, ?_⟩ rintro h _ ⟨⟨x, hx⟩, ⟨m, hm⟩, rfl⟩ exact h x hx m hm
true
import Mathlib.Data.Nat.Defs import Mathlib.Order.Interval.Set.Basic import Mathlib.Tactic.Monotonicity.Attr #align_import data.nat.log from "leanprover-community/mathlib"@"3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6" namespace Nat --@[pp_nodot] porting note: unknown attribute def log (b : β„•) : β„• β†’ β„• | n => i...
Mathlib/Data/Nat/Log.lean
108
111
theorem pow_le_of_le_log {b x y : β„•} (hy : y β‰  0) (h : x ≀ log b y) : b ^ x ≀ y := by refine (le_or_lt b 1).elim (fun hb => ?_) fun hb => (pow_le_iff_le_log hb hy).2 h
refine (le_or_lt b 1).elim (fun hb => ?_) fun hb => (pow_le_iff_le_log hb hy).2 h rw [log_of_left_le_one hb, Nat.le_zero] at h rwa [h, Nat.pow_zero, one_le_iff_ne_zero]
true
import Mathlib.Analysis.Normed.Group.InfiniteSum import Mathlib.Topology.Instances.ENNReal #align_import analysis.calculus.series from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Metric TopologicalSpace Function Filter open scoped Topology NNReal variable {Ξ± Ξ² F : Type*} [N...
Mathlib/Analysis/NormedSpace/FunctionSeries.lean
53
56
theorem tendstoUniformly_tsum {f : Ξ± β†’ Ξ² β†’ F} (hu : Summable u) (hfu : βˆ€ n x, β€–f n xβ€– ≀ u n) : TendstoUniformly (fun t : Finset Ξ± => fun x => βˆ‘ n ∈ t, f n x) (fun x => βˆ‘' n, f n x) atTop := by
rw [← tendstoUniformlyOn_univ]; exact tendstoUniformlyOn_tsum hu fun n x _ => hfu n x
true
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_lim...
Mathlib/Analysis/SpecificLimits/Normed.lean
132
189
theorem TFAE_exists_lt_isLittleO_pow (f : β„• β†’ ℝ) (R : ℝ) : TFAE [βˆƒ a ∈ Ioo (-R) R, f =o[atTop] (a ^ Β·), βˆƒ a ∈ Ioo 0 R, f =o[atTop] (a ^ Β·), βˆƒ a ∈ Ioo (-R) R, f =O[atTop] (a ^ Β·), βˆƒ a ∈ Ioo 0 R, f =O[atTop] (a ^ Β·), βˆƒ a < R, βˆƒ C : ℝ, (0 < C ∨ 0 < R) ∧ βˆ€ n, |f n| ≀ C * a ^ n, βˆƒ a ∈ Ioo 0...
have A : Ico 0 R βŠ† Ioo (-R) R := fun x hx ↦ ⟨(neg_lt_zero.2 (hx.1.trans_lt hx.2)).trans_le hx.1, hx.2⟩ have B : Ioo 0 R βŠ† Ioo (-R) R := Subset.trans Ioo_subset_Ico_self A -- First we prove that 1-4 are equivalent using 2 β†’ 3 β†’ 4, 1 β†’ 3, and 2 β†’ 1 tfae_have 1 β†’ 3 Β· exact fun ⟨a, ha, H⟩ ↦ ⟨a, ha, H.isBigO⟩...
true
import Mathlib.MeasureTheory.Measure.Haar.Basic import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional open sco...
Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
67
71
theorem image_parallelepiped (f : E β†’β‚—[ℝ] F) (v : ΞΉ β†’ E) : f '' parallelepiped v = parallelepiped (f ∘ v) := by simp only [parallelepiped, ← image_comp]
simp only [parallelepiped, ← image_comp] congr 1 with t simp only [Function.comp_apply, _root_.map_sum, LinearMap.map_smulβ‚›β‚—, RingHom.id_apply]
true
import Mathlib.Topology.Homotopy.Basic import Mathlib.Topology.Connected.PathConnected import Mathlib.Analysis.Convex.Basic #align_import topology.homotopy.path from "leanprover-community/mathlib"@"bb9d1c5085e0b7ea619806a68c5021927cecb2a6" universe u v variable {X : Type u} {Y : Type v} [TopologicalSpace X] [Top...
Mathlib/Topology/Homotopy/Path.lean
83
85
theorem eval_zero (F : Homotopy pβ‚€ p₁) : F.eval 0 = pβ‚€ := by ext t
ext t simp [eval]
true
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Congruence import Mathlib.RingTheory.Ideal.Basic import Mathlib.Tactic.FinCases #align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" universe u v w namespace Ideal open Set variabl...
Mathlib/RingTheory/Ideal/Quotient.lean
137
138
theorem mk_eq_mk_iff_sub_mem (x y : R) : mk I x = mk I y ↔ x - y ∈ I := by
rw [← eq_zero_iff_mem, map_sub, sub_eq_zero]
true
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Expand import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.ZMod.Basic #align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c...
Mathlib/RingTheory/WittVector/WittPolynomial.lean
116
119
theorem map_wittPolynomial (f : R β†’+* S) (n : β„•) : map f (W n) = W n := by rw [wittPolynomial, map_sum, wittPolynomial]
rw [wittPolynomial, map_sum, wittPolynomial] refine sum_congr rfl fun i _ => ?_ rw [map_monomial, RingHom.map_pow, map_natCast]
true
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
123
126
theorem HasStrictDerivAt.scomp_of_eq (hg : HasStrictDerivAt g₁ g₁' y) (hh : HasStrictDerivAt h h' x) (hy : y = h x) : HasStrictDerivAt (g₁ ∘ h) (h' β€’ g₁') x := by
rw [hy] at hg; exact hg.scomp x hh
true