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 1 224 | goals_before listlengths 0 221 | new_goals listlengths 0 92 |
|---|---|---|---|---|---|---|---|---|
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 266 | 276 | theorem linearIndependent_le_basis {ι : Type w} (b : Basis ι R M) {κ : Type w} (v : κ → M)
(i : LinearIndependent R v) : #κ ≤ #ι := by |
classical
-- We split into cases depending on whether `ι` is infinite.
cases fintypeOrInfinite ι
· rw [Cardinal.mk_fintype ι] -- When `ι` is finite, we have `linearIndependent_le_span`,
haveI : Nontrivial R := nontrivial_of_invariantBasisNumber R
rw [Fintype.card_congr (Equiv.ofInjective b b.injective)... | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)",
" range v ≤ ↑(span R w)",
" ran... | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)",
" range v ≤ ↑(span R w)",
" ran... | [
" #κ ≤ ↑(Fintype.card ι)",
" #κ ≤ ↑(Fintype.card ↑(range ⇑b))"
] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Nat
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Fintype
import Mathlib.Tactic.IntervalCases
#align_import number_the... | Mathlib/NumberTheory/LucasLehmer.lean | 173 | 174 | theorem sZMod_eq_sMod (p : ℕ) (i : ℕ) : sZMod p i = (sMod p i : ZMod (2 ^ p - 1)) := by |
induction i <;> push_cast [← Int.coe_nat_two_pow_pred p, sMod, sZMod, *] <;> rfl
| [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... | [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2",
" 0 ≤ sMod p i",
" 0 ≤ sMod p 0",
" 0 ≤ sMod p (n✝ + 1)",
" 0 ≤ 4 % (2 ^ p - 1)",
" 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)",
" 2 ^ p - 1 ≠ 0",
" sMod p i % (2 ^ p - 1) = sMod p i",
" sMod p 0 % (2 ^ p - 1) = sMod p... | [
" sZMod p 0 = ↑(sMod p 0)",
" sZMod p (n✝ + 1) = ↑(sMod p (n✝ + 1))",
" 4 = 4",
" ↑(sMod p n✝) ^ 2 - 2 = ↑(sMod p n✝) ^ 2 - 2"
] |
import Mathlib.Algebra.Field.Defs
import Mathlib.Tactic.Common
#align_import algebra.field.defs from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c"
universe u
section IsField
structure IsField (R : Type u) [Semiring R] : Prop where
exists_pair_ne : ∃ x y : R, x ≠ y
mul_comm ... | Mathlib/Algebra/Field/IsField.lean | 84 | 93 | theorem uniq_inv_of_isField (R : Type u) [Ring R] (hf : IsField R) :
∀ x : R, x ≠ 0 → ∃! y : R, x * y = 1 := by |
intro x hx
apply exists_unique_of_exists_of_unique
· exact hf.mul_inv_cancel hx
· intro y z hxy hxz
calc
y = y * (x * z) := by rw [hxz, mul_one]
_ = x * y * z := by rw [← mul_assoc, hf.mul_comm y x]
_ = z := by rw [hxy, one_mul]
| [
" a * a⁻¹ = 1",
" a⁻¹ = Classical.choose ⋯",
" ∀ (x : R), x ≠ 0 → ∃! y, x * y = 1",
" ∃! y, x * y = 1",
" ∃ x_1, x * x_1 = 1",
" ∀ (y₁ y₂ : R), x * y₁ = 1 → x * y₂ = 1 → y₁ = y₂",
" y = z",
" y = y * (x * z)",
" y * (x * z) = x * y * z",
" x * y * z = z"
] | [
" a * a⁻¹ = 1",
" a⁻¹ = Classical.choose ⋯",
" ∀ (x : R), x ≠ 0 → ∃! y, x * y = 1"
] | [
" ∃! y, x * y = 1",
" ∃ x_1, x * x_1 = 1",
" ∀ (y₁ y₂ : R), x * y₁ = 1 → x * y₂ = 1 → y₁ = y₂",
" y = z",
" y = y * (x * z)",
" y * (x * z) = x * y * z",
" x * y * z = z"
] |
import Mathlib.CategoryTheory.Limits.Shapes.SplitCoequalizer
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.equalizers from "leanprover-community/mathlib"@"4698e35ca56a0d4fa53aa5639c3364e0a77f4eba"
noncomputable section
universe w v₁ v₂ u₁ u₂
open Cate... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean | 207 | 211 | theorem map_π_preserves_coequalizer_inv :
G.map (coequalizer.π f g) ≫ (PreservesCoequalizer.iso G f g).inv =
coequalizer.π (G.map f) (G.map g) := by |
rw [← ι_comp_coequalizerComparison_assoc, ← PreservesCoequalizer.iso_hom, Iso.hom_inv_id,
comp_id]
| [
" G.map f ≫ G.map h = G.map g ≫ G.map h",
" Cofork.π\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g ⋙ G)).inv).obj (G.mapCocone (Cofork.ofπ h w))) ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g ⋙ G)).inv).obj\n (G.mapCocone (Cofor... | [
" G.map f ≫ G.map h = G.map g ≫ G.map h",
" Cofork.π\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g ⋙ G)).inv).obj (G.mapCocone (Cofork.ofπ h w))) ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoParallelPair (parallelPair f g ⋙ G)).inv).obj\n (G.mapCocone (Cofor... | [] |
import Mathlib.Analysis.PSeries
import Mathlib.Data.Real.Pi.Wallis
import Mathlib.Tactic.AdaptationNote
#align_import analysis.special_functions.stirling from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open scoped Topology Real Nat Asymptotics
open Finset Filter Nat Real
namespace... | Mathlib/Analysis/SpecialFunctions/Stirling.lean | 104 | 120 | theorem log_stirlingSeq_diff_le_geo_sum (n : ℕ) :
log (stirlingSeq (n + 1)) - log (stirlingSeq (n + 2)) ≤
((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2 / (1 - ((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2) := by |
have h_nonneg : (0 : ℝ) ≤ ((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2 := sq_nonneg _
have g : HasSum (fun k : ℕ => (((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2) ^ ↑(k + 1))
(((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2 / (1 - ((1 : ℝ) / (2 * ↑(n + 1) + 1)) ^ 2)) := by
have := (hasSum_geometric_of_lt_one h_nonneg ?_).mul_left (((1 :... | [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / √2",
" (stirlingSeq n).log = (↑n !).log - 1 / 2 * (2 * ↑n).log - ↑n * (↑n / rexp 1).log",
" (stirlingSeq 0).log = (↑0!).log - 1 / 2 * (2 * ↑0).log - ↑0 * (↑0 / rexp 1).log",
" (stirlingSeq (n✝ + 1)).log = (↑(n✝ + 1)!).log - 1 / 2 * (2 * ↑(n✝ + 1)).log - ↑(n✝ ... | [
" stirlingSeq 0 = 0",
" stirlingSeq 1 = rexp 1 / √2",
" (stirlingSeq n).log = (↑n !).log - 1 / 2 * (2 * ↑n).log - ↑n * (↑n / rexp 1).log",
" (stirlingSeq 0).log = (↑0!).log - 1 / 2 * (2 * ↑0).log - ↑0 * (↑0 / rexp 1).log",
" (stirlingSeq (n✝ + 1)).log = (↑(n✝ + 1)!).log - 1 / 2 * (2 * ↑(n✝ + 1)).log - ↑(n✝ ... | [
" HasSum (fun k => ((1 / (2 * ↑(n + 1) + 1)) ^ 2) ^ (k + 1))\n ((1 / (2 * ↑(n + 1) + 1)) ^ 2 / (1 - (1 / (2 * ↑(n + 1) + 1)) ^ 2))",
" (1 / (2 * ↑(n + 1) + 1)) ^ 2 < 1",
" ((2 * ↑(n + 1) + 1) ^ 2)⁻¹ < 1",
" 0 < 2 * ↑(n + 1)",
" 1 / (2 * ↑(k + 1) + 1) * ((1 / (2 * ↑(n + 1) + 1)) ^ 2) ^ (k + 1) ≤ ((1 / (2 ... |
import Mathlib.MeasureTheory.OuterMeasure.Caratheodory
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
namespace MeasureTheory
open Outer... | Mathlib/MeasureTheory/OuterMeasure/Induced.lean | 65 | 68 | theorem le_extend {s : α} (h : P s) : m s h ≤ extend m s := by |
simp only [extend, le_iInf_iff]
intro
rfl
| [
" extend m s = m s h",
" extend m s = ⊤",
" c • extend m = extend fun s h => c • m s h",
" (c • extend m) s = extend (fun s h => c • m s h) s",
" c • ⨅ (h : P s), m s h = ⨅ (h : P s), c • m s h",
" m s h ≤ extend m s",
" ∀ (i : P s), m s h ≤ m s i",
" m s h ≤ m s i✝"
] | [
" extend m s = m s h",
" extend m s = ⊤",
" c • extend m = extend fun s h => c • m s h",
" (c • extend m) s = extend (fun s h => c • m s h) s",
" c • ⨅ (h : P s), m s h = ⨅ (h : P s), c • m s h",
" m s h ≤ extend m s"
] | [
" ∀ (i : P s), m s h ≤ m s i",
" m s h ≤ m s i✝"
] |
import Mathlib.LinearAlgebra.BilinearForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.Basic
universe uR uA uM₁ uM₂
variable {R : Type uR} {A : Type uA} {M₁ : Type uM₁} {M₂ : Type uM₂}
open TensorProduct
open LinearMap (BilinForm)
namespace QuadraticForm
section CommRing
variable [CommRing R] [CommR... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean | 95 | 99 | theorem associated_baseChange [Invertible (2 : A)] (Q : QuadraticForm R M₂) :
associated (R := A) (Q.baseChange A) = (associated (R := R) Q).baseChange A := by |
dsimp only [QuadraticForm.baseChange, LinearMap.baseChange]
rw [associated_tmul (QuadraticForm.sq (R := A)) Q, associated_sq]
exact rfl
| [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... | [
" associated (Q₁.tmul Q₂) = (associated Q₁).tmul (associated Q₂)",
" associated\n ((let toQ := BilinForm.toQuadraticFormLinearMap A A (M₁ ⊗[R] M₂);\n let tmulB := BilinForm.tensorDistrib R A;\n let toB := AlgebraTensorModule.map associated associated;\n toQ ∘ₗ tmulB ∘ₗ toB)\n (Q₁ ... | [
" associated (sq.tmul Q) = BilinForm.baseChange A (associated Q)",
" BilinForm.tmul (LinearMap.mul A A) (associated Q) = BilinForm.baseChange A (associated Q)"
] |
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Data.DFinsupp.Basic
#align_import algebra.direct_sum.basic from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open Function
universe u v w u₁
variable (ι : Type v) [dec_ι : DecidableEq ι] (β : ι → Type w)
def DirectSum... | Mathlib/Algebra/DirectSum/Basic.lean | 155 | 159 | theorem sum_univ_of [Fintype ι] (x : ⨁ i, β i) :
∑ i ∈ Finset.univ, of β i (x i) = x := by |
apply DFinsupp.ext (fun i ↦ ?_)
rw [DFinsupp.finset_sum_apply]
simp [of_apply]
| [
" ∑ i : ι, (of β i) (x i) = x",
" (∑ i : ι, (of β i) (x i)) i = x i",
" ∑ a : ι, ((of β a) (x a)) i = x i"
] | [
" ∑ i : ι, (of β i) (x i) = x"
] | [
" (∑ i : ι, (of β i) (x i)) i = x i",
" ∑ a : ι, ((of β a) (x a)) i = x i"
] |
import Mathlib.Algebra.Polynomial.Module.AEval
#align_import data.polynomial.module from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
universe u v
open Polynomial BigOperators
@[nolint unusedArguments]
def PolynomialModule (R M : Type*) [CommRing R] [AddCommGroup M] [Module R M] := ℕ ... | Mathlib/Algebra/Polynomial/Module/Basic.lean | 123 | 135 | theorem monomial_smul_single (i : ℕ) (r : R) (j : ℕ) (m : M) :
monomial i r • single R j m = single R (i + j) (r • m) := by |
simp only [LinearMap.mul_apply, Polynomial.aeval_monomial, LinearMap.pow_apply,
Module.algebraMap_end_apply, smul_def]
induction i generalizing r j m with
| zero =>
rw [Function.iterate_zero, zero_add]
exact Finsupp.smul_single r j m
| succ n hn =>
rw [Function.iterate_succ, Function.comp_apply... | [
" f • m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m",
" IsScalarTower S R[X] (PolynomialModule R M)",
" ∀ (x : S) (y : R[X]) (z : PolynomialModule R M), (x • y) • z = x • y • z",
" (x • y) • z = x • y • z",
" (monomial i) r • (single R j) m = (single R (i + j)) (r • m)",
" r • (⇑(Finsupp.lmapDomain ... | [
" f • m = ((aeval (Finsupp.lmapDomain M R Nat.succ)) f) m",
" IsScalarTower S R[X] (PolynomialModule R M)",
" ∀ (x : S) (y : R[X]) (z : PolynomialModule R M), (x • y) • z = x • y • z",
" (x • y) • z = x • y • z",
" (monomial i) r • (single R j) m = (single R (i + j)) (r • m)"
] | [
" r • (⇑(Finsupp.lmapDomain M R Nat.succ))^[i] ((single R j) m) = (single R (i + j)) (r • m)",
" r • (⇑(Finsupp.lmapDomain M R Nat.succ))^[0] ((single R j) m) = (single R (0 + j)) (r • m)",
" r • id ((single R j) m) = (single R j) (r • m)",
" r • (⇑(Finsupp.lmapDomain M R Nat.succ))^[n + 1] ((single R j) m) =... |
import Mathlib.Analysis.Analytic.IsolatedZeros
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.Complex.AbsMax
#align_import analysis.complex.open_mapping from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88"
open Set Filter Metric Complex
open scoped Topology
vari... | Mathlib/Analysis/Complex/OpenMapping.lean | 77 | 106 | theorem AnalyticAt.eventually_constant_or_nhds_le_map_nhds_aux (hf : AnalyticAt ℂ f z₀) :
(∀ᶠ z in 𝓝 z₀, f z = f z₀) ∨ 𝓝 (f z₀) ≤ map f (𝓝 z₀) := by |
/- The function `f` is analytic in a neighborhood of `z₀`; by the isolated zeros principle, if `f`
is not constant in a neighborhood of `z₀`, then it is nonzero, and therefore bounded below, on
every small enough circle around `z₀` and then `DiffContOnCl.ball_subset_image_closedBall`
provides an explicit... | [
" ball (f z₀) (ε / 2) ⊆ f '' closedBall z₀ r",
" v ∈ f '' closedBall z₀ r",
" ε / 2 ≤ ‖f z - v‖",
" ‖f z₀ - v‖ < ε / 2",
" f z - v = 0",
" False",
" ∀ᶠ (w : ℂ) in 𝓝 z, f w = f z",
" f h - v = f z - v → f h = f z",
" (∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀) ∨ 𝓝 (f z₀) ≤ map f (𝓝 z₀)",
" 𝓝 (f z₀) ≤ map... | [
" ball (f z₀) (ε / 2) ⊆ f '' closedBall z₀ r",
" v ∈ f '' closedBall z₀ r",
" ε / 2 ≤ ‖f z - v‖",
" ‖f z₀ - v‖ < ε / 2",
" f z - v = 0",
" False",
" ∀ᶠ (w : ℂ) in 𝓝 z, f w = f z",
" f h - v = f z - v → f h = f z",
" (∀ᶠ (z : ℂ) in 𝓝 z₀, f z = f z₀) ∨ 𝓝 (f z₀) ≤ map f (𝓝 z₀)"
] | [
" 𝓝 (f z₀) ≤ map f (𝓝 z₀)",
" ∃ i, 0 < i ∧ ball (f z₀) i ⊆ f '' closedBall z₀ R",
" ∃ ρ > 0, AnalyticOn ℂ f (closedBall z₀ ρ) ∧ ∀ z ∈ closedBall z₀ ρ, z ≠ z₀ → f z ≠ f z₀",
" ball (f z₀) (‖f x - f z₀‖ / 2) ⊆ f '' closedBall z₀ R"
] |
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct
import Mathlib.MeasureTheory.Function.LpSpace
set_option autoImplicit true
open MeasureTheory Filter
open scoped ENNReal
namespace DomMulAct
variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N]
[MeasurableSpace α] [NormedAddCommGroup E] {μ : Me... | Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean | 82 | 83 | theorem smul_Lp_sub (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f - g) = c • f - c • g := by |
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl
| [
" ∀ (f g : ↥(Lp E p μ)), c • (f + g) = c • f + c • g",
" c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + c • ⟨Quot.mk Setoid.r a✝, property✝⟩",
" c • -f = -(c • f)",
" c • -⟨Quot.mk Setoid.r a✝, property✝⟩ = -(c • ⟨Quot.mk Setoid.r a✝... | [
" ∀ (f g : ↥(Lp E p μ)), c • (f + g) = c • f + c • g",
" c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + c • ⟨Quot.mk Setoid.r a✝, property✝⟩",
" c • -f = -(c • f)",
" c • -⟨Quot.mk Setoid.r a✝, property✝⟩ = -(c • ⟨Quot.mk Setoid.r a✝... | [
" c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ - ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ - c • ⟨Quot.mk Setoid.r a✝, property✝⟩"
] |
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Nat.GCD.BigOperators
import Mathlib.Order.SupIndep
#align_import group_theory.noncomm_pi_coprod from "leanprover-community/mathlib"@"6f9f36364eae3f42368b04858fd66d6d9ae730d8"
... | Mathlib/GroupTheory/NoncommPiCoprod.lean | 55 | 78 | theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
(K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
(heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1 := by |
classical
revert heq1
induction' s using Finset.induction_on with i s hnmem ih
· simp
· have hcomm := comm.mono (Finset.coe_subset.2 <| Finset.subset_insert _ _)
simp only [Finset.forall_mem_insert] at hmem
have hmem_bsupr : s.noncommProd f hcomm ∈ ⨆ i ∈ (s : Set ι), K i := by
ref... | [
" ∀ i ∈ s, f i = 1",
" s.noncommProd f comm = 1 → ∀ i ∈ s, f i = 1",
" ∅.noncommProd f comm = 1 → ∀ i ∈ ∅, f i = 1",
" (insert i s).noncommProd f comm = 1 → ∀ i_1 ∈ insert i s, f i_1 = 1",
" s.noncommProd f hcomm ∈ ⨆ i ∈ ↑s, K i",
" ∀ c ∈ s, f c ∈ ⨆ i ∈ ↑s, K i",
" f x ∈ ⨆ i ∈ ↑s, K i",
" ∀ i_1 ∈ inse... | [
" ∀ i ∈ s, f i = 1"
] | [
" s.noncommProd f comm = 1 → ∀ i ∈ s, f i = 1",
" ∅.noncommProd f comm = 1 → ∀ i ∈ ∅, f i = 1",
" (insert i s).noncommProd f comm = 1 → ∀ i_1 ∈ insert i s, f i_1 = 1",
" s.noncommProd f hcomm ∈ ⨆ i ∈ ↑s, K i",
" ∀ c ∈ s, f c ∈ ⨆ i ∈ ↑s, K i",
" f x ∈ ⨆ i ∈ ↑s, K i",
" ∀ i_1 ∈ insert i s, f i_1 = 1",
"... |
import Mathlib.Order.ConditionallyCompleteLattice.Finset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54"
assert_not_exists MonoidWithZero
open Set
namespace Nat
open scoped Classical
noncomputable instance : ... | Mathlib/Data/Nat/Lattice.lean | 110 | 120 | theorem sInf_upward_closed_eq_succ_iff {s : Set ℕ} (hs : ∀ k₁ k₂ : ℕ, k₁ ≤ k₂ → k₁ ∈ s → k₂ ∈ s)
(k : ℕ) : sInf s = k + 1 ↔ k + 1 ∈ s ∧ k ∉ s := by |
constructor
· intro H
rw [eq_Ici_of_nonempty_of_upward_closed (nonempty_of_sInf_eq_succ _) hs, H, mem_Ici, mem_Ici]
· exact ⟨le_rfl, k.not_succ_le_self⟩;
· exact k
· assumption
· rintro ⟨H, H'⟩
rw [sInf_def (⟨_, H⟩ : s.Nonempty), find_eq_iff]
exact ⟨H, fun n hnk hns ↦ H' <| hs n k (Nat.lt... | [
" sInf s = 0 ↔ 0 ∈ s ∨ s = ∅",
" sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅",
" sInf ∅ = 0",
" 0 ∈ ∅ ∨ ∅ = ∅",
" ∅ = ∅",
" iInf f = 0",
" ⨅ i, 0 = 0",
" (0 ∈ range fun i => 0) ∨ (range fun i => 0) = ∅",
" sInf s ∈ s",
" Nat.find h ∈ s",
" m ∉ s",
" m ∉ ∅",
" sInf s ≤ m",
" Nat.find ⋯ ≤ m",
" s.Nonempty"... | [
" sInf s = 0 ↔ 0 ∈ s ∨ s = ∅",
" sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅",
" sInf ∅ = 0",
" 0 ∈ ∅ ∨ ∅ = ∅",
" ∅ = ∅",
" iInf f = 0",
" ⨅ i, 0 = 0",
" (0 ∈ range fun i => 0) ∨ (range fun i => 0) = ∅",
" sInf s ∈ s",
" Nat.find h ∈ s",
" m ∉ s",
" m ∉ ∅",
" sInf s ≤ m",
" Nat.find ⋯ ≤ m",
" s.Nonempty"... | [
" sInf s = k + 1 → k + 1 ∈ s ∧ k ∉ s",
" k + 1 ∈ s ∧ k ∉ s",
" k + 1 ≤ k + 1 ∧ ¬k + 1 ≤ k",
" ℕ",
" sInf s = k + 1",
" k + 1 ∈ s ∧ k ∉ s → sInf s = k + 1",
" k + 1 ∈ s ∧ ∀ n < k + 1, n ∉ s"
] |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.NNRat.Defs
variable {ι α : Type*}
namespace NNRat
@[norm_cast]
theorem coe_list_sum (l : List ℚ≥0) : (l.sum : ℚ) = (l.map (↑)).sum :=
map_list_sum coeHom _
#align nnrat.coe_list_sum NNRat.coe_list_sum
@[norm_cast]
theorem coe_list_prod (... | Mathlib/Data/NNRat/BigOperators.lean | 52 | 55 | theorem toNNRat_prod_of_nonneg {s : Finset α} {f : α → ℚ} (hf : ∀ a ∈ s, 0 ≤ f a) :
(∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat := by |
rw [← coe_inj, coe_prod, Rat.coe_toNNRat _ (Finset.prod_nonneg hf)]
exact Finset.prod_congr rfl fun x hxs ↦ by rw [Rat.coe_toNNRat _ (hf x hxs)]
| [
" (∑ a ∈ s, f a).toNNRat = ∑ a ∈ s, (f a).toNNRat",
" ∑ i ∈ s, f i = ∑ a ∈ s, ↑(f a).toNNRat",
" f x = ↑(f x).toNNRat",
" (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat",
" ∏ i ∈ s, f i = ∏ a ∈ s, ↑(f a).toNNRat"
] | [
" (∑ a ∈ s, f a).toNNRat = ∑ a ∈ s, (f a).toNNRat",
" ∑ i ∈ s, f i = ∑ a ∈ s, ↑(f a).toNNRat",
" f x = ↑(f x).toNNRat",
" (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat"
] | [
" ∏ i ∈ s, f i = ∏ a ∈ s, ↑(f a).toNNRat"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
noncomputable section
open NNReal ENNReal Topology Set Filter Bornology
universe u v w
variable {ι : Sort*} {α : Type u} {β :... | Mathlib/Topology/MetricSpace/Thickening.lean | 238 | 239 | theorem cthickening_empty (δ : ℝ) : cthickening δ (∅ : Set α) = ∅ := by |
simp only [cthickening, ENNReal.ofReal_ne_top, setOf_false, infEdist_empty, top_le_iff]
| [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E",
" x ∉ cthickening δ E",
" ENNReal.ofReal δ < infEdist x E",
" x ∈ cthickening δ E",
" edist x y ≤ ENNReal.ofReal δ",
" ENNReal.ofReal (dist x y) ≤ ENNReal.ofReal δ",
" cthickening δ ∅ = ∅"
] | [
" ∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ cthickening δ E",
" x ∉ cthickening δ E",
" ENNReal.ofReal δ < infEdist x E",
" x ∈ cthickening δ E",
" edist x y ≤ ENNReal.ofReal δ",
" ENNReal.ofReal (dist x y) ≤ ENNReal.ofReal δ",
" cthickening δ ∅ = ∅"
] | [] |
import Mathlib.Analysis.InnerProductSpace.PiL2
import Mathlib.Combinatorics.Additive.AP.Three.Defs
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Complex.ExponentialBounds
#align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8"
open N... | Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean | 118 | 118 | theorem sphere_zero_right (n k : ℕ) : sphere (n + 1) 0 k = ∅ := by | simp [sphere]
| [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... | [
" ThreeAPFree (frontier s)",
" a = b",
" (1 / 2) • a + (1 / 2) • c = b",
" 2 ≠ 0",
" a = (1 / 2) • a + (1 / 2) • c",
" c = (2⁻¹ + 2⁻¹) • c",
" c = 1 • c",
" ThreeAPFree (sphere x r)",
" ThreeAPFree (sphere x 0)",
" ThreeAPFree {x}",
" sphere x r = frontier (closedBall x r)",
" x ∈ box n d ↔ ∀ ... | [] |
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 | 69 | 71 | theorem ContinuousOn.div_const (hf : ContinuousOn f s) (y : G₀) :
ContinuousOn (fun x => f x / y) s := by |
simpa only [div_eq_mul_inv] using hf.mul continuousOn_const
| [
" Tendsto (fun a => f a / y) l (𝓝 (x / y))",
" ContinuousOn (fun x => f x / y) s"
] | [
" Tendsto (fun a => f a / y) l (𝓝 (x / y))",
" ContinuousOn (fun x => f x / y) s"
] | [] |
import Mathlib.Algebra.Order.Group.Nat
import Mathlib.Data.Finset.Antidiagonal
import Mathlib.Data.Finset.Card
import Mathlib.Data.Multiset.NatAntidiagonal
#align_import data.finset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function
namespace Finset
name... | Mathlib/Data/Finset/NatAntidiagonal.lean | 89 | 99 | theorem antidiagonal_succ_succ' {n : ℕ} :
antidiagonal (n + 2) =
cons (0, n + 2)
(cons (n + 2, 0)
((antidiagonal n).map
(Embedding.prodMap ⟨Nat.succ, Nat.succ_injective⟩
⟨Nat.succ, Nat.succ_injective⟩)) <|
by simp)
(by simp) := by |
simp_rw [antidiagonal_succ (n + 1), antidiagonal_succ', Finset.map_cons, map_map]
rfl
| [
" xy ∈ (fun n => { val := Multiset.Nat.antidiagonal n, nodup := ⋯ }) n ↔ xy.1 + xy.2 = n",
" antidiagonal n = map { toFun := fun i => (n - i, i), inj' := ⋯ } (range (n + 1))",
" map ({ toFun := fun i => (i, n - i), inj' := ⋯ }.trans { toFun := Prod.swap, inj' := ⋯ }) (range (n + 1)) =\n map { toFun := fun i ... | [
" xy ∈ (fun n => { val := Multiset.Nat.antidiagonal n, nodup := ⋯ }) n ↔ xy.1 + xy.2 = n",
" antidiagonal n = map { toFun := fun i => (n - i, i), inj' := ⋯ } (range (n + 1))",
" map ({ toFun := fun i => (i, n - i), inj' := ⋯ }.trans { toFun := Prod.swap, inj' := ⋯ }) (range (n + 1)) =\n map { toFun := fun i ... | [
" cons (0, n + 1 + 1)\n (cons (({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Embedding.refl ℕ)) (n + 1, 0))\n (map\n (((Embedding.refl ℕ).prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }).trans\n ({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap (Embed... |
import Mathlib.Algebra.Homology.Additive
import Mathlib.AlgebraicTopology.MooreComplex
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.CategoryTheory.Preadditive.Opposite
import Mathlib.CategoryTheory.Idempotents.FunctorCategories
#align_import algebraic_topology.alternating_face_map_complex from "leanprover-c... | Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean | 70 | 112 | theorem d_squared (n : ℕ) : objD X (n + 1) ≫ objD X n = 0 := by |
-- we start by expanding d ≫ d as a double sum
dsimp
simp only [comp_sum, sum_comp, ← Finset.sum_product']
-- then, we decompose the index set P into a subset S and its complement Sᶜ
let P := Fin (n + 2) × Fin (n + 3)
let S := Finset.univ.filter fun ij : P => (ij.2 : ℕ) ≤ (ij.1 : ℕ)
erw [← Finset.sum_add... | [
" objD X (n + 1) ≫ objD X n = 0",
" (∑ i : Fin (n + 1 + 2), (-1) ^ ↑i • X.δ i) ≫ ∑ i : Fin (n + 2), (-1) ^ ↑i • X.δ i = 0",
" ∑ x ∈ Finset.univ ×ˢ Finset.univ, ((-1) ^ ↑x.2 • X.δ x.2) ≫ ((-1) ^ ↑x.1 • X.δ x.1) = 0",
" ∑ i ∈ S, ((-1) ^ ↑i.2 • X.δ i.2) ≫ ((-1) ^ ↑i.1 • X.δ i.1) =\n ∑ x ∈ Sᶜ, -((-1) ^ ↑x.2 • ... | [
" objD X (n + 1) ≫ objD X n = 0"
] | [
" (∑ i : Fin (n + 1 + 2), (-1) ^ ↑i • X.δ i) ≫ ∑ i : Fin (n + 2), (-1) ^ ↑i • X.δ i = 0",
" ∑ x ∈ Finset.univ ×ˢ Finset.univ, ((-1) ^ ↑x.2 • X.δ x.2) ≫ ((-1) ^ ↑x.1 • X.δ x.1) = 0",
" ∑ i ∈ S, ((-1) ^ ↑i.2 • X.δ i.2) ≫ ((-1) ^ ↑i.1 • X.δ i.1) =\n ∑ x ∈ Sᶜ, -((-1) ^ ↑x.2 • X.δ x.2) ≫ ((-1) ^ ↑x.1 • X.δ x.1)",... |
import Mathlib.Analysis.SpecialFunctions.Log.Base
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.measure.doubling from "leanprover-community/mathlib"@"5f6e827d81dfbeb6151d7016586ceeb0099b9655"
noncomputable section
open Set Filter Metric MeasureTheory TopologicalSpace ENNReal NN... | Mathlib/MeasureTheory/Measure/Doubling.lean | 113 | 129 | theorem eventually_measure_mul_le_scalingConstantOf_mul (K : ℝ) :
∃ R : ℝ,
0 < R ∧
∀ x t r, t ∈ Ioc 0 K → r ≤ R →
μ (closedBall x (t * r)) ≤ scalingConstantOf μ K * μ (closedBall x r) := by |
have h := Classical.choose_spec (exists_eventually_forall_measure_closedBall_le_mul μ K)
rcases mem_nhdsWithin_Ioi_iff_exists_Ioc_subset.1 h with ⟨R, Rpos, hR⟩
refine ⟨R, Rpos, fun x t r ht hr => ?_⟩
rcases lt_trichotomy r 0 with (rneg | rfl | rpos)
· have : t * r < 0 := mul_neg_of_pos_of_neg ht.1 rneg
s... | [
" ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), ∀ t ≤ K, μ (closedBall x (t * ε)) ≤ ↑C * μ (closedBall x ε)",
" ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * μ (closedBall x ε)",
" ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * μ (closedBall x ε)",
... | [
" ∃ C, ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), ∀ t ≤ K, μ (closedBall x (t * ε)) ≤ ↑C * μ (closedBall x ε)",
" ∀ (n : ℕ), ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * μ (closedBall x ε)",
" ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (closedBall x (2 ^ n * ε)) ≤ ↑(C ^ n) * μ (closedBall x ε)",
... | [
" μ (closedBall x (t * r)) ≤ ↑(scalingConstantOf μ K) * μ (closedBall x r)",
" μ (closedBall x (t * 0)) ≤ ↑(scalingConstantOf μ K) * μ (closedBall x 0)",
" μ {x} ≤ ↑(scalingConstantOf μ K) * μ {x}",
" 1 ≤ ↑(scalingConstantOf μ K)",
" ↑(Classical.choose ⋯) * μ (closedBall x r) ≤ ↑(scalingConstantOf μ K) * μ ... |
import Mathlib.Topology.Sets.Opens
#align_import topology.sets.closeds from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Order OrderDual Set
variable {ι α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
namespace TopologicalSpace
structure Closeds (α : Type*) [Topolog... | Mathlib/Topology/Sets/Closeds.lean | 110 | 111 | theorem coe_sup (s t : Closeds α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t := by |
rfl
| [
" s = t",
" { carrier := carrier✝, closed' := closed'✝ } = t",
" { carrier := carrier✝¹, closed' := closed'✝¹ } = { carrier := carrier✝, closed' := closed'✝ }",
" ↑(s ⊔ t) = ↑s ∪ ↑t"
] | [
" s = t",
" { carrier := carrier✝, closed' := closed'✝ } = t",
" { carrier := carrier✝¹, closed' := closed'✝¹ } = { carrier := carrier✝, closed' := closed'✝ }",
" ↑(s ⊔ t) = ↑s ∪ ↑t"
] | [] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.RingTheory.Ideal.Quotient
#align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open I... | Mathlib/NumberTheory/Multiplicity.lean | 56 | 71 | theorem sq_dvd_add_pow_sub_sub (p x : R) (n : ℕ) :
p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * n - x ^ n := by |
cases' n with n n
· simp only [pow_zero, Nat.cast_zero, sub_zero, sub_self, dvd_zero, Nat.zero_eq, mul_zero]
· simp only [Nat.succ_sub_succ_eq_sub, tsub_zero, Nat.cast_succ, add_pow, Finset.sum_range_succ,
Nat.choose_self, Nat.succ_sub _, tsub_self, pow_one, Nat.choose_succ_self_right, pow_zero,
mul_... | [
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)",
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)",
" p ∣ y - x",
" p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n",
" p ^ 2 ∣ (x + p) ^ 0 - x ^ (0 - 1) * p * ↑0 - x ^ 0",
" p ^ 2 ∣ (x + p) ^ (n + 1) - x ^ (n + 1 -... | [
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)",
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)",
" p ∣ y - x",
" p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n"
] | [
" p ^ 2 ∣ (x + p) ^ 0 - x ^ (0 - 1) * p * ↑0 - x ^ 0",
" p ^ 2 ∣ (x + p) ^ (n + 1) - x ^ (n + 1 - 1) * p * ↑(n + 1) - x ^ (n + 1)",
" p ^ 2 ∣\n ∑ m ∈ range n, x ^ m * p ^ (n + 1 - m) * ↑((n + 1).choose m) + x ^ n * p * (↑n + 1) + x ^ (n + 1) -\n x ^ n * p * (↑n + 1) -\n x ^ (n + 1)",
" ∑ m ∈ ra... |
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.RingTheory.Polynomial.Nilpotent
open scoped Classical Polynomial
open Polynomial
noncomputable section
| Mathlib/RingTheory/Polynomial/IrreducibleRing.lean | 37 | 61 | theorem Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical
{R S : Type*} [CommRing R] [(nilradical R).IsPrime] [CommRing S] [IsDomain S]
(φ : R →+* S) (f : R[X]) (hm : f.Monic) (hi : Irreducible (f.map φ)) : Irreducible f := by |
let R' := R ⧸ nilradical R
let ψ : R' →+* S := Ideal.Quotient.lift (nilradical R) φ
(haveI := RingHom.ker_isPrime φ; nilradical_le_prime (RingHom.ker φ))
let ι := algebraMap R R'
rw [show φ = ψ.comp ι from rfl, ← map_map] at hi
replace hi := hm.map ι |>.irreducible_of_irreducible_map _ _ hi
refine ⟨fun... | [
" Irreducible f",
" IsUnit a ∨ IsUnit b",
" Polynomial.map ι f = Polynomial.map ι a * Polynomial.map ι b",
" IsNilpotent (b.coeff i)",
" IsUnit (-(a.coeff f.natDegree * b.coeff 0))",
" IsUnit (∑ x ∈ Finset.range f.natDegree, a.coeff x * b.coeff (f.natDegree - x) - 1)"
] | [
" Irreducible f"
] | [
" IsUnit a ∨ IsUnit b",
" Polynomial.map ι f = Polynomial.map ι a * Polynomial.map ι b",
" IsNilpotent (b.coeff i)",
" IsUnit (-(a.coeff f.natDegree * b.coeff 0))",
" IsUnit (∑ x ∈ Finset.range f.natDegree, a.coeff x * b.coeff (f.natDegree - x) - 1)"
] |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Preserves.Basic
#align_import category_theory.limits.preserves.shapes.pullbacks from "leanprover-community/mathlib"@"f11e306adb9f2a393539d2bb4293bf1b42caa7ac"
noncomputable section
universe v₁ v₂ u₁ u₂
-- Porting note: ne... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean | 225 | 228 | theorem PreservesPushout.inl_iso_hom :
pushout.inl ≫ (PreservesPushout.iso G f g).hom = G.map pushout.inl := by |
delta PreservesPushout.iso
simp
| [
" G.map f ≫ G.map h = G.map g ≫ G.map k",
" ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ... | [
" G.map f ≫ G.map h = G.map g ≫ G.map k",
" ∀ (j : WalkingSpan),\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj (G.mapCocone (PushoutCocone.mk h k comm))).ι.app\n j ≫\n (Iso.refl\n ((Cocones.precompose (diagramIsoSpan (span f g ⋙ G)).symm.hom).obj\n ... | [
" pushout.inl ≫\n ((colimit.isColimit (span (G.map f) (G.map g))).coconePointUniqueUpToIso\n (isColimitOfHasPushoutOfPreservesColimit G f g)).hom =\n G.map pushout.inl"
] |
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 | 160 | 162 | theorem csSup_div (hs₀ : s.Nonempty) (hs₁ : BddAbove s) (ht₀ : t.Nonempty) (ht₁ : BddBelow t) :
sSup (s / t) = sSup s / sInf t := by |
rw [div_eq_mul_inv, csSup_mul hs₀ hs₁ ht₀.inv ht₁.inv, csSup_inv ht₀ ht₁, div_eq_mul_inv]
| [
" sSup s⁻¹ = (sInf s)⁻¹",
" sSup (Inv.inv '' s) = (sInf s)⁻¹",
" sInf s⁻¹ = (sSup s)⁻¹",
" sInf (Inv.inv '' s) = (sSup s)⁻¹",
" sSup (s / t) = sSup s / sInf t"
] | [
" sSup s⁻¹ = (sInf s)⁻¹",
" sSup (Inv.inv '' s) = (sInf s)⁻¹",
" sInf s⁻¹ = (sSup s)⁻¹",
" sInf (Inv.inv '' s) = (sSup s)⁻¹",
" sSup (s / t) = sSup s / sInf t"
] | [] |
import Mathlib.MeasureTheory.Measure.Restrict
open scoped ENNReal NNReal Topology
open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal
variable {α β δ ι : Type*}
namespace MeasureTheory
variable {m0 : MeasurableSpace α} [MeasurableSpace β] {μ ν ν₁ ν₂: Measure α}
{s t : Set α}
section IsFinit... | Mathlib/MeasureTheory/Measure/Typeclasses.lean | 41 | 44 | theorem not_isFiniteMeasure_iff : ¬IsFiniteMeasure μ ↔ μ Set.univ = ∞ := by |
refine ⟨fun h => ?_, fun h => fun h' => h'.measure_univ_lt_top.ne h⟩
by_contra h'
exact h ⟨lt_top_iff_ne_top.mpr h'⟩
| [
" ¬IsFiniteMeasure μ ↔ μ univ = ⊤",
" μ univ = ⊤",
" False"
] | [
" ¬IsFiniteMeasure μ ↔ μ univ = ⊤"
] | [
" μ univ = ⊤",
" False"
] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.RingTheory.Ideal.Quotient
#align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open I... | Mathlib/NumberTheory/Multiplicity.lean | 39 | 43 | theorem dvd_geom_sum₂_iff_of_dvd_sub {x y p : R} (h : p ∣ x - y) :
(p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) ↔ p ∣ n * y ^ (n - 1) := by |
rw [← mem_span_singleton, ← Ideal.Quotient.eq] at h
simp only [← mem_span_singleton, ← eq_zero_iff_mem, RingHom.map_geom_sum₂, h, geom_sum₂_self,
_root_.map_mul, map_pow, map_natCast]
| [
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)"
] | [
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)"
] | [] |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 634 | 635 | theorem preimage_mul_const_Icc (a b : α) {c : α} (h : 0 < c) :
(fun x => x * c) ⁻¹' Icc a b = Icc (a / c) (b / c) := by | simp [← Ici_inter_Iic, h]
| [
" (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Ioc a b = Ioc (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Ico a b = Ico (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Icc a b = Icc (a / c) (b / c)"
] | [
" (fun x => x * c) ⁻¹' Ioo a b = Ioo (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Ioc a b = Ioc (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Ico a b = Ico (a / c) (b / c)",
" (fun x => x * c) ⁻¹' Icc a b = Icc (a / c) (b / c)"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 172 | 175 | theorem eq_zero_of_dvd_of_natDegree_lt {p q : R[X]} (h₁ : p ∣ q) (h₂ : natDegree q < natDegree p) :
q = 0 := by |
by_contra hc
exact (lt_iff_not_ge _ _).mp h₂ (natDegree_le_of_dvd h₁ hc)
| [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [] |
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Set.Lattice
#align_import data.nat.pairing from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
assert_not_exists MonoidWithZero
open Prod Decidable Function
namespace Nat
-- Porting note: no pp_nodot
--@[pp_nodot]
def pair (a b : ... | Mathlib/Data/Nat/Pairing.lean | 64 | 73 | theorem unpair_pair (a b : ℕ) : unpair (pair a b) = (a, b) := by |
dsimp only [pair]; split_ifs with h
· show unpair (b * b + a) = (a, b)
have be : sqrt (b * b + a) = b := sqrt_add_eq _ (le_trans (le_of_lt h) (Nat.le_add_left _ _))
simp [unpair, be, Nat.add_sub_cancel_left, h]
· show unpair (a * a + a + b) = (a, b)
have ae : sqrt (a * a + (a + b)) = a := by
rw... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... | [
" n.unpair.1.pair n.unpair.2 = n",
" (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).1.pair\n (if n - n.sqrt * n.sqrt < n.sqrt then (n - n.sqrt * n.sqrt, n.sqrt)\n else (n.sqrt, n - n.sqrt * n.sqrt - n.sqrt)).2 =\n n",
" ... | [
" (if a < b then b * b + a else a * a + a + b).unpair = (a, b)",
" (b * b + a).unpair = (a, b)",
" (a * a + a + b).unpair = (a, b)",
" (a * a + (a + b)).sqrt = a",
" a + b ≤ a + a"
] |
import Mathlib.Topology.Order.ProjIcc
import Mathlib.Topology.ContinuousFunction.Ordered
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.UnitInterval
#align_import topology.homotopy.basic from "leanprover-community/mathlib"@"11c53f174270aa43140c0b26dabce5fc4a253e80"
noncomputable section
universe u v ... | Mathlib/Topology/Homotopy/Basic.lean | 172 | 175 | theorem extend_apply_of_one_le (F : Homotopy f₀ f₁) {t : ℝ} (ht : 1 ≤ t) (x : X) :
F.extend t x = f₁ x := by |
rw [← F.apply_one]
exact ContinuousMap.congr_fun (Set.IccExtend_of_right_le (zero_le_one' ℝ) F.curry ht) x
| [
" f = g",
" { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_zero_left := map_zero_left✝,\n map_one_left := map_one_left✝ } =\n g",
" { toFun := toFun✝¹, continuous_toFun := continuous_toFun✝¹, map_zero_left := map_zero_left✝¹,\n map_one_left := map_one_left✝¹ } =\n { toFun := toFun... | [
" f = g",
" { toFun := toFun✝, continuous_toFun := continuous_toFun✝, map_zero_left := map_zero_left✝,\n map_one_left := map_one_left✝ } =\n g",
" { toFun := toFun✝¹, continuous_toFun := continuous_toFun✝¹, map_zero_left := map_zero_left✝¹,\n map_one_left := map_one_left✝¹ } =\n { toFun := toFun... | [
" (F.extend t) x = F (1, x)"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Topology.Algebra.InfiniteSum.Constructions
import Mathlib.Topology.Algebra.Ring.Basic
#align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd"
open Filter Finset Function
open... | Mathlib/Topology/Algebra/InfiniteSum/Ring.lean | 38 | 39 | theorem HasSum.mul_right (a₂) (hf : HasSum f a₁) : HasSum (fun i ↦ f i * a₂) (a₁ * a₂) := by |
simpa only using hf.map (AddMonoidHom.mulRight a₂) (continuous_id.mul continuous_const)
| [
" HasSum (fun i => a₂ * f i) (a₂ * a₁)",
" HasSum (fun i => f i * a₂) (a₁ * a₂)"
] | [
" HasSum (fun i => a₂ * f i) (a₂ * a₁)",
" HasSum (fun i => f i * a₂) (a₁ * a₂)"
] | [] |
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 | 114 | 116 | theorem cos_eq_neg_one_iff {x : ℂ} : cos x = -1 ↔ ∃ k : ℤ, π + k * (2 * π) = x := by |
rw [← neg_eq_iff_eq_neg, ← cos_sub_pi, cos_eq_one_iff]
simp only [eq_sub_iff_add_eq']
| [
" θ.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 +... | [
" (∃ k, ↑k * (2 * ↑π) = x - ↑π) ↔ ∃ k, ↑π + ↑k * (2 * ↑π) = x"
] |
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.NormedSpace.Banach
import Mathlib.LinearAlgebra.SesquilinearForm
#align_import analysis.inner_product_space.symmetric from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b"
open RCLike
open ComplexConjugate
variable ... | Mathlib/Analysis/InnerProductSpace/Symmetric.lean | 97 | 110 | theorem IsSymmetric.continuous [CompleteSpace E] {T : E →ₗ[𝕜] E} (hT : IsSymmetric T) :
Continuous T := by |
-- We prove it by using the closed graph theorem
refine T.continuous_of_seq_closed_graph fun u x y hu hTu => ?_
rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
have hlhs : ∀ k : ℕ, ⟪T (u k) - T x, y - T x⟫ = ⟪u k - x, T (y - T x)⟫ := by
intro k
rw [← T.map_sub, hT]
refine tendsto_nhds_unique ((hTu.sub_c... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T",
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T... | [
" (starRingEnd 𝕜) ⟪T x, y⟫_𝕜 = ⟪T y, x⟫_𝕜",
" (T + S).IsSymmetric",
" ⟪(T + S) x, y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" ⟪x, T y + S y⟫_𝕜 = ⟪x, (T + S) y⟫_𝕜",
" Continuous ⇑T"
] | [
" y = T x",
" ⟪y - T x, y - T x⟫_𝕜 = 0",
" ∀ (k : ℕ), ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" ⟪T (u k) - T x, y - T x⟫_𝕜 = ⟪u k - x, T (y - T x)⟫_𝕜",
" Filter.Tendsto (fun t => ⟪(⇑T ∘ u) t - T x, y - T x⟫_𝕜) Filter.atTop (nhds 0)",
" Filter.Tendsto (fun t => ⟪u t - x, T (y - T x)⟫_... |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.PEquiv
#align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
namespace PEquiv
open Matrix
universe u v
variable {k l m n : Type*}
variable {α : Type v}
open Matrix
def toMatrix [DecidableEq n] [Zer... | Mathlib/Data/Matrix/PEquiv.lean | 123 | 139 | theorem toMatrix_injective [DecidableEq n] [MonoidWithZero α] [Nontrivial α] :
Function.Injective (@toMatrix m n α _ _ _) := by |
classical
intro f g
refine not_imp_not.1 ?_
simp only [Matrix.ext_iff.symm, toMatrix_apply, PEquiv.ext_iff, not_forall, exists_imp]
intro i hi
use i
cases' hf : f i with fi
· cases' hg : g i with gi
-- Porting note: was `cc`
· rw [hf, hg] at hi
exact (hi rfl).elim
... | [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j... | [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j... | [
" f.toMatrix = g.toMatrix → f = g",
" ¬f = g → ¬f.toMatrix = g.toMatrix",
" ∀ (x : m), ¬f x = g x → ∃ x x_1, ¬(if x_1 ∈ f x then 1 else 0) = if x_1 ∈ g x then 1 else 0",
" ∃ x x_1, ¬(if x_1 ∈ f x then 1 else 0) = if x_1 ∈ g x then 1 else 0",
" ∃ x, ¬(if x ∈ f i then 1 else 0) = if x ∈ g i then 1 else 0",
... |
import Mathlib.Algebra.Lie.Subalgebra
import Mathlib.RingTheory.Noetherian
import Mathlib.RingTheory.Artinian
#align_import algebra.lie.submodule from "leanprover-community/mathlib"@"9822b65bfc4ac74537d77ae318d27df1df662471"
universe u v w w₁ w₂
section LieSubmodule
variable (R : Type u) (L : Type v) (M : Type ... | Mathlib/Algebra/Lie/Submodule.lean | 132 | 133 | theorem coe_toSubmodule_mk (p : Submodule R M) (h) :
(({ p with lie_mem := h } : LieSubmodule R L M) : Submodule R M) = p := by | cases p; rfl
| [
" N = O",
" { toSubmodule := toSubmodule✝, lie_mem := lie_mem✝ } = O",
" { toSubmodule := toSubmodule✝¹, lie_mem := lie_mem✝¹ } = { toSubmodule := toSubmodule✝, lie_mem := lie_mem✝ }",
" toSubmodule✝¹ = toSubmodule✝",
" ⁅x, m⁆ ∈ __src✝.carrier",
" ⁅x, 0⁆ ∈ __src✝.carrier",
" ↑{ toSubmodule := p, lie_mem... | [
" N = O",
" { toSubmodule := toSubmodule✝, lie_mem := lie_mem✝ } = O",
" { toSubmodule := toSubmodule✝¹, lie_mem := lie_mem✝¹ } = { toSubmodule := toSubmodule✝, lie_mem := lie_mem✝ }",
" toSubmodule✝¹ = toSubmodule✝",
" ⁅x, m⁆ ∈ __src✝.carrier",
" ⁅x, 0⁆ ∈ __src✝.carrier",
" ↑{ toSubmodule := p, lie_mem... | [
" ↑{ toAddSubmonoid := toAddSubmonoid✝, smul_mem' := smul_mem'✝, lie_mem := h } =\n { toAddSubmonoid := toAddSubmonoid✝, smul_mem' := smul_mem'✝ }"
] |
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 | 111 | 113 | theorem FG.cg {N : L.Substructure M} (h : N.FG) : N.CG := by |
obtain ⟨s, hf, rfl⟩ := fg_def.1 h
exact ⟨s, hf.countable, rfl⟩
| [
" (∃ 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... | [
" ((closure L).toFun s).CG"
] |
import Mathlib.NumberTheory.Cyclotomic.Discriminant
import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral
import Mathlib.RingTheory.Ideal.Norm
#align_import number_theory.cyclotomic.rat from "leanprover-community/mathlib"@"b353176c24d96c23f0ce1cc63efc3f55019702d9"
universe u
open Algebra IsCyclotomicExtensio... | Mathlib/NumberTheory/Cyclotomic/Rat.lean | 55 | 59 | theorem discr_prime_pow' [IsCyclotomicExtension {p ^ k} ℚ K] (hζ : IsPrimitiveRoot ζ ↑(p ^ k)) :
discr ℚ (hζ.subOnePowerBasis ℚ).basis =
(-1) ^ ((p ^ k : ℕ).totient / 2) * p ^ ((p : ℕ) ^ (k - 1) * ((p - 1) * k - 1)) := by |
rw [← discr_prime_pow hζ (cyclotomic.irreducible_rat (p ^ k).pos)]
exact hζ.discr_zeta_eq_discr_zeta_sub_one.symm
| [
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))",
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis",
" Algebra.discr ℚ ⇑(IsPrimitiveRo... | [
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))",
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis",
" Algebra.discr ℚ ⇑(IsPrimitiveRo... | [] |
import Mathlib.Data.Countable.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Order.Disjointed
import Mathlib.MeasureTheory.OuterMeasure.Defs
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set F... | Mathlib/MeasureTheory/OuterMeasure/Basic.lean | 63 | 69 | theorem measure_iUnion_le [Countable ι] (s : ι → Set α) : μ (⋃ i, s i) ≤ ∑' i, μ (s i) := by |
refine rel_iSup_tsum μ measure_empty (· ≤ ·) (fun t ↦ ?_) _
calc
μ (⋃ i, t i) = μ (⋃ i, disjointed t i) := by rw [iUnion_disjointed]
_ ≤ ∑' i, μ (disjointed t i) :=
OuterMeasureClass.measure_iUnion_nat_le _ _ (disjoint_disjointed _)
_ ≤ ∑' i, μ (t i) := by gcongr; apply disjointed_subset
| [
" μ (⋃ i, s i) ≤ ∑' (i : ι), μ (s i)",
" (fun x x_1 => x ≤ x_1) (μ (⨆ i, t i)) (∑' (i : ℕ), μ (t i))",
" μ (⋃ i, t i) = μ (⋃ i, disjointed t i)",
" ∑' (i : ℕ), μ (disjointed t i) ≤ ∑' (i : ℕ), μ (t i)",
" disjointed t a✝ ⊆ t a✝"
] | [
" μ (⋃ i, s i) ≤ ∑' (i : ι), μ (s i)"
] | [
" (fun x x_1 => x ≤ x_1) (μ (⨆ i, t i)) (∑' (i : ℕ), μ (t i))",
" μ (⋃ i, t i) = μ (⋃ i, disjointed t i)",
" ∑' (i : ℕ), μ (disjointed t i) ≤ ∑' (i : ℕ), μ (t i)",
" disjointed t a✝ ⊆ t a✝"
] |
import Mathlib.Algebra.Category.GroupCat.EquivalenceGroupAddGroup
import Mathlib.GroupTheory.QuotientGroup
#align_import algebra.category.Group.epi_mono from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open scoped Pointwise
universe u v
namespace MonoidHom
o... | Mathlib/Algebra/Category/GroupCat/EpiMono.lean | 35 | 36 | theorem ker_eq_bot_of_cancel {f : A →* B} (h : ∀ u v : f.ker →* A, f.comp u = f.comp v → u = v) :
f.ker = ⊥ := by | simpa using _root_.congr_arg range (h f.ker.subtype 1 (by aesop_cat))
| [
" f.ker = ⊥",
" f.comp f.ker.subtype = f.comp 1"
] | [
" f.ker = ⊥"
] | [
" f.comp f.ker.subtype = f.comp 1"
] |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {𝕜 V W Q P : Type*}
section AddTorsor
variable (𝕜) [Ring 𝕜] [AddCommGroup V] [Modu... | Mathlib/Analysis/Convex/Intrinsic.lean | 142 | 143 | theorem intrinsicFrontier_singleton (x : P) : intrinsicFrontier 𝕜 ({x} : Set P) = ∅ := by |
rw [intrinsicFrontier, preimage_coe_affineSpan_singleton, frontier_univ, image_empty]
| [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False",
" intrinsicInterior 𝕜 {x} = {x}",
" intrinsicFrontier 𝕜 {x} = ∅"
] | [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False",
" intrinsicInterior 𝕜 {x} = {x}",
" intrinsicFrontier 𝕜 {x} = ∅"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Topology Filter ENNReal
open Filter Asymptotics Set
variable... | Mathlib/Analysis/Calculus/Deriv/Add.lean | 97 | 99 | theorem derivWithin_add_const (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) :
derivWithin (fun y => f y + c) s x = derivWithin f s x := by |
simp only [derivWithin, fderivWithin_add_const hxs]
| [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x",
" derivWithin (fun y => f y + c) s x = derivWithin f s x"
] | [
" HasDerivAtFilter (fun y => f y + g y) (f' + g') x L",
" HasStrictDerivAt (fun y => f y + g y) (f' + g') x",
" derivWithin (fun y => f y + c) s x = derivWithin f s x"
] | [] |
import Mathlib.Algebra.BigOperators.Pi
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finsupp.Fin
import Mathlib.Data.Finsupp.Indicator
#align_import algebra.bi... | Mathlib/Algebra/BigOperators/Finsupp.lean | 54 | 57 | theorem prod_of_support_subset (f : α →₀ M) {s : Finset α} (hs : f.support ⊆ s) (g : α → M → N)
(h : ∀ i ∈ s, g i 0 = 1) : f.prod g = ∏ x ∈ s, g x (f x) := by |
refine Finset.prod_subset hs fun x hxs hx => h x hxs ▸ (congr_arg (g x) ?_)
exact not_mem_support_iff.1 hx
| [
" f.prod g = ∏ x ∈ s, g x (f x)",
" f x = 0"
] | [
" f.prod g = ∏ x ∈ s, g x (f x)"
] | [
" f x = 0"
] |
import Mathlib.Data.List.Sublists
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
open List
variable {α : Type*}
-- Porting note (#11215): TODO: Write a more efficient version
def powerset... | Mathlib/Data/Multiset/Powerset.lean | 55 | 57 | theorem powersetAux'_cons (a : α) (l : List α) :
powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l) := by |
simp only [powersetAux', sublists'_cons, map_append, List.map_map, append_cancel_left_eq]; rfl
| [
" ∀ (a : List α), ⟦a⟧ ∈ powersetAux l ↔ ⟦a⟧ ≤ ↑l",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList ∘ List.cons a) l.sublists' = List.map (cons a ∘ ofList) l.sublists'"
] | [
" ∀ (a : List α), ⟦a⟧ ∈ powersetAux l ↔ ⟦a⟧ ≤ ↑l",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)"
] | [
" List.map (ofList ∘ List.cons a) l.sublists' = List.map (cons a ∘ ofList) l.sublists'"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
#align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973"
-- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals.
open scoped Real
namespace Real
theorem ... | Mathlib/Data/Real/Pi/Bounds.lean | 128 | 136 | theorem pi_upper_bound_start (n : ℕ) {a}
(h : (2 : ℝ) - ((a - 1 / (4 : ℝ) ^ n) / (2 : ℝ) ^ (n + 1)) ^ 2 ≤
sqrtTwoAddSeries ((0 : ℕ) / (1 : ℕ)) n)
(h₂ : (1 : ℝ) / (4 : ℝ) ^ n ≤ a) : π < a := by |
refine lt_of_lt_of_le (pi_lt_sqrtTwoAddSeries n) ?_
rw [← le_sub_iff_add_le, ← le_div_iff', sqrt_le_left, sub_le_comm]
· rwa [Nat.cast_zero, zero_div] at h
· exact div_nonneg (sub_nonneg.2 h₂) (pow_nonneg (le_of_lt zero_lt_two) _)
· exact pow_pos zero_lt_two _
| [
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π",
" √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π",
" 0 < 2 ^ (n + 2)",
" (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)",
" 0 < π / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 ≠ ... | [
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π",
" √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π",
" 0 < 2 ^ (n + 2)",
" (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)",
" 0 < π / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 ≠ ... | [
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) + 1 / 4 ^ n ≤ a",
" 2 - ((a - 1 / 4 ^ n) / 2 ^ (n + 1)) ^ 2 ≤ sqrtTwoAddSeries 0 n",
" 0 ≤ (a - 1 / 4 ^ n) / 2 ^ (n + 1)",
" 0 < 2 ^ (n + 1)"
] |
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.InvariantBasisNumber
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v w w'
variable {R : Type u} {M : Type v} [Ring R] [AddCommGroup... | Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean | 214 | 220 | theorem linearIndependent_le_span' {ι : Type*} (v : ι → M) (i : LinearIndependent R v) (w : Set M)
[Fintype w] (s : range v ≤ span R w) : #ι ≤ Fintype.card w := by |
haveI : Finite ι := i.finite_of_le_span_finite v w s
letI := Fintype.ofFinite ι
rw [Cardinal.mk_fintype]
simp only [Cardinal.natCast_le]
exact linearIndependent_le_span_aux' v i w s
| [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)",
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)"
] | [
" Fintype.card ι ≤ Fintype.card ↑w",
" (ι →₀ R) →ₗ[R] ↑w →₀ R",
" ι → ↑w →₀ R",
" Injective ⇑(Finsupp.total ι (↑w →₀ R) R fun i => Span.repr R w ⟨v i, ⋯⟩)",
" f = g",
" t.card ≤ Fintype.card ↑w",
" #ι ≤ ↑(Fintype.card ↑w)"
] | [
" ↑(Fintype.card ι) ≤ ↑(Fintype.card ↑w)"
] |
import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp
#align_import measure_theory.integral.set_to_l1 from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical Topology NNReal ENNReal MeasureTheory Pointwise
open Set Filter TopologicalSpace ENNR... | Mathlib/MeasureTheory/Integral/SetToL1.lean | 105 | 109 | theorem add (hT : FinMeasAdditive μ T) (hT' : FinMeasAdditive μ T') :
FinMeasAdditive μ (T + T') := by |
intro s t hs ht hμs hμt hst
simp only [hT s t hs ht hμs hμt hst, hT' s t hs ht hμs hμt hst, Pi.add_apply]
abel
| [
" 0 (s ∪ t) = 0 s + 0 t",
" FinMeasAdditive μ (T + T')",
" (T + T') (s ∪ t) = (T + T') s + (T + T') t",
" T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)"
] | [
" 0 (s ∪ t) = 0 s + 0 t",
" FinMeasAdditive μ (T + T')"
] | [
" (T + T') (s ∪ t) = (T + T') s + (T + T') t",
" T s + T t + (T' s + T' t) = T s + T' s + (T t + T' t)"
] |
import Mathlib.Analysis.NormedSpace.Star.GelfandDuality
import Mathlib.Topology.Algebra.StarSubalgebra
#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
open scoped Pointwise ENNReal NNReal ComplexOrder
open Weak... | Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus.lean | 81 | 94 | theorem spectrum_star_mul_self_of_isStarNormal :
spectrum ℂ (star a * a) ⊆ Set.Icc (0 : ℂ) ‖star a * a‖ := by |
-- this instance should be found automatically, but without providing it Lean goes on a wild
-- goose chase when trying to apply `spectrum.gelfandTransform_eq`.
--letI := elementalStarAlgebra.Complex.normedAlgebra a
rcases subsingleton_or_nontrivial A with ⟨⟩
· simp only [spectrum.of_subsingleton, Set.empty_... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖",
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * ... | [
" spectrum ℂ (star a * a) ⊆ Set.Icc 0 ↑‖star a * a‖"
] | [
" spectrum ℂ (star a' * a') ⊆ Set.Icc 0 ↑‖star a * a‖",
" Set.range ⇑((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) ⊆ Set.Icc 0 ↑‖star a * a‖",
" ((gelfandTransform ℂ ↥(elementalStarAlgebra ℂ a)) (star a' * a')) φ ∈ Set.Icc 0 ↑‖star a * a‖",
" star (φ a') * φ a' ∈ Set.Icc 0 ↑‖star a * a‖",
... |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Combinatorics.Enumerative.Composition
#align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
noncomputable section
variable {𝕜 : Type*} {E F G H : Type*}
open Filter List
open scoped Topol... | Mathlib/Analysis/Analytic/Composition.lean | 166 | 169 | theorem compContinuousLinearMap_applyComposition {n : ℕ} (p : FormalMultilinearSeries 𝕜 F G)
(f : E →L[𝕜] F) (c : Composition n) (v : Fin n → E) :
(p.compContinuousLinearMap f).applyComposition c v = p.applyComposition c (f ∘ v) := by |
simp (config := {unfoldPartialApp := true}) [applyComposition]; rfl
| [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)",
" ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi... | [
" p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)",
" p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)",
" ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi... | [
" (fun i => (p (c.blocksFun i)) (⇑f ∘ v ∘ ⇑(c.embedding i))) = fun i =>\n (p (c.blocksFun i)) ((⇑f ∘ v) ∘ ⇑(c.embedding i))"
] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 295 | 295 | theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1 := by | simp
| [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [] |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section IsCoprime
variable {R : Type ... | Mathlib/RingTheory/Coprime/Lemmas.lean | 79 | 80 | theorem IsCoprime.prod_right_iff : IsCoprime x (∏ i ∈ t, s i) ↔ ∀ i ∈ t, IsCoprime x (s i) := by |
simpa only [isCoprime_comm] using IsCoprime.prod_left_iff (R := R)
| [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... | [
" IsCoprime m n ↔ m.gcd n = 1",
" IsCoprime m n → m.gcd n = 1",
" m.gcd n = 1",
" 1 = m * a + n * b",
" m.gcd n = 1 → IsCoprime m n",
" m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1",
" ∃ a b, a * m + b * n = 1",
" IsCoprime ↑m ↑n ↔ m.Coprime n",
" IsCoprime ↑a ↑b",
" IsCoprime ↑↑a ↑↑... | [] |
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 | 235 | 239 | theorem mk_smul (c : R) (p q : K[X]) : RatFunc.mk (c • p) q = c • RatFunc.mk p q := by |
by_cases hq : q = 0
· rw [hq, mk_zero, mk_zero, ← ofFractionRing_smul, smul_zero]
· rw [mk_eq_localization_mk _ hq, mk_eq_localization_mk _ hq, ← Localization.smul_mk, ←
ofFractionRing_smul]
| [
" { 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... | [
" { 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... | [] |
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordin... | Mathlib/SetTheory/Game/Ordinal.lean | 96 | 97 | theorem toPGame_moveLeft {o : Ordinal} (i) :
o.toPGame.moveLeft (toLeftMovesToPGame i) = i.val.toPGame := by | simp
| [
" let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).α",
" o.toPGame.RightMoves = PEmpty.{u_1 + 1}",
" IsEmpty (toPGame 0).LeftMoves",
" IsEmpty (Quotient.out 0).α",
" IsEmpty ... | [
" let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).α",
" o.toPGame.RightMoves = PEmpty.{u_1 + 1}",
" IsEmpty (toPGame 0).LeftMoves",
" IsEmpty (Quotient.out 0).α",
" IsEmpty ... | [] |
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent
import Mathlib.Analysis.Calculus.FDeriv.Linear
import Mathlib.Analysis.Calculus.FDeriv.Comp
#align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee"
open Filter Asymptotics ContinuousLinearMa... | Mathlib/Analysis/Calculus/FDeriv/Equiv.lean | 121 | 130 | theorem comp_hasFDerivWithinAt_iff {f : G → E} {s : Set G} {x : G} {f' : G →L[𝕜] E} :
HasFDerivWithinAt (iso ∘ f) ((iso : E →L[𝕜] F).comp f') s x ↔ HasFDerivWithinAt f f' s x := by |
refine ⟨fun H => ?_, fun H => iso.hasFDerivAt.comp_hasFDerivWithinAt x H⟩
have A : f = iso.symm ∘ iso ∘ f := by
rw [← Function.comp.assoc, iso.symm_comp_self]
rfl
have B : f' = (iso.symm : F →L[𝕜] E).comp ((iso : E →L[𝕜] F).comp f') := by
rw [← ContinuousLinearMap.comp_assoc, iso.coe_symm_comp_coe,... | [
" DifferentiableWithinAt 𝕜 (⇑iso ∘ f) s x ↔ DifferentiableWithinAt 𝕜 f s x",
" DifferentiableWithinAt 𝕜 f s x",
" DifferentiableAt 𝕜 (⇑iso ∘ f) x ↔ DifferentiableAt 𝕜 f x",
" DifferentiableOn 𝕜 (⇑iso ∘ f) s ↔ DifferentiableOn 𝕜 f s",
" (∀ x ∈ s, DifferentiableWithinAt 𝕜 (⇑iso ∘ f) s x) ↔ ∀ x ∈ s, Di... | [
" DifferentiableWithinAt 𝕜 (⇑iso ∘ f) s x ↔ DifferentiableWithinAt 𝕜 f s x",
" DifferentiableWithinAt 𝕜 f s x",
" DifferentiableAt 𝕜 (⇑iso ∘ f) x ↔ DifferentiableAt 𝕜 f x",
" DifferentiableOn 𝕜 (⇑iso ∘ f) s ↔ DifferentiableOn 𝕜 f s",
" (∀ x ∈ s, DifferentiableWithinAt 𝕜 (⇑iso ∘ f) s x) ↔ ∀ x ∈ s, Di... | [
" HasFDerivWithinAt f f' s x",
" f = ⇑iso.symm ∘ ⇑iso ∘ f",
" f = _root_.id ∘ f",
" f' = (↑iso.symm).comp ((↑iso).comp f')",
" HasFDerivWithinAt (⇑iso.symm ∘ ⇑iso ∘ f) ((↑iso.symm).comp ((↑iso).comp f')) s x"
] |
import Mathlib.Data.Set.Equitable
import Mathlib.Logic.Equiv.Fin
import Mathlib.Order.Partition.Finpartition
#align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset Fintype
namespace Finpartition
variable {α : Type*} [DecidableEq α] ... | Mathlib/Order/Partition/Equipartition.lean | 114 | 134 | theorem IsEquipartition.exists_partsEquiv (hP : P.IsEquipartition) :
∃ f : P.parts ≃ Fin P.parts.card,
∀ t, t.1.card = s.card / P.parts.card + 1 ↔ f t < s.card % P.parts.card := by |
let el := (P.parts.filter fun p ↦ p.card = s.card / P.parts.card + 1).equivFin
let es := (P.parts.filter fun p ↦ p.card = s.card / P.parts.card).equivFin
simp_rw [mem_filter, hP.card_large_parts_eq_mod] at el
simp_rw [mem_filter, hP.card_small_parts_eq_mod] at es
let sneg : { x // x ∈ P.parts ∧ ¬x.card = s.c... | [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1",
" ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card ≤ t.card",
" (∑ i ... | [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1",
" ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card ≤ t.card",
" (∑ i ... | [
" { x // x ∈ P.parts ∧ ¬x.card = s.card / P.parts.card + 1 } ≃ { x // x ∈ P.parts ∧ x.card = s.card / P.parts.card }",
" ∀ (a : Finset α),\n a ∈ P.parts ∧ ¬a.card = s.card / P.parts.card + 1 ↔\n (Equiv.refl (Finset α)) a ∈ P.parts ∧ ((Equiv.refl (Finset α)) a).card = s.card / P.parts.card",
" ∀ a ∈ P.pa... |
import Mathlib.Data.Set.Lattice
import Mathlib.Order.Directed
#align_import data.set.Union_lift from "leanprover-community/mathlib"@"5a4ea8453f128345f73cc656e80a49de2a54f481"
variable {α : Type*} {ι β : Sort _}
namespace Set
section UnionLift
@[nolint unusedArguments]
noncomputable def iUnionLift (S : ι → Set... | Mathlib/Data/Set/UnionLift.lean | 107 | 120 | theorem iUnionLift_unary (u : T → T) (ui : ∀ i, S i → S i)
(hui :
∀ (i) (x : S i),
u (Set.inclusion (show S i ⊆ T from hT'.symm ▸ Set.subset_iUnion S i) x) =
Set.inclusion (show S i ⊆ T from hT'.symm ▸ Set.subset_iUnion S i) (ui i x))
(uβ : β → β) (h : ∀ (i) (x : S i), f i (ui i x) = uβ ... |
subst hT'
cases' Set.mem_iUnion.1 x.prop with i hi
rw [iUnionLift_of_mem x hi, ← h i]
have : x = Set.inclusion (Set.subset_iUnion S i) ⟨x, hi⟩ := by
cases x
rfl
conv_lhs => rw [this, hui, iUnionLift_inclusion]
| [
" iUnionLift S f hf T hT x = f i ⟨↑x, hx⟩",
" iUnionLift S f hf T hT ⟨x, hx✝⟩ = f i ⟨↑⟨x, hx✝⟩, hx⟩",
" iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" x ∈ iUnionLift S f hf T hT ⁻¹' t ↔ x ∈ inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" iUnionLift S f hf T hT x ∈ t... | [
" iUnionLift S f hf T hT x = f i ⟨↑x, hx⟩",
" iUnionLift S f hf T hT ⟨x, hx✝⟩ = f i ⟨↑⟨x, hx✝⟩, hx⟩",
" iUnionLift S f hf T hT ⁻¹' t = inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" x ∈ iUnionLift S f hf T hT ⁻¹' t ↔ x ∈ inclusion hT ⁻¹' ⋃ i, inclusion ⋯ '' (f i ⁻¹' t)",
" iUnionLift S f hf T hT x ∈ t... | [
" iUnionLift S f hf (iUnion S) ⋯ (u x) = uβ (iUnionLift S f hf (iUnion S) ⋯ x)",
" iUnionLift S f hf (iUnion S) ⋯ (u x) = f i (ui i ⟨↑x, hi⟩)",
" x = inclusion ⋯ ⟨↑x, hi⟩",
" ⟨val✝, property✝⟩ = inclusion ⋯ ⟨↑⟨val✝, property✝⟩, hi⟩",
"α : Type u_1\nι : Sort u_2\nβ : Sort u_3\nS : ι → Set α\nf : (i : ι) → ↑(... |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.SMulWithZero
import Mathlib.Data.Nat.PartENat
import Mathlib.Tactic.Linarith
#align_import ring_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
variable {α β... | Mathlib/RingTheory/Multiplicity.lean | 99 | 107 | theorem pow_dvd_of_le_multiplicity {a b : α} {k : ℕ} :
(k : PartENat) ≤ multiplicity a b → a ^ k ∣ b := by |
rw [← PartENat.some_eq_natCast]
exact
Nat.casesOn k
(fun _ => by
rw [_root_.pow_zero]
exact one_dvd _)
fun k ⟨_, h₂⟩ => by_contradiction fun hk => Nat.find_min _ (lt_of_succ_le (h₂ ⟨k, hk⟩)) hk
| [
" multiplicity ↑a ↑b = multiplicity a b",
" (multiplicity ↑a ↑b).Dom ↔ (multiplicity a b).Dom",
" (∃ n, ¬↑a ^ (n + 1) ∣ ↑b) ↔ ∃ n, ¬a ^ (n + 1) ∣ b",
" ∀ (h₁ : (multiplicity ↑a ↑b).Dom) (h₂ : (multiplicity a b).Dom),\n (multiplicity ↑a ↑b).get h₁ = (multiplicity a b).get h₂",
" (multiplicity ↑a ↑b).get h... | [
" multiplicity ↑a ↑b = multiplicity a b",
" (multiplicity ↑a ↑b).Dom ↔ (multiplicity a b).Dom",
" (∃ n, ¬↑a ^ (n + 1) ∣ ↑b) ↔ ∃ n, ¬a ^ (n + 1) ∣ b",
" ∀ (h₁ : (multiplicity ↑a ↑b).Dom) (h₂ : (multiplicity a b).Dom),\n (multiplicity ↑a ↑b).get h₁ = (multiplicity a b).get h₂",
" (multiplicity ↑a ↑b).get h... | [] |
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 | 136 | 137 | theorem wittPolynomial_zero : wittPolynomial p R 0 = X 0 := by |
simp only [wittPolynomial, X, sum_singleton, range_one, pow_zero, zero_add, tsub_self]
| [
" 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.Fin
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.BigOperators
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finsupp.Multiset
#align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc... | Mathlib/Data/Nat/Choose/Multinomial.lean | 145 | 148 | theorem multinomial_univ_two (a b : ℕ) :
multinomial Finset.univ ![a, b] = (a + b)! / (a ! * b !) := by |
rw [multinomial, Fin.sum_univ_two, Fin.prod_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one,
Matrix.head_cons]
| [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... | [
" multinomial ∅ f = 1",
" multinomial (cons a s ha) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" 0 < ∏ i ∈ cons a s ha, (f i)!",
" multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f",
" multinomial {a} f = 1",
" (f a + ∑ i ∈ ∅, f i).choose (f a) * multinomial ∅... | [] |
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.Data.Finset.Pointwise
#align_import algebra.monoid_algebra.support from "leanprover-community/mathlib"@"16749fc4661828cba18cd0f4e3c5eb66a8e80598"
open scoped Pointwise
universe u₁ u₂ u₃
namespace MonoidAlgebra
open Finset Finsupp
variable {k : Type u₁} ... | Mathlib/Algebra/MonoidAlgebra/Support.lean | 45 | 52 | theorem support_single_mul_eq_image [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) {r : k}
(hr : ∀ y, r * y = 0 ↔ y = 0) {x : G} (lx : IsLeftRegular x) :
(single x r * f : MonoidAlgebra k G).support = Finset.image (x * ·) f.support := by |
refine subset_antisymm (support_single_mul_subset f _ _) fun y hy => ?_
obtain ⟨y, yf, rfl⟩ : ∃ a : G, a ∈ f.support ∧ x * a = y := by
simpa only [Finset.mem_image, exists_prop] using hy
simp only [mul_apply, mem_support_iff.mp yf, hr, mem_support_iff, sum_single_index,
Finsupp.sum_ite_eq', Ne, not_false... | [
" (a * b).support ⊆ a.support * b.support",
" (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support",
" image₂ (fun x x_1 => x * x_1) {a} f.support ⊆ image (fun x => a * x) f.support",
" image₂ (fun x x_1 => x * x_1) f.support {a} ⊆ image (fun x => x * a) f.support... | [
" (a * b).support ⊆ a.support * b.support",
" (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support",
" image₂ (fun x x_1 => x * x_1) {a} f.support ⊆ image (fun x => a * x) f.support",
" image₂ (fun x x_1 => x * x_1) f.support {a} ⊆ image (fun x => x * a) f.support... | [
" y ∈ (single x r * f).support",
" ∃ a ∈ f.support, x * a = y",
" x * y ∈ (single x r * f).support"
] |
import Mathlib.Algebra.Ring.Defs
import Mathlib.Algebra.Group.Ext
local macro:max "local_hAdd[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HAdd.hAdd : $type → $type → $type))
local macro:max "local_hMul[" type:term ", " inst:term "]" : term =>
`(term| (letI := $inst; HMul.hMul : $type → $typ... | Mathlib/Algebra/Ring/Ext.lean | 427 | 429 | theorem toNonUnitalSemiring_injective :
Function.Injective (@toNonUnitalSemiring R) := by |
rintro ⟨⟩ ⟨⟩ _; congr
| [
" inst₁ = inst₂",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" inst₁ = inst₂",
" toAddMonoid = toAddMonoid",
" HAdd.hAdd = HAdd.hAdd",
" NatCast.natCast = NatCast.natCast",
" NatCast.natCast n = NatCast.natCast n",
" NatCast.natCast 0 = NatCast.natCast 0",
" 0 = 0",
" NatCast.natCast (n + 1) = NatCast.natCast (n + 1)",
" NatCast.natCast n + 1 = NatCast.natCas... | [
" mk mul_comm✝¹ = mk mul_comm✝"
] |
import Mathlib.GroupTheory.Solvable
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import field_theory.abel_ruffini from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial Intermedi... | Mathlib/FieldTheory/AbelRuffini.lean | 66 | 72 | theorem gal_prod_isSolvable {s : Multiset F[X]} (hs : ∀ p ∈ s, IsSolvable (Gal p)) :
IsSolvable s.prod.Gal := by |
apply Multiset.induction_on' s
· exact gal_one_isSolvable
· intro p t hps _ ht
rw [Multiset.insert_eq_cons, Multiset.prod_cons]
exact gal_mul_isSolvable (hs p hps) ht
| [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal",
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolva... | [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal",
" IsSolvable X.Gal",
" IsSolvable (X - C x).Gal",
" IsSolvable (X ^ n).Gal",
" IsSolvable s.prod.Gal"
] | [
" IsSolvable (Multiset.prod 0).Gal",
" ∀ {a : F[X]} {s_1 : Multiset F[X]}, a ∈ s → s_1 ⊆ s → IsSolvable s_1.prod.Gal → IsSolvable (insert a s_1).prod.Gal",
" IsSolvable (insert p t).prod.Gal",
" IsSolvable (p * t.prod).Gal"
] |
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 | 133 | 134 | theorem image_const_add_Ioc : (fun x => a + x) '' Ioc b c = Ioc (a + b) (a + c) := by |
simp only [add_comm a, image_add_const_Ioc]
| [
" 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.Analysis.SpecialFunctions.Gaussian.GaussianIntegral
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.MeasureTheory.Integral.Pi
import Mathlib.Analysis.Fourier.FourierTransform
open Real Set MeasureTheory Filter Asymptotics intervalIntegral
open scoped Real Topology FourierTransform Re... | Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean | 132 | 145 | theorem integrable_cexp_neg_mul_sq_add_real_mul_I (hb : 0 < b.re) (c : ℝ) :
Integrable fun x : ℝ => cexp (-b * (x + c * I) ^ 2) := by |
refine
⟨(Complex.continuous_exp.comp
(continuous_const.mul
((continuous_ofReal.add continuous_const).pow 2))).aestronglyMeasurable,
?_⟩
rw [← hasFiniteIntegral_norm_iff]
simp_rw [norm_cexp_neg_mul_sq_add_mul_I' hb.ne', neg_sub _ (c ^ 2 * _),
sub_eq_add_neg _ (b.re * _), Real.e... | [
" ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))",
" rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - 2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))",
" rexp\n (-(b.re * ((T + (c * 0 - 0 *... | [
" ‖cexp (-b * (↑T + ↑c * I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))",
" rexp (-((↑b.re + ↑b.im * I) * (↑T + ↑c * I) ^ 2).re) =\n rexp (-((↑b.re + ↑b.im * I).re * T ^ 2 - 2 * (↑b.re + ↑b.im * I).im * c * T - (↑b.re + ↑b.im * I).re * c ^ 2))",
" rexp\n (-(b.re * ((T + (c * 0 - 0 *... | [
" HasFiniteIntegral (fun x => cexp (-b * (↑x + ↑c * I) ^ 2)) volume",
" HasFiniteIntegral (fun a => ‖cexp (-b * (↑a + ↑c * I) ^ 2)‖) volume",
" HasFiniteIntegral (fun a => rexp (c ^ 2 * (b.im ^ 2 / b.re + b.re)) * rexp (-(b.re * (a - b.im * c / b.re) ^ 2)))\n volume",
" Integrable (fun x => rexp (-(b.re * ... |
import Mathlib.Analysis.InnerProductSpace.Dual
#align_import analysis.inner_product_space.lax_milgram from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike LinearMap ContinuousLinearMap InnerProductSpace
open LinearMap (ker range)
open RealInnerProduct... | Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean | 51 | 62 | theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by |
rcases coercive with ⟨C, C_ge_0, coercivity⟩
refine ⟨C, C_ge_0, ?_⟩
intro v
by_cases h : 0 < ‖v‖
· refine (mul_le_mul_right h).mp ?_
calc
C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v
_ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm
_ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) ... | [
" ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖ * ‖v‖",
" v = 0"
] | [
" ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖"
] | [
" ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖ * ‖v‖",
" v = 0"
] |
import Mathlib.Logic.Equiv.Option
import Mathlib.Order.RelIso.Basic
import Mathlib.Order.Disjoint
import Mathlib.Order.WithBot
import Mathlib.Tactic.Monotonicity.Attr
import Mathlib.Util.AssertExists
#align_import order.hom.basic from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
open ... | Mathlib/Order/Hom/Basic.lean | 1,235 | 1,239 | theorem OrderIso.map_bot' [LE α] [PartialOrder β] (f : α ≃o β) {x : α} {y : β} (hx : ∀ x', x ≤ x')
(hy : ∀ y', y ≤ y') : f x = y := by |
refine le_antisymm ?_ (hy _)
rw [← f.apply_symm_apply y, f.map_rel_iff]
apply hx
| [
" ∀ {a b : α}, f.toEmbedding a ≤ f.toEmbedding b ↔ a ≤ b",
" f.toEmbedding a✝ ≤ f.toEmbedding b✝ ↔ a✝ ≤ b✝",
" f x = y",
" f x ≤ y",
" x ≤ (RelIso.symm f) y"
] | [
" ∀ {a b : α}, f.toEmbedding a ≤ f.toEmbedding b ↔ a ≤ b",
" f.toEmbedding a✝ ≤ f.toEmbedding b✝ ↔ a✝ ≤ b✝",
" f x = y"
] | [
" f x ≤ y",
" x ≤ (RelIso.symm f) y"
] |
import Mathlib.Data.Finset.Sigma
import Mathlib.Data.Finset.Pairwise
import Mathlib.Data.Finset.Powerset
import Mathlib.Data.Fintype.Basic
import Mathlib.Order.CompleteLatticeIntervals
#align_import order.sup_indep from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d"
variable {α β ι ι' :... | Mathlib/Order/SupIndep.lean | 151 | 154 | theorem supIndep_univ_bool (f : Bool → α) :
(Finset.univ : Finset Bool).SupIndep f ↔ Disjoint (f false) (f true) :=
haveI : true ≠ false := by | simp only [Ne, not_false_iff]
(supIndep_pair this).trans disjoint_comm
| [
" Decidable (s.SupIndep f)",
" (t : Finset ι) → t ⊆ s → Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))",
" Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))",
" (a : ι) → a ∈ s → Decidable (a ∉ t → Disjoint (f a) (t.sup f))",
" Decidable (i ∉ t → Disjoint (f i) (t.sup f))",
... | [
" Decidable (s.SupIndep f)",
" (t : Finset ι) → t ⊆ s → Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))",
" Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))",
" (a : ι) → a ∈ s → Decidable (a ∉ t → Disjoint (f a) (t.sup f))",
" Decidable (i ∉ t → Disjoint (f i) (t.sup f))",
... | [] |
import Mathlib.Analysis.BoxIntegral.Partition.Filter
import Mathlib.Analysis.BoxIntegral.Partition.Measure
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Init.Data.Bool.Lemmas
#align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open... | Mathlib/Analysis/BoxIntegral/Basic.lean | 127 | 133 | theorem integralSum_disjUnion (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) {π₁ π₂ : TaggedPrepartition I}
(h : Disjoint π₁.iUnion π₂.iUnion) :
integralSum f vol (π₁.disjUnion π₂ h) = integralSum f vol π₁ + integralSum f vol π₂ := by |
refine (Prepartition.sum_disj_union_boxes h _).trans
(congr_arg₂ (· + ·) (sum_congr rfl fun J hJ => ?_) (sum_congr rfl fun J hJ => ?_))
· rw [disjUnion_tag_of_mem_left _ hJ]
· rw [disjUnion_tag_of_mem_right _ hJ]
| [
" integralSum f vol (π.biUnionTagged πi) = ∑ J ∈ π.boxes, integralSum f vol (πi J)",
" (vol J') (f ((π.biUnionTagged πi).tag J')) = (vol J') (f ((πi J).tag J'))",
" integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π",
" ∑ J' ∈ (πi J).boxes, (vol J') (f ((π.biUnionPrepartition πi).tag J')) = (v... | [
" integralSum f vol (π.biUnionTagged πi) = ∑ J ∈ π.boxes, integralSum f vol (πi J)",
" (vol J') (f ((π.biUnionTagged πi).tag J')) = (vol J') (f ((πi J).tag J'))",
" integralSum f vol (π.biUnionPrepartition πi) = integralSum f vol π",
" ∑ J' ∈ (πi J).boxes, (vol J') (f ((π.biUnionPrepartition πi).tag J')) = (v... | [
" (vol J) (f ((π₁.disjUnion π₂ h).tag J)) = (vol J) (f (π₁.tag J))",
" (vol J) (f ((π₁.disjUnion π₂ h).tag J)) = (vol J) (f (π₂.tag J))"
] |
import Mathlib.Data.Finsupp.Lex
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.GameAdd
#align_import logic.hydra from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
namespace Relation
open Multiset Prod
variable {α : Type*}
def CutExpand (r : α → α → Prop) (s' s : Multise... | Mathlib/Logic/Hydra.lean | 62 | 74 | theorem cutExpand_le_invImage_lex [DecidableEq α] [IsIrrefl α r] :
CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ (· ≠ ·)) (· < ·)) toFinsupp := by |
rintro s t ⟨u, a, hr, he⟩
replace hr := fun a' ↦ mt (hr a')
classical
refine ⟨a, fun b h ↦ ?_, ?_⟩ <;> simp_rw [toFinsupp_apply]
· apply_fun count b at he
simpa only [count_add, count_singleton, if_neg h.2, add_zero, count_eq_zero.2 (hr b h.1)]
using he
· apply_fun count a at he
simp only [co... | [
" CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp",
" InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t",
" (toFinsupp s) b = (toFinsupp t) b",
" (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)",
" count b... | [
" CutExpand r ≤ InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) ⇑toFinsupp"
] | [
" InvImage (Finsupp.Lex (rᶜ ⊓ fun x x_1 => x ≠ x_1) fun x x_1 => x < x_1) (⇑toFinsupp) s t",
" (toFinsupp s) b = (toFinsupp t) b",
" (fun {i} x x_1 => x < x_1) ((toFinsupp s) a) ((toFinsupp t) a)",
" count b s = count b t",
" count a s < count a t"
] |
import Mathlib.Analysis.SpecialFunctions.Complex.Arg
import Mathlib.Analysis.SpecialFunctions.Log.Basic
#align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
namespace Complex
open Set Filter Bornology
open scop... | Mathlib/Analysis/SpecialFunctions/Complex/Log.lean | 116 | 116 | theorem log_I : log I = π / 2 * I := by | simp [log]
| [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im",
" (↑x).log.re = x.log",
" (↑r * x).log = ↑r.log... | [
" x.log.re = (abs x).log",
" x.log.im = x.arg",
" -π < x.log.im",
" x.log.im ≤ π",
" cexp x.log = x",
" x ∈ Set.range cexp → x ∈ {0}ᶜ",
" cexp x ∈ {0}ᶜ",
" (cexp x).log = x",
" x = y",
" (↑x.log).re = (↑x).log.re",
" (↑x.log).im = (↑x).log.im",
" (↑x).log.re = x.log",
" (↑r * x).log = ↑r.log... | [] |
import Mathlib.Analysis.NormedSpace.PiLp
import Mathlib.Analysis.InnerProductSpace.PiL2
#align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped NNReal Matrix
namespace Matrix
variable {R l m n α β : Type*} [Fintype l] [Fintyp... | Mathlib/Analysis/Matrix.lean | 574 | 575 | theorem frobenius_nnnorm_map_eq (A : Matrix m n α) (f : α → β) (hf : ∀ a, ‖f a‖₊ = ‖a‖₊) :
‖A.map f‖₊ = ‖A‖₊ := by | simp_rw [frobenius_nnnorm_def, Matrix.map_apply, hf]
| [
" NormedAddCommGroup (PiLp 2 fun i => PiLp 2 fun j => α)",
" BoundedSMul R (PiLp 2 fun i => PiLp 2 fun j => α)",
" NormedSpace R (PiLp 2 fun i => PiLp 2 fun j => α)",
" ‖A‖₊ = (∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)",
" ‖(WithLp.equiv 2 (m → WithLp 2 (n → α))).symm fun i => (WithLp.equiv 2 (n → α)).symm ... | [
" NormedAddCommGroup (PiLp 2 fun i => PiLp 2 fun j => α)",
" BoundedSMul R (PiLp 2 fun i => PiLp 2 fun j => α)",
" NormedSpace R (PiLp 2 fun i => PiLp 2 fun j => α)",
" ‖A‖₊ = (∑ i : m, ∑ j : n, ‖A i j‖₊ ^ 2) ^ (1 / 2)",
" ‖(WithLp.equiv 2 (m → WithLp 2 (n → α))).symm fun i => (WithLp.equiv 2 (n → α)).symm ... | [] |
import Mathlib.RingTheory.OrzechProperty
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.RingTheory.PrincipalIdealDomain
#align_import linear_algebra.invariant_basis_number from "leanprover-community/mathlib"@"5fd3186f1ec30a75d5f65732e3ce5e623382556f"
noncomputable section
open Function
universe u v w
... | Mathlib/LinearAlgebra/InvariantBasisNumber.lean | 197 | 203 | theorem card_le_of_surjective' [RankCondition R] {α β : Type*} [Fintype α] [Fintype β]
(f : (α →₀ R) →ₗ[R] β →₀ R) (i : Surjective f) : Fintype.card β ≤ Fintype.card α := by |
let P := Finsupp.linearEquivFunOnFinite R R β
let Q := (Finsupp.linearEquivFunOnFinite R R α).symm
exact
card_le_of_surjective R ((P.toLinearMap.comp f).comp Q.toLinearMap)
((P.surjective.comp i).comp Q.surjective)
| [
" StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ⇑f",
" False",
" n ≤ m",
" StrongRankCondition R",
" 0 = update 0 (Fin.last n) 1",
" f 0 = f (update 0 (Fin.last n) 1)",
" f 0 m = f (update 0 (Fin.last n) 1) m",
" Fintype.card α ≤ Fintype.card β",
" Fintype.car... | [
" StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Injective ⇑f",
" False",
" n ≤ m",
" StrongRankCondition R",
" 0 = update 0 (Fin.last n) 1",
" f 0 = f (update 0 (Fin.last n) 1)",
" f 0 m = f (update 0 (Fin.last n) 1) m",
" Fintype.card α ≤ Fintype.card β",
" Fintype.car... | [] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.Matrix.AbsoluteValue
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.ClassGroup
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.Ri... | Mathlib/NumberTheory/ClassNumber/Finite.lean | 119 | 135 | theorem exists_min (I : (Ideal S)⁰) :
∃ b ∈ (I : Ideal S),
b ≠ 0 ∧ ∀ c ∈ (I : Ideal S), abv (Algebra.norm R c) < abv (Algebra.norm R b) → c =
(0 : S) := by |
obtain ⟨_, ⟨b, b_mem, b_ne_zero, rfl⟩, min⟩ := @Int.exists_least_of_bdd
(fun a => ∃ b ∈ (I : Ideal S), b ≠ (0 : S) ∧ abv (Algebra.norm R b) = a)
(by
use 0
rintro _ ⟨b, _, _, rfl⟩
apply abv.nonneg)
(by
obtain ⟨b, b_mem, b_ne_zero⟩ := (I : Ideal S).ne_bot_iff.mp (nonZeroDivisors.c... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... | [
" ∃ b, ∀ (z : ℤ), (fun a => ∃ b ∈ ↑I, b ≠ 0 ∧ abv ((Algebra.norm R) b) = a) z → b ≤ z",
" ∀ (z : ℤ), (fun a => ∃ b ∈ ↑I, b ≠ 0 ∧ abv ((Algebra.norm R) b) = a) z → 0 ≤ z",
" 0 ≤ abv ((Algebra.norm R) b)",
" ∃ z, (fun a => ∃ b ∈ ↑I, b ≠ 0 ∧ abv ((Algebra.norm R) b) = a) z",
" ∀ c ∈ ↑I, abv ((Algebra.norm R) c... |
import Mathlib.Probability.Martingale.Basic
#align_import probability.martingale.centering from "leanprover-community/mathlib"@"bea6c853b6edbd15e9d0941825abd04d77933ed0"
open TopologicalSpace Filter
open scoped NNReal ENNReal MeasureTheory ProbabilityTheory
namespace MeasureTheory
variable {Ω E : Type*} {m0 : ... | Mathlib/Probability/Martingale/Centering.lean | 50 | 51 | theorem predictablePart_zero : predictablePart f ℱ μ 0 = 0 := by |
simp_rw [predictablePart, Finset.range_zero, Finset.sum_empty]
| [
" predictablePart f ℱ μ 0 = 0"
] | [
" predictablePart f ℱ μ 0 = 0"
] | [] |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.AffineSpace.AffineMap
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.Tactic.FinCases
#align_import linear_algebra.affine_space.combination from ... | Mathlib/LinearAlgebra/AffineSpace/Combination.lean | 151 | 155 | theorem weightedVSubOfPoint_insert [DecidableEq ι] (w : ι → k) (p : ι → P) (i : ι) :
(insert i s).weightedVSubOfPoint p (p i) w = s.weightedVSubOfPoint p (p i) w := by |
rw [weightedVSubOfPoint_apply, weightedVSubOfPoint_apply]
apply sum_insert_zero
rw [vsub_self, smul_zero]
| [
" univ = {0, 1}",
" x ∈ univ ↔ x ∈ {0, 1}",
" ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}",
" ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}",
" (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)",
" (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)",
" (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf... | [
" univ = {0, 1}",
" x ∈ univ ↔ x ∈ {0, 1}",
" ⟨0, ⋯⟩ ∈ univ ↔ ⟨0, ⋯⟩ ∈ {0, 1}",
" ⟨1, ⋯⟩ ∈ univ ↔ ⟨1, ⋯⟩ ∈ {0, 1}",
" (s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)",
" (s.weightedVSubOfPoint (fun x => p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)",
" (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOf... | [
" ∑ i_1 ∈ insert i s, w i_1 • (p i_1 -ᵥ p i) = ∑ i_1 ∈ s, w i_1 • (p i_1 -ᵥ p i)"
] |
import Mathlib.Data.Nat.Bits
import Mathlib.Order.Lattice
#align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
namespace Nat
section
set_option linter.deprecated false
theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n := shiftLeft_eq _
#align nat.... | Mathlib/Data/Nat/Size.lean | 107 | 116 | theorem lt_size_self (n : ℕ) : n < 2 ^ size n := by |
rw [← one_shiftLeft]
have : ∀ {n}, n = 0 → n < 1 <<< (size n) := by simp
apply binaryRec _ _ n
· apply this rfl
intro b n IH
by_cases h : bit b n = 0
· apply this h
rw [size_bit h, shiftLeft_succ, shiftLeft_eq, one_mul, ← bit0_val]
exact bit_lt_bit0 _ (by simpa [shiftLeft_eq, shiftRight_eq_div_pow] u... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... | [
" shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0",
" shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)",
" bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)",
" 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)",
" shiftLeft' b m n ≠ 0",
... | [
" n < 1 <<< n.size",
" ∀ {n : ℕ}, n = 0 → n < 1 <<< n.size",
" 0 < 1 <<< size 0",
" ∀ (b : Bool) (n : ℕ), n < 1 <<< n.size → bit b n < 1 <<< (bit b n).size",
" bit b n < 1 <<< (bit b n).size",
" bit b n < bit0 (2 ^ n.size)"
] |
import Mathlib.Topology.Separation
import Mathlib.Topology.NoetherianSpace
#align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
open TopologicalSpace
variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β}
def IsQuasiSeparate... | Mathlib/Topology/QuasiSeparated.lean | 53 | 56 | theorem isQuasiSeparated_univ_iff {α : Type*} [TopologicalSpace α] :
IsQuasiSeparated (Set.univ : Set α) ↔ QuasiSeparatedSpace α := by |
rw [quasiSeparatedSpace_iff]
simp [IsQuasiSeparated]
| [
" IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α",
" IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)"
] | [
" IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α"
] | [
" IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)"
] |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 109 | 111 | theorem mul_self_den (q : ℚ) : (q * q).den = q.den * q.den := by |
rw [Rat.mul_den, Int.natAbs_mul, Nat.Coprime.gcd_eq_one, Nat.div_one]
exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [] |
import Mathlib.CategoryTheory.Category.Cat
import Mathlib.CategoryTheory.Elements
#align_import category_theory.grothendieck from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
namespace CategoryTheory
variable {C D : Type*} [Category C] [Category D]
variable (F : C ⥤ Cat)
... | Mathlib/CategoryTheory/Grothendieck.lean | 78 | 83 | theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
(w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g := by |
cases f; cases g
congr
dsimp at w_base
aesop_cat
| [
" (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber",
" f = g",
" { base := base✝, fiber := fiber✝ } = g",
" { base := base✝¹, fiber := fiber✝¹ } = { base := base✝, fiber := fiber✝ }",
" HEq fiber✝¹ fiber✝"
] | [
" (F.map g.base).obj X.fiber = (F.map f.base).obj X.fiber",
" f = g"
] | [
" { base := base✝, fiber := fiber✝ } = g",
" { base := base✝¹, fiber := fiber✝¹ } = { base := base✝, fiber := fiber✝ }",
" HEq fiber✝¹ fiber✝"
] |
import Mathlib.CategoryTheory.Adjunction.Basic
import Mathlib.CategoryTheory.Category.Preorder
import Mathlib.CategoryTheory.IsomorphismClasses
import Mathlib.CategoryTheory.Thin
#align_import category_theory.skeletal from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe v₁ v₂ v₃... | Mathlib/CategoryTheory/Skeletal.lean | 108 | 111 | theorem skeleton_skeletal : Skeletal (Skeleton C) := by |
rintro X Y ⟨h⟩
have : X.out ≈ Y.out := ⟨(fromSkeleton C).mapIso h⟩
simpa using Quotient.sound this
| [
" Category.{?u.1478, u₁} (Skeleton C)",
" (fromSkeleton C).Full",
" (fromSkeleton C).Faithful",
" Skeletal (Skeleton C)",
" X = Y"
] | [
" Category.{?u.1478, u₁} (Skeleton C)",
" (fromSkeleton C).Full",
" (fromSkeleton C).Faithful",
" Skeletal (Skeleton C)"
] | [
" X = Y"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 55 | 56 | theorem eraseLead_coeff_of_ne (i : ℕ) (hi : i ≠ f.natDegree) : f.eraseLead.coeff i = f.coeff i := by |
simp [eraseLead_coeff, hi]
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i"
] | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i"
] | [] |
import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Data.Nat.ModEq
import Mathlib.Data.Nat.GCD.BigOperators
namespace Nat
variable {ι : Type*}
lemma modEq_list_prod_iff {a b} {l : List ℕ} (co : l.Pairwise Coprime) :
a ≡ b [MOD l.prod] ↔ ∀ i, a ≡ b [MOD l.get i] := by
induction' l with m l ih
· si... | Mathlib/Data/Nat/ChineseRemainder.lean | 107 | 118 | theorem chineseRemainderOfList_perm {l l' : List ι} (hl : l.Perm l')
(hs : ∀ i ∈ l, s i ≠ 0) (co : l.Pairwise (Coprime on s)) :
(chineseRemainderOfList a s l co : ℕ) =
chineseRemainderOfList a s l' (co.perm hl coprime_comm.mpr) := by |
let z := chineseRemainderOfList a s l' (co.perm hl coprime_comm.mpr)
have hlp : (l.map s).prod = (l'.map s).prod := List.Perm.prod_eq (List.Perm.map s hl)
exact (chineseRemainderOfList_modEq_unique a s l co (z := z)
(fun i hi => z.prop i (hl.symm.mem_iff.mpr hi))).symm.eq_of_lt_of_lt
(chineseRemainderO... | [
" a ≡ b [MOD l.prod] ↔ ∀ (i : Fin l.length), a ≡ b [MOD l.get i]",
" a ≡ b [MOD [].prod] ↔ ∀ (i : Fin [].length), a ≡ b [MOD [].get i]",
" a ≡ b [MOD (m :: l).prod] ↔ ∀ (i : Fin (m :: l).length), a ≡ b [MOD (m :: l).get i]",
" (a ≡ b [MOD m] ∧ ∀ (i : Fin l.length), a ≡ b [MOD l.get i]) ↔ ∀ (i : Fin l.length.s... | [
" a ≡ b [MOD l.prod] ↔ ∀ (i : Fin l.length), a ≡ b [MOD l.get i]",
" a ≡ b [MOD [].prod] ↔ ∀ (i : Fin [].length), a ≡ b [MOD [].get i]",
" a ≡ b [MOD (m :: l).prod] ↔ ∀ (i : Fin (m :: l).length), a ≡ b [MOD (m :: l).get i]",
" (a ≡ b [MOD m] ∧ ∀ (i : Fin l.length), a ≡ b [MOD l.get i]) ↔ ∀ (i : Fin l.length.s... | [
" ↑z < (List.map s l).prod",
" ↑z < (List.map s l').prod",
" ∀ i ∈ l', s i ≠ 0"
] |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Data.Matrix.CharP
#align_import linear_algebra.matrix.charpoly.finite_field from "leanprover-community/mathlib"@"b95b8c7a484a298228805c72c142f6b062eb0d70"
noncomputable section
open Polynomial Matrix
open s... | Mathlib/LinearAlgebra/Matrix/Charpoly/FiniteField.lean | 53 | 58 | theorem FiniteField.trace_pow_card {K : Type*} [Field K] [Fintype K] (M : Matrix n n K) :
trace (M ^ Fintype.card K) = trace M ^ Fintype.card K := by |
cases isEmpty_or_nonempty n
· simp [Matrix.trace]
rw [Matrix.trace_eq_neg_charpoly_coeff, Matrix.trace_eq_neg_charpoly_coeff,
FiniteField.Matrix.charpoly_pow_card, FiniteField.pow_card]
| [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (⇑(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (⇑(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (⇑(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (⇑(frobeni... | [
" (M ^ Fintype.card K).charpoly = M.charpoly",
" (M ^ p ^ k).charpoly = M.charpoly",
" (⇑(frobenius K[X] p))^[k] (M ^ p ^ k).charpoly = (⇑(frobenius K[X] p))^[k] M.charpoly",
" (M ^ p ^ k).charpoly ^ p ^ k = (⇑(frobenius K[X] p))^[k] M.charpoly",
" (M ^ Fintype.card K).charpoly ^ Fintype.card K = (⇑(frobeni... | [] |
import Mathlib.Analysis.Convex.StrictConvexBetween
import Mathlib.Geometry.Euclidean.Basic
#align_import geometry.euclidean.sphere.basic from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RealInnerProductSpace
namespace EuclideanGeometry
variable {V : Type... | Mathlib/Geometry/Euclidean/Sphere/Basic.lean | 74 | 75 | theorem Sphere.mk_center_radius (s : Sphere P) : (⟨s.center, s.radius⟩ : Sphere P) = s := by |
ext <;> rfl
| [
" { center := s.center, radius := s.radius } = s",
" { center := s.center, radius := s.radius }.center = s.center",
" { center := s.center, radius := s.radius }.radius = s.radius"
] | [
" { center := s.center, radius := s.radius } = s"
] | [
" { center := s.center, radius := s.radius }.center = s.center",
" { center := s.center, radius := s.radius }.radius = s.radius"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
#align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973"
-- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals.
open scoped Real
namespace Real
theorem ... | Mathlib/Data/Real/Pi/Bounds.lean | 40 | 71 | theorem pi_lt_sqrtTwoAddSeries (n : ℕ) :
π < (2 : ℝ) ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) + 1 / (4 : ℝ) ^ n := by |
have : π <
(√(2 - sqrtTwoAddSeries 0 n) / (2 : ℝ) + (1 : ℝ) / ((2 : ℝ) ^ n) ^ 3 / 4) *
(2 : ℝ) ^ (n + 2) := by
rw [← div_lt_iff (by norm_num), ← sin_pi_over_two_pow_succ]
refine lt_of_lt_of_le (lt_add_of_sub_right_lt (sin_gt_sub_cube ?_ ?_)) ?_
· apply div_pos pi_pos; apply pow_pos; norm_num
... | [
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π",
" √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π",
" 0 < 2 ^ (n + 2)",
" (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)",
" 0 < π / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 ≠ ... | [
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π",
" √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < π",
" 0 < 2 ^ (n + 2)",
" (π / 2 ^ (n + 2)).sin < π / 2 ^ (n + 2)",
" 0 < π / 2 ^ (n + 2)",
" 0 < 2",
" 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)",
" 2 ≠ ... | [
" π < (√(2 - sqrtTwoAddSeries 0 n) / 2 + 1 / (2 ^ n) ^ 3 / 4) * 2 ^ (n + 2)",
" π / 2 ^ (n + 2) < (π / 2 ^ (n + 2)).sin + 1 / (2 ^ n) ^ 3 / 4",
" π / 2 ^ (n + 2) ≤ 1",
" π ≤ 2 ^ (n + 2) * 1",
" 4 ≤ 2 ^ (n + 2) * 1",
" 4 = 2 ^ 2",
" 2 ^ 2 ≤ 2 ^ (n + 2)",
" 1 ≤ 2",
" 2 ≤ n + 2",
" 0 ≤ n",
" (π / 2... |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.Ring.Int
#align_import algebra.field.power from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
variable {α : Type*}
section DivisionRing
variable [DivisionRing α] {n : ℤ}
| Mathlib/Algebra/Field/Power.lean | 26 | 30 | theorem Odd.neg_zpow (h : Odd n) (a : α) : (-a) ^ n = -a ^ n := by |
have hn : n ≠ 0 := by rintro rfl; exact Int.odd_iff_not_even.1 h even_zero
obtain ⟨k, rfl⟩ := h
simp_rw [zpow_add' (.inr (.inl hn)), zpow_one, zpow_mul, zpow_two, neg_mul_neg,
neg_mul_eq_mul_neg]
| [
" (-a) ^ n = -a ^ n",
" n ≠ 0",
" False",
" (-a) ^ (2 * k + 1) = -a ^ (2 * k + 1)"
] | [
" (-a) ^ n = -a ^ n"
] | [
" n ≠ 0",
" False",
" (-a) ^ (2 * k + 1) = -a ^ (2 * k + 1)"
] |
import Mathlib.CategoryTheory.Adjunction.Whiskering
import Mathlib.CategoryTheory.Sites.PreservesSheafification
#align_import category_theory.sites.adjunction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory
open GrothendieckTopology CategoryTheory Limits Op... | Mathlib/CategoryTheory/Sites/Adjunction.lean | 136 | 143 | theorem adjunctionToTypes_unit_app_val {G : Type max v u ⥤ D} (adj : G ⊣ forget D)
(Y : SheafOfTypes J) :
((adjunctionToTypes J adj).unit.app Y).val =
(adj.whiskerRight _).unit.app ((sheafOfTypesToPresheaf J).obj Y) ≫
whiskerRight (toSheafify J _) (forget D) := by |
dsimp [adjunctionToTypes, Adjunction.comp]
simp
rfl
| [
" Function.LeftInverse\n (fun γ =>\n { val := sheafifyLift J ((A.homEquiv ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ)) ⋯ })\n fun η => { val := (A.homEquiv X.val Y.val) (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj X.val) ≫ η.val) }",
" (fun γ =>\n {\n ... | [
" Function.LeftInverse\n (fun γ =>\n { val := sheafifyLift J ((A.homEquiv ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ)) ⋯ })\n fun η => { val := (A.homEquiv X.val Y.val) (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj X.val) ≫ η.val) }",
" (fun γ =>\n {\n ... | [
" ((sheafEquivSheafOfTypes J).symm.unit.app Y).val ≫\n ((adjunction J adj).unit.app ((sheafEquivSheafOfTypes J).inverse.obj Y)).val ≫\n 𝟙 (((presheafToSheaf J D).obj (Y.val ⋙ G)).val ⋙ forget D) =\n (Adjunction.whiskerRight Cᵒᵖ adj).unit.app Y.val ≫ whiskerRight (toSheafify J (Y.val ⋙ G)) (forget D)... |
import Mathlib.Logic.Encodable.Lattice
import Mathlib.MeasureTheory.MeasurableSpace.Defs
#align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
open MeasurableSpace Set
open scoped Classical
open MeasureTheory
def IsPiSystem {α} (C : Set (Set α)) :... | Mathlib/MeasureTheory/PiSystem.lean | 105 | 109 | theorem IsPiSystem.comap {α β} {S : Set (Set β)} (h_pi : IsPiSystem S) (f : α → β) :
IsPiSystem { s : Set α | ∃ t ∈ S, f ⁻¹' t = s } := by |
rintro _ ⟨s, hs_mem, rfl⟩ _ ⟨t, ht_mem, rfl⟩ hst
rw [← Set.preimage_inter] at hst ⊢
exact ⟨s ∩ t, h_pi s hs_mem t ht_mem (nonempty_of_nonempty_preimage hst), rfl⟩
| [
" IsPiSystem {S}",
" s ∩ t ∈ {S}",
" IsPiSystem (insert ∅ S)",
" s ∩ t ∈ insert ∅ S",
" IsPiSystem (insert univ S)",
" s ∩ t ∈ insert univ S",
" IsPiSystem {s | ∃ t ∈ S, f ⁻¹' t = s}",
" f ⁻¹' s ∩ f ⁻¹' t ∈ {s | ∃ t ∈ S, f ⁻¹' t = s}",
" f ⁻¹' (s ∩ t) ∈ {s | ∃ t ∈ S, f ⁻¹' t = s}"
] | [
" IsPiSystem {S}",
" s ∩ t ∈ {S}",
" IsPiSystem (insert ∅ S)",
" s ∩ t ∈ insert ∅ S",
" IsPiSystem (insert univ S)",
" s ∩ t ∈ insert univ S",
" IsPiSystem {s | ∃ t ∈ S, f ⁻¹' t = s}"
] | [
" f ⁻¹' s ∩ f ⁻¹' t ∈ {s | ∃ t ∈ S, f ⁻¹' t = s}",
" f ⁻¹' (s ∩ t) ∈ {s | ∃ t ∈ S, f ⁻¹' t = s}"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 72 | 80 | theorem smul_modByMonic (c : R) (p : R[X]) : c • p %ₘ q = c • (p %ₘ q) := by |
by_cases hq : q.Monic
· cases' subsingleton_or_nontrivial R with hR hR
· simp only [eq_iff_true_of_subsingleton]
· exact
(div_modByMonic_unique (c • (p /ₘ q)) (c • (p %ₘ q)) hq
⟨by rw [mul_smul_comm, ← smul_add, modByMonic_add_div p hq],
(degree_smul_le _ _).trans_lt (degree_mod... | [
" p₁ %ₘ q = p₂ %ₘ q",
" p₂ %ₘ q + q * (p₂ /ₘ q + f) = p₁",
" (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q",
" p₁ %ₘ q + p₂ %ₘ q + q * (p₁ /ₘ q + p₂ /ₘ q) = p₁ + p₂",
" c • p %ₘ q = c • (p %ₘ q)",
" c • (p %ₘ q) + q * c • (p /ₘ q) = c • p"
] | [
" p₁ %ₘ q = p₂ %ₘ q",
" p₂ %ₘ q + q * (p₂ /ₘ q + f) = p₁",
" (p₁ + p₂) %ₘ q = p₁ %ₘ q + p₂ %ₘ q",
" p₁ %ₘ q + p₂ %ₘ q + q * (p₁ /ₘ q + p₂ /ₘ q) = p₁ + p₂",
" c • p %ₘ q = c • (p %ₘ q)"
] | [
" c • (p %ₘ q) + q * c • (p /ₘ q) = c • p"
] |
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 | 112 | 114 | theorem mellin_const_smul (f : ℝ → E) (s : ℂ) {𝕜 : Type*} [NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E] [SMulCommClass ℂ 𝕜 E] (c : 𝕜) :
mellin (fun t => c • f t) s = c • mellin f s := by | simp only [mellin, smul_comm, integral_smul]
| [
" MellinConvergent (fun t => c • f t) s",
" MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)",
" ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t",
" MellinConvergent (fun t => f t / a) s",
" MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s",
" (fun t ... | [
" MellinConvergent (fun t => c • f t) s",
" MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)",
" ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t",
" MellinConvergent (fun t => f t / a) s",
" MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s",
" (fun t ... | [] |
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87"
noncomputable section
open scoped Classical nonZeroDivisors
open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind... | Mathlib/RingTheory/DedekindDomain/Factorization.lean | 131 | 144 | theorem finprod_not_dvd (I : Ideal R) (hI : I ≠ 0) :
¬v.asIdeal ^ ((Associates.mk v.asIdeal).count (Associates.mk I).factors + 1) ∣
∏ᶠ v : HeightOneSpectrum R, v.maxPowDividing I := by |
have hf := finite_mulSupport hI
have h_ne_zero : v.maxPowDividing I ≠ 0 := pow_ne_zero _ v.ne_bot
rw [← mul_finprod_cond_ne v hf, pow_add, pow_one, finprod_cond_ne _ _ hf]
intro h_contr
have hv_prime : Prime v.asIdeal := Ideal.prime_of_isPrime v.ne_bot v.isPrime
obtain ⟨w, hw, hvw'⟩ :=
Prime.exists_mem... | [
" {v | v.asIdeal ∣ I}.Finite",
" Finite { x // x.asIdeal ∣ I }",
" Injective fun v => ⟨(↑v).asIdeal, ⋯⟩",
" v = w",
" ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... | [
" {v | v.asIdeal ∣ I}.Finite",
" Finite { x // x.asIdeal ∣ I }",
" Injective fun v => ⟨(↑v).asIdeal, ⋯⟩",
" v = w",
" ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0",
" {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0... | [
" ¬v.asIdeal ^ (Associates.mk v.asIdeal).count (Associates.mk I).factors * v.asIdeal ∣\n v.maxPowDividing I * ∏ i ∈ hf.toFinset.erase v, i.maxPowDividing I"
] |
import Mathlib.Data.Set.Image
import Mathlib.Data.SProd
#align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
open Function
namespace Set
section Prod
variable {α β γ δ : Type*} {s s₁ s₂ : Set α} {t t₁ t₂ : Set β} {a : α} {b : β}
theorem Subsingleton.pro... | Mathlib/Data/Set/Prod.lean | 122 | 122 | theorem singleton_prod_singleton : ({a} : Set α) ×ˢ ({b} : Set β) = {(a, b)} := by | simp
| [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ",
" {... | [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ",
" {... | [] |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function ... | Mathlib/Algebra/Field/Basic.lean | 56 | 58 | theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) :
1 / a * (a + b) * (1 / b) = 1 / a + 1 / b := by |
simpa only [one_div] using (inv_add_inv' ha hb).symm
| [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1",
" 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b"
] | [
" (a + b) / c = a / c + b / c",
" (b + a) / b = 1 + a / b",
" (a + b) / b = a / b + 1",
" 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b"
] | [] |
import Mathlib.Algebra.Order.Floor
import Mathlib.Algebra.Order.Field.Power
import Mathlib.Data.Nat.Log
#align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R]
namespace Int
def log (b : ℕ) (r : ... | Mathlib/Data/Int/Log.lean | 66 | 70 | theorem log_of_right_le_one (b : ℕ) {r : R} (hr : r ≤ 1) : log b r = -Nat.clog b ⌈r⁻¹⌉₊ := by |
obtain rfl | hr := hr.eq_or_lt
· rw [log, if_pos hr, inv_one, Nat.ceil_one, Nat.floor_one, Nat.log_one_right, Nat.clog_one_right,
Int.ofNat_zero, neg_zero]
· exact if_neg hr.not_le
| [
" log b r = -↑(b.clog ⌈r⁻¹⌉₊)",
" log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)"
] | [
" log b r = -↑(b.clog ⌈r⁻¹⌉₊)"
] | [
" log b 1 = -↑(b.clog ⌈1⁻¹⌉₊)"
] |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd5389208... | Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 110 | 113 | theorem IsSRGWith.card_neighborFinset_union_of_adj {v w : V} (h : G.IsSRGWith n k ℓ μ)
(ha : G.Adj v w) : (G.neighborFinset v ∪ G.neighborFinset w).card = 2 * k - ℓ := by |
rw [← h.of_adj v w ha]
apply h.card_neighborFinset_union_eq
| [
" (fun v w => ¬⊥.Adj v w → Fintype.card ↑(⊥.commonNeighbors v w) = 0) v w",
" filter (fun x => x ∈ ⊥.commonNeighbors v w) univ = ∅",
" a✝ ∈ filter (fun x => x ∈ ⊥.commonNeighbors v w) univ ↔ a✝ ∈ ∅",
" Fintype.card ↑(⊤.commonNeighbors v w) = Fintype.card V - 2",
" v ≠ w",
" (G.neighborFinset v ∪ G.neighbo... | [
" (fun v w => ¬⊥.Adj v w → Fintype.card ↑(⊥.commonNeighbors v w) = 0) v w",
" filter (fun x => x ∈ ⊥.commonNeighbors v w) univ = ∅",
" a✝ ∈ filter (fun x => x ∈ ⊥.commonNeighbors v w) univ ↔ a✝ ∈ ∅",
" Fintype.card ↑(⊤.commonNeighbors v w) = Fintype.card V - 2",
" v ≠ w",
" (G.neighborFinset v ∪ G.neighbo... | [] |
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
#align_import linear_algebra.affine_space.matrix from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
open Affine Matrix
open Set
universe u₁ u₂ u₃ u₄
variable {ι : Type u₁} {k : Type... | Mathlib/LinearAlgebra/AffineSpace/Matrix.lean | 114 | 119 | theorem toMatrix_vecMul_coords (x : P) : b₂.coords x ᵥ* b.toMatrix b₂ = b.coords x := by |
ext j
change _ = b.coord j x
conv_rhs => rw [← b₂.affineCombination_coord_eq_self x]
rw [Finset.map_affineCombination _ _ _ (b₂.sum_coord_apply_eq_one x)]
simp [Matrix.vecMul, Matrix.dotProduct, toMatrix_apply, coords]
| [
" b.toMatrix ⇑b = 1",
" b.toMatrix (⇑b) i j = 1 i j",
" ∑ j : ι, b.toMatrix q i j = 1",
" AffineIndependent k p",
" ∀ (w1 w2 : ι' → k),\n ∑ i : ι', w1 i = 1 →\n ∑ i : ι', w2 i = 1 →\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 → w1 = w2",
"... | [
" b.toMatrix ⇑b = 1",
" b.toMatrix (⇑b) i j = 1 i j",
" ∑ j : ι, b.toMatrix q i j = 1",
" AffineIndependent k p",
" ∀ (w1 w2 : ι' → k),\n ∑ i : ι', w1 i = 1 →\n ∑ i : ι', w2 i = 1 →\n (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 → w1 = w2",
"... | [
" (b₂.coords x ᵥ* b.toMatrix ⇑b₂) j = b.coords x j",
" (b₂.coords x ᵥ* b.toMatrix ⇑b₂) j = (b.coord j) x",
"ι : Type u₁\nk : Type u₂\nV : Type u₃\nP : Type u₄\ninst✝⁴ : AddCommGroup V\ninst✝³ : AffineSpace V P\ninst✝² : Ring k\ninst✝¹ : Module k V\nb : AffineBasis ι k P\nι' : Type u_1\ninst✝ : Fintype ι\nb₂ : A... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antidiagonal mem_anti... | Mathlib/RingTheory/PowerSeries/Order.lean | 134 | 139 | theorem order_eq_nat {φ : R⟦X⟧} {n : ℕ} :
order φ = n ↔ coeff R n φ ≠ 0 ∧ ∀ i, i < n → coeff R i φ = 0 := by |
classical
rcases eq_or_ne φ 0 with (rfl | hφ)
· simpa [(coeff R _).map_zero] using (PartENat.natCast_ne_top _).symm
simp [order, dif_neg hφ, Nat.find_eq_iff]
| [
" (∃ n, (coeff R n) φ ≠ 0) ↔ φ ≠ 0",
" (¬∃ n, (coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0",
" (∀ (n : ℕ), (coeff R n) φ = 0) ↔ φ = 0",
" φ.order.Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom → φ ≠ 0",
" ⊤.Dom → φ ≠ 0",
" (↑(Nat.find ⋯)).Dom → φ ≠... | [
" (∃ n, (coeff R n) φ ≠ 0) ↔ φ ≠ 0",
" (¬∃ n, (coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0",
" (∀ (n : ℕ), (coeff R n) φ = 0) ↔ φ = 0",
" φ.order.Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom → φ ≠ 0",
" ⊤.Dom → φ ≠ 0",
" (↑(Nat.find ⋯)).Dom → φ ≠... | [
" order 0 = ↑n ↔ (coeff R n) 0 ≠ 0 ∧ ∀ i < n, (coeff R i) 0 = 0"
] |
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.LinearAlgebra.Dimension.Constructions
#align_import algebra.linear_recurrence from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
noncomputable section
open Finset
open Polynomial
structure LinearRecurrence (α : Type*) [CommSemir... | Mathlib/Algebra/LinearRecurrence.lean | 92 | 95 | theorem mkSol_eq_init (init : Fin E.order → α) : ∀ n : Fin E.order, E.mkSol init n = init n := by |
intro n
rw [mkSol]
simp only [n.is_lt, dif_pos, Fin.mk_val, Fin.eta]
| [
" n - E.order + ↑k < n",
" ↑k + n < E.order + n",
" E.order ≤ ↑k + n",
" E.order = 0 + E.order",
" E.IsSolution (E.mkSol init)",
" E.mkSol init (n + E.order) = ∑ i : Fin E.order, E.coeffs i * E.mkSol init (n + ↑i)",
" (if h : n + E.order < E.order then init ⟨n + E.order, h⟩\n else\n ∑ k : Fin E.... | [
" n - E.order + ↑k < n",
" ↑k + n < E.order + n",
" E.order ≤ ↑k + n",
" E.order = 0 + E.order",
" E.IsSolution (E.mkSol init)",
" E.mkSol init (n + E.order) = ∑ i : Fin E.order, E.coeffs i * E.mkSol init (n + ↑i)",
" (if h : n + E.order < E.order then init ⟨n + E.order, h⟩\n else\n ∑ k : Fin E.... | [
" E.mkSol init ↑n = init n",
" (if h : ↑n < E.order then init ⟨↑n, h⟩\n else\n ∑ k : Fin E.order,\n let_fun x := ⋯;\n E.coeffs k * E.mkSol init (↑n - E.order + ↑k)) =\n init n"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Div
#align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8"
noncomputable ... | Mathlib/Algebra/Polynomial/RingDivision.lean | 166 | 169 | theorem eq_zero_of_dvd_of_degree_lt {p q : R[X]} (h₁ : p ∣ q) (h₂ : degree q < degree p) :
q = 0 := by |
by_contra hc
exact (lt_iff_not_ge _ _).mp h₂ (degree_le_of_dvd h₁ hc)
| [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" a✝ = 0 ∨ b✝ = 0",
" a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0",
" a✝.leadingCoeff * b✝.leadingCoeff = 0",
" (p * q).natDegree = p.natDegree + q.natDegree",
" (p * q).trailingDegree = p.trailingDegree + q.trailingDegree",
" ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail... | [
" False"
] |
import Mathlib.Algebra.ContinuedFractions.Computation.Basic
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
open Generali... | Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean | 209 | 212 | theorem of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none :
(of v).TerminatedAt n ↔ IntFractPair.stream v (n + 1) = none := by |
rw [of_terminatedAt_iff_intFractPair_seq1_terminatedAt, Stream'.Seq.TerminatedAt,
IntFractPair.get?_seq1_eq_succ_get?_stream]
| [
" (of v).TerminatedAt n ↔ IntFractPair.stream v (n + 1) = none"
] | [
" (of v).TerminatedAt n ↔ IntFractPair.stream v (n + 1) = none"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.