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.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace Tens...
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
126
135
theorem gradedComm_tmul_of_zero (a : ⨁ i, π’œ i) (b : ℬ 0) : gradedComm R π’œ ℬ (a βŠ—β‚œ lof R _ ℬ 0 b) = lof R _ ℬ _ b βŠ—β‚œ a := by
suffices (gradedComm R π’œ ℬ).toLinearMap βˆ˜β‚— (TensorProduct.mk R (⨁ i, π’œ i) (⨁ i, ℬ i)).flip (lof R _ ℬ 0 b) = TensorProduct.mk R _ _ (lof R _ ℬ 0 b) from DFunLike.congr_fun this a ext i a dsimp rw [gradedComm_of_tmul_of, zero_mul, uzpow_zero, one_smul]
[ " (⨁ (i : ΞΉ Γ— ΞΉ), π’œ i.1 βŠ—[R] ℬ i.2) β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " π’œ i.1 βŠ—[R] ℬ i.2 β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " (gradedCommAux R π’œ ℬ) ((lof R (ΞΉ Γ— ΞΉ) (fun i => π’œ i.1 βŠ—[R] ℬ i.2) (i, j)) (a βŠ—β‚œ[R] b)) =\n (-1) ^ (j * i) β€’ (lof R (ΞΉ Γ— ΞΉ) (fun i => ℬ i.1 βŠ—[R] π’œ i.2) (j, i)) (b βŠ—β‚œ[...
[ " (⨁ (i : ΞΉ Γ— ΞΉ), π’œ i.1 βŠ—[R] ℬ i.2) β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " π’œ i.1 βŠ—[R] ℬ i.2 β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " (gradedCommAux R π’œ ℬ) ((lof R (ΞΉ Γ— ΞΉ) (fun i => π’œ i.1 βŠ—[R] ℬ i.2) (i, j)) (a βŠ—β‚œ[R] b)) =\n (-1) ^ (j * i) β€’ (lof R (ΞΉ Γ— ΞΉ) (fun i => ℬ i.1 βŠ—[R] π’œ i.2) (j, i)) (b βŠ—β‚œ[...
import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Set open Pointwise variable ...
Mathlib/Algebra/Order/Pointwise.lean
225
236
theorem smul_Ioc : r β€’ Ioc a b = Ioc (r β€’ a) (r β€’ b) := by
ext x simp only [mem_smul_set, smul_eq_mul, mem_Ioc] constructor · rintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩ constructor · exact (mul_lt_mul_left hr).mpr a_h_left_left · exact (mul_le_mul_left hr).mpr a_h_left_right · rintro ⟨a_left, a_right⟩ use x / r refine ⟨⟨(lt_div_iff' hr).mpr...
[ " r β€’ Ioo a b = Ioo (r β€’ a) (r β€’ b)", " x ∈ r β€’ Ioo a b ↔ x ∈ Ioo (r β€’ a) (r β€’ b)", " (βˆƒ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (βˆƒ y, (a < y ∧ y < b) ∧ r * y = x) β†’ r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
[ " r β€’ Ioo a b = Ioo (r β€’ a) (r β€’ b)", " x ∈ r β€’ Ioo a b ↔ x ∈ Ioo (r β€’ a) (r β€’ b)", " (βˆƒ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b", " (βˆƒ y, (a < y ∧ y < b) ∧ r * y = x) β†’ r * a < x ∧ x < r * b", " r * a✝ < r * a ∧ r * a < r * b", " r * a✝ < r * a", " r * a < r * b", " r * a < x ∧ x < r ...
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.star from "leanprover-community/mathlib"@"4d66277cfec381260ba05c68f9ae6ce2a118031d" variable {R : Type*} [CommRing R] variable {M : Type*} [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} namespac...
Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
50
50
theorem star_ΞΉ (m : M) : star (ΞΉ Q m) = -ΞΉ Q m := by
rw [star_def, involute_ΞΉ, map_neg, reverse_ΞΉ]
[ " star (star x) = x", " star (x * y) = star y * star x", " star (x + y) = star x + star y", " star ((ΞΉ Q) m) = -(ΞΉ Q) m" ]
[ " star (star x) = x", " star (x * y) = star y * star x", " star (x + y) = star x + star y" ]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Analysis.InnerProductSpace.l2Space import Mathlib.MeasureTheory.Function.ContinuousMapDense import Mathlib.MeasureTheory.Function.L2Space import Mathlib.MeasureTheory.Group.Integral import Mathlib.M...
Mathlib/Analysis/Fourier/AddCircle.lean
117
123
theorem fourier_coe_apply {n : β„€} {x : ℝ} : fourier n (x : AddCircle T) = Complex.exp (2 * Ο€ * Complex.I * n * x / T) := by
rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, toCircle, Function.Periodic.lift_coe, expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul, Complex.ofReal_mul, Complex.ofReal_intCast] norm_num congr 1; ring
[ " (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑...
[]
import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Complex #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" noncomputable secti...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
60
61
theorem sin_ne_zero_iff {ΞΈ : β„‚} : sin ΞΈ β‰  0 ↔ βˆ€ k : β„€, ΞΈ β‰  k * Ο€ := by
rw [← not_exists, not_iff_not, sin_eq_zero_iff]
[ " ΞΈ.cos = 0 ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 ↔ cexp (2 * ΞΈ * I) = -1", " cexp (ΞΈ * I - -ΞΈ * I) = -1 ↔ cexp (2 * ΞΈ * I) = -1", " (βˆƒ n, 2 * I * ΞΈ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * ΞΈ = ↑π * I + ↑x * (2 * ↑π * I) ↔ ΞΈ = (2 * ↑x +...
[ " ΞΈ.cos = 0 ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " (cexp (ΞΈ * I) + cexp (-ΞΈ * I)) / 2 = 0 ↔ cexp (2 * ΞΈ * I) = -1", " cexp (ΞΈ * I - -ΞΈ * I) = -1 ↔ cexp (2 * ΞΈ * I) = -1", " (βˆƒ n, 2 * I * ΞΈ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ βˆƒ k, ΞΈ = (2 * ↑k + 1) * ↑π / 2", " 2 * I * ΞΈ = ↑π * I + ↑x * (2 * ↑π * I) ↔ ΞΈ = (2 * ↑x +...
import Mathlib.Algebra.IsPrimePow import Mathlib.Algebra.Squarefree.Basic import Mathlib.Order.Hom.Bounded import Mathlib.Algebra.GCDMonoid.Basic #align_import ring_theory.chain_of_divisors from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" variable {M : Type*} [CancelCommMonoidWithZero...
Mathlib/RingTheory/ChainOfDivisors.lean
99
108
theorem second_of_chain_is_irreducible {q : Associates M} {n : β„•} (hn : n β‰  0) {c : Fin (n + 1) β†’ Associates M} (h₁ : StrictMono c) (hβ‚‚ : βˆ€ {r}, r ≀ q ↔ βˆƒ i, r = c i) (hq : q β‰  0) : Irreducible (c 1) := by
cases' n with n; Β· contradiction refine (Associates.isAtom_iff (ne_zero_of_dvd_ne_zero hq (hβ‚‚.2 ⟨1, rfl⟩))).mp ⟨?_, fun b hb => ?_⟩ Β· exact ne_bot_of_gt (h₁ (show (0 : Fin (n + 2)) < 1 from Fin.one_pos)) obtain ⟨⟨i, hi⟩, rfl⟩ := hβ‚‚.1 (hb.le.trans (hβ‚‚.2 ⟨1, rfl⟩)) cases i Β· exact (Associates.isUnit_iff_eq_o...
[ " Β¬IsUnit p", " IsUnit b", " Associated (p * b) p", "M : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p β‰  0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p", " p β‰  βŠ₯", " b = βŠ₯", " b = p * ↑ha.unit⁻¹", " βˆƒ c, c 1 = p ∧ StrictMono c ∧ βˆ€ {r : Associates M}, r ≀ ...
[ " Β¬IsUnit p", " IsUnit b", " Associated (p * b) p", "M : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p β‰  0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p", " p β‰  βŠ₯", " b = βŠ₯", " b = p * ↑ha.unit⁻¹", " βˆƒ c, c 1 = p ∧ StrictMono c ∧ βˆ€ {r : Associates M}, r ≀ ...
import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" universe u v noncompu...
Mathlib/FieldTheory/RatFunc/Basic.lean
131
132
theorem ofFractionRing_one : (ofFractionRing 1 : RatFunc K) = 1 := by
simp only [One.one, OfNat.ofNat, RatFunc.one]
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }", " { toFractionRing := -p } = -{ toFractionRing := p }", " { toFractionRing := 1 } = 1" ]
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }", " { toFractionRing := -p } = -{ toFractionRing := p }" ]
import Mathlib.Algebra.Group.Commutator import Mathlib.Algebra.Group.Subgroup.Finite import Mathlib.Data.Bracket import Mathlib.GroupTheory.Subgroup.Centralizer import Mathlib.Tactic.Group #align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef" variable...
Mathlib/GroupTheory/Commutator.lean
65
66
theorem map_commutatorElement : (f ⁅g₁, g₂⁆ : G') = ⁅f g₁, f g₂⁆ := by
simp_rw [commutatorElement_def, map_mul f, map_inv f]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * gβ‚‚ = gβ‚‚ * g₁", " ⁅g₁, g₂⁆⁻¹ = ⁅gβ‚‚, g₁⁆", " f ⁅g₁, g₂⁆ = ⁅f g₁, f g₂⁆" ]
[ " ⁅g₁, g₂⁆ = 1 ↔ g₁ * gβ‚‚ = gβ‚‚ * g₁", " ⁅g₁, g₂⁆⁻¹ = ⁅gβ‚‚, g₁⁆" ]
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Field.Rat import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Field.Rat import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.lym from "leanprover-co...
Mathlib/Combinatorics/SetFamily/LYM.lean
65
87
theorem card_mul_le_card_shadow_mul (hπ’œ : (π’œ : Set (Finset Ξ±)).Sized r) : π’œ.card * r ≀ (βˆ‚ π’œ).card * (Fintype.card Ξ± - r + 1) := by
let i : DecidableRel ((Β· βŠ† Β·) : Finset Ξ± β†’ Finset Ξ± β†’ Prop) := fun _ _ => Classical.dec _ refine card_mul_le_card_mul' (Β· βŠ† Β·) (fun s hs => ?_) (fun s hs => ?_) Β· rw [← hπ’œ hs, ← card_image_of_injOn s.erase_injOn] refine card_le_card ?_ simp_rw [image_subset_iff, mem_bipartiteBelow] exact fun a ha =>...
[ " π’œ.card * r ≀ (βˆ‚ π’œ).card * (Fintype.card Ξ± - r + 1)", " r ≀ (bipartiteBelow (fun x x_1 => x βŠ† x_1) (βˆ‚ π’œ) s).card", " (image s.erase s).card ≀ (bipartiteBelow (fun x x_1 => x βŠ† x_1) (βˆ‚ π’œ) s).card", " image s.erase s βŠ† bipartiteBelow (fun x x_1 => x βŠ† x_1) (βˆ‚ π’œ) s", " βˆ€ x ∈ s, s.erase x ∈ βˆ‚ π’œ ∧ s.erase...
[]
import Mathlib.Data.Multiset.Sum import Mathlib.Data.Finset.Card #align_import data.finset.sum from "leanprover-community/mathlib"@"48a058d7e39a80ed56858505719a0b2197900999" open Function Multiset Sum namespace Finset variable {α β : Type*} (s : Finset α) (t : Finset β) def disjSum : Finset (Sum α β) := ⟨s....
Mathlib/Data/Finset/Sum.lean
54
56
theorem disjoint_map_inl_map_inr : Disjoint (s.map Embedding.inl) (t.map Embedding.inr) := by
simp_rw [disjoint_left, mem_map] rintro x ⟨a, _, rfl⟩ ⟨b, _, ⟨⟩⟩
[ " _root_.Disjoint (map Embedding.inl s) (map Embedding.inr t)", " βˆ€ ⦃a : Ξ± βŠ• β⦄, (βˆƒ a_1 ∈ s, Embedding.inl a_1 = a) β†’ Β¬βˆƒ a_2 ∈ t, Embedding.inr a_2 = a" ]
[]
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Data.Multiset.FinsetOps import Mathlib.Data.Multiset.Fold #align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" namespace Multiset variable {Ξ± : Type*} [CancelCommMonoidWithZero Ξ±] [NormalizedG...
Mathlib/Algebra/GCDMonoid/Multiset.lean
219
221
theorem gcd_ndinsert (a : Ξ±) (s : Multiset Ξ±) : (ndinsert a s).gcd = GCDMonoid.gcd a s.gcd := by
rw [← gcd_dedup, dedup_ext.2, gcd_dedup, gcd_cons] simp
[ " (s₁ + sβ‚‚).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + sβ‚‚)", " a ∣ gcd 0 ↔ βˆ€ b ∈ 0, a ∣ b", " βˆ€ (a_1 : Ξ±) (s : Multiset Ξ±), (a ∣ s.gcd ↔ βˆ€ b ∈ s, a ∣ b) β†’ (a ∣ (a_1 ::β‚˜ s).gcd ↔ βˆ€ b ∈ a_1 ::β‚˜ s, a ∣ b)", " normalize (gcd 0) = gcd 0", " normalize (a ::β‚˜ s).gcd = (a ::β‚˜ s).gcd", " s.gcd = 0 ↔ βˆ€ x ∈ ...
[ " (s₁ + sβ‚‚).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + sβ‚‚)", " a ∣ gcd 0 ↔ βˆ€ b ∈ 0, a ∣ b", " βˆ€ (a_1 : Ξ±) (s : Multiset Ξ±), (a ∣ s.gcd ↔ βˆ€ b ∈ s, a ∣ b) β†’ (a ∣ (a_1 ::β‚˜ s).gcd ↔ βˆ€ b ∈ a_1 ::β‚˜ s, a ∣ b)", " normalize (gcd 0) = gcd 0", " normalize (a ::β‚˜ s).gcd = (a ::β‚˜ s).gcd", " s.gcd = 0 ↔ βˆ€ x ∈ ...
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Measure.Haar.Quotient import Mathlib.MeasureTheory.Constructions.Polish import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Topology.Algebra.Order.Floor #align_import measure_theory.integral.periodic from "leanprover-c...
Mathlib/MeasureTheory/Integral/Periodic.lean
256
262
theorem intervalIntegral_add_eq_of_pos (hf : Periodic f T) (hT : 0 < T) (t s : ℝ) : ∫ x in t..t + T, f x = ∫ x in s..s + T, f x := by
simp only [integral_of_le, hT.le, le_add_iff_nonneg_right] haveI : VAddInvariantMeasure (AddSubgroup.zmultiples T) ℝ volume := ⟨fun c s _ => measure_preimage_add _ _ _⟩ apply IsAddFundamentalDomain.setIntegral_eq (G := AddSubgroup.zmultiples T) exacts [isAddFundamentalDomain_Ioc hT t, isAddFundamentalDomai...
[ " IsAddFundamentalDomain (β†₯(zmultiples T)) (Ioc t (t + T)) ΞΌ", " βˆƒ! g, g +α΅₯ x ∈ Ioc t (t + T)", " βˆƒ! x_1, codRestrict (fun n => n β€’ T) ↑(zmultiples T) β‹― x_1 +α΅₯ x ∈ Ioc t (t + T)", " IsAddFundamentalDomain (β†₯(zmultiples T).op) (Ioc t (t + T)) ΞΌ", " βˆƒ! x_1, (⇑(zmultiples T).equivOp ∘ codRestrict (fun n => n β€’...
[ " IsAddFundamentalDomain (β†₯(zmultiples T)) (Ioc t (t + T)) ΞΌ", " βˆƒ! g, g +α΅₯ x ∈ Ioc t (t + T)", " βˆƒ! x_1, codRestrict (fun n => n β€’ T) ↑(zmultiples T) β‹― x_1 +α΅₯ x ∈ Ioc t (t + T)", " IsAddFundamentalDomain (β†₯(zmultiples T).op) (Ioc t (t + T)) ΞΌ", " βˆƒ! x_1, (⇑(zmultiples T).equivOp ∘ codRestrict (fun n => n β€’...
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics #align_import analysis.special_functions.pow.continuity from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" noncomputable section open scoped Classical open Real Topology NNReal ENNReal Filter ComplexConjugate open Filter Finset...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
53
62
theorem cpow_eq_nhds' {p : β„‚ Γ— β„‚} (hp_fst : p.fst β‰  0) : (fun x => x.1 ^ x.2) =αΆ [𝓝 p] fun x => exp (log x.1 * x.2) := by
suffices βˆ€αΆ  x : β„‚ Γ— β„‚ in 𝓝 p, x.1 β‰  0 from this.mono fun x hx ↦ by dsimp only rw [cpow_def_of_ne_zero hx] refine IsOpen.eventually_mem ?_ hp_fst change IsOpen { x : β„‚ Γ— β„‚ | x.1 = 0 }ᢜ rw [isOpen_compl_iff] exact isClosed_eq continuous_fst continuous_const
[ " (fun x => 0 ^ x) =αΆ [𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " βˆ€αΆ  (x : β„‚) in 𝓝 b, x β‰  0", " (fun x => x ^ b) =αΆ [𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " βˆ€αΆ  (x : β„‚) in 𝓝 a, x β‰  0", " (fun x =>...
[ " (fun x => 0 ^ x) =αΆ [𝓝 b] 0", " (fun x => 0 ^ x) x = 0 x", " 0 ^ x = OfNat.ofNat 0 x", " βˆ€αΆ  (x : β„‚) in 𝓝 b, x β‰  0", " (fun x => x ^ b) =αΆ [𝓝 a] fun x => cexp (x.log * b)", " (fun x => x ^ b) x = (fun x => cexp (x.log * b)) x", " x ^ b = cexp (x.log * b)", " βˆ€αΆ  (x : β„‚) in 𝓝 a, x β‰  0" ]
import Mathlib.Data.Vector.Basic import Mathlib.Data.List.Zip #align_import data.vector.zip from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" namespace Vector section ZipWith variable {Ξ± Ξ² Ξ³ : Type*} {n : β„•} (f : Ξ± β†’ Ξ² β†’ Ξ³) def zipWith : Vector Ξ± n β†’ Vector Ξ² n β†’ Vector Ξ³ n := fun...
Mathlib/Data/Vector/Zip.lean
33
36
theorem zipWith_get (x : Vector Ξ± n) (y : Vector Ξ² n) (i) : (Vector.zipWith f x y).get i = f (x.get i) (y.get i) := by
dsimp only [Vector.zipWith, Vector.get] simp only [List.get_zipWith, Fin.cast]
[ " (List.zipWith f ↑x ↑y).length = n", " (zipWith f x y).get i = f (x.get i) (y.get i)", " (List.zipWith f ↑x ↑y).get (Fin.cast β‹― i) = f ((↑x).get (Fin.cast β‹― i)) ((↑y).get (Fin.cast β‹― i))" ]
[ " (List.zipWith f ↑x ↑y).length = n" ]
import Mathlib.Data.Fintype.Card import Mathlib.Data.Finset.Sum import Mathlib.Logic.Embedding.Set #align_import data.fintype.sum from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1" universe u v variable {Ξ± Ξ² : Type*} open Finset instance (Ξ± : Type u) (Ξ² : Type v) [Fintype Ξ±] [Fintyp...
Mathlib/Data/Fintype/Sum.lean
105
115
theorem Set.MapsTo.exists_equiv_extend_of_card_eq [Fintype Ξ±] {t : Finset Ξ²} (hΞ±t : Fintype.card Ξ± = t.card) {s : Set Ξ±} {f : Ξ± β†’ Ξ²} (hfst : s.MapsTo f t) (hfs : Set.InjOn f s) : βˆƒ g : Ξ± ≃ t, βˆ€ i ∈ s, (g i : Ξ²) = f i := by
classical let s' : Finset Ξ± := s.toFinset have hfst' : s'.image f βŠ† t := by simpa [s', ← Finset.coe_subset] using hfst have hfs' : Set.InjOn f s' := by simpa [s'] using hfs obtain ⟨g, hg⟩ := Finset.exists_equiv_extend_of_card_eq hΞ±t hfst' hfs' refine ⟨g, fun i hi => ?_⟩ apply hg simpa [s'...
[ " βˆ€ (x : Ξ± βŠ• Ξ²), x ∈ univ.disjSum univ", " Sum.inl val✝ ∈ univ.disjSum univ", " Sum.inr val✝ ∈ univ.disjSum univ", " Function.Bijective (Sum.elim Subtype.val Subtype.val)", " image (fun i => b ↑i) univ = (image b univ).erase k", " image (fun i => b ↑i) univ βŠ† (image b univ).erase k", " βˆ€ x ∈ univ, b ↑x ...
[ " βˆ€ (x : Ξ± βŠ• Ξ²), x ∈ univ.disjSum univ", " Sum.inl val✝ ∈ univ.disjSum univ", " Sum.inr val✝ ∈ univ.disjSum univ", " Function.Bijective (Sum.elim Subtype.val Subtype.val)", " image (fun i => b ↑i) univ = (image b univ).erase k", " image (fun i => b ↑i) univ βŠ† (image b univ).erase k", " βˆ€ x ∈ univ, b ↑x ...
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.dslope from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open scoped Classical Topology Filter open Function Set Filter variable {π•œ E : Type*} [NontriviallyNormed...
Mathlib/Analysis/Calculus/Dslope.lean
72
74
theorem dslope_sub_smul_of_ne (f : π•œ β†’ E) (h : b β‰  a) : dslope (fun x => (x - a) β€’ f x) a b = f b := by
rw [dslope_of_ne _ h, slope_sub_smul _ h.symm]
[ " dslope (⇑f ∘ g) a b = f (dslope g a b)", " dslope (⇑f ∘ g) b b = f (dslope g b b)", " deriv (⇑f ∘ g) b = f (deriv g b)", " (b - a) β€’ dslope f a b = f b - f a", " (b - b) β€’ dslope f b b = f b - f b", " dslope (fun x => (x - a) β€’ f x) a b = f b" ]
[ " dslope (⇑f ∘ g) a b = f (dslope g a b)", " dslope (⇑f ∘ g) b b = f (dslope g b b)", " deriv (⇑f ∘ g) b = f (deriv g b)", " (b - a) β€’ dslope f a b = f b - f a", " (b - b) β€’ dslope f b b = f b - f b" ]
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups noncomputable section open ModularForm UpperHalfPlane Complex Matrix open scoped MatrixGroups namespace EisensteinSeries variable (N : β„•) (a : Fin 2 β†’ ZMod N) variable {N a} section eisSum...
Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean
92
100
theorem eisSummand_SL2_apply (k : β„€) (i : (Fin 2 β†’ β„€)) (A : SL(2, β„€)) (z : ℍ) : eisSummand k i (A β€’ z) = (z.denom A) ^ k * eisSummand k (i α΅₯* A) z := by
simp only [eisSummand, specialLinearGroup_apply, algebraMap_int_eq, eq_intCast, ofReal_intCast, one_div, vecMul, vec2_dotProduct, Int.cast_add, Int.cast_mul] have h (a b c d u v : β„‚) (hc : c * z + d β‰  0) : ((u * ((a * z + b) / (c * z + d)) + v) ^ k)⁻¹ = (c * z + d) ^ k * (((u * a + v * c) * z + (u * b + ...
[ " eisSummand k i (A β€’ z) = denom (↑A) z ^ k * eisSummand k (i α΅₯* ↑A) z", " ((↑(i 0) * ↑(UpperHalfPlane.mk ((↑(↑↑A 0 0) * ↑z + ↑(↑↑A 0 1)) / (↑(↑↑A 1 0) * ↑z + ↑(↑↑A 1 1))) β‹―) + ↑(i 1)) ^ k)⁻¹ =\n denom (↑A) z ^ k *\n (((↑(i 0) * ↑(↑A 0 0) + ↑(i 1) * ↑(↑A 1 0)) * ↑z + (↑(i 0) * ↑(↑A 0 1) + ↑(i 1) * ↑(↑A 1 ...
[]
import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.FieldDivision #align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3" namespace Po...
Mathlib/RingTheory/Polynomial/Content.lean
158
168
theorem content_eq_zero_iff {p : R[X]} : content p = 0 ↔ p = 0 := by
rw [content, Finset.gcd_eq_zero_iff] constructor <;> intro h · ext n by_cases h0 : n ∈ p.support · rw [h n h0, coeff_zero] · rw [mem_support_iff] at h0 push_neg at h0 simp [h0] · intro x simp [h]
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
import Mathlib.LinearAlgebra.FreeModule.IdealQuotient import Mathlib.RingTheory.Norm #align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974" open Ideal Polynomial open scoped Polynomial variable {R S ΞΉ : Type*} [CommRing R] [IsDomain R] [IsPri...
Mathlib/LinearAlgebra/FreeModule/Norm.lean
30
50
theorem associated_norm_prod_smith [Fintype ΞΉ] (b : Basis ΞΉ R S) {f : S} (hf : f β‰  0) : Associated (Algebra.norm R f) (∏ i, smithCoeffs b _ (span_singleton_eq_bot.not.2 hf) i) := by
have hI := span_singleton_eq_bot.not.2 hf let b' := ringBasis b (span {f}) hI classical rw [← Matrix.det_diagonal, ← LinearMap.det_toLin b'] let e := (b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans ((LinearEquiv.coord S S f hf).restrictScalars R) refine (LinearMap.associated_det_of_e...
[ " Associated ((Algebra.norm R) f) (∏ i : ΞΉ, smithCoeffs b (span {f}) β‹― i)", " Associated ((Algebra.norm R) f)\n (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) β‹― i)))", " βˆ€ (x : S),\n ((Matrix.toLin b' b') (Matrix.diagonal fun i => smithCoeffs b (span {f}) β‹― i)) x =...
[]
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {Ξ± : Type u} class OrderedAddCommGroup (Ξ± : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
394
394
theorem lt_inv' : a < b⁻¹ ↔ b < a⁻¹ := by
rw [← inv_lt_inv_iff, inv_inv]
[ " b ≀ c", " a⁻¹ < b⁻¹ ↔ b < a", " a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a", " a⁻¹ < b ↔ b⁻¹ < a", " a < b⁻¹ ↔ b < a⁻¹" ]
[ " b ≀ c", " a⁻¹ < b⁻¹ ↔ b < a", " a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a", " a⁻¹ < b ↔ b⁻¹ < a" ]
import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Data.Set.Function #align_import analysis.sum_integral_comparisons from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Set MeasureTheory.MeasureSpace variable {xβ‚€ : ℝ} {a b : β„•} {f : ℝ β†’ ℝ} theorem AntitoneOn.in...
Mathlib/Analysis/SumIntegralComparisons.lean
98
123
theorem AntitoneOn.sum_le_integral (hf : AntitoneOn f (Icc xβ‚€ (xβ‚€ + a))) : (βˆ‘ i ∈ Finset.range a, f (xβ‚€ + (i + 1 : β„•))) ≀ ∫ x in xβ‚€..xβ‚€ + a, f x := by
have hint : βˆ€ k : β„•, k < a β†’ IntervalIntegrable f volume (xβ‚€ + k) (xβ‚€ + (k + 1 : β„•)) := by intro k hk refine (hf.mono ?_).intervalIntegrable rw [uIcc_of_le] Β· apply Icc_subset_Icc Β· simp only [le_add_iff_nonneg_right, Nat.cast_nonneg] Β· simp only [add_le_add_iff_left, Nat.cast_le, Nat.suc...
[ " ∫ (x : ℝ) in xβ‚€..xβ‚€ + ↑a, f x ≀ βˆ‘ i ∈ Finset.range a, f (xβ‚€ + ↑i)", " βˆ€ k < a, IntervalIntegrable f volume (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1))", " IntervalIntegrable f volume (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1))", " uIcc (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1)) βŠ† Icc xβ‚€ (xβ‚€ + ↑a)", " Icc (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1)) βŠ† Icc xβ‚€ (xβ‚€ + ↑a)", " xβ‚€...
[ " ∫ (x : ℝ) in xβ‚€..xβ‚€ + ↑a, f x ≀ βˆ‘ i ∈ Finset.range a, f (xβ‚€ + ↑i)", " βˆ€ k < a, IntervalIntegrable f volume (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1))", " IntervalIntegrable f volume (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1))", " uIcc (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1)) βŠ† Icc xβ‚€ (xβ‚€ + ↑a)", " Icc (xβ‚€ + ↑k) (xβ‚€ + ↑(k + 1)) βŠ† Icc xβ‚€ (xβ‚€ + ↑a)", " xβ‚€...
import Mathlib.Algebra.Group.Embedding import Mathlib.Data.Fin.Basic import Mathlib.Data.Finset.Union #align_import data.finset.image from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" -- TODO -- assert_not_exists OrderedCommMonoid assert_not_exists MonoidWithZero assert_not_exists MulA...
Mathlib/Data/Finset/Image.lean
141
144
theorem map_cast_heq {Ξ± Ξ²} (h : Ξ± = Ξ²) (s : Finset Ξ±) : HEq (s.map (Equiv.cast h).toEmbedding) s := by
subst h simp
[ " b ∈ map f.toEmbedding s ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) β†’ f.symm b ∈ s", " f.symm (f.toEmbedding a) ∈ s", " f.toEmbedding (f.symm b) = b", " p x hx", " p (f y) hx", " βˆ€ (x : Ξ²), x ∈ ↑(map f s) ↔ x ∈ ⇑f '' ↑s", " x✝ ∈ map f s.toFin...
[ " b ∈ map f.toEmbedding s ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) β†’ f.symm b ∈ s", " f.symm (f.toEmbedding a) ∈ s", " f.toEmbedding (f.symm b) = b", " p x hx", " p (f y) hx", " βˆ€ (x : Ξ²), x ∈ ↑(map f s) ↔ x ∈ ⇑f '' ↑s", " x✝ ∈ map f s.toFin...
import Mathlib.Algebra.Module.PID import Mathlib.Data.ZMod.Quotient #align_import group_theory.finite_abelian from "leanprover-community/mathlib"@"879155bff5af618b9062cbb2915347dafd749ad6" open scoped DirectSum private def directSumNeZeroMulHom {ΞΉ : Type} [DecidableEq ΞΉ] (p : ΞΉ β†’ β„•) (n : ΞΉ β†’ β„•) : (⨁ i : {i ...
Mathlib/GroupTheory/FiniteAbelian.lean
114
126
theorem equiv_free_prod_directSum_zmod [hG : AddGroup.FG G] : βˆƒ (n : β„•) (ΞΉ : Type) (_ : Fintype ΞΉ) (p : ΞΉ β†’ β„•) (_ : βˆ€ i, Nat.Prime <| p i) (e : ΞΉ β†’ β„•), Nonempty <| G ≃+ (Fin n β†’β‚€ β„€) Γ— ⨁ i : ΞΉ, ZMod (p i ^ e i) := by
obtain ⟨n, ΞΉ, fΞΉ, p, hp, e, ⟨f⟩⟩ := @Module.equiv_free_prod_directSum _ _ _ _ _ _ _ (Module.Finite.iff_addGroup_fg.mpr hG) refine ⟨n, ΞΉ, fΞΉ, fun i => (p i).natAbs, fun i => ?_, e, ⟨?_⟩⟩ Β· rw [← Int.prime_iff_natAbs_prime, ← irreducible_iff_prime]; exact hp i exact f.toAddEquiv.trans ((AddEquiv.re...
[ " (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p ↑j ^ n ↑j)) ⟨i, h⟩)\n ((directSumNeZeroMulHom p n) x) =\n x", " (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p ↑j ^ n ↑j)) ⟨i, h⟩)\n ((directSumNeZeroMulHom p n) 0) =...
[ " (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p ↑j ^ n ↑j)) ⟨i, h⟩)\n ((directSumNeZeroMulHom p n) x) =\n x", " (DirectSum.toAddMonoid fun i => if h : n i = 0 then 0 else DirectSum.of (fun j => ZMod (p ↑j ^ n ↑j)) ⟨i, h⟩)\n ((directSumNeZeroMulHom p n) 0) =...
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex #align_import analysis.special_functions.trigonometric.arctan from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Real open Set Filter open scoped Topology Real theorem tan_add {x y : ℝ} ...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean
56
60
theorem continuousOn_tan : ContinuousOn tan {x | cos x β‰  0} := by
suffices ContinuousOn (fun x => sin x / cos x) {x | cos x β‰  0} by have h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos] rwa [h_eq] at this exact continuousOn_sin.div continuousOn_cos fun x => id
[ " (x + y).tan = (x.tan + y.tan) / (1 - x.tan * y.tan)", " ((βˆ€ (k : β„€), ↑x β‰  (2 * ↑k + 1) * ↑π / 2) ∧ βˆ€ (l : β„€), ↑y β‰  (2 * ↑l + 1) * ↑π / 2) ∨\n (βˆƒ k, ↑x = (2 * ↑k + 1) * ↑π / 2) ∧ βˆƒ l, ↑y = (2 * ↑l + 1) * ↑π / 2", " ↑x = (2 * ↑a✝ + 1) * ↑π / 2 ↔ x = (2 * ↑a✝ + 1) * Ο€ / 2", " ↑y = (2 * ↑a✝ + 1) * ↑π / 2 ↔ y...
[ " (x + y).tan = (x.tan + y.tan) / (1 - x.tan * y.tan)", " ((βˆ€ (k : β„€), ↑x β‰  (2 * ↑k + 1) * ↑π / 2) ∧ βˆ€ (l : β„€), ↑y β‰  (2 * ↑l + 1) * ↑π / 2) ∨\n (βˆƒ k, ↑x = (2 * ↑k + 1) * ↑π / 2) ∧ βˆƒ l, ↑y = (2 * ↑l + 1) * ↑π / 2", " ↑x = (2 * ↑a✝ + 1) * ↑π / 2 ↔ x = (2 * ↑a✝ + 1) * Ο€ / 2", " ↑y = (2 * ↑a✝ + 1) * ↑π / 2 ↔ y...
import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.Multiset.Dedup #align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" assert_not_exists MonoidWithZero assert_not_exists MulAction universe v variable {Ξ± : Type*} {Ξ² : Type v} {Ξ³ Ξ΄ : Ty...
Mathlib/Data/Multiset/Bind.lean
142
142
theorem bind_add : (s.bind fun a => f a + g a) = s.bind f + s.bind g := by
simp [bind, join]
[ " (↑(List.map ofList (l :: L))).join = ↑(l :: L).join", " a ∈ join 0 ↔ βˆƒ s ∈ 0, a ∈ s", " βˆ€ (a_1 : Multiset Ξ±) (s : Multiset (Multiset Ξ±)),\n (a ∈ s.join ↔ βˆƒ s_1 ∈ s, a ∈ s_1) β†’ (a ∈ (a_1 ::β‚˜ s).join ↔ βˆƒ s_1 ∈ a_1 ::β‚˜ s, a ∈ s_1)", " card (join 0) = (map (⇑card) 0).sum", " βˆ€ (a : Multiset Ξ±) (s : Multise...
[ " (↑(List.map ofList (l :: L))).join = ↑(l :: L).join", " a ∈ join 0 ↔ βˆƒ s ∈ 0, a ∈ s", " βˆ€ (a_1 : Multiset Ξ±) (s : Multiset (Multiset Ξ±)),\n (a ∈ s.join ↔ βˆƒ s_1 ∈ s, a ∈ s_1) β†’ (a ∈ (a_1 ::β‚˜ s).join ↔ βˆƒ s_1 ∈ a_1 ::β‚˜ s, a ∈ s_1)", " card (join 0) = (map (⇑card) 0).sum", " βˆ€ (a : Multiset Ξ±) (s : Multise...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Nat.GCD.Basic import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Logic.Function.Iterate import Mathlib.Tactic.Ring import Mathlib.Tactic.Zify #align_import data.nat.fib from "leanprover-community/mathlib"@"...
Mathlib/Data/Nat/Fib/Basic.lean
174
179
theorem fib_two_mul (n : β„•) : fib (2 * n) = fib n * (2 * fib (n + 1) - fib n) := by
cases n Β· simp Β· rw [two_mul, ← add_assoc, fib_add, fib_add_two, two_mul] simp only [← add_assoc, add_tsub_cancel_right] ring
[ " (n + 2).fib = n.fib + (n + 1).fib", " n.fib ≀ (n + 1).fib", " fib 0 ≀ (0 + 1).fib", " (n✝ + 1).fib ≀ (n✝ + 1 + 1).fib", " (n + 2).fib = 0 ↔ n + 2 = 0", " 0 < n.fib ↔ 0 < n", " (n + 2).fib - (n + 1).fib = n.fib", " n.fib < (n + 1).fib", " (2 + n).fib < (2 + n + 1).fib", " 0 < n + 1", " StrictMo...
[ " (n + 2).fib = n.fib + (n + 1).fib", " n.fib ≀ (n + 1).fib", " fib 0 ≀ (0 + 1).fib", " (n✝ + 1).fib ≀ (n✝ + 1 + 1).fib", " (n + 2).fib = 0 ↔ n + 2 = 0", " 0 < n.fib ↔ 0 < n", " (n + 2).fib - (n + 1).fib = n.fib", " n.fib < (n + 1).fib", " (2 + n).fib < (2 + n + 1).fib", " 0 < n + 1", " StrictMo...
import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.RingTheory.Finiteness open scoped TensorProduct open Submodule variable {R M N : Type*} variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] variable {M₁ Mβ‚‚ : Submodule R M} {N₁ Nβ‚‚ : Submodule R N} namespace Tens...
Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
121
126
theorem exists_finite_submodule_left_of_finite (s : Set (M βŠ—[R] N)) (hs : s.Finite) : βˆƒ M' : Submodule R M, Module.Finite R M' ∧ s βŠ† LinearMap.range (M'.subtype.rTensor N) := by
obtain ⟨M', _, hfin, _, h⟩ := exists_finite_submodule_of_finite s hs refine ⟨M', hfin, ?_⟩ rw [mapIncl, ← LinearMap.rTensor_comp_lTensor] at h exact h.trans (LinearMap.range_comp_le_range _ _)
[ " βˆƒ S, x = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " βˆƒ S, 0 = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) 0).sum", " βˆƒ S, x βŠ—β‚œ[R] y = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " x βŠ—β‚œ[R] y = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) {(x, y)}).sum", ...
[ " βˆƒ S, x = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " βˆƒ S, 0 = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " 0 = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) 0).sum", " βˆƒ S, x βŠ—β‚œ[R] y = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) S).sum", " x βŠ—β‚œ[R] y = (Multiset.map (fun i => i.1 βŠ—β‚œ[R] i.2) {(x, y)}).sum", ...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Log import Mathlib.Data.List.Indexes import Mathlib.Data.List.Palindrome import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith impo...
Mathlib/Data/Nat/Digits.lean
137
140
theorem digits_of_lt (b x : β„•) (hx : x β‰  0) (hxb : x < b) : digits b x = [x] := by
rcases exists_eq_succ_of_ne_zero hx with ⟨x, rfl⟩ rcases Nat.exists_eq_add_of_le' ((Nat.le_add_left 1 x).trans_lt hxb) with ⟨b, rfl⟩ rw [digits_add_two_add_one, div_eq_of_lt hxb, digits_zero, mod_eq_of_lt hxb]
[ " (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 ((n + 1) / b) n.succ", " b.digitsAux h 0 = []", " b.digitsAux h n = n % b :: b.digitsAux h (n / b)", " b.digitsAux h 0 = 0 % b :: b.digitsAux h (0 / b)", " b.digitsAux h (n✝ + 1) = (n✝ + 1) % b :: b.digitsAux h ((n✝ + 1) / b)", " 2 ≀ b + 2", " ...
[ " (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 ((n + 1) / b) n.succ", " b.digitsAux h 0 = []", " b.digitsAux h n = n % b :: b.digitsAux h (n / b)", " b.digitsAux h 0 = 0 % b :: b.digitsAux h (0 / b)", " b.digitsAux h (n✝ + 1) = (n✝ + 1) % b :: b.digitsAux h ((n✝ + 1) / b)", " 2 ≀ b + 2", " ...
import Mathlib.Data.Set.Prod #align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654" open Function namespace Set variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' ΞΆ ΞΆ' Ξ½ : Type*} {f f' : Ξ± β†’ Ξ² β†’ Ξ³} {g g' : Ξ± β†’ Ξ² β†’ Ξ³ β†’ Ξ΄} variable {s s' : Set Ξ±} {t t' : Set Ξ²} {u u' : Set Ξ³} {v...
Mathlib/Data/Set/NAry.lean
68
69
theorem image2_subset_iff_left : image2 f s t βŠ† u ↔ βˆ€ a ∈ s, (fun b => f a b) '' t βŠ† u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
[ " f a b ∈ image2 f s t β†’ a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t", " image2 f s t βŠ† image2 f s' t'", " f a b ∈ image2 f s' t'", " image2 f s t βŠ† u ↔ βˆ€ a ∈ s, (fun b => f a b) '' t βŠ† u" ]
[ " f a b ∈ image2 f s t β†’ a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t", " image2 f s t βŠ† image2 f s' t'", " f a b ∈ image2 f s' t'" ]
import Mathlib.Data.List.Nodup #align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" variable {Ξ± : Type*} namespace List inductive Duplicate (x : Ξ±) : List Ξ± β†’ Prop | cons_mem {l : List Ξ±} : x ∈ l β†’ Duplicate x (x :: l) | cons_duplicate {y : Ξ±} {l ...
Mathlib/Data/List/Duplicate.lean
141
142
theorem duplicate_iff_two_le_count [DecidableEq Ξ±] : x ∈+ l ↔ 2 ≀ count x l := by
simp [duplicate_iff_sublist, le_count_iff_replicate_sublist]
[ " x ∈ l", " x ∈ x :: l'", " x ∈ y :: l'", " l β‰  [y]", " x :: l' β‰  [y]", " z :: l' β‰  [y]", " x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l", " y = x ∧ x ∈ l ∨ x ∈+ l", " x = x ∧ x ∈ l ∨ x ∈+ l", " x ∈+ y :: l", " x ∈+ x :: l", " x ∈+ l", " x ∈+ y :: l ↔ x ∈+ l", " x ∈+ l'", " x ∈+ []", " x ∈+ y ...
[ " x ∈ l", " x ∈ x :: l'", " x ∈ y :: l'", " l β‰  [y]", " x :: l' β‰  [y]", " z :: l' β‰  [y]", " x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l", " y = x ∧ x ∈ l ∨ x ∈+ l", " x = x ∧ x ∈ l ∨ x ∈+ l", " x ∈+ y :: l", " x ∈+ x :: l", " x ∈+ l", " x ∈+ y :: l ↔ x ∈+ l", " x ∈+ l'", " x ∈+ []", " x ∈+ y ...
import Mathlib.RingTheory.RingHomProperties import Mathlib.RingTheory.IntegralClosure #align_import ring_theory.ring_hom.integral from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0" namespace RingHom open scoped TensorProduct open TensorProduct Algebra.TensorProduct theorem isIntegra...
Mathlib/RingTheory/RingHom/Integral.lean
28
32
theorem isIntegral_respectsIso : RespectsIso fun f => f.IsIntegral := by
apply isIntegral_stableUnderComposition.respectsIso introv x rw [← e.apply_symm_apply x] apply RingHom.isIntegralElem_map
[ " StableUnderComposition fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral", " (g.comp f).IsIntegral", " RespectsIso fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral", " βˆ€ {R S : Type u_1} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), e.toRingHom.IsIntegral", " e.toRingHom.IsIntegralElem...
[ " StableUnderComposition fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral", " (g.comp f).IsIntegral" ]
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*}
Mathlib/Data/Nat/GCD/BigOperators.lean
20
22
theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by
induction l <;> simp [Nat.coprime_mul_iff_left, *]
[ " l.prod.Coprime k ↔ βˆ€ n ∈ l, n.Coprime k", " [].prod.Coprime k ↔ βˆ€ n ∈ [], n.Coprime k", " (head✝ :: tail✝).prod.Coprime k ↔ βˆ€ n ∈ head✝ :: tail✝, n.Coprime k" ]
[]
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
145
150
theorem volume_Ioi {a : ℝ} : volume (Ioi a) = ∞ := top_unique <| le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => calc (n : ℝβ‰₯0∞) = volume (Ioo a (a + n)) := by
simp _ ≀ volume (Ioi a) := measure_mono Ioo_subset_Ioi_self
[ " 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.Probability.Kernel.MeasurableIntegral #align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b" open MeasureTheory open scoped ENNReal namespace ProbabilityTheory namespace kernel variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}...
Mathlib/Probability/Kernel/Composition.lean
146
148
theorem compProdFun_tsum_left (ΞΊ : kernel Ξ± Ξ²) (Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³) [IsSFiniteKernel ΞΊ] (a : Ξ±) (s : Set (Ξ² Γ— Ξ³)) : compProdFun ΞΊ Ξ· a s = βˆ‘' n, compProdFun (seq ΞΊ n) Ξ· a s := by
simp_rw [compProdFun, (measure_sum_seq ΞΊ _).symm, lintegral_sum_measure]
[ " compProdFun ΞΊ Ξ· a βˆ… = 0", " compProdFun ΞΊ Ξ· a (⋃ i, f i) = βˆ‘' (i : β„•), compProdFun ΞΊ Ξ· a (f i)", " (fun b => (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i}) = fun b => (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i} = (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " c ∈ {c | (b, c) ∈ ⋃ i, f i} ↔ c...
[ " compProdFun ΞΊ Ξ· a βˆ… = 0", " compProdFun ΞΊ Ξ· a (⋃ i, f i) = βˆ‘' (i : β„•), compProdFun ΞΊ Ξ· a (f i)", " (fun b => (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i}) = fun b => (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i} = (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " c ∈ {c | (b, c) ∈ ⋃ i, f i} ↔ c...
import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.EffectiveEpi.Coproduct import Mathlib.CategoryTheory.Extensive import Mathlib.CategoryTheory.Limits.Preserves.Finite namespace CategoryTheory open Limits variable {C : Type*} [Category C] [FinitaryPreExtensive C]
Mathlib/CategoryTheory/EffectiveEpi/Extensive.lean
24
29
theorem effectiveEpi_desc_iff_effectiveEpiFamily {Ξ± : Type} [Finite Ξ±] {B : C} (X : Ξ± β†’ C) (Ο€ : (a : Ξ±) β†’ X a ⟢ B) : EffectiveEpi (Sigma.desc Ο€) ↔ EffectiveEpiFamily X Ο€ := by
exact ⟨fun h ↦ ⟨⟨@effectiveEpiFamilyStructOfEffectiveEpiDesc _ _ _ _ X Ο€ _ h _ _ (fun g ↦ (FinitaryPreExtensive.sigma_desc_iso (fun a ↦ Sigma.ΞΉ X a) g inferInstance).epi_of_iso)⟩⟩, fun _ ↦ inferInstance⟩
[ " EffectiveEpi (Sigma.desc Ο€) ↔ EffectiveEpiFamily X Ο€" ]
[]
import Batteries.Data.DList import Mathlib.Mathport.Rename import Mathlib.Tactic.Cases #align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" universe u #align dlist Batteries.DList namespace Batteries.DList open Function variable {Ξ± : Type u} #align dlist.of_list...
Mathlib/Data/DList/Defs.lean
84
85
theorem toList_push (x : Ξ±) (l : DList Ξ±) : toList (push l x) = toList l ++ [x] := by
cases' l with _ l_invariant; simp; rw [l_invariant]
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.Tactic.ComputeDegree #align_import linear_algebra.matrix.polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" set_...
Mathlib/LinearAlgebra/Matrix/Polynomial.lean
73
86
theorem coeff_det_X_add_C_card (A B : Matrix n n Ξ±) : coeff (det ((X : Ξ±[X]) β€’ A.map C + B.map C)) (Fintype.card n) = det A := by
rw [det_apply, det_apply, finset_sum_coeff] refine Finset.sum_congr rfl ?_ simp only [Algebra.id.smul_eq_mul, Finset.mem_univ, RingHom.mapMatrix_apply, forall_true_left, map_apply, Pi.smul_apply] intro g convert coeff_smul (R := Ξ±) (sign g) _ _ rw [← mul_one (Fintype.card n)] convert (coeff_prod_of_n...
[ " (X β€’ A.map ⇑C + B.map ⇑C).det.natDegree ≀ Fintype.card n", " (βˆ‘ Οƒ : Equiv.Perm n, sign Οƒ β€’ ∏ i : n, (X β€’ A.map ⇑C + B.map ⇑C) (Οƒ i) i).natDegree ≀ Fintype.card n", " Finset.fold max 0 (natDegree ∘ fun Οƒ => sign Οƒ β€’ ∏ i : n, (X β€’ A.map ⇑C + B.map ⇑C) (Οƒ i) i) Finset.univ ≀\n Fintype.card n", " βˆ€ x ∈ Multi...
[ " (X β€’ A.map ⇑C + B.map ⇑C).det.natDegree ≀ Fintype.card n", " (βˆ‘ Οƒ : Equiv.Perm n, sign Οƒ β€’ ∏ i : n, (X β€’ A.map ⇑C + B.map ⇑C) (Οƒ i) i).natDegree ≀ Fintype.card n", " Finset.fold max 0 (natDegree ∘ fun Οƒ => sign Οƒ β€’ ∏ i : n, (X β€’ A.map ⇑C + B.map ⇑C) (Οƒ i) i) Finset.univ ≀\n Fintype.card n", " βˆ€ x ∈ Multi...
import Mathlib.Topology.MetricSpace.PseudoMetric #align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" open Set Filter Bornology open scoped NNReal Uniformity universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {X ΞΉ : Type*} variable [PseudoMetricS...
Mathlib/Topology/MetricSpace/Basic.lean
107
108
theorem zero_eq_nndist {x y : Ξ³} : 0 = nndist x y ↔ x = y := by
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, zero_eq_dist]
[ " m = m'", " mk eq_of_dist_eq_zero✝ = m'", " mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝", " toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝", " PseudoMetricSpace.toDist = PseudoMetricSpace.toDist", " 0 = dist x y ↔ x = y", " dist x y β‰  0 ↔ x β‰  y", " dist x y ≀ 0 ↔ x = y", " 0 < dist x y ↔ x β‰  y",...
[ " m = m'", " mk eq_of_dist_eq_zero✝ = m'", " mk eq_of_dist_eq_zero✝¹ = mk eq_of_dist_eq_zero✝", " toPseudoMetricSpace✝¹ = toPseudoMetricSpace✝", " PseudoMetricSpace.toDist = PseudoMetricSpace.toDist", " 0 = dist x y ↔ x = y", " dist x y β‰  0 ↔ x β‰  y", " dist x y ≀ 0 ↔ x = y", " 0 < dist x y ↔ x β‰  y",...
import Mathlib.Analysis.SpecialFunctions.Bernstein import Mathlib.Topology.Algebra.Algebra #align_import topology.continuous_function.weierstrass from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" open ContinuousMap Filter open scoped unitInterval theorem polynomialFunctions_closure...
Mathlib/Topology/ContinuousFunction/Weierstrass.lean
99
105
theorem exists_polynomial_near_continuousMap (a b : ℝ) (f : C(Set.Icc a b, ℝ)) (Ξ΅ : ℝ) (pos : 0 < Ξ΅) : βˆƒ p : ℝ[X], β€–p.toContinuousMapOn _ - fβ€– < Ξ΅ := by
have w := mem_closure_iff_frequently.mp (continuousMap_mem_polynomialFunctions_closure _ _ f) rw [Metric.nhds_basis_ball.frequently_iff] at w obtain ⟨-, H, ⟨m, ⟨-, rfl⟩⟩⟩ := w Ρ pos rw [Metric.mem_ball, dist_eq_norm] at H exact ⟨m, H⟩
[ " (polynomialFunctions I).topologicalClosure = ⊀", " ⊀ ≀ (polynomialFunctions I).topologicalClosure", " f ∈ (polynomialFunctions I).topologicalClosure", " βˆƒαΆ  (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)", " βˆƒαΆ  (x : β„•) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)", " βˆ€ (x : β„•),...
[ " (polynomialFunctions I).topologicalClosure = ⊀", " ⊀ ≀ (polynomialFunctions I).topologicalClosure", " f ∈ (polynomialFunctions I).topologicalClosure", " βˆƒαΆ  (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)", " βˆƒαΆ  (x : β„•) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)", " βˆ€ (x : β„•),...
import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Data.Finset.Basic import Mathlib.Order.Interval.Finset.Defs open Function namespace Finset class HasAntidiagonal (A : Type*) [AddMonoid A] where antidiagonal : A β†’ Finset (A Γ— A) mem_antidiagonal {n} {a} : a ∈ antidiagonal n ↔ a.fst + a.snd = n exp...
Mathlib/Data/Finset/Antidiagonal.lean
141
144
theorem antidiagonal.snd_le {n : A} {kl : A Γ— A} (hlk : kl ∈ antidiagonal n) : kl.2 ≀ n := by
rw [le_iff_exists_add] use kl.1 rwa [mem_antidiagonal, eq_comm, add_comm] at hlk
[ " βˆ€ (a b : HasAntidiagonal A), a = b", " { antidiagonal := a, mem_antidiagonal := ha } = { antidiagonal := b, mem_antidiagonal := hb }", " xy ∈ a n ↔ xy ∈ b n", " antidiagonal = antidiagonal", " H1 = H2", " xy.swap ∈ antidiagonal n ↔ xy ∈ antidiagonal n", " (a, b) ∈ map (Equiv.prodComm A A).toEmbedding ...
[ " βˆ€ (a b : HasAntidiagonal A), a = b", " { antidiagonal := a, mem_antidiagonal := ha } = { antidiagonal := b, mem_antidiagonal := hb }", " xy ∈ a n ↔ xy ∈ b n", " antidiagonal = antidiagonal", " H1 = H2", " xy.swap ∈ antidiagonal n ↔ xy ∈ antidiagonal n", " (a, b) ∈ map (Equiv.prodComm A A).toEmbedding ...
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
209
210
theorem weightedSMul_null {s : Set Ξ±} (h_zero : ΞΌ s = 0) : (weightedSMul ΞΌ s : F β†’L[ℝ] F) = 0 := by
ext1 x; rw [weightedSMul_apply, h_zero]; simp
[ " (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.Analysis.SpecialFunctions.Exponential #align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84e0d918668460a34aa19d02fe2e0e2286da0" open NormedSpace open scoped Nat section SinCos
Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
32
46
theorem Complex.hasSum_cos' (z : β„‚) : HasSum (fun n : β„• => (z * Complex.I) ^ (2 * n) / ↑(2 * n)!) (Complex.cos z) := by
rw [Complex.cos, Complex.exp_eq_exp_β„‚] have := ((expSeries_div_hasSum_exp β„‚ (z * Complex.I)).add (expSeries_div_hasSum_exp β„‚ (-z * Complex.I))).div_const 2 replace := (Nat.divModEquiv 2).symm.hasSum_iff.mpr this dsimp [Function.comp_def] at this simp_rw [← mul_comm 2 _] at this refine this.prod_fiberwi...
[ " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos", " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp β„‚ (z * I) + NormedSpace.exp β„‚ (-z * I)) / 2)", " HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +...
[]
import Mathlib.SetTheory.Ordinal.Arithmetic import Mathlib.Tactic.TFAE import Mathlib.Topology.Order.Monotone #align_import set_theory.ordinal.topology from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da" noncomputable section universe u v open Cardinal Order Topology namespace Ordina...
Mathlib/SetTheory/Ordinal/Topology.lean
41
53
theorem isOpen_singleton_iff : IsOpen ({a} : Set Ordinal) ↔ Β¬IsLimit a := by
refine ⟨fun h ⟨hβ‚€, hsucc⟩ => ?_, fun ha => ?_⟩ Β· obtain ⟨b, c, hbc, hbc'⟩ := (mem_nhds_iff_exists_Ioo_subset' ⟨0, Ordinal.pos_iff_ne_zero.2 hβ‚€βŸ© ⟨_, lt_succ a⟩).1 (h.mem_nhds rfl) have hba := hsucc b hbc.1 exact hba.ne (hbc' ⟨lt_succ b, hba.trans hbc.2⟩) Β· rcases zero_or_succ_or_limit a with...
[ " IsOpen {a} ↔ Β¬a.IsLimit", " False", " IsOpen {a}", " IsOpen {0}", " IsOpen (Set.Iio (succ βŠ₯))", " IsOpen {succ b}", " IsOpen (Set.Ioo b (succ (succ b)))" ]
[]
import Mathlib.Data.Finset.Image import Mathlib.Data.List.FinRange #align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf" assert_not_exists MonoidWithZero assert_not_exists MulAction open Function open Nat universe u v variable {Ξ± Ξ² Ξ³ : Type*} class Fi...
Mathlib/Data/Fintype/Basic.lean
92
92
theorem coe_univ : ↑(univ : Finset Ξ±) = (Set.univ : Set Ξ±) := by
ext; simp
[ " s = univ ↔ βˆ€ (x : Ξ±), x ∈ s", " ↑univ = Set.univ", " x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ" ]
[ " s = univ ↔ βˆ€ (x : Ξ±), x ∈ s" ]
import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Data.Int.Cast.Defs import Mathlib.Algebra.Group.Basic #align_import data.int.cast.basic from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u open Nat namespace Int variable {R : Type u} [AddGroupWithOne R] @[simp, norm_cas...
Mathlib/Data/Int/Cast/Basic.lean
74
76
theorem cast_ofNat (n : β„•) [n.AtLeastTwo] : ((no_index (OfNat.ofNat n) : β„€) : R) = OfNat.ofNat n := by
simpa only [OfNat.ofNat] using AddGroupWithOne.intCast_ofNat (R := R) n
[ " ↑(OfNat.ofNat n) = OfNat.ofNat n" ]
[]
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" open scoped ENNReal namespace MeasureTheory variable {Ξ± E : Type*} {m0 : MeasurableSpace Ξ±} [NormedAddCommGroup E] {p : ℝβ‰₯0∞} (ΞΌ...
Mathlib/MeasureTheory/Function/LpSeminorm/ChebyshevMarkov.lean
23
28
theorem pow_mul_meas_ge_le_snorm (hp_ne_zero : p β‰  0) (hp_ne_top : p β‰  ∞) (hf : AEStronglyMeasurable f ΞΌ) (Ξ΅ : ℝβ‰₯0∞) : (Ξ΅ * ΞΌ { x | Ξ΅ ≀ (β€–f xβ€–β‚Š : ℝβ‰₯0∞) ^ p.toReal }) ^ (1 / p.toReal) ≀ snorm f p ΞΌ := by
rw [snorm_eq_lintegral_rpow_nnnorm hp_ne_zero hp_ne_top] gcongr exact mul_meas_ge_le_lintegralβ‚€ (hf.ennnorm.pow_const _) Ξ΅
[ " (Ξ΅ * ΞΌ {x | Ξ΅ ≀ ↑‖f xβ€–β‚Š ^ p.toReal}) ^ (1 / p.toReal) ≀ snorm f p ΞΌ", " (Ξ΅ * ΞΌ {x | Ξ΅ ≀ ↑‖f xβ€–β‚Š ^ p.toReal}) ^ (1 / p.toReal) ≀ (∫⁻ (x : Ξ±), ↑‖f xβ€–β‚Š ^ p.toReal βˆ‚ΞΌ) ^ (1 / p.toReal)", " Ξ΅ * ΞΌ {x | Ξ΅ ≀ ↑‖f xβ€–β‚Š ^ p.toReal} ≀ ∫⁻ (x : Ξ±), ↑‖f xβ€–β‚Š ^ p.toReal βˆ‚ΞΌ" ]
[]
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notat...
Mathlib/SetTheory/Cardinal/Continuum.lean
64
66
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠 := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≀ lift.{v, u} c ↔ 𝔠 ≀ c", " lift.{v, u} c ≀ 𝔠 ↔ c ≀ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c", " lift.{v, u} c < 𝔠 ↔ c < 𝔠" ]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≀ lift.{v, u} c ↔ 𝔠 ≀ c", " lift.{v, u} c ≀ 𝔠 ↔ c ≀ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c" ]
import Mathlib.Probability.Variance import Mathlib.MeasureTheory.Function.UniformIntegrable #align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Filter Finset noncomputable section open scoped Topology MeasureTheory ENNReal NNR...
Mathlib/Probability/IdentDistrib.lean
326
348
theorem Memβ„’p.uniformIntegrable_of_identDistrib_aux {ΞΉ : Type*} {f : ΞΉ β†’ Ξ± β†’ E} {j : ΞΉ} {p : ℝβ‰₯0∞} (hp : 1 ≀ p) (hp' : p β‰  ∞) (hβ„’p : Memβ„’p (f j) p ΞΌ) (hfmeas : βˆ€ i, StronglyMeasurable (f i)) (hf : βˆ€ i, IdentDistrib (f i) (f j) ΞΌ ΞΌ) : UniformIntegrable f p ΞΌ := by
refine uniformIntegrable_of' hp hp' hfmeas fun Ξ΅ hΞ΅ => ?_ by_cases hΞΉ : Nonempty ΞΉ swap; Β· exact ⟨0, fun i => False.elim (hΞΉ <| Nonempty.intro i)⟩ obtain ⟨C, hC₁, hCβ‚‚βŸ© := hβ„’p.snorm_indicator_norm_ge_pos_le (hfmeas _) hΞ΅ refine ⟨⟨C, hC₁.le⟩, fun i => le_trans (le_of_eq ?_) hCβ‚‚βŸ© have : {x | (⟨C, hC₁.le⟩ : ℝβ‰₯...
[ " UniformIntegrable f p ΞΌ", " βˆƒ C, βˆ€ (i : ΞΉ), snorm ({x | C ≀ β€–f i xβ€–β‚Š}.indicator (f i)) p ΞΌ ≀ ENNReal.ofReal Ξ΅", " snorm ({x | ⟨C, β‹―βŸ© ≀ β€–f i xβ€–β‚Š}.indicator (f i)) p ΞΌ = snorm ({x | C ≀ ↑‖f j xβ€–β‚Š}.indicator (f j)) p ΞΌ", " {x | ⟨C, β‹―βŸ© ≀ β€–f i xβ€–β‚Š} = {x | C ≀ β€–f i xβ€–}", " x ∈ {x | ⟨C, β‹―βŸ© ≀ β€–f i xβ€–β‚Š} ↔ x ∈ {x |...
[]
import Mathlib.Topology.Order.Basic import Mathlib.Data.Set.Pointwise.Basic open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² Ξ³ : Type*} section LinearOrder variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] section OrderTopology variable [OrderTopology Ξ±] open List ...
Mathlib/Topology/Order/LeftRightNhds.lean
131
138
theorem TFAE_mem_nhdsWithin_Iio {a b : Ξ±} (h : a < b) (s : Set Ξ±) : TFAE [s ∈ 𝓝[<] b,-- 0 : `s` is a neighborhood of `b` within `(-∞, b)` s ∈ 𝓝[Ico a b] b,-- 1 : `s` is a neighborhood of `b` within `[a, b)` s ∈ 𝓝[Ioo a b] b,-- 2 : `s` is a neighborhood of `b` within `(a, b)` βˆƒ l ∈ Ico a b...
-- 4 : `s` includes `(l, b)` for some `l < b` simpa only [exists_prop, OrderDual.exists, dual_Ioi, dual_Ioc, dual_Ioo] using TFAE_mem_nhdsWithin_Ioi h.dual (ofDual ⁻¹' s)
[ " [s ∈ 𝓝[>] a, s ∈ 𝓝[Ioc a b] a, s ∈ 𝓝[Ioo a b] a, βˆƒ u ∈ Ioc a b, Ioo a u βŠ† s, βˆƒ u ∈ Ioi a, Ioo a u βŠ† s].TFAE", " s ∈ 𝓝[>] a ↔ s ∈ 𝓝[Ioc a b] a", " s ∈ 𝓝[>] a ↔ s ∈ 𝓝[Ioo a b] a", " (βˆƒ u ∈ Ioc a b, Ioo a u βŠ† s) β†’ βˆƒ u ∈ Ioi a, Ioo a u βŠ† s", " (βˆƒ u ∈ Ioi a, Ioo a u βŠ† s) β†’ s ∈ 𝓝[>] a", " s ∈ 𝓝[>] a"...
[ " [s ∈ 𝓝[>] a, s ∈ 𝓝[Ioc a b] a, s ∈ 𝓝[Ioo a b] a, βˆƒ u ∈ Ioc a b, Ioo a u βŠ† s, βˆƒ u ∈ Ioi a, Ioo a u βŠ† s].TFAE", " s ∈ 𝓝[>] a ↔ s ∈ 𝓝[Ioc a b] a", " s ∈ 𝓝[>] a ↔ s ∈ 𝓝[Ioo a b] a", " (βˆƒ u ∈ Ioc a b, Ioo a u βŠ† s) β†’ βˆƒ u ∈ Ioi a, Ioo a u βŠ† s", " (βˆƒ u ∈ Ioi a, Ioo a u βŠ† s) β†’ s ∈ 𝓝[>] a", " s ∈ 𝓝[>] a"...
import Mathlib.Order.Filter.Lift import Mathlib.Order.Filter.AtTopBot #align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Filter open Filter Set variable {Ξ± Ξ² : Type*} {ΞΉ : Sort*} namespace Filter variable {l l' la : Filter Ξ±} {lb : Filter ...
Mathlib/Order/Filter/SmallSets.lean
40
42
theorem smallSets_eq_generate {f : Filter Ξ±} : f.smallSets = generate (powerset '' f.sets) := by
simp_rw [generate_eq_biInf, smallSets, iInf_image] rfl
[ " f.smallSets = generate (powerset '' f.sets)", " f.lift' powerset = β¨… b ∈ f.sets, π“Ÿ (𝒫 b)" ]
[]
import Mathlib.Data.PFunctor.Multivariate.W import Mathlib.Data.QPF.Multivariate.Basic #align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" universe u v namespace MvQPF open TypeVec open MvFunctor (LiftP LiftR) open MvFunctor var...
Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean
120
121
theorem wEquiv.refl {Ξ± : TypeVec n} (x : q.P.W Ξ±) : WEquiv x x := by
apply q.P.w_cases _ x; intro a f' f; exact WEquiv.abs a f' f a f' f rfl
[ " recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)", " g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)", " recF g x = g (abs ((TypeVec.id ::: r...
[ " recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)", " g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)", " recF g x = g (abs ((TypeVec.id ::: r...
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
98
125
theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ΞΉ ℝ ℝ) : parallelepiped b = Icc 0 1 ∨ parallelepiped b = Icc (-1) 0 := by
have e : ΞΉ ≃ Fin 1 := by apply Fintype.equivFinOfCardEq simp only [← finrank_eq_card_basis b.toBasis, finrank_self] have B : parallelepiped (b.reindex e) = parallelepiped b := by convert parallelepiped_comp_equiv b e.symm ext i simp only [OrthonormalBasis.coe_reindex] rw [← B] let F : ℝ β†’ F...
[ " 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.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic #align_import measure_theory.integral.interval_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
129
131
theorem intervalIntegrable_const_iff {c : E} : IntervalIntegrable (fun _ => c) ΞΌ a b ↔ c = 0 ∨ ΞΌ (Ξ™ a b) < ∞ := by
simp only [intervalIntegrable_iff, integrableOn_const]
[ " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ξ™ a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ioc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f [[a, b]] ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Icc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ico a b) ΞΌ", " Interva...
[ " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ξ™ a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ioc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f [[a, b]] ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Icc a b) ΞΌ", " IntervalIntegrable f ΞΌ a b ↔ IntegrableOn f (Ico a b) ΞΌ", " Interva...
import Mathlib.Dynamics.Ergodic.AddCircle import Mathlib.MeasureTheory.Covering.LiminfLimsup #align_import number_theory.well_approximable from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Set Filter Function Metric MeasureTheory open scoped MeasureTheory Topology Pointwise @[...
Mathlib/NumberTheory/WellApproximable.lean
108
116
theorem image_pow_subset_of_coprime (hm : 0 < m) (hmn : n.Coprime m) : (fun (y : A) => y ^ m) '' approxOrderOf A n Ξ΄ βŠ† approxOrderOf A n (m * Ξ΄) := by
rintro - ⟨a, ha, rfl⟩ obtain ⟨b, hb, hab⟩ := mem_approxOrderOf_iff.mp ha replace hb : b ^ m ∈ {u : A | orderOf u = n} := by rw [← hb] at hmn ⊒; exact hmn.orderOf_pow apply ball_subset_thickening hb ((m : ℝ) β€’ Ξ΄) convert pow_mem_ball hm hab using 1 simp only [nsmul_eq_mul, Algebra.id.smul_eq_mul]
[ " a ∈ approxOrderOf A n Ξ΄ ↔ βˆƒ b, orderOf b = n ∧ a ∈ ball b Ξ΄", " (fun y => y ^ m) '' approxOrderOf A n Ξ΄ βŠ† approxOrderOf A n (↑m * Ξ΄)", " (fun y => y ^ m) a ∈ approxOrderOf A n (↑m * Ξ΄)", " b ^ m ∈ {u | orderOf u = n}", " b ^ m ∈ {u | orderOf u = orderOf b}", " (fun y => y ^ m) a ∈ ball (b ^ m) (↑m β€’ Ξ΄)"...
[ " a ∈ approxOrderOf A n Ξ΄ ↔ βˆƒ b, orderOf b = n ∧ a ∈ ball b Ξ΄" ]
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.Localization.NormTrace #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a" open scoped NumberField open Finset NumberField Algebra FiniteDimensional namespace RingOfIn...
Mathlib/NumberTheory/NumberField/Norm.lean
111
126
theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x := by
letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K let L := normalClosure K F (AlgebraicClosure F) haveI : FiniteDimensional F L := FiniteDimensional.right K F L haveI : IsAlgClosure K (AlgebraicClosure F) := IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) haveI : IsGalois F L := I...
[ " (norm K) ((algebraMap (π“ž K) (π“ž L)) x) = x ^ finrank K L", " IsUnit ((norm K) x) ↔ IsUnit x", " IsUnit x", " IsUnit (⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * x)", " ⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * x = (algebraMap (π“ž K) (π“ž L)) ((norm K) x)", " ↑(⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * ...
[ " (norm K) ((algebraMap (π“ž K) (π“ž L)) x) = x ^ finrank K L", " IsUnit ((norm K) x) ↔ IsUnit x", " IsUnit x", " IsUnit (⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * x)", " ⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * x = (algebraMap (π“ž K) (π“ž L)) ((norm K) x)", " ↑(⟨∏ Οƒ ∈ univ \\ {AlgEquiv.refl}, Οƒ ↑x, β‹―βŸ© * ...
import Mathlib.Topology.MetricSpace.Isometry #align_import topology.metric_space.gluing from "leanprover-community/mathlib"@"e1a7bdeb4fd826b7e71d130d34988f0a2d26a177" noncomputable section universe u v w open Function Set Uniformity Topology namespace Metric --section section InductiveLimit open Nat variab...
Mathlib/Topology/MetricSpace/Gluing.lean
648
658
theorem toInductiveLimit_commute (I : βˆ€ n, Isometry (f n)) (n : β„•) : toInductiveLimit I n.succ ∘ f n = toInductiveLimit I n := by
let h := inductivePremetric I let _ := h.toUniformSpace.toTopologicalSpace funext x simp only [comp, toInductiveLimit] refine SeparationQuotient.mk_eq_mk.2 (Metric.inseparable_iff.2 ?_) show inductiveLimitDist f ⟨n.succ, f n x⟩ ⟨n, x⟩ = 0 rw [inductiveLimitDist_eq_dist I ⟨n.succ, f n x⟩ ⟨n, x⟩ n.succ, le...
[ " inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)", " inductiveLimitDist f ⟨i, x⟩ y = dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) y.snd)", " inductiveLimitDist f ⟨i, x⟩ ⟨j, y⟩ =\n dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.s...
[ " inductiveLimitDist f x y = dist (leRecOn hx (fun {k} => f k) x.snd) (leRecOn hy (fun {k} => f k) y.snd)", " inductiveLimitDist f ⟨i, x⟩ y = dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.snd) (leRecOn hy (fun {k} => f k) y.snd)", " inductiveLimitDist f ⟨i, x⟩ ⟨j, y⟩ =\n dist (leRecOn hx (fun {k} => f k) ⟨i, x⟩.s...
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
56
57
theorem hammingDist_comm (x y : βˆ€ i, Ξ² i) : hammingDist x y = hammingDist y x := by
simp_rw [hammingDist, ne_comm]
[ " hammingDist x x = 0", " βˆ€ ⦃x_1 : ι⦄, x_1 ∈ univ β†’ Β¬x x_1 β‰  x x_1", " hammingDist x y = hammingDist y x" ]
[ " hammingDist x x = 0", " βˆ€ ⦃x_1 : ι⦄, x_1 ∈ univ β†’ Β¬x x_1 β‰  x x_1" ]
import Mathlib.Control.Bifunctor import Mathlib.Logic.Equiv.Defs #align_import logic.equiv.functor from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f" universe u v w variable {Ξ± Ξ² : Type u} open Equiv namespace Functor variable (f : Type u β†’ Type v) [Functor f] [LawfulFunctor f] d...
Mathlib/Logic/Equiv/Functor.lean
57
60
theorem mapEquiv_refl : mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±) := by
ext x simp only [mapEquiv_apply, refl_apply] exact LawfulFunctor.id_map x
[ " ⇑h.symm <$> ⇑h <$> x = x", " ⇑h <$> ⇑h.symm <$> x = x", " mapEquiv f (Equiv.refl Ξ±) = Equiv.refl (f Ξ±)", " (mapEquiv f (Equiv.refl Ξ±)) x = (Equiv.refl (f Ξ±)) x", " ⇑(Equiv.refl Ξ±) <$> x = x" ]
[ " ⇑h.symm <$> ⇑h <$> x = x", " ⇑h <$> ⇑h.symm <$> x = x" ]
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
113
113
theorem projIci_of_mem (hx : x ∈ Ici a) : projIci a x = ⟨x, hx⟩ := by
simpa [projIci]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIcc a b β‹― x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIci a x = ⟨x, hx⟩" ]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIcc a b β‹― x = ⟨b, β‹―βŸ© ↔ b ≀ x" ]
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic import Mathlib.RingTheory.Localization.AsSubring #align_import algebraic_geometry.prime_spectrum.maximal from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" noncomputable section open scoped Classical universe u v variable (R : Typ...
Mathlib/AlgebraicGeometry/PrimeSpectrum/Maximal.lean
92
117
theorem iInf_localization_eq_bot : (β¨… v : MaximalSpectrum R, Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = βŠ₯ := by
ext x rw [Algebra.mem_bot, Algebra.mem_iInf] constructor Β· contrapose intro hrange hlocal let denom : Ideal R := (Submodule.span R {1} : Submodule R K).colon (Submodule.span R {x}) have hdenom : (1 : R) βˆ‰ denom := by intro hdenom rcases Submodule.mem_span_singleton.mp (Submodule...
[ " { asIdeal := asIdeal✝¹, IsMaximal := IsMaximal✝¹ } = { asIdeal := asIdeal✝, IsMaximal := IsMaximal✝ }", " range toPrimeSpectrum = {x | IsClosed {x}}", " range toPrimeSpectrum = {x | x.asIdeal.IsMaximal}", " { asIdeal := x, IsPrime := IsPrime✝ } ∈ range toPrimeSpectrum ↔\n { asIdeal := x, IsPrime := IsPri...
[ " { asIdeal := asIdeal✝¹, IsMaximal := IsMaximal✝¹ } = { asIdeal := asIdeal✝, IsMaximal := IsMaximal✝ }", " range toPrimeSpectrum = {x | IsClosed {x}}", " range toPrimeSpectrum = {x | x.asIdeal.IsMaximal}", " { asIdeal := x, IsPrime := IsPrime✝ } ∈ range toPrimeSpectrum ↔\n { asIdeal := x, IsPrime := IsPri...
import Mathlib.Logic.Function.Iterate import Mathlib.Order.GaloisConnection import Mathlib.Order.Hom.Basic #align_import order.hom.order from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6" namespace OrderHom variable {Ξ± Ξ² : Type*} section Preorder variable [Preorder Ξ±] instance [Sem...
Mathlib/Order/Hom/Order.lean
133
154
theorem iterate_sup_le_sup_iff {Ξ± : Type*} [SemilatticeSup Ξ±] (f : Ξ± β†’o Ξ±) : (βˆ€ n₁ nβ‚‚ a₁ aβ‚‚, f^[n₁ + nβ‚‚] (a₁ βŠ” aβ‚‚) ≀ f^[n₁] a₁ βŠ” f^[nβ‚‚] aβ‚‚) ↔ βˆ€ a₁ aβ‚‚, f (a₁ βŠ” aβ‚‚) ≀ f a₁ βŠ” aβ‚‚ := by
constructor <;> intro h Β· exact h 1 0 Β· intro n₁ nβ‚‚ a₁ aβ‚‚ have h' : βˆ€ n a₁ aβ‚‚, f^[n] (a₁ βŠ” aβ‚‚) ≀ f^[n] a₁ βŠ” aβ‚‚ := by intro n induction' n with n ih <;> intro a₁ aβ‚‚ Β· rfl Β· calc f^[n + 1] (a₁ βŠ” aβ‚‚) = f^[n] (f (a₁ βŠ” aβ‚‚)) := Function.iterate_succ_apply f n _ _ ≀ f^[n]...
[ " ⇑(β¨… i, f i) = β¨… i, ⇑(f i)", " (β¨… i, f i) x = (β¨… i, ⇑(f i)) x", " ⇑(⨆ i, f i) = ⨆ i, ⇑(f i)", " (⨆ i, f i) x = (⨆ i, ⇑(f i)) x", " f.toFun x ≀ ⨆ (_ : f ∈ s), f x", " (βˆ€ (n₁ nβ‚‚ : β„•) (a₁ aβ‚‚ : Ξ±), (⇑f)^[n₁ + nβ‚‚] (a₁ βŠ” aβ‚‚) ≀ (⇑f)^[n₁] a₁ βŠ” (⇑f)^[nβ‚‚] aβ‚‚) ↔\n βˆ€ (a₁ aβ‚‚ : Ξ±), f (a₁ βŠ” aβ‚‚) ≀ f a₁ βŠ” aβ‚‚", " (βˆ€ ...
[ " ⇑(β¨… i, f i) = β¨… i, ⇑(f i)", " (β¨… i, f i) x = (β¨… i, ⇑(f i)) x", " ⇑(⨆ i, f i) = ⨆ i, ⇑(f i)", " (⨆ i, f i) x = (⨆ i, ⇑(f i)) x", " f.toFun x ≀ ⨆ (_ : f ∈ s), f x" ]
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.NormedSpace.RCLike import Mathlib.Order.Filter.Curry #align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b" open Filter open scoped uniformity Filter Topology section d...
Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
455
474
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter π•œ} (hf' : UniformCauchySeqOnFilter f' l l') : UniformCauchySeqOnFilter (fun n => fun z => (1 : π•œ β†’L[π•œ] π•œ).smulRight (f' n z)) l l' := by
-- The tricky part of this proof is that operator norms are written in terms of `≀` whereas -- metrics are written in terms of `<`. So we need to shrink `Ξ΅` utilizing the archimedean -- property of `ℝ` rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero, Metric.tendstoUniforml...
[ " UniformCauchySeqOnFilter (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l l'", " βˆ€ Ξ΅ > 0,\n βˆ€αΆ  (n : (ΞΉ Γ— ΞΉ) Γ— π•œ) in (l Γ—Λ’ l) Γ—Λ’ l',\n dist (0 n.2) (ContinuousLinearMap.smulRight 1 (f' n.1.1 n.2) - ContinuousLinearMap.smulRight 1 (f' n.1.2 n.2)) < Ξ΅", " βˆ€αΆ  (n : (ΞΉ Γ— ΞΉ) Γ— π•œ) in (l Γ—Λ’ l) Γ—Λ’ l',\...
[]
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace #align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb" open MeasureTheory Set Filter A...
Mathlib/Analysis/MellinTransform.lean
317
332
theorem isBigO_rpow_zero_log_smul [NormedSpace ℝ E] {a b : ℝ} {f : ℝ β†’ E} (hab : a < b) (hf : f =O[𝓝[>] 0] (Β· ^ (-a))) : (fun t : ℝ => log t β€’ f t) =O[𝓝[>] 0] (Β· ^ (-b)) := by
have : log =o[𝓝[>] 0] fun t : ℝ => t ^ (a - b) := by refine ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).neg_left.comp_tendsto tendsto_inv_zero_atTop).congr' (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t ht => ?_) (eventually_nhdsWithin_iff.mpr <| eventually_of_forall fun t...
[ " (fun t => t.log β€’ f t) =O[atTop] fun x => x ^ (-b)", " (fun x => x.log β€’ f x) t = (fun t => t.log β€’ f t) t", " (fun x => x ^ (a - b) β€’ x ^ (-a)) t = (fun x => x ^ (-b)) t", " t ^ (a - b) β€’ t ^ (-a) = t ^ (-b)", " (fun t => t.log β€’ f t) =O[𝓝[>] 0] fun x => x ^ (-b)", " log =o[𝓝[>] 0] fun t => t ^ (a - ...
[ " (fun t => t.log β€’ f t) =O[atTop] fun x => x ^ (-b)", " (fun x => x.log β€’ f x) t = (fun t => t.log β€’ f t) t", " (fun x => x ^ (a - b) β€’ x ^ (-a)) t = (fun x => x ^ (-b)) t", " t ^ (a - b) β€’ t ^ (-a) = t ^ (-b)" ]
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.UniversalEnveloping import Mathlib.GroupTheory.GroupAction.Ring #align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4" universe ...
Mathlib/Algebra/Lie/Free.lean
95
96
theorem Rel.subLeft (a : lib R X) {b c : lib R X} (h : Rel R X b c) : Rel R X (a - b) (a - c) := by
simpa only [sub_eq_add_neg] using h.neg.addLeft a
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)", " Rel R X (a - b) (a - c)" ]
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)" ]
import Mathlib.Algebra.Group.Pi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.IsomorphismClasses import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects #align_import category_theory.limits.shapes.zero_morphisms from "leanpr...
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
106
113
theorem ext (I J : HasZeroMorphisms C) : I = J := by
apply ext_aux intro X Y have : (I.zero X Y).zero ≫ (J.zero Y Y).zero = (I.zero X Y).zero := by apply I.zero_comp X (J.zero Y Y).zero have that : (I.zero X Y).zero ≫ (J.zero Y Y).zero = (J.zero X Y).zero := by apply J.comp_zero (I.zero X Y).zero Y rw [← this, ← that]
[]
[]
import Mathlib.LinearAlgebra.Dual import Mathlib.LinearAlgebra.Matrix.ToLin #align_import linear_algebra.contraction from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec" suppress_compilation -- Porting note: universe metavariables behave oddly universe w u v₁ vβ‚‚ v₃ vβ‚„ variable {ΞΉ : Type...
Mathlib/LinearAlgebra/Contraction.lean
105
110
theorem zero_prodMap_dualTensorHom (g : Module.Dual R N) (q : Q) : (0 : M β†’β‚—[R] P).prodMap ((dualTensorHom R N Q) (g βŠ—β‚œ[R] q)) = dualTensorHom R (M Γ— N) (P Γ— Q) ((g βˆ˜β‚— snd R M N) βŠ—β‚œ inr R P Q q) := by
ext <;> simp only [coe_comp, coe_inr, Function.comp_apply, prodMap_apply, dualTensorHom_apply, snd_apply, Prod.smul_mk, LinearMap.zero_apply, smul_zero]
[ " Dual.transpose ((dualTensorHom R M M) (f βŠ—β‚œ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m βŠ—β‚œ[R] f)", " ((Dual.transpose ((dualTensorHom R M M) (f βŠ—β‚œ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m βŠ—β‚œ[R] f)) f') m'", " f m' * f' m = f' m * f m'", ...
[ " Dual.transpose ((dualTensorHom R M M) (f βŠ—β‚œ[R] m)) =\n (dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m βŠ—β‚œ[R] f)", " ((Dual.transpose ((dualTensorHom R M M) (f βŠ—β‚œ[R] m))) f') m' =\n (((dualTensorHom R (Dual R M) (Dual R M)) ((Dual.eval R M) m βŠ—β‚œ[R] f)) f') m'", " f m' * f' m = f' m * f m'", ...
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, ...
Mathlib/Order/Directed.lean
77
80
theorem directedOn_image {s : Set Ξ²} {f : Ξ² β†’ Ξ±} : DirectedOn r (f '' s) ↔ DirectedOn (f ⁻¹'o r) s := by
simp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp, forall_apply_eq_imp_iffβ‚‚, Order.Preimage]
[ " DirectedOn r s ↔ Directed r Subtype.val", " (βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆ€ a_1 ∈ s, βˆƒ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2", " (βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆƒ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1", " Directed r f ↔ DirectedOn r (Set.range f)", " DirectedOn r (f '' s) ↔ Di...
[ " DirectedOn r s ↔ Directed r Subtype.val", " (βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆ€ a_1 ∈ s, βˆƒ a_2, r a a_2 ∧ a_2 ∈ s ∧ r a_1 a_2", " (βˆ€ y ∈ s, βˆƒ z ∈ s, r x z ∧ r y z) ↔ βˆ€ a ∈ s, βˆƒ a_1, r x a_1 ∧ a_1 ∈ s ∧ r a a_1", " Directed r f ↔ DirectedOn r (Set.range f)" ]
import Mathlib.Data.Fintype.Basic import Mathlib.ModelTheory.Substructures #align_import model_theory.elementary_maps from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" open FirstOrder namespace FirstOrder namespace Language open Structure variable (L : Language) (M : Type*) (N : T...
Mathlib/ModelTheory/ElementaryMaps.lean
272
302
theorem isElementary_of_exists (f : M β†ͺ[L] N) (htv : βˆ€ (n : β„•) (Ο† : L.BoundedFormula Empty (n + 1)) (x : Fin n β†’ M) (a : N), Ο†.Realize default (Fin.snoc (f ∘ x) a : _ β†’ N) β†’ βˆƒ b : M, Ο†.Realize default (Fin.snoc (f ∘ x) (f b) : _ β†’ N)) : βˆ€ {n} (Ο† : L.Formula (Fin n)) (x : Fin n β†’ M), Ο†.Re...
suffices h : βˆ€ (n : β„•) (Ο† : L.BoundedFormula Empty n) (xs : Fin n β†’ M), Ο†.Realize (f ∘ default) (f ∘ xs) ↔ Ο†.Realize default xs by intro n Ο† x exact Ο†.realize_relabel_sum_inr.symm.trans (_root_.trans (h n _ _) Ο†.realize_relabel_sum_inr) refine fun n Ο† => Ο†.recOn ?_ ?_ ?_ ?_ ?_ Β· exact fun {_} _ => ...
[ " Ο†.Realize ((constantMap ∘ Sum.inr) ∘ x) ↔ Ο†.Realize x", " Ο†.Realize ((constantMap ∘ Sum.inr) ∘ x) ↔\n N ⊨ (((L.lhomWithConstants M).onBoundedFormula Ο†).subst (Constants.term ∘ Sum.inr ∘ x)).alls", " M ⊨ (((L.lhomWithConstants M).onBoundedFormula Ο†).subst (Constants.term ∘ Sum.inr ∘ x)).alls ↔ Ο†.Realize x",...
[ " Ο†.Realize ((constantMap ∘ Sum.inr) ∘ x) ↔ Ο†.Realize x", " Ο†.Realize ((constantMap ∘ Sum.inr) ∘ x) ↔\n N ⊨ (((L.lhomWithConstants M).onBoundedFormula Ο†).subst (Constants.term ∘ Sum.inr ∘ x)).alls", " M ⊨ (((L.lhomWithConstants M).onBoundedFormula Ο†).subst (Constants.term ∘ Sum.inr ∘ x)).alls ↔ Ο†.Realize x",...
import Mathlib.ModelTheory.Substructures #align_import model_theory.finitely_generated from "leanprover-community/mathlib"@"0602c59878ff3d5f71dea69c2d32ccf2e93e5398" open FirstOrder Set namespace FirstOrder namespace Language open Structure variable {L : Language} {M : Type*} [L.Structure M] namespace Substru...
Mathlib/ModelTheory/FinitelyGenerated.lean
116
135
theorem cg_iff_empty_or_exists_nat_generating_family {N : L.Substructure M} : N.CG ↔ N = (βˆ… : Set M) ∨ βˆƒ s : β„• β†’ M, closure L (range s) = N := by
rw [cg_def] constructor Β· rintro ⟨S, Scount, hS⟩ rcases eq_empty_or_nonempty (N : Set M) with h | h Β· exact Or.intro_left _ h obtain ⟨f, h'⟩ := (Scount.union (Set.countable_singleton h.some)).exists_eq_range (singleton_nonempty h.some).inr refine Or.intro_right _ ⟨f, ?_⟩ rw [← h...
[ " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) β†’ N.FG", " ((closure L).toFun t').FG", " ((closure L).toFun ↑t).FG", " N.FG ↔ βˆƒ n s, (closure L).toFun (range s) = N", " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) ↔ βˆƒ n s, (closure L).toFun (range s) = N", " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) β†’ βˆƒ n s, (cl...
[ " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) β†’ N.FG", " ((closure L).toFun t').FG", " ((closure L).toFun ↑t).FG", " N.FG ↔ βˆƒ n s, (closure L).toFun (range s) = N", " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) ↔ βˆƒ n s, (closure L).toFun (range s) = N", " (βˆƒ S, S.Finite ∧ (closure L).toFun S = N) β†’ βˆƒ n s, (cl...
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Topology.Algebra.Monoid import Mathlib.Topology.Homeomorph #align_import topology.algebra.group_with_zero from "leanprover-community/mathlib"@"c10e724be91096453ee3db13862b9fb9a992fef2" open Topology Filter Function variable {Ξ± Ξ² Gβ‚€ : Type*} section DivConst...
Mathlib/Topology/Algebra/GroupWithZero.lean
75
76
theorem Continuous.div_const (hf : Continuous f) (y : Gβ‚€) : Continuous fun x => f x / y := by
simpa only [div_eq_mul_inv] using hf.mul continuous_const
[ " Tendsto (fun a => f a / y) l (𝓝 (x / y))", " ContinuousOn (fun x => f x / y) s", " Continuous fun x => f x / y" ]
[ " Tendsto (fun a => f a / y) l (𝓝 (x / y))", " ContinuousOn (fun x => f x / y) s" ]
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ΞΉ : Sort*} {π•œ E : Type*} section OrderedSemiring variable (π•œ) [OrderedSemiring π•œ] [AddCommMonoid E] [Module π•œ E] {s t s₁ sβ‚‚ t₁ tβ‚‚ u : Set ...
Mathlib/Analysis/Convex/Join.lean
70
71
theorem convexJoin_singleton_right (s : Set E) (y : E) : convexJoin π•œ s {y} = ⋃ x ∈ s, segment π•œ x y := by
simp [convexJoin]
[ " x ∈ convexJoin π•œ s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, x ∈ segment π•œ a b", " ⋃ iβ‚‚ ∈ t, ⋃ i₁ ∈ s, segment π•œ i₁ iβ‚‚ = convexJoin π•œ t s", " convexJoin π•œ βˆ… t = βˆ…", " convexJoin π•œ s βˆ… = βˆ…", " convexJoin π•œ {x} t = ⋃ y ∈ t, segment π•œ x y", " convexJoin π•œ s {y} = ⋃ x ∈ s, segment π•œ x y" ]
[ " x ∈ convexJoin π•œ s t ↔ βˆƒ a ∈ s, βˆƒ b ∈ t, x ∈ segment π•œ a b", " ⋃ iβ‚‚ ∈ t, ⋃ i₁ ∈ s, segment π•œ i₁ iβ‚‚ = convexJoin π•œ t s", " convexJoin π•œ βˆ… t = βˆ…", " convexJoin π•œ s βˆ… = βˆ…", " convexJoin π•œ {x} t = ⋃ y ∈ t, segment π•œ x y" ]
import Mathlib.Probability.Variance import Mathlib.MeasureTheory.Function.UniformIntegrable #align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Filter Finset noncomputable section open scoped Topology MeasureTheory ENNReal NNR...
Mathlib/Probability/IdentDistrib.lean
132
135
theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) : μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
rw [← Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, ← Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
[ " AEMeasurable (u ∘ g) ν", " Measure.map (u ∘ f) μ = Measure.map (u ∘ g) ν", " AEMeasurable u (Measure.map g ν)", " μ (f ⁻¹' s) = ν (g ⁻¹' s)" ]
[ " AEMeasurable (u ∘ g) ν", " Measure.map (u ∘ f) μ = Measure.map (u ∘ g) ν", " AEMeasurable u (Measure.map g ν)" ]
import Mathlib.Algebra.Module.Zlattice.Basic import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.NumberTheory.NumberField.FractionalIdeal #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" variable (K : Type*) [F...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
274
279
theorem normAtPlace_smul (w : InfinitePlace K) (x : E K) (c : ℝ) : normAtPlace w (c β€’ x) = |c| * normAtPlace w x := by
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk] split_ifs Β· rw [Prod.smul_fst, Pi.smul_apply, norm_smul, Real.norm_eq_abs] Β· rw [Prod.smul_snd, Pi.smul_apply, norm_smul, Real.norm_eq_abs, Complex.norm_eq_abs]
[ " Nontrivial (({ w // w.IsReal } β†’ ℝ) Γ— ({ w // w.IsComplex } β†’ β„‚))", " finrank ℝ (({ w // w.IsReal } β†’ ℝ) Γ— ({ w // w.IsComplex } β†’ β„‚)) = finrank β„š K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then β€–x.1 ⟨w, hwβŸ©β€– else β€–x.2 ⟨w, β‹―βŸ©β€–) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
[ " Nontrivial (({ w // w.IsReal } β†’ ℝ) Γ— ({ w // w.IsComplex } β†’ β„‚))", " finrank ℝ (({ w // w.IsReal } β†’ ℝ) Γ— ({ w // w.IsComplex } β†’ β„‚)) = finrank β„š K", " Function.Injective ⇑(mixedEmbedding K)", " (fun x => if hw : w.IsReal then β€–x.1 ⟨w, hwβŸ©β€– else β€–x.2 ⟨w, β‹―βŸ©β€–) 0 = 0", " { toFun := fun x => if hw : w.IsRea...
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv noncomputable section open scoped Manifold open Bundle Set Topology section SpecificFunctions variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π•œ E H)...
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
285
288
theorem tangentMap_prod_fst {p : TangentBundle (I.prod I') (M Γ— M')} : tangentMap (I.prod I') I Prod.fst p = ⟨p.proj.1, p.2.1⟩ := by
-- Porting note: `rfl` wasn't needed simp [tangentMap]; rfl
[ " HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst π•œ (TangentSpace I x.1) (TangentSpace I' x.2))", " HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst π•œ (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x...
[ " HasMFDerivAt (I.prod I') I Prod.fst x (ContinuousLinearMap.fst π•œ (TangentSpace I x.1) (TangentSpace I' x.2))", " HasFDerivWithinAt (writtenInExtChartAt (I.prod I') I x Prod.fst)\n (ContinuousLinearMap.fst π•œ (TangentSpace I x.1) (TangentSpace I' x.2)) (range ↑(I.prod I'))\n (↑(extChartAt (I.prod I') x) x...
import Mathlib.Data.Set.Lattice import Mathlib.Init.Set import Mathlib.Control.Basic import Mathlib.Lean.Expr.ExtraRecognizers #align_import data.set.functor from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u open Function namespace Set variable {Ξ± Ξ² : Type u} {s : Set Ξ±} ...
Mathlib/Data/Set/Functor.lean
135
139
theorem coe_eq_image_val (t : Set s) : @Lean.Internal.coeM Set s Ξ± _ Set.monad t = (t : Set Ξ±) := by
change ⋃ (x ∈ t), {x.1} = _ ext simp
[ " Lean.Internal.coeM t = Subtype.val '' t", " ⋃ x ∈ t, {↑x} = Subtype.val '' t", " x✝ ∈ ⋃ x ∈ t, {↑x} ↔ x✝ ∈ Subtype.val '' t" ]
[]
import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Pow import Mathlib.Algebra.Ring.Int #align_import algebra.order.field.power from "leanprover-community/mathlib"@"acb3d204d4ee883eb686f45d486a2a6811a01329" ...
Mathlib/Algebra/Order/Field/Power.lean
155
159
theorem Odd.zpow_neg_iff (hn : Odd n) : a ^ n < 0 ↔ a < 0 := by
refine ⟨lt_imp_lt_of_le_imp_le (zpow_nonneg Β· _), fun ha ↦ ?_⟩ obtain ⟨k, rfl⟩ := hn rw [zpow_add_oneβ‚€ ha.ne] exact mul_neg_of_pos_of_neg (Even.zpow_pos (even_two_mul _) ha.ne) ha
[ " 0 ≀ a ^ n", " 0 ≀ a ^ (k + k)", " a β‰  0 ∨ k + k β‰  0 ∨ k = 0 ∧ k = 0", " 0 ≀ a ^ k * a ^ k", " 0 < a ^ n ↔ a β‰  0", " 0 < a ^ (k + k) ↔ a β‰  0", " k β‰  0", " a ^ n < 0 ↔ a < 0", " a ^ n < 0", " a ^ (2 * k + 1) < 0", " a ^ (2 * k) * a < 0" ]
[ " 0 ≀ a ^ n", " 0 ≀ a ^ (k + k)", " a β‰  0 ∨ k + k β‰  0 ∨ k = 0 ∧ k = 0", " 0 ≀ a ^ k * a ^ k", " 0 < a ^ n ↔ a β‰  0", " 0 < a ^ (k + k) ↔ a β‰  0", " k β‰  0" ]
import Mathlib.Analysis.Calculus.MeanValue #align_import analysis.calculus.extend_deriv from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] open Filter Set Metric Contin...
Mathlib/Analysis/Calculus/FDeriv/Extend.lean
111
140
theorem has_deriv_at_interval_left_endpoint_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ} {f : ℝ β†’ E} (f_diff : DifferentiableOn ℝ f s) (f_lim : ContinuousWithinAt f s a) (hs : s ∈ 𝓝[>] a) (f_lim' : Tendsto (fun x => deriv f x) (𝓝[>] a) (𝓝 e)) : HasDerivWithinAt f e (Ici a) a := by
/- This is a specialization of `has_fderiv_at_boundary_of_tendsto_fderiv`. To be in the setting of this theorem, we need to work on an open interval with closure contained in `s βˆͺ {a}`, that we call `t = (a, b)`. Then, we check all the assumptions of this theorem and we apply it. -/ obtain ⟨b, ab : a < b, ...
[ " HasFDerivWithinAt f f' (closure s) x", " βˆ€ ⦃c : ℝ⦄, 0 < c β†’ βˆ€αΆ  (x_1 : E) in 𝓝[closure s] x, β€–f x_1 - f x - f' (x_1 - x)β€– ≀ c * β€–x_1 - xβ€–", " βˆ€αΆ  (x_1 : E) in 𝓝[closure s] x, β€–f x_1 - f x - f' (x_1 - x)β€– ≀ Ξ΅ * β€–x_1 - xβ€–", " βˆƒ Ξ΄ > 0, βˆ€ y ∈ s, dist y x < Ξ΄ β†’ β€–fderiv ℝ f y - f'β€– < Ξ΅", " y ∈ {x_1 | (fun x_2 =...
[ " HasFDerivWithinAt f f' (closure s) x", " βˆ€ ⦃c : ℝ⦄, 0 < c β†’ βˆ€αΆ  (x_1 : E) in 𝓝[closure s] x, β€–f x_1 - f x - f' (x_1 - x)β€– ≀ c * β€–x_1 - xβ€–", " βˆ€αΆ  (x_1 : E) in 𝓝[closure s] x, β€–f x_1 - f x - f' (x_1 - x)β€– ≀ Ξ΅ * β€–x_1 - xβ€–", " βˆƒ Ξ΄ > 0, βˆ€ y ∈ s, dist y x < Ξ΄ β†’ β€–fderiv ℝ f y - f'β€– < Ξ΅", " y ∈ {x_1 | (fun x_2 =...
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Order.Filter.Pointwise import Mathlib.Topology.Algebra.MulAction import Mathlib.Algebra.BigOperators.Pi import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Algebra.Group.ULift #align_import topology.algebra.monoid from "leanprover-community/mathli...
Mathlib/Topology/Algebra/Monoid.lean
150
152
theorem le_nhds_mul (a b : M) : 𝓝 a * 𝓝 b ≀ 𝓝 (a * b) := by
rw [← mapβ‚‚_mul, ← map_uncurry_prod, ← nhds_prod_eq] exact continuous_mul.tendsto _
[ " ContinuousMul (ULift.{u, u_3} M)", " Continuous fun p => p.1 * p.2", " Continuous fun p => p.1.down * p.2.down", " 𝓝 a * 𝓝 b ≀ 𝓝 (a * b)", " map (Function.uncurry fun x x_1 => x * x_1) (𝓝 (a, b)) ≀ 𝓝 (a * b)" ]
[ " ContinuousMul (ULift.{u, u_3} M)", " Continuous fun p => p.1 * p.2", " Continuous fun p => p.1.down * p.2.down" ]
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S β„•] [Mu...
Mathlib/Algebra/Polynomial/Smeval.lean
61
63
theorem smeval_monomial (n : β„•) : (monomial n r).smeval x = r β€’ x ^ n := by
simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index]
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r β€’ x ^ 0", " ((monomial n) r).smeval x = r β€’ x ^ n" ]
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r β€’ x ^ 0" ]
import Mathlib.AlgebraicTopology.DoldKan.FunctorN #align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan non...
Mathlib/AlgebraicTopology/DoldKan/Normalized.lean
83
86
theorem PInftyToNormalizedMooreComplex_naturality {X Y : SimplicialObject A} (f : X ⟢ Y) : AlternatingFaceMapComplex.map f ≫ PInftyToNormalizedMooreComplex Y = PInftyToNormalizedMooreComplex X ≫ NormalizedMooreComplex.map f := by
aesop_cat
[ " (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.Ξ΄ j.succ = 0", " (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow ≫ X.Ξ΄ j.succ = 0", " j ∈ Finset.univ", " (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)", " (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)", " (No...
[ " (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.Ξ΄ j.succ = 0", " (Finset.univ.inf fun k => kernelSubobject (X.Ξ΄ k.succ)).arrow ≫ X.Ξ΄ j.succ = 0", " j ∈ Finset.univ", " (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)", " (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)", " (No...
import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Computability.Primrec import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383" open Nat def ack : β„• β†’ β„• β†’ β„• | 0, n => n + 1 | m + 1, 0 ...
Mathlib/Computability/Ackermann.lean
78
78
theorem ack_succ_succ (m n : β„•) : ack (m + 1) (n + 1) = ack m (ack (m + 1) n) := by
rw [ack]
[ " ack 0 n = n + 1", " ack (m + 1) 0 = ack m 1", " ack (m + 1) (n + 1) = ack m (ack (m + 1) n)" ]
[ " ack 0 n = n + 1", " ack (m + 1) 0 = ack m 1" ]
import Mathlib.Data.Fin.VecNotation import Mathlib.SetTheory.Cardinal.Basic #align_import model_theory.basic from "leanprover-community/mathlib"@"369525b73f229ccd76a6ec0e0e0bf2be57599768" set_option autoImplicit true universe u v u' v' w w' open Cardinal open Cardinal namespace FirstOrder -- intended to b...
Mathlib/ModelTheory/Basic.lean
95
100
theorem lift_mk {i : β„•} : Cardinal.lift.{v,u} #(Sequenceβ‚‚ aβ‚€ a₁ aβ‚‚ i) = #(Sequenceβ‚‚ (ULift.{v,u} aβ‚€) (ULift.{v,u} a₁) (ULift.{v,u} aβ‚‚) i) := by
rcases i with (_ | _ | _ | i) <;> simp only [Sequenceβ‚‚, mk_uLift, Nat.succ_ne_zero, IsEmpty.forall_iff, Nat.succ.injEq, add_eq_zero, OfNat.ofNat_ne_zero, and_false, one_ne_zero, mk_eq_zero, lift_zero]
[ " lift.{v, u} #(Sequenceβ‚‚ aβ‚€ a₁ aβ‚‚ i) = #(Sequenceβ‚‚ (ULift.{v, u} aβ‚€) (ULift.{v, u} a₁) (ULift.{v, u} aβ‚‚) i)", " lift.{v, u} #(Sequenceβ‚‚ aβ‚€ a₁ aβ‚‚ 0) = #(Sequenceβ‚‚ (ULift.{v, u} aβ‚€) (ULift.{v, u} a₁) (ULift.{v, u} aβ‚‚) 0)", " lift.{v, u} #(Sequenceβ‚‚ aβ‚€ a₁ aβ‚‚ (0 + 1)) = #(Sequenceβ‚‚ (ULift.{v, u} aβ‚€) (ULift.{v, u} ...
[]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.simple_func from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" noncomputable section open Set hiding restrict restrict_apply open Filter ENNReal open Function (support) open scoped Cla...
Mathlib/MeasureTheory/Function/SimpleFunc.lean
129
130
theorem exists_range_iff {f : Ξ± β†’β‚› Ξ²} {p : Ξ² β†’ Prop} : (βˆƒ y ∈ f.range, p y) ↔ βˆƒ x, p (f x) := by
simpa only [mem_range, exists_prop] using Set.exists_range_iff
[ " f = g", " { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ } = g", " { toFun := toFun✝¹, measurableSet_fiber' := measurableSet_fiber'✝¹, finite_range' := finite_range'✝¹ } =\n { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' :=...
[ " f = g", " { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' := finite_range'✝ } = g", " { toFun := toFun✝¹, measurableSet_fiber' := measurableSet_fiber'✝¹, finite_range' := finite_range'✝¹ } =\n { toFun := toFun✝, measurableSet_fiber' := measurableSet_fiber'✝, finite_range' :=...
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv noncomputable section open scoped Manifold open Bundle Set Topology section SpecificFunctions variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π•œ E H)...
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
184
187
theorem hasMFDerivAt_const (c : M') (x : M) : HasMFDerivAt I I' (fun _ : M => c) x (0 : TangentSpace I x β†’L[π•œ] TangentSpace I' c) := by
refine ⟨continuous_const.continuousAt, ?_⟩ simp only [writtenInExtChartAt, (· ∘ ·), hasFDerivWithinAt_const]
[ " HasMFDerivAt I I' (fun x => c) x 0", " HasFDerivWithinAt (writtenInExtChartAt I I' x fun x => c) 0 (range ↑I) (↑(extChartAt I x) x)" ]
[]
import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.Ring #align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Finset namespace Nat variable (p : β„• β†’ Prop) section Count variable [DecidablePred p] def count (n : β„•) : β„• := (List.range n)....
Mathlib/Data/Nat/Count.lean
133
137
theorem count_injective {m n : β„•} (hm : p m) (hn : p n) (heq : count p m = count p n) : m = n := by
by_contra! h : m β‰  n wlog hmn : m < n Β· exact this hn hm heq.symm h.symm (h.lt_or_lt.resolve_left hmn) Β· simpa [heq] using count_strict_mono hm hmn
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " βˆ€ (x : β„•), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " βˆ€ (x : β„•), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.PolynomialExp #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9...
Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean
53
54
theorem pos_of_pos {x : ℝ} (hx : 0 < x) : 0 < expNegInvGlue x := by
simp [expNegInvGlue, not_le.2 hx, exp_pos]
[ " expNegInvGlue x = 0", " 0 < expNegInvGlue x" ]
[ " expNegInvGlue x = 0" ]
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section OpenMap variable [Topo...
Mathlib/Topology/Maps.lean
338
340
theorem isOpen_range (hf : IsOpenMap f) : IsOpen (range f) := by
rw [← image_univ] exact hf _ isOpen_univ
[ " IsOpen (id '' s)", " IsOpen (g ∘ f '' s)", " IsOpen (g '' (f '' s))", " IsOpen (range f)", " IsOpen (f '' univ)" ]
[ " IsOpen (id '' s)", " IsOpen (g ∘ f '' s)", " IsOpen (g '' (f '' s))" ]
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Expand import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.ZMod.Basic #align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c...
Mathlib/RingTheory/WittVector/WittPolynomial.lean
146
148
theorem aeval_wittPolynomial {A : Type*} [CommRing A] [Algebra R A] (f : β„• β†’ A) (n : β„•) : aeval f (W_ R n) = βˆ‘ i ∈ range (n + 1), (p : A) ^ i * f i ^ p ^ (n - i) := by
simp [wittPolynomial, AlgHom.map_sum, aeval_monomial, Finsupp.prod_single_index]
[ " wittPolynomial p R n = βˆ‘ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " βˆ€ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
[ " wittPolynomial p R n = βˆ‘ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " βˆ€ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finset.NatAntidiagonal #align_import algebra.big_operators.nat_antidiagonal from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" variable {M N : Type*} [CommMonoid M] [AddCommMonoid N] namespace Finset namespace Nat t...
Mathlib/Algebra/BigOperators/NatAntidiagonal.lean
42
45
theorem prod_antidiagonal_succ' {n : β„•} {f : β„• Γ— β„• β†’ M} : (∏ p ∈ antidiagonal (n + 1), f p) = f (n + 1, 0) * ∏ p ∈ antidiagonal n, f (p.1, p.2 + 1) := by
rw [← prod_antidiagonal_swap, prod_antidiagonal_succ, ← prod_antidiagonal_swap] rfl
[ " ∏ p ∈ antidiagonal (n + 1), f p = f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)", " f (0, n + 1) *\n ∏ x ∈ antidiagonal n,\n f (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Function.Embedding.refl β„•)) x) =\n f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)", " ∏ p ∈ ...
[ " ∏ p ∈ antidiagonal (n + 1), f p = f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)", " f (0, n + 1) *\n ∏ x ∈ antidiagonal n,\n f (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Function.Embedding.refl β„•)) x) =\n f (0, n + 1) * ∏ p ∈ antidiagonal n, f (p.1 + 1, p.2)", " ∏ p ∈ ...
import Mathlib.Data.Nat.Defs import Mathlib.Data.Option.Basic import Mathlib.Data.List.Defs import Mathlib.Init.Data.List.Basic import Mathlib.Init.Data.List.Instances import Mathlib.Init.Data.List.Lemmas import Mathlib.Logic.Unique import Mathlib.Order.Basic import Mathlib.Tactic.Common #align_import data.list.basic...
Mathlib/Data/List/Basic.lean
137
138
theorem mem_map_of_involutive {f : Ξ± β†’ Ξ±} (hf : Involutive f) {a : Ξ±} {l : List Ξ±} : a ∈ map f l ↔ f a ∈ l := by
rw [mem_map, hf.exists_mem_and_apply_eq_iff]
[ " a = b ∨ a β‰  b ∧ a ∈ l", " a ∈ [b, c] ↔ a = b ∨ a = c", " (βˆƒ y, y ∈ l ∧ f y = x) β†’ f x ∈ l", " f (f y) ∈ l", " a ∈ map f l ↔ f a ∈ l" ]
[ " a = b ∨ a β‰  b ∧ a ∈ l", " a ∈ [b, c] ↔ a = b ∨ a = c", " (βˆƒ y, y ∈ l ∧ f y = x) β†’ f x ∈ l", " f (f y) ∈ l" ]
import Mathlib.Data.Set.Prod import Mathlib.Logic.Function.Conjugate #align_import data.set.function from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207" variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} {Ο€ : Ξ± β†’ Type*} open Equiv Equiv.Perm Function namespace Set section restrict def restrict (...
Mathlib/Data/Set/Function.lean
139
143
theorem range_extend {f : Ξ± β†’ Ξ²} (hf : Injective f) (g : Ξ± β†’ Ξ³) (g' : Ξ² β†’ Ξ³) : range (extend f g g') = range g βˆͺ g' '' (range f)ᢜ := by
refine (range_extend_subset _ _ _).antisymm ?_ rintro z (⟨x, rfl⟩ | ⟨y, hy, rfl⟩) exacts [⟨f x, hf.extend_apply _ _ _⟩, ⟨y, extend_apply' _ _ _ hy⟩]
[ " s.restrict f '' (Subtype.val ⁻¹' t) = f '' (t ∩ s)", " (range f).restrict (extend f g g') = fun x => g (Exists.choose β‹―)", " (range f)ᢜ.restrict (extend f g g') = g' ∘ Subtype.val", " range (extend f g g') βŠ† range g βˆͺ g' '' (range f)ᢜ", " extend f g g' y ∈ range g βˆͺ g' '' (range f)ᢜ", " (if h : βˆƒ a, f a...
[ " s.restrict f '' (Subtype.val ⁻¹' t) = f '' (t ∩ s)", " (range f).restrict (extend f g g') = fun x => g (Exists.choose β‹―)", " (range f)ᢜ.restrict (extend f g g') = g' ∘ Subtype.val", " range (extend f g g') βŠ† range g βˆͺ g' '' (range f)ᢜ", " extend f g g' y ∈ range g βˆͺ g' '' (range f)ᢜ", " (if h : βˆƒ a, f a...
import Mathlib.Init.Function import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Inhabit #align_import data.prod.basic from "leanprover-community/mathlib"@"d07245fd37786daa997af4f1a73a49fa3b748408" variable {Ξ± : Type*} {Ξ² : Type*} {Ξ³ : Type*} {Ξ΄ : Type*} @[simp] theorem Prod.map_apply (f : Ξ± β†’ Ξ³) (g : Ξ² β†’ Ξ΄...
Mathlib/Data/Prod/Basic.lean
122
123
theorem ext_iff {p q : Ξ± Γ— Ξ²} : p = q ↔ p.1 = q.1 ∧ p.2 = q.2 := by
rw [mk.inj_iff]
[ " Function.Injective (mk a)", " b₁ = bβ‚‚", " Function.Injective fun a => (a, b)", " p = q ↔ p.fst = q.fst ∧ p.snd = q.snd" ]
[ " Function.Injective (mk a)", " b₁ = bβ‚‚", " Function.Injective fun a => (a, b)" ]
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.Finsupp.Order #align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Finset variable {Ξ± Ξ² ΞΉ : Type*} namespace Finsupp def toMultiset : (Ξ± β†’β‚€ β„•) β†’+ Multiset Ξ± where toFun f := Finsupp.sum f...
Mathlib/Data/Finsupp/Multiset.lean
61
63
theorem toMultiset_sum_single (s : Finset ΞΉ) (n : β„•) : Finsupp.toMultiset (βˆ‘ i ∈ s, single i n) = n β€’ s.val := by
simp_rw [toMultiset_sum, Finsupp.toMultiset_single, sum_nsmul, sum_multiset_singleton]
[ " toMultiset (single a n) = n β€’ {a}", " 0 β€’ {a} = 0", " toMultiset (βˆ‘ i ∈ s, single i n) = n β€’ s.val" ]
[ " toMultiset (single a n) = n β€’ {a}", " 0 β€’ {a} = 0" ]
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
115
119
theorem vars_add_of_disjoint [DecidableEq Οƒ] (h : Disjoint p.vars q.vars) : (p + q).vars = p.vars βˆͺ q.vars := by
refine (vars_add_subset p q).antisymm fun x hx => ?_ simp only [vars_def, Multiset.disjoint_toFinset] at h hx ⊒ rwa [degrees_add_of_disjoint h, Multiset.toFinset_union]
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = βˆ…", " ((monomial s) r).vars = s.support", " (C r).vars = βˆ…", " (X n).vars = {n}", " i ∈ p.vars ↔ βˆƒ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars βŠ† p.vars βˆͺ q.vars", " x ∈ p.vars βˆͺ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = βˆ…", " ((monomial s) r).vars = s.support", " (C r).vars = βˆ…", " (X n).vars = {n}", " i ∈ p.vars ↔ βˆƒ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars βŠ† p.vars βˆͺ q.vars", " x ∈ p.vars βˆͺ q....
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
58
62
theorem Ioc_add_bij : BijOn (Β· + d) (Ioc a b) (Ioc (a + d) (b + d)) := by
rw [← Ioi_inter_Iic, ← Ioi_inter_Iic] exact (Ioi_add_bij a d).inter_mapsTo (fun x hx => add_le_add_right hx _) fun x hx => le_of_add_le_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.Data.DFinsupp.Basic import Mathlib.Data.Finset.Pointwise import Mathlib.LinearAlgebra.Basis.VectorSpace #align_import algebra.group.unique_prods from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" @[to_additive "Let `G` be a Type with addition, let `A B : Finset G` ...
Mathlib/Algebra/Group/UniqueProds.lean
67
68
theorem of_subsingleton [Subsingleton G] : UniqueMul A B a0 b0 := by
simp [UniqueMul, eq_iff_true_of_subsingleton]
[ " UniqueMul A B a0 b0" ]
[]
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.Tactic.ByContra import Mathlib.Topology.Algebra.Polynomial import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Analysis.Complex.Arg #align_import ring_theory.polynomial.cyclotomic.eval from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf16...
Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
70
111
theorem cyclotomic_pos {n : β„•} (hn : 2 < n) {R} [LinearOrderedCommRing R] (x : R) : 0 < eval x (cyclotomic n R) := by
induction' n using Nat.strong_induction_on with n ih have hn' : 0 < n := pos_of_gt hn have hn'' : 1 < n := one_lt_two.trans hn have := prod_cyclotomic_eq_geom_sum hn' R apply_fun eval x at this rw [← cons_self_properDivisors hn'.ne', Finset.erase_cons_of_ne _ hn''.ne', Finset.prod_cons, eval_mul, eval_...
[ " eval 1 (cyclotomic p R) = ↑p", " evalβ‚‚ f 1 (cyclotomic p R) = ↑p", " eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p", " evalβ‚‚ f 1 (cyclotomic (p ^ (k + 1)) R) = ↑p", " 0 < eval (-1) (cyclotomic n R)", " 0 < eval (↑(-1)) (cyclotomic n β„€)", " 0 < eval (↑(-1)) (cyclotomic n ℝ)", " 0 < eval (-1) (cyclotomic n...
[ " eval 1 (cyclotomic p R) = ↑p", " evalβ‚‚ f 1 (cyclotomic p R) = ↑p", " eval 1 (cyclotomic (p ^ (k + 1)) R) = ↑p", " evalβ‚‚ f 1 (cyclotomic (p ^ (k + 1)) R) = ↑p", " 0 < eval (-1) (cyclotomic n R)", " 0 < eval (↑(-1)) (cyclotomic n β„€)", " 0 < eval (↑(-1)) (cyclotomic n ℝ)", " 0 < eval (-1) (cyclotomic n...
import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Functor.EpiMono #align_import category_theory.adjunction.evaluation from "leanprover-community/mathlib"@"937c692d73f5130c7fecd3fd32e81419f4e04eb7" namespace CategoryTheory open CategoryTheory.Limits universe v₁ vβ‚‚ u₁ uβ‚‚ variable...
Mathlib/CategoryTheory/Adjunction/Evaluation.lean
140
145
theorem NatTrans.epi_iff_epi_app {F G : C β₯€ D} (Ξ· : F ⟢ G) : Epi Ξ· ↔ βˆ€ c, Epi (Ξ·.app c) := by
constructor Β· intro h c exact (inferInstance : Epi (((evaluation _ _).obj c).map Ξ·)) Β· intros apply NatTrans.epi_of_epi_app
[ " βˆ€ ⦃X Y : C⦄ (f_1 : X ⟢ Y),\n ((fun d =>\n { obj := fun t => ∐ fun x => d, map := fun {X Y} f => Sigma.desc fun g => Sigma.ΞΉ (fun x => d) (g ≫ f),\n map_id := β‹―, map_comp := β‹― })\n x✝).map\n f_1 ≫\n (fun e => Sigma.desc fun h => f ≫ Sigma.ΞΉ (fun x => ...
[ " βˆ€ ⦃X Y : C⦄ (f_1 : X ⟢ Y),\n ((fun d =>\n { obj := fun t => ∐ fun x => d, map := fun {X Y} f => Sigma.desc fun g => Sigma.ΞΉ (fun x => d) (g ≫ f),\n map_id := β‹―, map_comp := β‹― })\n x✝).map\n f_1 ≫\n (fun e => Sigma.desc fun h => f ≫ Sigma.ΞΉ (fun x => ...
import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence import Mathlib.Algebra.ContinuedFractions.TerminatedStable import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Ring #align_import algebra.continued_fractions.convergents_equiv from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40a...
Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
155
181
theorem succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq : convergents'Aux s (n + 2) = convergents'Aux (squashSeq s n) (n + 1) := by
cases s_succ_nth_eq : s.get? <| n + 1 with | none => rw [squashSeq_eq_self_of_terminated s_succ_nth_eq, convergents'Aux_stable_step_of_terminated s_succ_nth_eq] | some gp_succ_n => induction n generalizing s gp_succ_n with | zero => obtain ⟨gp_head, s_head_eq⟩ : βˆƒ gp_head, s.head = some g...
[ " squashSeq s n = s", " (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }", " (squashSeq s n).get? m = s.get? m", " (squashSeq s (n + 1)).tail = squashSeq s.tail n", " (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m", " convergents'Aux s (n + 2) = conve...
[ " squashSeq s n = s", " (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }", " (squashSeq s n).get? m = s.get? m", " (squashSeq s (n + 1)).tail = squashSeq s.tail n", " (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m" ]
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
50
52
theorem revAtFun_inj {N : β„•} : Function.Injective (revAtFun N) := by
intro a b hab rw [← @revAtFun_invol N a, hab, revAtFun_invol]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i", " Function.Injective (revAtFun N)", " a = b" ]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i" ]