Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Ring.Int #align_import data.int.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" namespace Int open Nat variable {α : Type*} @[norm_cast] theorem cast_neg_natCast {R} [DivisionRing R] (n : ℕ) : ((-n : ℤ) : R) = -...
Mathlib/Data/Int/Cast/Field.lean
38
42
theorem cast_div [DivisionRing α] {m n : ℤ} (n_dvd : n ∣ m) (hn : (n : α) ≠ 0) : ((m / n : ℤ) : α) = m / n := by
rcases n_dvd with ⟨k, rfl⟩ have : n ≠ 0 := by rintro rfl; simp at hn rw [Int.mul_ediv_cancel_left _ this, mul_comm n, Int.cast_mul, mul_div_cancel_right₀ _ hn]
[ " ↑(-↑n) = -↑n", " ↑(m / n) = ↑m / ↑n", " ↑(n * k / n) = ↑(n * k) / ↑n", " n ≠ 0", " False" ]
[ " ↑(-↑n) = -↑n" ]
import Mathlib.Probability.Process.Filtration import Mathlib.Topology.Instances.Discrete #align_import probability.process.adapted from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Order TopologicalSpace open scoped Classical MeasureTheory NNReal ENNReal Topology namespa...
Mathlib/Probability/Process/Adapted.lean
99
105
theorem Filtration.adapted_natural [MetrizableSpace β] [mβ : MeasurableSpace β] [BorelSpace β] {u : ι → Ω → β} (hum : ∀ i, StronglyMeasurable[m] (u i)) : Adapted (Filtration.natural u hum) u := by
intro i refine StronglyMeasurable.mono ?_ (le_iSup₂_of_le i (le_refl i) le_rfl) rw [stronglyMeasurable_iff_measurable_separable] exact ⟨measurable_iff_comap_le.2 le_rfl, (hum i).isSeparable_range⟩
[ " Adapted (natural u hum) u", " StronglyMeasurable (u i)", " Measurable (u i) ∧ IsSeparable (Set.range (u i))" ]
[]
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Module.Defs #align_import group_theory.subgroup.saturated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" namespace Subgroup variable {G : Type*} [Group G] @[to_additive "An additive subgroup `H` of `G` is *...
Mathlib/GroupTheory/Subgroup/Saturated.lean
42
56
theorem saturated_iff_zpow {H : Subgroup G} : Saturated H ↔ ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H := by
constructor · intros hH n g hgn induction' n with n n · simp only [Int.natCast_eq_zero, Int.ofNat_eq_coe, zpow_natCast] at hgn ⊢ exact hH hgn · suffices g ^ (n + 1) ∈ H by refine (hH this).imp ?_ id simp only [IsEmpty.forall_iff, Nat.succ_ne_zero] simpa only [inv_mem_iff, zp...
[ " H.Saturated ↔ ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H", " H.Saturated → ∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ H", " n = 0 ∨ g ∈ H", " Int.ofNat n = 0 ∨ g ∈ H", " Int.negSucc n = 0 ∨ g ∈ H", " n + 1 = 0 → Int.negSucc n = 0", " g ^ (n + 1) ∈ H", " (∀ (n : ℤ) (g : G), g ^ n ∈ H → n = 0 ∨ g ∈ ...
[]
import Mathlib.Data.Set.Function import Mathlib.Logic.Relation import Mathlib.Logic.Pairwise #align_import data.set.pairwise.basic from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Order Set variable {α β γ ι ι' : Type*} {r p q : α → α → Prop} section Pairwise variabl...
Mathlib/Data/Set/Pairwise/Basic.lean
41
42
theorem pairwise_on_bool (hr : Symmetric r) {a b : α} : Pairwise (r on fun c => cond c a b) ↔ r a b := by
simpa [Pairwise, Function.onFun] using @hr a b
[ " Pairwise (r on fun c => bif c then a else b) ↔ r a b" ]
[]
import Mathlib.Analysis.Normed.Group.Basic #align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" section HammingDistNorm open Finset Function variable {α ι : Type*} {β : ι → Type*} [Fintype ι] [∀ i, DecidableEq (β i)] variable {γ : ι → Type*} [∀ ...
Mathlib/InformationTheory/Hamming.lean
122
123
theorem hammingDist_lt_one {x y : ∀ i, β i} : hammingDist x y < 1 ↔ x = y := by
rw [Nat.lt_one_iff, hammingDist_eq_zero]
[ " hammingDist x x = 0", " ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≤ hammingDist x y + hammingDist y z", " (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card", " filter (...
[ " hammingDist x x = 0", " ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≤ hammingDist x y + hammingDist y z", " (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card", " filter (...
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {α : Type*} section support v...
Mathlib/GroupTheory/Perm/Support.lean
316
316
theorem support_one : (1 : Perm α).support = ∅ := by
rw [support_eq_empty_iff]
[ " x ∈ f.support ↔ f x ≠ x", " x ∉ f.support ↔ f x = x", " ↑f.support = {x | f x ≠ x}", " x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}", " σ.support = ∅ ↔ σ = 1", " support 1 = ∅" ]
[ " x ∈ f.support ↔ f x ≠ x", " x ∉ f.support ↔ f x = x", " ↑f.support = {x | f x ≠ x}", " x✝ ∈ ↑f.support ↔ x✝ ∈ {x | f x ≠ x}", " σ.support = ∅ ↔ σ = 1" ]
import Mathlib.Combinatorics.Hall.Finite import Mathlib.CategoryTheory.CofilteredSystem import Mathlib.Data.Rel #align_import combinatorics.hall.basic from "leanprover-community/mathlib"@"8195826f5c428fc283510bc67303dd4472d78498" open Finset CategoryTheory universe u v def hallMatchingsOn {ι : Type u} {α : Typ...
Mathlib/Combinatorics/Hall/Basic.lean
123
163
theorem Finset.all_card_le_biUnion_card_iff_exists_injective {ι : Type u} {α : Type v} [DecidableEq α] (t : ι → Finset α) : (∀ s : Finset ι, s.card ≤ (s.biUnion t).card) ↔ ∃ f : ι → α, Function.Injective f ∧ ∀ x, f x ∈ t x := by
constructor · intro h -- Set up the functor haveI : ∀ ι' : (Finset ι)ᵒᵖ, Nonempty ((hallMatchingsFunctor t).obj ι') := fun ι' => hallMatchingsOn.nonempty t h ι'.unop classical haveI : ∀ ι' : (Finset ι)ᵒᵖ, Finite ((hallMatchingsFunctor t).obj ι') := by intro ι' rw [hallMatchi...
[ " ↑(hallMatchingsOn t ι')", " (fun i => ↑f ⟨↑i, ⋯⟩) ∈ hallMatchingsOn t ι'", " Function.Injective fun i => ↑f ⟨↑i, ⋯⟩", " ⟨i, hi⟩ = ⟨j, hj⟩", " Nonempty ↑(hallMatchingsOn t ι')", " ∃ x, x ∈ hallMatchingsOn t ι'", " ∀ (s : Finset { x // x ∈ ι' }), s.card ≤ (s.biUnion fun i => t ↑i).card", " s'.card ≤ (...
[ " ↑(hallMatchingsOn t ι')", " (fun i => ↑f ⟨↑i, ⋯⟩) ∈ hallMatchingsOn t ι'", " Function.Injective fun i => ↑f ⟨↑i, ⋯⟩", " ⟨i, hi⟩ = ⟨j, hj⟩", " Nonempty ↑(hallMatchingsOn t ι')", " ∃ x, x ∈ hallMatchingsOn t ι'", " ∀ (s : Finset { x // x ∈ ι' }), s.card ≤ (s.biUnion fun i => t ↑i).card", " s'.card ≤ (...
import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" noncomputable section open MvPolynomial Function variable...
Mathlib/RingTheory/WittVector/Basic.lean
123
123
theorem zsmul (z : ℤ) (x : WittVector p R) : mapFun f (z • x) = z • mapFun f x := by
map_fun_tac
[ " Injective (mapFun f)", " a₁✝ = a₂✝", " a₁✝.coeff p = a₂✝.coeff p", " mapFun f (mk p fun n => Classical.choose ⋯) = x", " (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n", " mapFun (⇑f) 0 = 0", " mapFun (⇑f) 1 = 1", " mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y", " mapFun ...
[ " Injective (mapFun f)", " a₁✝ = a₂✝", " a₁✝.coeff p = a₂✝.coeff p", " mapFun f (mk p fun n => Classical.choose ⋯) = x", " (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n", " mapFun (⇑f) 0 = 0", " mapFun (⇑f) 1 = 1", " mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y", " mapFun ...
import Mathlib.Combinatorics.Young.YoungDiagram #align_import combinatorics.young.semistandard_tableau from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" structure SemistandardYoungTableau (μ : YoungDiagram) where entry : ℕ → ℕ → ℕ row_weak' : ∀ {i j1 j2 : ℕ}, j1 < j2 → (i, ...
Mathlib/Combinatorics/Young/SemistandardTableau.lean
129
133
theorem row_weak_of_le {μ : YoungDiagram} (T : SemistandardYoungTableau μ) {i j1 j2 : ℕ} (hj : j1 ≤ j2) (cell : (i, j2) ∈ μ) : T i j1 ≤ T i j2 := by
cases' eq_or_lt_of_le hj with h h · rw [h] · exact T.row_weak h cell
[ " T = T'", " { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ } = T'", " { entry := entry✝¹, row_weak' := row_weak'✝¹, col_strict' := col_strict'✝¹, zeros' := zeros'✝¹ } =\n { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ }"...
[ " T = T'", " { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ } = T'", " { entry := entry✝¹, row_weak' := row_weak'✝¹, col_strict' := col_strict'✝¹, zeros' := zeros'✝¹ } =\n { entry := entry✝, row_weak' := row_weak'✝, col_strict' := col_strict'✝, zeros' := zeros'✝ }"...
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Data.Set.Finite #align_import data.finsupp.defs from "leanprover-community/mathlib"@"842328d9df7e96fd90fc424e115679c15fb23a71" noncomputable section open Finset Function variable {α β γ ι M M' N P G H R S : Type*}...
Mathlib/Data/Finsupp/Defs.lean
185
185
theorem coe_eq_zero {f : α →₀ M} : (f : α → M) = 0 ↔ f = 0 := by
rw [← coe_zero, DFunLike.coe_fn_eq]
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0" ]
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t" ]
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Count import Mathlib.Data.Rat.Floor import Mathlib.Order.Interval.Finset.Nat open Finset Int namespace Int variable (a b : ℤ) {r : ℤ} (hr : 0 < r) lemma Ico_filter_dvd_eq : (Ico a b).filter (r ∣ ·) = (Ico ⌈a / (r : ℚ)⌉ ⌈b...
Mathlib/Data/Int/CardIntervalMod.lean
42
44
theorem Ico_filter_dvd_card : ((Ico a b).filter (r ∣ ·)).card = max (⌈b / (r : ℚ)⌉ - ⌈a / (r : ℚ)⌉) 0 := by
rw [Ico_filter_dvd_eq _ _ hr, card_map, card_Ico, toNat_eq_max]
[ " filter (fun x => r ∣ x) (Ico a b) = map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)", " x ∈ filter (fun x => r ∣ x) (Ico a b) ↔ x ∈ map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)", " ((a ≤ x ∧ x < b) ∧ ∃ c, x = c * r) ↔\n ∃ a_1, (a ≤ a_1 * r ∧ a_1 * r < b) ∧ { toF...
[ " filter (fun x => r ∣ x) (Ico a b) = map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)", " x ∈ filter (fun x => r ∣ x) (Ico a b) ↔ x ∈ map { toFun := fun x => x * r, inj' := ⋯ } (Ico ⌈↑a / ↑r⌉ ⌈↑b / ↑r⌉)", " ((a ≤ x ∧ x < b) ∧ ∃ c, x = c * r) ↔\n ∃ a_1, (a ≤ a_1 * r ∧ a_1 * r < b) ∧ { toF...
import Mathlib.Data.Nat.Choose.Dvd import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Norm import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand #align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf1682e59106d6c942434a32" universe u ...
Mathlib/RingTheory/Polynomial/Eisenstein/IsIntegral.lean
137
212
theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L} (hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p • z) (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt 𝓟) : p ∣ Q.coeff 0 := by
-- First define some abbreviations. letI := B.finite let P := minpoly R B.gen obtain ⟨n, hn⟩ := Nat.exists_eq_succ_of_ne_zero B.dim_pos.ne' have finrank_K_L : FiniteDimensional.finrank K L = B.dim := B.finrank have deg_K_P : (minpoly K B.gen).natDegree = B.dim := B.natDegree_minpoly have deg_R_P : P.natD...
[ " p ∣ Q.coeff 0", " P.natDegree = B.dim", " p ^ n.succ ∣ Q.coeff 0 ^ n.succ * (minpoly R B.gen).coeff 0 ^ n", " Q.coeff 0 ^ n.succ * (minpoly R B.gen).coeff 0 ^ n =\n Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).coeff 0 ^ n) * ↑((-1) ^ (n.succ * n))", " Q.coeff 0 ^ n.succ * (minpoly R B....
[]
import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.Data.Finset.Pointwise #align_import algebra.monoid_algebra.support from "leanprover-community/mathlib"@"16749fc4661828cba18cd0f4e3c5eb66a8e80598" open scoped Pointwise universe u₁ u₂ u₃ namespace MonoidAlgebra open Finset Finsupp variable {k : Type u₁} ...
Mathlib/Algebra/MonoidAlgebra/Support.lean
25
30
theorem support_mul [Mul G] [DecidableEq G] (a b : MonoidAlgebra k G) : (a * b).support ⊆ a.support * b.support := by
rw [MonoidAlgebra.mul_def] exact support_sum.trans <| biUnion_subset.2 fun _x hx ↦ support_sum.trans <| biUnion_subset.2 fun _y hy ↦ support_single_subset.trans <| singleton_subset_iff.2 <| mem_image₂_of_mem hx hy
[ " (a * b).support ⊆ a.support * b.support", " (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support" ]
[]
import Mathlib.Algebra.MvPolynomial.Monad #align_import data.mv_polynomial.expand from "leanprover-community/mathlib"@"5da451b4c96b4c2e122c0325a7fce17d62ee46c6" namespace MvPolynomial variable {σ τ R S : Type*} [CommSemiring R] [CommSemiring S] noncomputable def expand (p : ℕ) : MvPolynomial σ R →ₐ[R] MvPolyno...
Mathlib/Algebra/MvPolynomial/Expand.lean
59
61
theorem expand_one : expand 1 = AlgHom.id R (MvPolynomial σ R) := by
ext1 f rw [expand_one_apply, AlgHom.id_apply]
[ " (expand 1) f = f", " expand 1 = AlgHom.id R (MvPolynomial σ R)", " (expand 1) (X f) = (AlgHom.id R (MvPolynomial σ R)) (X f)" ]
[ " (expand 1) f = f" ]
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
104
104
theorem prod_univ {s : Set α} : s ×ˢ (univ : Set β) = Prod.fst ⁻¹' s := by
simp [prod_eq]
[ " (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)", " s ×ˢ ∅ = ∅", " x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅", " ∅ ×ˢ t = ∅", " x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅", " univ ×ˢ univ = univ", " x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ", " univ ×ˢ t = Prod.snd ⁻¹' t", " s ×ˢ univ = Prod.fst ⁻¹' s" ]
[ " (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)", " s ×ˢ ∅ = ∅", " x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅", " ∅ ×ˢ t = ∅", " x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅", " univ ×ˢ univ = univ", " x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ", " univ ×ˢ t = Prod.snd ⁻¹' t" ]
import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Finset.Preimage #align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Function @[ext] structure YoungDiagram where cells : Finset (ℕ × ℕ) isLowerSet : IsLowerSet (cel...
Mathlib/Combinatorics/Young/YoungDiagram.lean
285
286
theorem mem_row_iff {μ : YoungDiagram} {i : ℕ} {c : ℕ × ℕ} : c ∈ μ.row i ↔ c ∈ μ ∧ c.fst = i := by
simp [row]
[ " μ = ν", " c ∈ μ.row i ↔ c ∈ μ ∧ c.1 = i" ]
[ " μ = ν" ]
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.RingTheory.IntegralDomain #align_import field_theory.primitive_element from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87" noncomputable section open scoped Classical Polynomial open FiniteDimensional Polynomial In...
Mathlib/FieldTheory/PrimitiveElement.lean
282
292
theorem FiniteDimensional.of_finite_intermediateField [Finite (IntermediateField F E)] : FiniteDimensional F E := by
let IF := { K : IntermediateField F E // ∃ x, K = F⟮x⟯ } have := isAlgebraic_of_finite_intermediateField F E haveI : ∀ K : IF, FiniteDimensional F K.1 := fun ⟨_, x, rfl⟩ ↦ adjoin.finiteDimensional (Algebra.IsIntegral.isIntegral _) have hfin := finiteDimensional_iSup_of_finite (t := fun K : IF ↦ K.1) have...
[ " IsAlgebraic F α", " (aeval α) (X ^ n - C y) = 0", " s ≠ 0", " False", " f ≠ 0", " f.coeff (n * s.natDegree + m) ≠ 0", " 0 < n", " ¬n ∣ n * s.natDegree + m", " ¬n ∣ m", " s.leadingCoeff ≠ 0", " (aeval α) f = 0", " FiniteDimensional F E" ]
[ " IsAlgebraic F α", " (aeval α) (X ^ n - C y) = 0", " s ≠ 0", " False", " f ≠ 0", " f.coeff (n * s.natDegree + m) ≠ 0", " 0 < n", " ¬n ∣ n * s.natDegree + m", " ¬n ∣ m", " s.leadingCoeff ≠ 0", " (aeval α) f = 0" ]
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Data.Finset.Pointwise import Mathlib.Tactic.GCongr #align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc...
Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
45
56
theorem card_div_mul_le_card_div_mul_card_div (A B C : Finset α) : (A / C).card * B.card ≤ (A / B).card * (B / C).card := by
rw [← card_product (A / B), ← mul_one ((A / B) ×ˢ (B / C)).card] refine card_mul_le_card_mul (fun b ac ↦ ac.1 * ac.2 = b) (fun x hx ↦ ?_) fun x _ ↦ card_le_one_iff.2 fun hu hv ↦ ((mem_bipartiteBelow _).1 hu).2.symm.trans ?_ obtain ⟨a, ha, c, hc, rfl⟩ := mem_div.1 hx refine card_le_card_of_inj_on (fun...
[ " (A / C).card * B.card ≤ (A / B).card * (B / C).card", " (A / C).card * B.card ≤ ((A / B) ×ˢ (B / C)).card * 1", " x.1 * x.2 = b✝", " (fun b => (a / b, b / c)) b ∈ bipartiteAbove (fun b ac => ac.1 * ac.2 = b) ((A / B) ×ˢ (B / C)) (a / c)", " (fun b => (a / b, b / c)) b ∈ (A / B) ×ˢ (B / C) ∧\n ((fun b =...
[]
import Mathlib.AlgebraicTopology.DoldKan.PInfty #align_import algebraic_topology.dold_kan.decomposition from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Preadditive Opposite Simplicial noncomputable section namespace Alge...
Mathlib/AlgebraicTopology/DoldKan/Decomposition.lean
137
139
theorem postComp_φ : (f.postComp h).φ = f.φ ≫ h := by
unfold φ postComp simp only [add_comp, sum_comp, assoc]
[ " (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev", " (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev", " (Q (q + 1)).f (n + 1) =\n ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) F...
[ " (Q q).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < q) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev", " (Q 0).f (n + 1) = ∑ i ∈ Finset.filter (fun i => ↑i < 0) Finset.univ, (P ↑i).f (n + 1) ≫ X.δ i.rev.succ ≫ X.σ i.rev", " (Q (q + 1)).f (n + 1) =\n ∑ i ∈ Finset.filter (fun i => ↑i < q + 1) F...
import Mathlib.SetTheory.Ordinal.Arithmetic #align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d" noncomputable section open Function Cardinal Set Equiv Order open scoped Classical open Cardinal Ordinal universe u v w namespace Ordinal in...
Mathlib/SetTheory/Ordinal/Exponential.lean
78
79
theorem opow_one (a : Ordinal) : a ^ (1 : Ordinal) = a := by
rw [← succ_zero, opow_succ]; simp only [opow_zero, one_mul]
[ " 0 ^ a = 1 - a", " 0 ^ a = 0", " a ^ 0 = 1", " a ^ succ b = a ^ b * a", " 0 ^ succ b = 0 ^ b * 0", " a ^ b = b.bsup fun c x => a ^ c", " (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup", " a ^ b ≤ c ↔ ∀ b' < b, a ^...
[ " 0 ^ a = 1 - a", " 0 ^ a = 0", " a ^ 0 = 1", " a ^ succ b = a ^ b * a", " 0 ^ succ b = 0 ^ b * 0", " a ^ b = b.bsup fun c x => a ^ c", " (b.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup) =\n b.bsup fun c x => c.limitRecOn 1 (fun x IH => IH * a) fun b x => b.bsup", " a ^ b ≤ c ↔ ∀ b' < b, a ^...
import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Nat import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.OrderOfElement import Mathlib.RingTheory.Fintype import Mathlib.Tactic.IntervalCases #align_import number_the...
Mathlib/NumberTheory/LucasLehmer.lean
145
145
theorem sMod_mod (p i : ℕ) : sMod p i % (2 ^ p - 1) = sMod p i := by
cases i <;> simp [sMod]
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2", " 0 ≤ sMod p i", " 0 ≤ sMod p 0", " 0 ≤ sMod p (n✝ + 1)", " 0 ≤ 4 % (2 ^ p - 1)", " 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)", " 2 ^ p - 1 ≠ 0", " sMod p i % (2 ^ p - 1) = sMod p i", " sMod p 0 % (2 ^ p - 1) = sMod p...
[ " 2 ^ m < 2 ^ n", " 1 < 2", " mersenne k + 1 = 2 ^ k", " 1 ≤ 2 ^ k", " 1 ≤ 2", " 0 ≤ sMod p i", " 0 ≤ sMod p 0", " 0 ≤ sMod p (n✝ + 1)", " 0 ≤ 4 % (2 ^ p - 1)", " 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)", " 2 ^ p - 1 ≠ 0" ]
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Sym.Sym2 namespace List variable {α : Type*} section Sym2 protected def sym2 : List α → List (Sym2 α) | [] => [] | x :: xs => (x :: xs).map (fun y => s(x, y)) ++ xs.sym2 theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} : z ∈ (x :: xs)...
Mathlib/Data/List/Sym.lean
46
47
theorem sym2_eq_nil_iff {xs : List α} : xs.sym2 = [] ↔ xs = [] := by
cases xs <;> simp [List.sym2]
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " xs.sym2 = [] ↔ xs = []", " [].sym2 = [] ↔ [] = []", " (head✝ :: tail✝).sym2 = [] ↔ head✝ :: tail✝ = []" ]
[ " z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2", " z = s(x, x) ∨ (∃ a ∈ xs, s(x, a) = z) ∨ z ∈ xs.sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2" ]
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9" namespace Set variable {M : Type*} ...
Mathlib/Algebra/Order/Interval/Set/Monoid.lean
35
41
theorem Ioi_add_bij : BijOn (· + d) (Ioi a) (Ioi (a + d)) := by
refine ⟨fun x h => add_lt_add_right (mem_Ioi.mp h) _, fun _ _ _ _ h => add_right_cancel h, fun _ h => ?_⟩ obtain ⟨c, rfl⟩ := exists_add_of_le (mem_Ioi.mp h).le rw [mem_Ioi, add_right_comm, add_lt_add_iff_right] at h exact ⟨a + c, h, by rw [add_right_comm]⟩
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a" ]
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c" ]
import Mathlib.LinearAlgebra.Finsupp import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Algebra.DirectSum.Internal import Mathlib.RingTheory.GradedAlgebra.Basic #align_import algebra.monoid_algebra.grading from "leanprover-community/mathlib"@"feb99064803fd3108e37c18b0f77d0a8344677a3" noncomputable sectio...
Mathlib/Algebra/MonoidAlgebra/Grading.lean
86
89
theorem single_mem_gradeBy {R} [CommSemiring R] (f : M → ι) (m : M) (r : R) : Finsupp.single m r ∈ gradeBy R f (f m) := by
intro x hx rw [Finset.mem_singleton.mp (Finsupp.support_single_subset hx)]
[ " f m = i", " a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}", " a ∈ grade R m ↔ a.support ⊆ {m}", " a ∈ grade R m ↔ ↑a.support ⊆ {m}", " a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " (∃ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " ∀ (a_1 : R), a = Finsupp.single m ...
[ " f m = i", " a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}", " a ∈ grade R m ↔ a.support ⊆ {m}", " a ∈ grade R m ↔ ↑a.support ⊆ {m}", " a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " (∃ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)", " ∀ (a_1 : R), a = Finsupp.single m ...
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
90
92
theorem multiplicity_eq_factorization {n p : ℕ} (pp : p.Prime) (hn : n ≠ 0) : multiplicity p n = n.factorization p := by
simp [factorization, pp, padicValNat_def' pp.ne_one hn.bot_lt]
[ " ∀ (a : ℕ), a ∈ n.primeFactors ↔ (fun p => if p.Prime then padicValNat p n else 0) a ≠ 0", " ∀ (a : ℕ), a.Prime → (a ∣ n ∧ ¬n = 0 ↔ ¬a = 1 ∧ ¬n = 0 ∧ a ∣ n)", " n.factorization p = padicValNat p n", " count p n.factors = n.factorization p", " count p (factors 0) = (factorization 0) p", " 0 = n.factorizat...
[ " ∀ (a : ℕ), a ∈ n.primeFactors ↔ (fun p => if p.Prime then padicValNat p n else 0) a ≠ 0", " ∀ (a : ℕ), a.Prime → (a ∣ n ∧ ¬n = 0 ↔ ¬a = 1 ∧ ¬n = 0 ∧ a ∣ n)", " n.factorization p = padicValNat p n", " count p n.factors = n.factorization p", " count p (factors 0) = (factorization 0) p", " 0 = n.factorizat...
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheor...
Mathlib/CategoryTheory/Abelian/Opposite.lean
124
126
theorem kernel.ι_unop : (kernel.ι g.unop).op = eqToHom (Opposite.op_unop _) ≫ cokernel.π g ≫ (kernelUnopOp g).inv := by
simp
[ " Abelian Cᵒᵖ", " (cokernel.π f).op ≫ f.op = 0", " f ≫ (kernel.ι f.op).unop = 0", " (kernel.ι f.op ≫ f.op).unop = 0", " (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop", " ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel...
[ " Abelian Cᵒᵖ", " (cokernel.π f).op ≫ f.op = 0", " f ≫ (kernel.ι f.op).unop = 0", " (kernel.ι f.op ≫ f.op).unop = 0", " (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop", " ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel...
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
109
112
theorem hasBasis_nhds_of_ne_zero {x : Γ₀} (h : x ≠ 0) : HasBasis (𝓝 x) (fun _ : Unit => True) fun _ => {x} := by
rw [nhds_of_ne_zero h] exact hasBasis_pure _
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
[ " 𝓝 = update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ))", " pure 0 ≤ ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " 𝓝 0 = ⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)", " (𝓝 0).HasBasis (fun γ => γ ≠ 0) Iio", " (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Iio γ)).HasBasis (fun γ => γ ≠ 0) Iio", " DirectedOn ((fun γ => Iio γ) ⁻¹'o fun x x_1 => x ≥ x_1...
import Mathlib.Analysis.Convex.StrictConvexBetween import Mathlib.Geometry.Euclidean.Basic #align_import geometry.euclidean.sphere.basic from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RealInnerProductSpace namespace EuclideanGeometry variable {V : Type...
Mathlib/Geometry/Euclidean/Sphere/Basic.lean
119
121
theorem Sphere.ne_iff {s₁ s₂ : Sphere P} : s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius := by
rw [← not_and_or, ← Sphere.ext_iff]
[ " { center := s.center, radius := s.radius } = s", " { center := s.center, radius := s.radius }.center = s.center", " { center := s.center, radius := s.radius }.radius = s.radius", " s₁ ≠ s₂ ↔ s₁.center ≠ s₂.center ∨ s₁.radius ≠ s₂.radius" ]
[ " { center := s.center, radius := s.radius } = s", " { center := s.center, radius := s.radius }.center = s.center", " { center := s.center, radius := s.radius }.radius = s.radius" ]
import Mathlib.CategoryTheory.Monoidal.Braided.Basic import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic #align_import algebra.category.Module.monoidal.symmetric from "leanprover-community/mathlib"@"74403a3b2551b0970855e14ef5e8fd0d6af1bfc2" suppress_compilation universe v w x u open CategoryTheory MonoidalC...
Mathlib/Algebra/Category/ModuleCat/Monoidal/Symmetric.lean
43
46
theorem braiding_naturality_left {X Y : ModuleCat R} (f : X ⟶ Y) (Z : ModuleCat R) : f ▷ Z ≫ (braiding Y Z).hom = (braiding X Z).hom ≫ Z ◁ f := by
simp_rw [← id_tensorHom] apply braiding_naturality
[ " (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)", " ∀ (x : ↑X₁) (y : ↑X₂), ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)", " ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)", " f ▷ Z ≫ (Y.braiding Z).ho...
[ " (f ⊗ g) ≫ (Y₁.braiding Y₂).hom = (X₁.braiding X₂).hom ≫ (g ⊗ f)", " ∀ (x : ↑X₁) (y : ↑X₂), ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)", " ((f ⊗ g) ≫ (Y₁.braiding Y₂).hom) (x ⊗ₜ[R] y) = ((X₁.braiding X₂).hom ≫ (g ⊗ f)) (x ⊗ₜ[R] y)" ]
import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Algebra.GCDMonoid.Nat #align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802" theorem Int.Prime.dvd_mul {m n : ℤ} {p : ℕ} (hp : Nat.Prime p) (h : (p ...
Mathlib/RingTheory/Int/Basic.lean
99
102
theorem Int.Prime.dvd_pow {n : ℤ} {k p : ℕ} (hp : Nat.Prime p) (h : (p : ℤ) ∣ n ^ k) : p ∣ n.natAbs := by
rw [Int.natCast_dvd, Int.natAbs_pow] at h exact hp.dvd_of_dvd_pow h
[ " p ∣ m.natAbs ∨ p ∣ n.natAbs", " ↑p ∣ m ∨ ↑p ∣ n", " p ∣ n.natAbs" ]
[ " p ∣ m.natAbs ∨ p ∣ n.natAbs", " ↑p ∣ m ∨ ↑p ∣ n" ]
import Mathlib.MeasureTheory.Integral.FundThmCalculus import Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv import Mathlib.Analysis.SpecialFunctions.NonIntegrable import Mathlib.Analysis.SpecialFunctions.Pow.Deriv #align_import analysis.special_functions.integrals from "leanprover-community/mathlib"@"011...
Mathlib/Analysis/SpecialFunctions/Integrals.lean
120
164
theorem intervalIntegrable_cpow {r : ℂ} (h : 0 ≤ r.re ∨ (0 : ℝ) ∉ [[a, b]]) : IntervalIntegrable (fun x : ℝ => (x : ℂ) ^ r) μ a b := by
by_cases h2 : (0 : ℝ) ∉ [[a, b]] · -- Easy case #1: 0 ∉ [a, b] -- use continuity. refine (ContinuousAt.continuousOn fun x hx => ?_).intervalIntegrable exact Complex.continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_mem_of_not_mem hx h2) rw [eq_false h2, or_false_iff] at h rcases lt_or_eq_of_le h with...
[ " IntervalIntegrable (fun x => x ^ r) volume a b", " ∀ (c : ℝ), IntervalIntegrable (fun x => x ^ r) volume 0 c", " ∀ (c : ℝ), 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntegrableOn (fun x => x ^ r) (Set.Ioc 0 c) volume", " ∀ x ∈ Set.Ioo 0...
[ " IntervalIntegrable (fun x => x ^ r) volume a b", " ∀ (c : ℝ), IntervalIntegrable (fun x => x ^ r) volume 0 c", " ∀ (c : ℝ), 0 ≤ c → IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntervalIntegrable (fun x => x ^ r) volume 0 c", " IntegrableOn (fun x => x ^ r) (Set.Ioc 0 c) volume", " ∀ x ∈ Set.Ioo 0...
import Mathlib.Geometry.RingedSpace.PresheafedSpace import Mathlib.CategoryTheory.Limits.Final import Mathlib.Topology.Sheaves.Stalks #align_import algebraic_geometry.stalks from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section universe v u v' u' open Opposite Cate...
Mathlib/Geometry/RingedSpace/Stalks.lean
188
192
theorem congr_point {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) (x x' : X) (h : x = x') : stalkMap α x ≫ eqToHom (show X.stalk x = X.stalk x' by rw [h]) = eqToHom (show Y.stalk (α.base x) = Y.stalk (α.base x') by rw [h]) ≫ stalkMap α x' := by
rw [stalkMap.congr α α rfl x x' h]
[]
[]
import Mathlib.MeasureTheory.Integral.SetToL1 #align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" assert_not_exists Differentiable noncomputable section open scoped Topology NNReal ENNReal MeasureTheory open Set Filter TopologicalSpace EN...
Mathlib/MeasureTheory/Integral/Bochner.lean
204
206
theorem weightedSMul_congr (s t : Set α) (hst : μ s = μ t) : (weightedSMul μ s : F →L[ℝ] F) = weightedSMul μ t := by
ext1 x; simp_rw [weightedSMul_apply]; congr 2
[ " (weightedSMul μ s) x = (μ s).toReal • x", " weightedSMul 0 = 0", " weightedSMul 0 x✝ = 0 x✝", " weightedSMul μ ∅ = 0", " (weightedSMul μ ∅) x = 0 x", " (μ ∅).toReal • x = 0 x", " weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s", " (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte...
[ " (weightedSMul μ s) x = (μ s).toReal • x", " weightedSMul 0 = 0", " weightedSMul 0 x✝ = 0 x✝", " weightedSMul μ ∅ = 0", " (weightedSMul μ ∅) x = 0 x", " (μ ∅).toReal • x = 0 x", " weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s", " (weightedSMul (μ + ν) s) x = (weightedSMul μ s + weighte...
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {α : Type*} section Disjoint ...
Mathlib/GroupTheory/Perm/Support.lean
50
50
theorem Disjoint.symm : Disjoint f g → Disjoint g f := by
simp only [Disjoint, or_comm, imp_self]
[ " f.Disjoint g → g.Disjoint f" ]
[]
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
153
154
theorem of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly = C P.d := by
rw [of_b_eq_zero ha hb, hc, C_0, zero_mul, zero_add]
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Limits.Constructions.EpiMono import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import category_theory.glue_data from "l...
Mathlib/CategoryTheory/GlueData.lean
88
90
theorem t'_jii (i j : D.J) : D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd := by
rw [← Category.assoc, ← D.t_fac] simp
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom", " D.t' j i i = pullback.fst ≫ D.t j i ≫ inv pullback.snd", " D.t' j i i = (D.t' j i i ≫ pullback.snd) ≫ inv pullback.snd" ]
[ " D.t' i i j = (pullbackSymmetry (D.f i i) (D.f i j)).hom" ]
import Mathlib.Data.Matrix.Basic variable {l m n o : Type*} universe u v w variable {R : Type*} {α : Type v} {β : Type w} namespace Matrix def col (w : m → α) : Matrix m Unit α := of fun x _ => w x #align matrix.col Matrix.col -- TODO: set as an equation lemma for `col`, see mathlib4#3024 @[simp] theorem col...
Mathlib/Data/Matrix/RowCol.lean
106
108
theorem conjTranspose_col [Star α] (v : m → α) : (col v)ᴴ = row (star v) := by
ext rfl
[ " col (v + w) = col v + col w", " col (v + w) i✝ j✝ = (col v + col w) i✝ j✝", " col (x • v) = x • col v", " col (x • v) i✝ j✝ = (x • col v) i✝ j✝", " row (v + w) = row v + row w", " row (v + w) i✝ j✝ = (row v + row w) i✝ j✝", " row (x • v) = x • row v", " row (x • v) i✝ j✝ = (x • row v) i✝ j✝", " (c...
[ " col (v + w) = col v + col w", " col (v + w) i✝ j✝ = (col v + col w) i✝ j✝", " col (x • v) = x • col v", " col (x • v) i✝ j✝ = (x • col v) i✝ j✝", " row (v + w) = row v + row w", " row (v + w) i✝ j✝ = (row v + row w) i✝ j✝", " row (x • v) = x • row v", " row (x • v) i✝ j✝ = (x • row v) i✝ j✝", " (c...
import Mathlib.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
84
93
theorem matrix_mul_apply [Fintype m] [Semiring α] [DecidableEq n] (M : Matrix l m α) (f : m ≃. n) (i j) : (M * f.toMatrix :) i j = Option.casesOn (f.symm j) 0 fun fj => M i fj := by
dsimp [toMatrix, Matrix.mul_apply] cases' h : f.symm j with fj · simp [h, ← f.eq_some_iff] · rw [Finset.sum_eq_single fj] · simp [h, ← f.eq_some_iff] · rintro b - n simp [h, ← f.eq_some_iff, n.symm] · simp
[ " (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j", " ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)", " ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none", " ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j...
[ " (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j", " ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)", " ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none", " ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j...
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 L...
Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
176
220
theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r)) (hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFDerivAt (f n) (f' n y) y) (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r) := by
letI : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ 𝕜 _ have : NeBot l := (cauchy_map_iff.1 hfg).1 rcases le_or_lt r 0 with (hr | hr) · simp only [Metric.ball_eq_empty.2 hr, UniformCauchySeqOn, Set.mem_empty_iff_false, IsEmpty.forall_iff, eventually_const, imp_true_iff] rw [SeminormedAddGroup.unif...
[ " UniformCauchySeqOnFilter f l (𝓝 x)", " TendstoUniformlyOnFilter (fun n z => f n.1 z - f n.2 z) 0 (l ×ˢ l) (𝓝 x)", " ∀ᶠ (n : (ι × ι) × E) in (l ×ˢ l) ×ˢ 𝓝 x,\n ((fun n z => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) + fun n x_1 => f n.1 x - f n.2 x) n.1 n.2 =\n f n.1.1 n.2 - f n.1.2 n.2", " TendstoU...
[ " UniformCauchySeqOnFilter f l (𝓝 x)", " TendstoUniformlyOnFilter (fun n z => f n.1 z - f n.2 z) 0 (l ×ˢ l) (𝓝 x)", " ∀ᶠ (n : (ι × ι) × E) in (l ×ˢ l) ×ˢ 𝓝 x,\n ((fun n z => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) + fun n x_1 => f n.1 x - f n.2 x) n.1 n.2 =\n f n.1.1 n.2 - f n.1.2 n.2", " TendstoU...
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.Data.Complex.Orientation import Mathlib.Tactic.LinearCombination #align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af" non...
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
109
113
theorem areaForm_apply_self (x : E) : ω x x = 0 := by
rw [areaForm_to_volumeForm] refine o.volumeForm.map_eq_zero_of_eq ![x, x] ?_ (?_ : (0 : Fin 2) ≠ 1) · simp · norm_num
[ " E →ₗ[ℝ] E →ₗ[ℝ] ℝ", " (o.areaForm x) y = o.volumeForm ![x, y]", " (o.areaForm x) x = 0", " o.volumeForm ![x, x] = 0", " ![x, x] 0 = ![x, x] 1", " 0 ≠ 1" ]
[ " E →ₗ[ℝ] E →ₗ[ℝ] ℝ", " (o.areaForm x) y = o.volumeForm ![x, y]" ]
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u → Type u) [Functor F] where P : PFunctor.{u} abs : ∀ {α}, P α → F α repr : ∀ {α}, F α → P α abs_repr : ∀ {α} (...
Mathlib/Data/QPF/Univariate/Basic.lean
117
131
theorem liftp_iff' {α : Type u} (p : α → Prop) (x : F α) : Liftp p x ↔ ∃ u : q.P α, abs u = x ∧ ∀ i, p (u.snd i) := by
constructor · rintro ⟨y, hy⟩ cases' h : repr y with a f use ⟨a, fun i => (f i).val⟩ dsimp constructor · rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨⟨a, f⟩, h₀, h₁⟩; dsimp at * use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, ← h₀]; rfl
[ " id <$> x = x", " id <$> abs (repr x) = abs (repr x)", " id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩", " (g ∘ f) <$> x = g <$> f <$> x", " (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)", " (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩", " abs ((P F).map (g ∘ f✝...
[ " id <$> x = x", " id <$> abs (repr x) = abs (repr x)", " id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩", " abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩", " (g ∘ f) <$> x = g <$> f <$> x", " (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)", " (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩", " abs ((P F).map (g ∘ f✝...
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
128
138
theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i, segment ℝ 0 (v i) := by
ext simp only [mem_parallelepiped_iff, Set.mem_finset_sum, Finset.mem_univ, forall_true_left, segment_eq_image, smul_zero, zero_add, ← Set.pi_univ_Icc, Set.mem_univ_pi] constructor · rintro ⟨t, ht, rfl⟩ exact ⟨t • v, fun {i} => ⟨t i, ht _, by simp⟩, rfl⟩ rintro ⟨g, hg, rfl⟩ choose t ht hg using @hg...
[ " x ∈ parallelepiped v ↔ ∃ t ∈ Icc 0 1, x = ∑ i : ι, t i • v i", " parallelepiped ⇑b = {x | ∀ (i : ι), (b.repr x) i ∈ Icc 0 1}", " x ∈ parallelepiped ⇑b ↔ x ∈ {x | ∀ (i : ι), (b.repr x) i ∈ Icc 0 1}", " (∃ t, ∀ (x_1 : ι), (0 ≤ t x_1 ∧ t x_1 ≤ 1) ∧ (b.repr x) x_1 = t x_1) ↔ ∀ (i : ι), 0 ≤ (b.repr x) i ∧ (b.rep...
[ " x ∈ parallelepiped v ↔ ∃ t ∈ Icc 0 1, x = ∑ i : ι, t i • v i", " parallelepiped ⇑b = {x | ∀ (i : ι), (b.repr x) i ∈ Icc 0 1}", " x ∈ parallelepiped ⇑b ↔ x ∈ {x | ∀ (i : ι), (b.repr x) i ∈ Icc 0 1}", " (∃ t, ∀ (x_1 : ι), (0 ≤ t x_1 ∧ t x_1 ≤ 1) ∧ (b.repr x) x_1 = t x_1) ↔ ∀ (i : ι), 0 ≤ (b.repr x) i ∧ (b.rep...
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
180
181
theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) : b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a := by
simp [restrict]
[ " x ∈ f.Dom ↔ ∃ y, y ∈ f x", " (fun f => ⟨fun a => (f a).Dom, f.asSubtype⟩) ((fun f x => { Dom := f.fst x, get := fun h => f.snd ⟨x, h⟩ }) ⟨p, f⟩) =\n ⟨p, f⟩", " ⟨fun a => p a, asSubtype fun x => { Dom := p x, get := fun h => f ⟨x, h⟩ }⟩ = ⟨p, f⟩", " b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a" ]
[ " x ∈ f.Dom ↔ ∃ y, y ∈ f x", " (fun f => ⟨fun a => (f a).Dom, f.asSubtype⟩) ((fun f x => { Dom := f.fst x, get := fun h => f.snd ⟨x, h⟩ }) ⟨p, f⟩) =\n ⟨p, f⟩", " ⟨fun a => p a, asSubtype fun x => { Dom := p x, get := fun h => f ⟨x, h⟩ }⟩ = ⟨p, f⟩" ]
import Mathlib.NumberTheory.Padics.PadicIntegers import Mathlib.RingTheory.ZMod #align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" noncomputable section open scoped Classical open Nat LocalRing Padic namespace PadicInt variable {p : ℕ} [h...
Mathlib/NumberTheory/Padics/RingHoms.lean
586
597
theorem limNthHom_spec (r : R) : ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, ∀ n ≥ N, ‖limNthHom f_compat r - nthHom f r n‖ < ε := by
intro ε hε obtain ⟨ε', hε'0, hε'⟩ : ∃ v : ℚ, (0 : ℝ) < v ∧ ↑v < ε := exists_rat_btwn hε norm_cast at hε'0 obtain ⟨N, hN⟩ := padicNormE.defn (nthHomSeq f_compat r) hε'0 use N intro n hn apply _root_.lt_trans _ hε' change (padicNormE _ : ℝ) < _ norm_cast exact hN _ hn
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
import Mathlib.CategoryTheory.Galois.Basic import Mathlib.CategoryTheory.Limits.FintypeCat import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Shapes.SingleObj import Mathlib.Logic.Equiv.TransferInstance universe u₁ u₂ v₁ v₂ v w namespace CategoryTheory namespace PreGaloisCat...
Mathlib/CategoryTheory/Galois/GaloisObjects.lean
81
84
theorem isGalois_iff_pretransitive (X : C) [IsConnected X] : IsGalois X ↔ MulAction.IsPretransitive (Aut X) (F.obj X) := by
rw [isGalois_iff_aux, Equiv.nonempty_congr <| quotientByAutTerminalEquivUniqueQuotient F X] exact (MulAction.pretransitive_iff_unique_quotient_of_nonempty (Aut X) (F.obj X)).symm
[ " PreservesColimitsOfShape (SingleObj G) FintypeCat.incl", " 1 • a = a", " F.map (𝟙 X) a = a", " (g * h) • a = g • h • a", " F.map (h.hom ≫ g.hom) a = (F.map h.hom ≫ F.map g.hom) a", " IsTerminal (colimit (SingleObj.functor (Aut.toEnd X))) ≃ Unique (MulAction.orbitRel.Quotient (Aut X) ↑(F.obj X))", " I...
[ " PreservesColimitsOfShape (SingleObj G) FintypeCat.incl", " 1 • a = a", " F.map (𝟙 X) a = a", " (g * h) • a = g • h • a", " F.map (h.hom ≫ g.hom) a = (F.map h.hom ≫ F.map g.hom) a", " IsTerminal (colimit (SingleObj.functor (Aut.toEnd X))) ≃ Unique (MulAction.orbitRel.Quotient (Aut X) ↑(F.obj X))", " I...
import Mathlib.Init.Core import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.NumberTheory.NumberField.Basic import Mathlib.FieldTheory.Galois #align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba" open Polynomial Algebra FiniteD...
Mathlib/NumberTheory/Cyclotomic/Basic.lean
107
108
theorem empty [h : IsCyclotomicExtension ∅ A B] : (⊥ : Subalgebra A B) = ⊤ := by
simpa [Algebra.eq_top_iff, isCyclotomicExtension_iff] using h
[ " IsCyclotomicExtension {n} A B ↔ (∃ r, IsPrimitiveRoot r ↑n) ∧ ∀ (x : B), x ∈ adjoin A {b | b ^ ↑n = 1}", " ⊥ = ⊤" ]
[ " IsCyclotomicExtension {n} A B ↔ (∃ r, IsPrimitiveRoot r ↑n) ∧ ∀ (x : B), x ∈ adjoin A {b | b ^ ↑n = 1}" ]
import Mathlib.Analysis.Seminorm import Mathlib.Topology.Algebra.Equicontinuity import Mathlib.Topology.MetricSpace.Equicontinuity import Mathlib.Topology.Algebra.FilterBasis import Mathlib.Topology.Algebra.Module.LocallyConvex #align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"...
Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
130
134
theorem basisSets_neg (U) (hU' : U ∈ p.basisSets) : ∃ V ∈ p.basisSets, V ⊆ (fun x : E => -x) ⁻¹' U := by
rcases p.basisSets_iff.mp hU' with ⟨s, r, _, hU⟩ rw [hU, neg_preimage, neg_ball (s.sup p), neg_zero] exact ⟨U, hU', Eq.subset hU⟩
[ " U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r", " (p i).ball 0 r = ({i}.sup p).ball 0 r", " p.basisSets.Nonempty", " (p i).ball 0 1 ∈ p.basisSets", " ∃ z ∈ p.basisSets, z ⊆ U ∩ V", " ((s ∪ t).sup p).ball 0 (min r₁ r₂) ∈ p.basisSets ∧ ((s ∪ t).sup p).ball 0 (min r₁ r₂) ⊆ U ∩ V", " ((s ∪ t).su...
[ " U ∈ p.basisSets ↔ ∃ i r, 0 < r ∧ U = (i.sup p).ball 0 r", " (p i).ball 0 r = ({i}.sup p).ball 0 r", " p.basisSets.Nonempty", " (p i).ball 0 1 ∈ p.basisSets", " ∃ z ∈ p.basisSets, z ⊆ U ∩ V", " ((s ∪ t).sup p).ball 0 (min r₁ r₂) ∈ p.basisSets ∧ ((s ∪ t).sup p).ball 0 (min r₁ r₂) ⊆ U ∩ V", " ((s ∪ t).su...
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.monoid from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9" namespace Set variable {M : Type*} ...
Mathlib/Algebra/Order/Interval/Set/Monoid.lean
51
55
theorem Ioo_add_bij : BijOn (· + d) (Ioo a b) (Ioo (a + d) (b + d)) := by
rw [← Ioi_inter_Iio, ← Ioi_inter_Iio] exact (Ioi_add_bij a d).inter_mapsTo (fun x hx => add_lt_add_right hx _) fun x hx => lt_of_add_lt_add_right hx.2
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
[ " BijOn (fun x => x + d) (Ici a) (Ici (a + d))", " x✝ ∈ (fun x => x + d) '' Ici a", " a + d + c ∈ (fun x => x + d) '' Ici a", " (fun x => x + d) (a + c) = a + d + c", " BijOn (fun x => x + d) (Ioi a) (Ioi (a + d))", " x✝ ∈ (fun x => x + d) '' Ioi a", " a + d + c ∈ (fun x => x + d) '' Ioi a", " BijOn (...
import Mathlib.SetTheory.Cardinal.ENat #align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" universe u v open Function Set namespace Cardinal variable {α : Type u} {c d : Cardinal.{u}} noncomputable def toNat : Cardinal →*₀ ℕ := ENat.toNat.com...
Mathlib/SetTheory/Cardinal/ToNat.lean
57
57
theorem toNat_apply_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : toNat c = 0 := by
simp [h]
[ " toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c", " toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀", " ↑(toNat c) = c", " ↑(toNat ↑c) = ↑c", " ↑(toNat c) = ↑(Classical.choose ⋯)", " toNat c = 0" ]
[ " toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c", " toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀", " ↑(toNat c) = c", " ↑(toNat ↑c) = ↑c", " ↑(toNat c) = ↑(Classical.choose ⋯)" ]
import Mathlib.Topology.Separation open Topology Filter Set TopologicalSpace section Basic variable {α : Type*} [TopologicalSpace α] {C : Set α} theorem AccPt.nhds_inter {x : α} {U : Set α} (h_acc : AccPt x (𝓟 C)) (hU : U ∈ 𝓝 x) : AccPt x (𝓟 (U ∩ C)) := by have : 𝓝[≠] x ≤ 𝓟 U := by rw [le_princ...
Mathlib/Topology/Perfect.lean
158
177
theorem Perfect.splitting [T25Space α] (hC : Perfect C) (hnonempty : C.Nonempty) : ∃ C₀ C₁ : Set α, (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁ := by
cases' hnonempty with y yC obtain ⟨x, xC, hxy⟩ : ∃ x ∈ C, x ≠ y := by have := hC.acc _ yC rw [accPt_iff_nhds] at this rcases this univ univ_mem with ⟨x, xC, hxy⟩ exact ⟨x, xC.2, hxy⟩ obtain ⟨U, xU, Uop, V, yV, Vop, hUV⟩ := exists_open_nhds_disjoint_closure hxy use closure (U ∩ C), closure (V ∩ ...
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot", " Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x", " Preperfect (U ∩ C)", " U ∈ 𝓝 x", " Perfect (closure C)", " IsClosed (closure C)", " Preperfect (closure C)", " AccPt x (𝓟 (closure C))", " AccPt...
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot", " Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x", " Preperfect (U ∩ C)", " U ∈ 𝓝 x", " Perfect (closure C)", " IsClosed (closure C)", " Preperfect (closure C)", " AccPt x (𝓟 (closure C))", " AccPt...
import Mathlib.Algebra.Algebra.Bilinear import Mathlib.RingTheory.Localization.Basic #align_import algebra.module.localized_module from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86" namespace LocalizedModule universe u v variable {R : Type u} [CommSemiring R] (S : Submonoid R) variab...
Mathlib/Algebra/Module/LocalizedModule.lean
142
145
theorem subsingleton (h : 0 ∈ S) : Subsingleton (LocalizedModule S M) := by
refine ⟨fun a b ↦ ?_⟩ induction a,b using LocalizedModule.induction_on₂ exact mk_eq.mpr ⟨⟨0, h⟩, by simp only [Submonoid.mk_smul, zero_smul]⟩
[ " 1 • (m, s).2 • (m, s).1 = 1 • (m, s).2 • (m, s).1", " r S M (m1, s1) (m3, s3)", " (u1 * u2 * s2) • (m3, s3).2 • (m1, s1).1 = (u1 * u2 * s2) • (m1, s1).2 • (m3, s3).1", " (s2 * (s3 * (u1 * u2))) • m1 = (s1 * (s2 * (u1 * u2))) • m3", " ∀ (x : LocalizedModule S M), β x", " β (Quot.mk Setoid.r (m, s))", "...
[ " 1 • (m, s).2 • (m, s).1 = 1 • (m, s).2 • (m, s).1", " r S M (m1, s1) (m3, s3)", " (u1 * u2 * s2) • (m3, s3).2 • (m1, s1).1 = (u1 * u2 * s2) • (m1, s1).2 • (m3, s3).1", " (s2 * (s3 * (u1 * u2))) • m1 = (s1 * (s2 * (u1 * u2))) • m3", " ∀ (x : LocalizedModule S M), β x", " β (Quot.mk Setoid.r (m, s))", "...
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal import Mathlib.LinearAlgebra.Matrix.Transvection import Mathlib.MeasureTheory.Group.LIntegral import Mathlib.MeasureTheory.Integral.Marginal import Mathlib.MeasureTheory.Measure.Stiel...
Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
80
80
theorem volume_Ico {a b : ℝ} : volume (Ico a b) = ofReal (b - a) := by
simp [volume_val]
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
[ " volume = StieltjesFunction.id.measure", " StieltjesFunction.id.measure (Ioo ↑p ↑q) = (Measure.map (fun x => a + x) StieltjesFunction.id.measure) (Ioo ↑p ↑q)", " StieltjesFunction.id.measure ↑(stdOrthonormalBasis ℝ ℝ).toBasis.parallelepiped = 1", " StieltjesFunction.id.measure (parallelepiped ⇑(stdOrthonorma...
import Mathlib.Tactic.NormNum import Mathlib.Tactic.TryThis import Mathlib.Util.AtomM set_option autoImplicit true namespace Mathlib.Tactic.Abel open Lean Elab Meta Tactic Qq initialize registerTraceClass `abel initialize registerTraceClass `abel.detail structure Context where α : Expr univ :...
Mathlib/Tactic/Abel.lean
140
142
theorem term_add_constg {α} [AddCommGroup α] (n x a k a') (h : a + k = a') : @termg α _ n x a + k = termg n x a' := by
simp [h.symm, termg, add_assoc]
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'", " termg n x a + k = termg n x a'" ]
[ " k + term n x a = term n x a'", " k + termg n x a = termg n x a'", " term n x a + k = term n x a'" ]
import Mathlib.CategoryTheory.Galois.GaloisObjects import Mathlib.CategoryTheory.Limits.Shapes.CombinedProducts universe u₁ u₂ w namespace CategoryTheory open Limits Functor variable {C : Type u₁} [Category.{u₂} C] namespace PreGaloisCategory variable [GaloisCategory C] section Decomposition private lemma...
Mathlib/CategoryTheory/Galois/Decomposition.lean
118
121
theorem has_decomp_connected_components' (X : C) : ∃ (ι : Type) (_ : Finite ι) (f : ι → C) (_ : ∐ f ≅ X), ∀ i, IsConnected (f i) := by
obtain ⟨ι, f, g, hl, hc, hf⟩ := has_decomp_connected_components X exact ⟨ι, hf, f, colimit.isoColimitCocone ⟨Cofan.mk X g, hl⟩, hc⟩
[ " ∃ ι f g x, (∀ (i : ι), IsConnected (f i)) ∧ Finite ι", " (∀ (i : Unit), IsConnected ((fun x => X) i)) ∧ Finite Unit", " ∃ x, (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty", " ∀ (j : Empty), (Cofan.mk X fun x => 𝟙 X).inj j ≫ (fun s => h.to s.pt) s = s.inj j", " (∀ (i : Empty), IsConnected (...
[ " ∃ ι f g x, (∀ (i : ι), IsConnected (f i)) ∧ Finite ι", " (∀ (i : Unit), IsConnected ((fun x => X) i)) ∧ Finite Unit", " ∃ x, (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty", " ∀ (j : Empty), (Cofan.mk X fun x => 𝟙 X).inj j ≫ (fun s => h.to s.pt) s = s.inj j", " (∀ (i : Empty), IsConnected (...
import Mathlib.Algebra.Order.Pointwise import Mathlib.Analysis.NormedSpace.SphereNormEquiv import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar open Set Function Metric MeasurableSpace intervalIntegral open s...
Mathlib/MeasureTheory/Constructions/HaarToSphere.lean
49
53
theorem toSphere_apply_aux (s : Set (sphere (0 : E) 1)) (r : Ioi (0 : ℝ)) : μ ((↑) '' (homeomorphUnitSphereProd E ⁻¹' s ×ˢ Iio r)) = μ (Ioo (0 : ℝ) r • ((↑) '' s)) := by
rw [← image2_smul, image2_image_right, ← Homeomorph.image_symm, image_image, ← image_subtype_val_Ioi_Iio, image2_image_left, image2_swap, ← image_prod] rfl
[ " μ (Subtype.val '' (⇑(homeomorphUnitSphereProd E) ⁻¹' s ×ˢ Iio r)) = μ (Ioo 0 ↑r • Subtype.val '' s)", " μ ((fun x => ↑((homeomorphUnitSphereProd E).symm x)) '' s ×ˢ Iio r) = μ ((fun x => SMul.smul ↑x.2 ↑x.1) '' s ×ˢ Iio r)" ]
[]
import Mathlib.Tactic.Ring import Mathlib.Data.PNat.Prime #align_import data.pnat.xgcd from "leanprover-community/mathlib"@"6afc9b06856ad973f6a2619e3e8a0a8d537a58f2" open Nat namespace PNat structure XgcdType where wp : ℕ x : ℕ y : ℕ zp : ℕ ap : ℕ bp : ℕ deriving Inhabited #alig...
Mathlib/Data/PNat/Xgcd.lean
217
219
theorem flip_isReduced : (flip u).IsReduced ↔ u.IsReduced := by
dsimp [IsReduced, flip] constructor <;> intro h <;> exact h.symm
[ " u.v = succ₂ u.vp", " u.v.1 = (succ₂ u.vp).1", " u.v.2 = (succ₂ u.vp).2", " (u.wp + 1) * (u.ap + 1) + u.x * (u.bp + 1) = u.wp + u.x + u.ap + u.wp * u.ap + u.x * u.bp + 1", " u.y * (u.ap + 1) + (u.zp + 1) * (u.bp + 1) = u.y + u.zp + u.bp + u.y * u.ap + u.zp * u.bp + 1", " u.IsSpecial ↔ u.IsSpecial'", " ...
[ " u.v = succ₂ u.vp", " u.v.1 = (succ₂ u.vp).1", " u.v.2 = (succ₂ u.vp).2", " (u.wp + 1) * (u.ap + 1) + u.x * (u.bp + 1) = u.wp + u.x + u.ap + u.wp * u.ap + u.x * u.bp + 1", " u.y * (u.ap + 1) + (u.zp + 1) * (u.bp + 1) = u.y + u.zp + u.bp + u.y * u.ap + u.zp * u.bp + 1", " u.IsSpecial ↔ u.IsSpecial'", " ...
import Mathlib.AlgebraicGeometry.Morphisms.Basic import Mathlib.Topology.LocalAtTarget #align_import algebraic_geometry.morphisms.universally_closed from "leanprover-community/mathlib"@"a8ae1b3f7979249a0af6bc7cf20c1f6bf656ca73" noncomputable section open CategoryTheory CategoryTheory.Limits Opposite TopologicalS...
Mathlib/AlgebraicGeometry/Morphisms/UniversallyClosed.lean
45
46
theorem universallyClosed_eq : @UniversallyClosed = universally (topologically @IsClosedMap) := by
ext X Y f; rw [universallyClosed_iff]
[ " @UniversallyClosed = (topologically @IsClosedMap).universally", " UniversallyClosed f ↔ (topologically @IsClosedMap).universally f" ]
[]
import Mathlib.Algebra.Group.Support import Mathlib.Data.Int.Cast.Field import Mathlib.Data.Int.Cast.Lemmas #align_import data.int.char_zero from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Nat Set variable {α β : Type*} namespace Int @[simp, norm_cast]
Mathlib/Data/Int/CharZero.lean
24
28
theorem cast_div_charZero {k : Type*} [DivisionRing k] [CharZero k] {m n : ℤ} (n_dvd : n ∣ m) : ((m / n : ℤ) : k) = m / n := by
rcases eq_or_ne n 0 with (rfl | hn) · simp [Int.ediv_zero] · exact cast_div n_dvd (cast_ne_zero.mpr hn)
[ " ↑(m / n) = ↑m / ↑n", " ↑(m / 0) = ↑m / ↑0" ]
[]
import Mathlib.Algebra.IsPrimePow import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import number_theory.von_mangoldt from "leanprover-community/mathlib"@"c946d6097a6925ad16d7ec55677bbc977f9846de" namespace ArithmeticFunction open Finset Nat open scoped Arit...
Mathlib/NumberTheory/VonMangoldt.lean
140
141
theorem moebius_mul_log_eq_vonMangoldt : (μ : ArithmeticFunction ℝ) * log = Λ := by
rw [mul_comm]; simp
[ " (fun n => (↑n).log) 0 = 0", " Λ 1 = 0", " 0 ≤ Λ n", " 0 ≤ if IsPrimePow n then (↑n.minFac).log else 0", " 0 ≤ (↑n.minFac).log", " 0 ≤ 0", " Λ (n ^ k) = Λ n", " Λ p = (↑p).log", " Λ n ≠ 0 ↔ IsPrimePow n", " Λ 1 ≠ 0 ↔ IsPrimePow 1", " ∑ i ∈ n.divisors, Λ i = (↑n).log", " ∑ i ∈ divisors 0, Λ i ...
[ " (fun n => (↑n).log) 0 = 0", " Λ 1 = 0", " 0 ≤ Λ n", " 0 ≤ if IsPrimePow n then (↑n.minFac).log else 0", " 0 ≤ (↑n.minFac).log", " 0 ≤ 0", " Λ (n ^ k) = Λ n", " Λ p = (↑p).log", " Λ n ≠ 0 ↔ IsPrimePow n", " Λ 1 ≠ 0 ↔ IsPrimePow 1", " ∑ i ∈ n.divisors, Λ i = (↑n).log", " ∑ i ∈ divisors 0, Λ i ...
import Mathlib.Probability.Kernel.MeasurableIntegral import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.with_density from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" open MeasureTheory ProbabilityTheory open scoped MeasureTheory ENNReal NNReal namesp...
Mathlib/Probability/Kernel/WithDensity.lean
125
132
theorem withDensity_add_left (κ η : kernel α β) [IsSFiniteKernel κ] [IsSFiniteKernel η] (f : α → β → ℝ≥0∞) : withDensity (κ + η) f = withDensity κ f + withDensity η f := by
by_cases hf : Measurable (Function.uncurry f) · ext a s simp only [kernel.withDensity_apply _ hf, coeFn_add, Pi.add_apply, withDensity_add_measure, Measure.add_apply] · simp_rw [withDensity_of_not_measurable _ hf] rw [zero_add]
[ " (fun a => (κ a).withDensity (f a)) ∈ kernel α β", " Measurable fun b => ((κ b).withDensity (f b)) s", " Measurable fun b => ∫⁻ (a : β) in s, f b a ∂κ b", " withDensity κ f = 0", " (withDensity κ f) a = (κ a).withDensity (f a)", " ⟨fun a => (κ a).withDensity (f a), ⋯⟩ a = (κ a).withDensity (f a)", " ((...
[ " (fun a => (κ a).withDensity (f a)) ∈ kernel α β", " Measurable fun b => ((κ b).withDensity (f b)) s", " Measurable fun b => ∫⁻ (a : β) in s, f b a ∂κ b", " withDensity κ f = 0", " (withDensity κ f) a = (κ a).withDensity (f a)", " ⟨fun a => (κ a).withDensity (f a), ⋯⟩ a = (κ a).withDensity (f a)", " ((...
import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Exponent #align_import group_theory.specific_groups.dihedral from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" inductive DihedralGroup (n : ℕ) : Type | r : ZMod n → DihedralGroup n | sr : ZMod n → DihedralGroup n derivin...
Mathlib/GroupTheory/SpecificGroups/Dihedral.lean
189
191
theorem orderOf_r [NeZero n] (i : ZMod n) : orderOf (r i) = n / Nat.gcd n i.val := by
conv_lhs => rw [← ZMod.natCast_zmod_val i] rw [← r_one_pow, orderOf_pow, orderOf_r_one]
[ " ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)", " r a * r b * r c = r a * (r b * r c)", " r a * r b * sr c = r a * (r b * sr c)", " r a * sr b * r c = r a * (sr b * r c)", " r a * sr b * sr c = r a * (sr b * sr c)", " sr a * r b * r c = sr a * (r b * r c)", " sr a * r b * sr c = sr a * (r b * s...
[ " ∀ (a b c : DihedralGroup n), a * b * c = a * (b * c)", " r a * r b * r c = r a * (r b * r c)", " r a * r b * sr c = r a * (r b * sr c)", " r a * sr b * r c = r a * (sr b * r c)", " r a * sr b * sr c = r a * (sr b * sr c)", " sr a * r b * r c = sr a * (r b * r c)", " sr a * r b * sr c = sr a * (r b * s...
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
130
131
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
import Mathlib.RingTheory.WittVector.Truncated import Mathlib.RingTheory.WittVector.Identities import Mathlib.NumberTheory.Padics.RingHoms #align_import ring_theory.witt_vector.compare from "leanprover-community/mathlib"@"168ad7fc5d8173ad38be9767a22d50b8ecf1cd00" noncomputable section variable {p : ℕ} [hp : Fact...
Mathlib/RingTheory/WittVector/Compare.lean
43
53
theorem eq_of_le_of_cast_pow_eq_zero [CharP R p] (i : ℕ) (hin : i ≤ n) (hpi : (p : TruncatedWittVector p n R) ^ i = 0) : i = n := by
contrapose! hpi replace hin := lt_of_le_of_ne hin hpi; clear hpi have : (p : TruncatedWittVector p n R) ^ i = WittVector.truncate n ((p : 𝕎 R) ^ i) := by rw [RingHom.map_pow, map_natCast] rw [this, ne_eq, ext_iff, not_forall]; clear this use ⟨i, hin⟩ rw [WittVector.coeff_truncate, coeff_zero, Fin.val_...
[ " i = n", " ↑p ^ i ≠ 0", " ↑p ^ i = (WittVector.truncate n) (↑p ^ i)", " ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0", " ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0", " ¬1 = 0" ]
[]
import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Polynomial.Roots import Mathlib.GroupTheory.SpecificGroups.Cyclic #align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e" section open Finset Polynomial Function Nat variable {R : Type*} {G : Ty...
Mathlib/RingTheory/IntegralDomain.lean
122
133
theorem card_nthRoots_subgroup_units [Fintype G] [DecidableEq G] (f : G →* R) (hf : Injective f) {n : ℕ} (hn : 0 < n) (g₀ : G) : Finset.card (Finset.univ.filter (fun g ↦ g^n = g₀)) ≤ Multiset.card (nthRoots n (f g₀)) := by
haveI : DecidableEq R := Classical.decEq _ refine le_trans ?_ (nthRoots n (f g₀)).toFinset_card_le apply card_le_card_of_inj_on f · intro g hg rw [mem_filter] at hg rw [Multiset.mem_toFinset, mem_nthRoots hn, ← f.map_pow, hg.2] · intros apply hf assumption
[ " (filter (fun g => g ^ n = g₀) univ).card ≤ Multiset.card (nthRoots n (f g₀))", " (filter (fun g => g ^ n = g₀) univ).card ≤ (nthRoots n (f g₀)).toFinset.card", " ∀ a ∈ filter (fun g => g ^ n = g₀) univ, f a ∈ (nthRoots n (f g₀)).toFinset", " f g ∈ (nthRoots n (f g₀)).toFinset", " ∀ a₁ ∈ filter (fun g => g...
[]
import Mathlib.Algebra.BigOperators.Group.List import Mathlib.Algebra.Group.Prod import Mathlib.Data.Multiset.Basic #align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4" assert_not_exists MonoidWithZero variable {F ι α β γ : Type*} names...
Mathlib/Algebra/BigOperators/Group/Multiset.lean
144
147
theorem prod_eq_pow_single [DecidableEq α] (a : α) (h : ∀ a' ≠ a, a' ∈ s → a' = 1) : s.prod = a ^ s.count a := by
induction' s using Quotient.inductionOn with l simp [List.prod_eq_pow_single a h]
[ " (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)", " (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y", " foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s", " s.toList...
[ " (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)", " (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y", " foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s", " s.toList...
import Mathlib.Computability.NFA #align_import computability.epsilon_NFA from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" open Set open Computability -- "ε_NFA" set_option linter.uppercaseLean3 false universe u v structure εNFA (α : Type u) (σ : Type v) where step : σ → Opt...
Mathlib/Computability/EpsilonNFA.lean
82
83
theorem mem_stepSet_iff : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t a) := by
simp_rw [stepSet, mem_iUnion₂, exists_prop]
[ " False", " s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t (some a))" ]
[ " False" ]
import Mathlib.Algebra.Order.Floor import Mathlib.Topology.Algebra.Order.Group import Mathlib.Topology.Order.Basic #align_import topology.algebra.order.floor from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Filter Function Int Set Topology variable {α β γ : Type*} [LinearOrdere...
Mathlib/Topology/Algebra/Order/Floor.lean
96
98
theorem tendsto_floor_left_pure_sub_one (n : ℤ) : Tendsto (floor : α → ℤ) (𝓝[<] n) (pure (n - 1)) := by
simpa only [ceil_intCast] using tendsto_floor_left_pure_ceil_sub_one (n : α)
[ " b ≤ ⌊↑(b + 1)⌋", " b ≤ b + 1", " ⌈↑(b - 1)⌉ ≤ b", " b - 1 ≤ b", " Tendsto floor (𝓝[≥] ↑n) (pure n)", " Tendsto ceil (𝓝[≤] ↑n) (pure n)", " ↑(⌈x⌉ - 1) < x", " ↑⌈x⌉ < x + 1", " x ≤ ↑(⌈x⌉ - 1) + 1", " x ≤ ↑⌈x⌉", " Tendsto floor (𝓝[<] ↑n) (pure (n - 1))" ]
[ " b ≤ ⌊↑(b + 1)⌋", " b ≤ b + 1", " ⌈↑(b - 1)⌉ ≤ b", " b - 1 ≤ b", " Tendsto floor (𝓝[≥] ↑n) (pure n)", " Tendsto ceil (𝓝[≤] ↑n) (pure n)", " ↑(⌈x⌉ - 1) < x", " ↑⌈x⌉ < x + 1", " x ≤ ↑(⌈x⌉ - 1) + 1", " x ≤ ↑⌈x⌉" ]
import Mathlib.Algebra.Algebra.Equiv import Mathlib.Algebra.Algebra.NonUnitalHom import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Finsupp.Basic import Mathlib.LinearAlgebra.Finsupp #align_import algebra.monoid_algebra.basic from "leanprover-community/mathlib"@...
Mathlib/Algebra/MonoidAlgebra/Basic.lean
174
176
theorem mul_def {f g : MonoidAlgebra k G} : f * g = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂) := by
with_unfolding_all rfl
[ " f * g = sum f fun a₁ b₁ => sum g fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)" ]
[]
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
237
238
theorem SymmetricRel.inter {U V : Set (α × α)} (hU : SymmetricRel U) (hV : SymmetricRel V) : SymmetricRel (U ∩ V) := by
rw [SymmetricRel, preimage_inter, hU.eq, hV.eq]
[ " idRel ⊆ s ↔ ∀ (a : α), (a, a) ∈ s", " (a, b) ∈ Prod.swap '' idRel ↔ (a, b) ∈ idRel", " (a, b) ∈ idRel ○ r ↔ (a, b) ∈ r", " r ○ s ○ t = r ○ (s ○ t)", " (a, b) ∈ r ○ s ○ t ↔ (a, b) ∈ r ○ (s ○ t)", " (∃ z, (∃ z_1, (a, z_1) ∈ r ∧ (z_1, z) ∈ s) ∧ (z, b) ∈ t) ↔ ∃ z, (a, z) ∈ r ∧ ∃ z_1, (z, z_1) ∈ s ∧ (z_1, b)...
[ " idRel ⊆ s ↔ ∀ (a : α), (a, a) ∈ s", " (a, b) ∈ Prod.swap '' idRel ↔ (a, b) ∈ idRel", " (a, b) ∈ idRel ○ r ↔ (a, b) ∈ r", " r ○ s ○ t = r ○ (s ○ t)", " (a, b) ∈ r ○ s ○ t ↔ (a, b) ∈ r ○ (s ○ t)", " (∃ z, (∃ z_1, (a, z_1) ∈ r ∧ (z_1, z) ∈ s) ∧ (z, b) ∈ t) ↔ ∃ z, (a, z) ∈ r ∧ ∃ z_1, (z, z_1) ∈ s ∧ (z_1, b)...
import Mathlib.Algebra.Order.Group.TypeTags import Mathlib.FieldTheory.RatFunc.Degree import Mathlib.RingTheory.DedekindDomain.IntegralClosure import Mathlib.RingTheory.IntegrallyClosed import Mathlib.Topology.Algebra.ValuedField #align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563...
Mathlib/NumberTheory/FunctionField.lean
168
176
theorem InftyValuation.map_mul' (x y : RatFunc Fq) : inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y := by
rw [inftyValuationDef, inftyValuationDef, inftyValuationDef] by_cases hx : x = 0 · rw [hx, zero_mul, if_pos (Eq.refl _), zero_mul] · by_cases hy : y = 0 · rw [hy, mul_zero, if_pos (Eq.refl _), mul_zero] · rw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithZero.coe_mul, WithZero.coe_inj, ...
[ " FunctionField Fq F ↔ FiniteDimensional Fqt F", " ∀ (c : RatFunc Fq) (x : F), e c • x = c • x", " e c • x = c • x", " (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x", " (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c", " (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu...
[ " FunctionField Fq F ↔ FiniteDimensional Fqt F", " ∀ (c : RatFunc Fq) (x : F), e c • x = c • x", " e c • x = c • x", " (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x", " (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c", " (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu...
import Mathlib.Algebra.CharP.Two import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Periodic import Mathlib.Data.ZMod.Basic import Mathlib.Tactic.Monotonicity #align_import data.nat.totient from "leanprover-community/mathlib"@"5cc2dfdd3e92f340411acea4427d701dc7ed26f8" open Finset namespace Nat ...
Mathlib/Data/Nat/Totient.lean
117
126
theorem _root_.ZMod.card_units_eq_totient (n : ℕ) [NeZero n] [Fintype (ZMod n)ˣ] : Fintype.card (ZMod n)ˣ = φ n := calc Fintype.card (ZMod n)ˣ = Fintype.card { x : ZMod n // x.val.Coprime n } := Fintype.card_congr ZMod.unitsEquivCoprime _ = φ n := by
obtain ⟨m, rfl⟩ : ∃ m, n = m + 1 := exists_eq_succ_of_ne_zero NeZero.out simp only [totient, Finset.card_eq_sum_ones, Fintype.card_subtype, Finset.sum_filter, ← Fin.sum_univ_eq_sum_range, @Nat.coprime_comm (m + 1)] rfl
[ " φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}", " ↑m ∈ filter n.Coprime (range n)", " ↑m ∈ {m | m < n ∧ n.Coprime m}", " (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m", " 0 ∈ range n ∧ ¬n.Coprime 0", " φ 0 = 0 ↔ 0 = 0", " (n + 1).gcd (1 % (n + 1)) = 1", " φ (n + 1) = 0 ↔ n + 1 = 0", " 0 < φ n ↔ 0 < n"...
[ " φ n = Nat.card ↑{m | m < n ∧ n.Coprime m}", " ↑m ∈ filter n.Coprime (range n)", " ↑m ∈ {m | m < n ∧ n.Coprime m}", " (fun m => ⟨↑m, ⋯⟩) ((fun m => ⟨↑m, ⋯⟩) m) = m", " 0 ∈ range n ∧ ¬n.Coprime 0", " φ 0 = 0 ↔ 0 = 0", " (n + 1).gcd (1 % (n + 1)) = 1", " φ (n + 1) = 0 ↔ n + 1 = 0", " 0 < φ n ↔ 0 < n"...
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
137
138
theorem of_a_eq_zero (ha : P.a = 0) : P.toPoly = C P.b * X ^ 2 + C P.c * X + C P.d := by
rw [toPoly, ha, C_0, zero_mul, zero_add]
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
[ " C w * (X - C x) * (X - C y) * (X - C z) =\n { a := w, b := w * -(x + y + z), c := w * (x * y + x * z + y * z), d := w * -(x * y * z) }.toPoly", " C w * (X - C x) * (X - C y) * (X - C z) =\n C w * X ^ 3 + C w * -(C x + C y + C z) * X ^ 2 + C w * (C x * C y + C x * C z + C y * C z) * X +\n C w * -(C x ...
import Mathlib.Data.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.LinearRecurrence import Mathlib.Tactic.NormNum.NatFib import Mathlib.Tactic.NormNum.Prime #align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712...
Mathlib/Data/Real/GoldenRatio.lean
140
146
theorem gold_irrational : Irrational φ := by
have := Nat.Prime.irrational_sqrt (show Nat.Prime 5 by norm_num) have := this.rat_add 1 have := this.rat_mul (show (0.5 : ℚ) ≠ 0 by norm_num) convert this norm_num field_simp
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -φ", " -ψ = φ⁻¹", " φ * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * φ = -1", " φ + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - φ = ψ", " 1 - ψ = φ", " φ - ψ = √5", " φ ^ (n + 2) - φ ^ (...
import Mathlib.Algebra.ContinuedFractions.Computation.Approximations import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.Data.Rat.Floor #align_import algebra.continued_fractions.computation.terminates_iff_rat from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b3...
Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
170
171
theorem coe_of_rat_eq : ((IntFractPair.of q).mapFr (↑) : IntFractPair K) = IntFractPair.of v := by
simp [IntFractPair.of, v_eq_q]
[ " mapFr Rat.cast (IntFractPair.of q) = IntFractPair.of v" ]
[]
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
629
634
theorem oangle_left_eq_arctan_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : ∡ p₃ p₁ p₂ = Real.arctan (dist p₃ p₂ / dist p₁ p₂) := by
have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two] rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, angle_eq_arctan_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h) (left_ne_of_oangle_eq_pi_div_two h)]
[ " ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos", " (∡ p₂ p₃ p₁).sign = 1", " ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos", " (∡ p₃ p₁ p₂).sign = 1", " ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₁ p₃).arcsin", " ∡ p₃ p₁ p₂ = ↑(dist p₃ p₂ / dist p₁ p₃).arcsin", " ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₃ p₂).arctan...
[ " ∡ p₂ p₃ p₁ = ↑(dist p₃ p₂ / dist p₁ p₃).arccos", " (∡ p₂ p₃ p₁).sign = 1", " ∡ p₃ p₁ p₂ = ↑(dist p₁ p₂ / dist p₁ p₃).arccos", " (∡ p₃ p₁ p₂).sign = 1", " ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₁ p₃).arcsin", " ∡ p₃ p₁ p₂ = ↑(dist p₃ p₂ / dist p₁ p₃).arcsin", " ∡ p₂ p₃ p₁ = ↑(dist p₁ p₂ / dist p₃ p₂).arctan...
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Order.Group.Instances import Mathlib.GroupTheory.GroupAction.Pi open Function Set structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where protected...
Mathlib/Algebra/AddConstMap/Basic.lean
137
139
theorem map_nsmul_add [AddCommMonoid G] [AddMonoid H] [AddConstMapClass F G H a b] (f : F) (n : ℕ) (x : G) : f (n • a + x) = f x + n • b := by
rw [add_comm, map_add_nsmul]
[ " f (x + n • a) = f x + n • b", " f (x + ↑n) = f x + n • b", " f (x + ↑n) = f x + ↑n", " f a = f 0 + b", " f (n • a) = f 0 + n • b", " f ↑n = f 0 + n • b", " f ↑n = f 0 + ↑n", " f (a + x) = f x + b", " f (n • a + x) = f x + n • b" ]
[ " f (x + n • a) = f x + n • b", " f (x + ↑n) = f x + n • b", " f (x + ↑n) = f x + ↑n", " f a = f 0 + b", " f (n • a) = f 0 + n • b", " f ↑n = f 0 + n • b", " f ↑n = f 0 + ↑n", " f (a + x) = f x + b" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex #align_import analysis.special_functions.trigonometric.complex_deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section namespace Complex open Set Filter open scoped Real theorem hasStrictDerivAt_t...
Mathlib/Analysis/SpecialFunctions/Trigonometric/ComplexDeriv.lean
37
44
theorem tendsto_abs_tan_of_cos_eq_zero {x : ℂ} (hx : cos x = 0) : Tendsto (fun x => abs (tan x)) (𝓝[≠] x) atTop := by
simp only [tan_eq_sin_div_cos, ← norm_eq_abs, norm_div] have A : sin x ≠ 0 := fun h => by simpa [*, sq] using sin_sq_add_cos_sq x have B : Tendsto cos (𝓝[≠] x) (𝓝[≠] 0) := hx ▸ (hasDerivAt_cos x).tendsto_punctured_nhds (neg_ne_zero.2 A) exact continuous_sin.continuousWithinAt.norm.mul_atTop (norm_pos_iff...
[ " HasStrictDerivAt tan (1 / x.cos ^ 2) x", " 1 / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2", " (x.sin ^ 2 + x.cos ^ 2) / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2", " Tendsto (fun x => abs x.tan) (𝓝[≠] x) atTop", " Tendsto (fun x => ‖x.sin‖ / ‖x.cos‖) (𝓝[≠] x) atTop", " Fal...
[ " HasStrictDerivAt tan (1 / x.cos ^ 2) x", " 1 / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2", " (x.sin ^ 2 + x.cos ^ 2) / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2" ]
import Mathlib.Data.Set.Subsingleton import Mathlib.Order.WithBot #align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" universe u v open Function Set namespace Set variable {α β γ : Type*} {ι ι' : Sort*} section Image variable {f : α → β} {s t : Set...
Mathlib/Data/Set/Image.lean
249
251
theorem image_congr {f g : α → β} {s : Set α} (h : ∀ a ∈ s, f a = g a) : f '' s = g '' s := by
ext x exact exists_congr fun a ↦ and_congr_right fun ha ↦ by rw [h a ha]
[ " (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)", " (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)", " f '' s = g '' s", " x ∈ f '' s ↔ x ∈ g '' s", " f a = x ↔ g a = x" ]
[ " (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)", " (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)" ]
import Mathlib.Topology.Algebra.InfiniteSum.Defs import Mathlib.Data.Fintype.BigOperators import Mathlib.Topology.Algebra.Monoid noncomputable section open Filter Finset Function open scoped Topology variable {α β γ δ : Type*} section HasProd variable [CommMonoid α] [TopologicalSpace α] variable {f g : β → α} ...
Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
35
35
theorem hasProd_one : HasProd (fun _ ↦ 1 : β → α) 1 := by
simp [HasProd, tendsto_const_nhds]
[ " HasProd (fun x => 1) 1" ]
[]
import Mathlib.Data.DFinsupp.Lex import Mathlib.Order.GameAdd import Mathlib.Order.Antisymmetrization import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Tactic.AdaptationNote #align_import data.dfinsupp.well_founded from "leanprover-community/mathlib"@"e9b8651eb1ad354f4de6be35a38ef31efcd2cfaa" variable {ι : Ty...
Mathlib/Data/DFinsupp/WellFounded.lean
134
153
theorem Lex.acc_single [DecidableEq ι] {i : ι} (hi : Acc (rᶜ ⊓ (· ≠ ·)) i) : ∀ a, Acc (DFinsupp.Lex r s) (single i a) := by
induction' hi with i _ ih refine fun a => WellFounded.induction (hs i) (C := fun x ↦ Acc (DFinsupp.Lex r s) (single i x)) a fun a ha ↦ ?_ refine Acc.intro _ fun x ↦ ?_ rintro ⟨k, hr, hs⟩ rw [single_apply] at hs split_ifs at hs with hik swap · exact (hbot hs).elim subst hik classical refine ...
[ " Fibration (InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd) (DFinsupp.Lex r s) fun x =>\n x.2.1.piecewise x.2.2 x.1", " ∃ a',\n InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n (fun x => x.2.1.piecewise x.2.2 x.1) a' = x", " (x₁.piecewise x {j | r j i}) j...
[ " Fibration (InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd) (DFinsupp.Lex r s) fun x =>\n x.2.1.piecewise x.2.2 x.1", " ∃ a',\n InvImage (GameAdd (DFinsupp.Lex r s) (DFinsupp.Lex r s)) snd a' (p, x₁, x₂) ∧\n (fun x => x.2.1.piecewise x.2.2 x.1) a' = x", " (x₁.piecewise x {j | r j i}) j...
import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Data.List.Infix import Mathlib.Data.List.MinMax import Mathlib.Data.List.EditDistance.Defs set_option autoImplicit true variable {C : Levenshtein.Cost α β δ} [CanonicallyLinearOrderedAddCommMonoid δ] theorem suffixLevenshtein_minimum_le_levenshtein...
Mathlib/Data/List/EditDistance/Bounds.lean
75
79
theorem le_suffixLevenshtein_append_minimum (xs : List α) (ys₁ ys₂) : (suffixLevenshtein C xs ys₂).1.minimum ≤ (suffixLevenshtein C xs (ys₁ ++ ys₂)).1.minimum := by
induction ys₁ with | nil => exact le_refl _ | cons y ys₁ ih => exact ih.trans (le_suffixLevenshtein_cons_minimum _ _ _)
[ " (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))", " (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))", " levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys", " 0 ≤ C.insert y", " (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :...
[ " (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))", " (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))", " levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys", " 0 ≤ C.insert y", " (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :...
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Projection import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.RingTheory.I...
Mathlib/LinearAlgebra/Dual.lean
329
330
theorem toDual_apply_left (m : M) (i : ι) : b.toDual m (b i) = b.repr m i := by
rw [← b.toDual_total_left, b.total_repr]
[ " (b.toDual (b i)) (b j) = if i = j then 1 else 0", " (if j = i then 1 else 0) = if i = j then 1 else 0", " (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i", " ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i", " (if i ∈ f.support then f i else 0) = f i", " f i = f i", " 0 = f i", " (b.toDual (...
[ " (b.toDual (b i)) (b j) = if i = j then 1 else 0", " (if j = i then 1 else 0) = if i = j then 1 else 0", " (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i", " ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i", " (if i ∈ f.support then f i else 0) = f i", " f i = f i", " 0 = f i", " (b.toDual (...
import Mathlib.LinearAlgebra.Ray import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.ray from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Real variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSp...
Mathlib/Analysis/NormedSpace/Ray.lean
49
52
theorem norm_smul_eq (h : SameRay ℝ x y) : ‖x‖ • y = ‖y‖ • x := by
rcases h.exists_eq_smul with ⟨u, a, b, ha, hb, -, rfl, rfl⟩ simp only [norm_smul_of_nonneg, *, mul_smul] rw [smul_comm, smul_comm b, smul_comm a b u]
[ " ‖x + y‖ = ‖x‖ + ‖y‖", " ‖a • u + b • u‖ = ‖a • u‖ + ‖b • u‖", " ‖x - y‖ = |‖x‖ - ‖y‖|", " ‖a • u - b • u‖ = |‖a • u‖ - ‖b • u‖|", " ‖b • u - a • u‖ = |‖b • u‖ - ‖a • u‖|", " ‖x‖ • y = ‖y‖ • x", " ‖a • u‖ • b • u = ‖b • u‖ • a • u", " a • ‖u‖ • b • u = b • ‖u‖ • a • u" ]
[ " ‖x + y‖ = ‖x‖ + ‖y‖", " ‖a • u + b • u‖ = ‖a • u‖ + ‖b • u‖", " ‖x - y‖ = |‖x‖ - ‖y‖|", " ‖a • u - b • u‖ = |‖a • u‖ - ‖b • u‖|", " ‖b • u - a • u‖ = |‖b • u‖ - ‖a • u‖|" ]
import Mathlib.Order.Interval.Multiset #align_import data.nat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" -- TODO -- assert_not_exists Ring open Finset Nat variable (a b c : ℕ) namespace Nat instance instLocallyFiniteOrder : LocallyFiniteOrder ℕ where finsetIcc a b...
Mathlib/Order/Interval/Finset/Nat.lean
126
127
theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a := by
rw [Fintype.card_ofFinset, card_Ioc]
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x ≤ b", " a ≤ x ∧ x < a + (b + 1 - a) ↔ a ≤ x ∧ x ≤ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x < b", " a ≤ x ∧ x < a + (b - a) ↔ a ≤ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x ≤ b", " a ≤ x ∧ x < a + (b + 1 - a) ↔ a ≤ x ∧ x ≤ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := ⋯ }) a b ↔ a ≤ x ∧ x < b", " a ≤ x ∧ x < a + (b - a) ↔ a ≤ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ v₂ u u₁ u₂ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
112
115
theorem Path.cast_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (p : Path u v) : HEq (p.cast hu hv) p := by
rw [Path.cast_eq_cast] exact _root_.cast_heq _ _
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'", " e' ...
[ " (u ⟶ v) = (u' ⟶ v')", " cast hu hv e = _root_.cast ⋯ e", " cast ⋯ ⋯ e = _root_.cast ⋯ e", " cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e", " cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e", " HEq (cast hu hv e) e", " HEq (cast ⋯ ⋯ e) e", " cast hu hv e = e' ↔ HEq e e'", " _root_.cast ⋯ e = e' ↔ HEq e e'", " e' ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic #align_import analysis.calculus.fderiv_...
Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
473
483
theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by
rcases hx with ⟨r', rr', hr'⟩ rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset] obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1 have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩ refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩ have...
[ " A f L r ε ∈ 𝓝[>] x", " ∃ u ∈ Ioi x, Ioo x u ⊆ A f L r ε", " x + r' - s ∈ Ioi x", " x < x + r' - s", " ∀ y ∈ Icc x' (x' + s), ∀ z ∈ Icc x' (x' + s), ‖f z - f y - (z - y) • L‖ ≤ ε * r", " Icc x' (x' + s) ⊆ Icc x (x + r')", " x' + s ≤ x + r'", " ‖f z - f y - (z - y) • L‖ ≤ ε * r" ]
[]
import Mathlib.Logic.Pairwise import Mathlib.Logic.Relation import Mathlib.Data.List.Basic #align_import data.list.pairwise from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open Nat Function namespace List variable {α β : Type*} {R S T : α → α → Prop} {a : α} {l : List α} mk_iff_o...
Mathlib/Data/List/Pairwise.lean
124
133
theorem pairwise_pmap {p : β → Prop} {f : ∀ b, p b → α} {l : List β} (h : ∀ x ∈ l, p x) : Pairwise R (l.pmap f h) ↔ Pairwise (fun b₁ b₂ => ∀ (h₁ : p b₁) (h₂ : p b₂), R (f b₁ h₁) (f b₂ h₂)) l := by
induction' l with a l ihl · simp obtain ⟨_, hl⟩ : p a ∧ ∀ b, b ∈ l → p b := by simpa using h simp only [ihl hl, pairwise_cons, exists₂_imp, pmap, and_congr_left_iff, mem_pmap] refine fun _ => ⟨fun H b hb _ hpb => H _ _ hb rfl, ?_⟩ rintro H _ b hb rfl exact H b hb _ _
[ " Pairwise (flip fun x => R x) l", " ∀ ⦃a : α⦄, a ∈ l → ∀ ⦃b : α⦄, b ∈ l → a ≠ b → R a b", " Symmetric fun x y => x ≠ y → R x y", " ∀ (x : α), x ∈ l → x ≠ x → R x x", " Pairwise (fun x y => x ≠ y → R x y) l", " R a b", " Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []", " Pairwise R (ma...
[ " Pairwise (flip fun x => R x) l", " ∀ ⦃a : α⦄, a ∈ l → ∀ ⦃b : α⦄, b ∈ l → a ≠ b → R a b", " Symmetric fun x y => x ≠ y → R x y", " ∀ (x : α), x ∈ l → x ≠ x → R x x", " Pairwise (fun x y => x ≠ y → R x y) l", " R a b", " Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []", " Pairwise R (ma...
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
166
166
theorem one_im : im (1 : K) = 0 := by
rw [← ofReal_one, ofReal_im]
[ " r • x = ↑r • x", " re 1 = 1", " im 1 = 0" ]
[ " r • x = ↑r • x", " re 1 = 1" ]
import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.centering from "leanprover-community/mathlib"@"bea6c853b6edbd15e9d0941825abd04d77933ed0" open TopologicalSpace Filter open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory variable {Ω E : Type*} {m0 : ...
Mathlib/Probability/Martingale/Centering.lean
93
131
theorem martingale_martingalePart (hf : Adapted ℱ f) (hf_int : ∀ n, Integrable (f n) μ) [SigmaFiniteFiltration μ ℱ] : Martingale (martingalePart f ℱ μ) ℱ μ := by
refine ⟨adapted_martingalePart hf, fun i j hij => ?_⟩ -- ⊢ μ[martingalePart f ℱ μ j | ℱ i] =ᵐ[μ] martingalePart f ℱ μ i have h_eq_sum : μ[martingalePart f ℱ μ j|ℱ i] =ᵐ[μ] f 0 + ∑ k ∈ Finset.range j, (μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i]) := by rw [martingalePart_eq_sum] refine (c...
[ " predictablePart f ℱ μ 0 = 0", " martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " (fun n => f n - ∑ i ∈ Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " f n - ∑ i ∈ F...
[ " predictablePart f ℱ μ 0 = 0", " martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " (fun n => f n - ∑ i ∈ Finset.range n, μ[f (i + 1) - f i|↑ℱ i]) = fun n =>\n f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])", " f n - ∑ i ∈ F...
import Batteries.Data.List.Lemmas import Batteries.Data.Array.Basic import Batteries.Tactic.SeqFocus import Batteries.Util.ProofWanted namespace Array theorem forIn_eq_data_forIn [Monad m] (as : Array α) (b : β) (f : α → β → m (ForInStep β)) : forIn as b f = forIn as.data b f := by let rec loop : ∀ {i h b ...
.lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
33
73
theorem zipWith_eq_zipWith_data (f : α → β → γ) (as : Array α) (bs : Array β) : (as.zipWith bs f).data = as.data.zipWith f bs.data := by
let rec loop : ∀ (i : Nat) cs, i ≤ as.size → i ≤ bs.size → (zipWithAux f as bs i cs).data = cs.data ++ (as.data.drop i).zipWith f (bs.data.drop i) := by intro i cs hia hib unfold zipWithAux by_cases h : i = as.size ∨ i = bs.size case pos => have : ¬(i < as.size) ∨ ¬(i < bs.size) := by ...
[ " forIn as b f = forIn as.data b f", " forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f", " forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f", " forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f", " (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi...
[ " forIn as b f = forIn as.data b f", " forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f", " forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f", " forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f", " (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi...
import Mathlib.Data.Vector.Basic set_option autoImplicit true namespace Vector def snoc : Vector α n → α → Vector α (n+1) := fun xs x => append xs (x ::ᵥ Vector.nil) section Simp variable (xs : Vector α n) @[simp] theorem snoc_cons : (x ::ᵥ xs).snoc y = x ::ᵥ (xs.snoc y) := rfl @[simp] theorem snoc_nil...
Mathlib/Data/Vector/Snoc.lean
54
62
theorem replicate_succ_to_snoc (val : α) : replicate (n+1) val = (replicate n val).snoc val := by
clear xs induction n with | zero => rfl | succ n ih => rw [replicate_succ] conv => rhs; rw [replicate_succ] rw [snoc_cons, ih]
[ " (x ::ᵥ xs).reverse = xs.reverse.snoc x", " (x ::ᵥ ⟨val✝, property✝⟩).reverse = (reverse ⟨val✝, property✝⟩).snoc x", " ⟨val✝.reverse ++ [x], ⋯⟩ = append ⟨val✝.reverse, ⋯⟩ ⟨[x], ⋯⟩", " (xs.snoc x).reverse = x ::ᵥ xs.reverse", " (snoc ⟨val✝, property✝⟩ x).reverse = x ::ᵥ reverse ⟨val✝, property✝⟩", " ⟨(app...
[ " (x ::ᵥ xs).reverse = xs.reverse.snoc x", " (x ::ᵥ ⟨val✝, property✝⟩).reverse = (reverse ⟨val✝, property✝⟩).snoc x", " ⟨val✝.reverse ++ [x], ⋯⟩ = append ⟨val✝.reverse, ⋯⟩ ⟨[x], ⋯⟩", " (xs.snoc x).reverse = x ::ᵥ xs.reverse", " (snoc ⟨val✝, property✝⟩ x).reverse = x ::ᵥ reverse ⟨val✝, property✝⟩", " ⟨(app...
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.Geometry.RingedSpace.OpenImmersion import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers #align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprov...
Mathlib/Geometry/RingedSpace/LocallyRingedSpace/HasColimits.lean
185
211
theorem imageBasicOpen_image_preimage : (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) = (imageBasicOpen f g U s).1 := by
fapply Types.coequalizer_preimage_image_eq_of_preimage_eq -- Porting note: Type of `f.1.base` and `g.1.base` needs to be explicit (f.1.base : X.carrier.1 ⟶ Y.carrier.1) (g.1.base : X.carrier.1 ⟶ Y.carrier.1) · ext simp_rw [types_comp_apply, ← TopCat.comp_app, ← PresheafedSpace.comp_base] congr 2 ...
[ " IsLocalRingHom ((coequalizer.π f.val g.val).c.app { unop := U })", " IsLocalRingHom\n ((coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ...
[ " IsLocalRingHom ((coequalizer.π f.val g.val).c.app { unop := U })", " IsLocalRingHom\n ((coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ...
import Mathlib.MeasureTheory.Measure.MeasureSpace #align_import measure_theory.covering.vitali_family from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Metric Set Filter TopologicalSpace MeasureTheory.Measure open Filter MeasureTheory Topology variable {α : Type*}...
Mathlib/MeasureTheory/Covering/VitaliFamily.lean
226
228
theorem _root_.Filter.HasBasis.vitaliFamily {ι : Sort*} {p : ι → Prop} {s : ι → Set α} {x : α} (h : (𝓝 x).HasBasis p s) : (v.filterAt x).HasBasis p (fun i ↦ {t ∈ v.setsAt x | t ⊆ s i}) := by
simpa only [← Set.setOf_inter_eq_sep] using h.smallSets.inf_principal _
[ " MeasurableSet a", " (interior a).Nonempty", " ∀ (x : α),\n ∀ ε > 0,\n ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ}) x,\n s ⊆ closedBall x ε", " ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ})...
[ " MeasurableSet a", " (interior a).Nonempty", " ∀ (x : α),\n ∀ ε > 0,\n ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ}) x,\n s ⊆ closedBall x ε", " ∃ s ∈ (fun x => v.setsAt x ∪ {a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ})...
import Mathlib.Topology.Category.TopCat.EpiMono import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.ConcreteCategory import Mathlib.Data.Set.Subsingleton import Mathlib.Tactic.CategoryTheory.Elementwise #align_import topology.c...
Mathlib/Topology/Category/TopCat/Limits/Products.lean
127
128
theorem sigmaIsoSigma_hom_ι {ι : Type v} (α : ι → TopCat.{max v u}) (i : ι) : Sigma.ι α i ≫ (sigmaIsoSigma α).hom = sigmaι α i := by
simp [sigmaIsoSigma]
[ " ∀ (s : Cone (Discrete.functor α)) (m : s.pt ⟶ (piFan α).pt),\n (∀ (j : Discrete ι), m ≫ (piFan α).π.app j = s.π.app j) →\n m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) s", " m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) S",...
[ " ∀ (s : Cone (Discrete.functor α)) (m : s.pt ⟶ (piFan α).pt),\n (∀ (j : Discrete ι), m ≫ (piFan α).π.app j = s.π.app j) →\n m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) s", " m = (fun S => { toFun := fun s i => (S.π.app { as := i }) s, continuous_toFun := ⋯ }) S",...
import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.add_torsor from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P, VSub G P where [nonempty : Nonempty P] vsub_vadd' : ∀ p₁ p₂ : P, (p₁ ...
Mathlib/Algebra/AddTorsor.lean
172
173
theorem vsub_sub_vsub_cancel_right (p₁ p₂ p₃ : P) : p₁ -ᵥ p₃ - (p₂ -ᵥ p₃) = p₁ -ᵥ p₂ := by
rw [← vsub_vadd_eq_vsub_sub, vsub_vadd]
[ " g₁ = g₂", " g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)", " g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂", " p -ᵥ p = 0", " p₁ = p₂", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃", " -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₁) +ᵥ p₁ = 0 +ᵥ p₁", " g +ᵥ p -ᵥ q = g - (q...
[ " g₁ = g₂", " g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)", " g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂", " p -ᵥ p = 0", " p₁ = p₂", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃", " -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁", " p₁ -ᵥ p₂ + (p₂ -ᵥ p₁) +ᵥ p₁ = 0 +ᵥ p₁", " g +ᵥ p -ᵥ q = g - (q...
import Mathlib.Data.Matrix.Basic import Mathlib.LinearAlgebra.Matrix.Trace #align_import data.matrix.basis from "leanprover-community/mathlib"@"320df450e9abeb5fc6417971e75acb6ae8bc3794" variable {l m n : Type*} variable {R α : Type*} namespace Matrix open Matrix variable [DecidableEq l] [DecidableEq m] [Decida...
Mathlib/Data/Matrix/Basis.lean
133
135
theorem apply_of_ne (h : ¬(i = i' ∧ j = j')) : stdBasisMatrix i j c i' j' = 0 := by
simp only [stdBasisMatrix, and_imp, ite_eq_right_iff] tauto
[ " r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0", " stdBasisMatrix i j 0 = 0", " (fun i' j'...
[ " r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0", " (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0", " stdBasisMatrix i j 0 = 0", " (fun i' j'...
import Mathlib.Data.List.Infix #align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" -- Make sure we don't import algebra assert_not_exists Monoid variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ) namespace List def rdrop : List α := l.take (l.leng...
Mathlib/Data/List/DropRight.lean
112
113
theorem rdropWhile_concat_pos (x : α) (h : p x) : rdropWhile p (l ++ [x]) = rdropWhile p l := by
rw [rdropWhile_concat, if_pos h]
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
[ " [].rdrop n = []", " l.rdrop 0 = l", " l.rdrop n = (drop n l.reverse).reverse", " take (l.length - n) l = (drop n l.reverse).reverse", " take ([].length - n) [] = (drop n [].reverse).reverse", " take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse", " take ((xs ++ [x]).lengt...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology.Instances.Sign #align_import analysis.special_functions.trigonometric.angle from "leanprover-community/mathlib"@"213b0cff7bc5ab6696ee07cceec80829...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
119
125
theorem angle_eq_iff_two_pi_dvd_sub {ψ θ : ℝ} : (θ : Angle) = ψ ↔ ∃ k : ℤ, θ - ψ = 2 * π * k := by
simp only [QuotientAddGroup.eq, AddSubgroup.zmultiples_eq_closure, AddSubgroup.mem_closure_singleton, zsmul_eq_mul', (sub_eq_neg_add _ _).symm, eq_comm] -- Porting note: added `rw`, `simp [Angle.coe, QuotientAddGroup.eq]` doesn't fire otherwise rw [Angle.coe, Angle.coe, QuotientAddGroup.eq] simp only [AddS...
[ " 0 < 2 * π", " ↑(↑n * x) = n • ↑x", " ↑θ = ↑ψ ↔ ∃ k, θ - ψ = 2 * π * ↑k", " ↑ψ = ↑θ ↔ ∃ k, θ - ψ = 2 * π * ↑k", " -ψ + θ ∈ AddSubgroup.zmultiples (2 * π) ↔ ∃ k, θ - ψ = 2 * π * ↑k" ]
[ " 0 < 2 * π", " ↑(↑n * x) = n • ↑x" ]
import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.continuous_affine_map from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901fe9326d83" structure ContinuousAffineMap (R : T...
Mathlib/Topology/Algebra/ContinuousAffineMap.lean
108
111
theorem to_continuousMap_injective {f g : P →ᴬ[R] Q} (h : (f : C(P, Q)) = (g : C(P, Q))) : f = g := by
ext a exact ContinuousMap.congr_fun h a
[ " f = g", " { toAffineMap := toAffineMap✝, cont := cont✝ } = g", " { toAffineMap := toAffineMap✝¹, cont := cont✝¹ } = { toAffineMap := toAffineMap✝, cont := cont✝ }", " f a = g a" ]
[ " f = g", " { toAffineMap := toAffineMap✝, cont := cont✝ } = g", " { toAffineMap := toAffineMap✝¹, cont := cont✝¹ } = { toAffineMap := toAffineMap✝, cont := cont✝ }" ]
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classi...
Mathlib/Topology/MetricSpace/Contracting.lean
79
81
theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞) (hy : IsFixedPt f y) : edist x y ≤ edist x (f x) / (1 - K) := by
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h
[ " 0 < 1 - ↑K", " 1 - ↑K ≠ ⊤", " ¬1 - ↑K = ⊤", " edist x (f x) + edist (f x) (f y) + edist (f y) y = edist x (f x) + edist y (f y) + edist (f x) (f y)", " edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)", " edist x y ≤ edist x (f x) / (1 - ↑K)" ]
[ " 0 < 1 - ↑K", " 1 - ↑K ≠ ⊤", " ¬1 - ↑K = ⊤", " edist x (f x) + edist (f x) (f y) + edist (f y) y = edist x (f x) + edist y (f y) + edist (f x) (f y)", " edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)" ]