Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Convex.Gauge
#align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open NormedField Set
open NNReal Pointwis... | Mathlib/Analysis/LocallyConvex/AbsConvex.lean | 52 | 60 | theorem nhds_basis_abs_convex :
(𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ Balanced 𝕜 s ∧ Convex ℝ s) id := by |
refine
(LocallyConvexSpace.convex_basis_zero ℝ E).to_hasBasis (fun s hs => ?_) fun s hs =>
⟨s, ⟨hs.1, hs.2.2⟩, rfl.subset⟩
refine ⟨convexHull ℝ (balancedCore 𝕜 s), ?_, convexHull_min (balancedCore_subset s) hs.2⟩
refine ⟨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull ℝ _),... | [
" (𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ Balanced 𝕜 s ∧ Convex ℝ s) id",
" ∃ i', (i' ∈ 𝓝 0 ∧ Balanced 𝕜 i' ∧ Convex ℝ i') ∧ id i' ⊆ id s",
" (convexHull ℝ) (balancedCore 𝕜 s) ∈ 𝓝 0 ∧\n Balanced 𝕜 ((convexHull ℝ) (balancedCore 𝕜 s)) ∧ Convex ℝ ((convexHull ℝ) (balancedCore 𝕜 s))",
" Balanced 𝕜 ((conv... | [] |
import Mathlib.RingTheory.Nilpotent.Basic
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import algebra.squarefree from "leanprover-community/mathlib"@"00d163e35035c3577c1c79fa53b68de17781ffc1"
variable {R : Type*}
def Squarefree [Monoid R] (r : R) : Prop :=
∀ x : R, x * x ∣ r → IsUnit x
#align sq... | Mathlib/Algebra/Squarefree/Basic.lean | 147 | 152 | theorem squarefree_iff_no_irreducibles {x : R} (hx₀ : x ≠ 0) :
Squarefree x ↔ ∀ p, Irreducible p → ¬ (p * p ∣ x) := by |
refine ⟨fun h p hp hp' ↦ hp.not_unit (h p hp'), fun h d hd ↦ by_contra fun hdu ↦ ?_⟩
have hd₀ : d ≠ 0 := ne_zero_of_dvd_ne_zero (ne_zero_of_dvd_ne_zero hx₀ hd) (dvd_mul_left d d)
obtain ⟨p, irr, dvd⟩ := WfDvdMonoid.exists_irreducible_factor hdu hd₀
exact h p irr ((mul_dvd_mul dvd dvd).trans hd)
| [
" ¬Squarefree 0",
" ∃ x, ¬(x * x ∣ 0 → IsUnit x)",
" ¬(0 * 0 ∣ 0 → IsUnit 0)",
" m ≠ 0",
" False",
" Squarefree x",
" IsUnit y",
" n = 0 ∨ n = 1",
" IsUnit x",
" 2 ≤ n",
" x * x ∣ x ^ n",
" x ^ 2 ∣ x ^ n",
" Squarefree x ↔ ∀ (p : R), Irreducible p → ¬p * p ∣ x"
] | [
" ¬Squarefree 0",
" ∃ x, ¬(x * x ∣ 0 → IsUnit x)",
" ¬(0 * 0 ∣ 0 → IsUnit 0)",
" m ≠ 0",
" False",
" Squarefree x",
" IsUnit y",
" n = 0 ∨ n = 1",
" IsUnit x",
" 2 ≤ n",
" x * x ∣ x ^ n",
" x ^ 2 ∣ x ^ n"
] |
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.CategoryTheory.FullSubcategory
import Mathlib.CategoryTheory.Skeletal
import Mathlib.Data.Fintype.Card
#align_import category_theory.Fintype from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open scoped Classical
ope... | Mathlib/CategoryTheory/FintypeCat.lean | 211 | 213 | theorem incl_mk_nat_card (n : ℕ) : Fintype.card (incl.obj (mk n)) = n := by |
convert Finset.card_fin n
apply Fintype.ofEquiv_card
| [
" f = g",
" f x✝ = g x✝",
" Function.LeftInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := ⋯, right_inv := ⋯ }) fun e =>\n { hom := ⇑e, inv := ⇑e.symm, hom_inv_id := ⋯, inv_hom_id := ⋯ }",
" Function.RightInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := ⋯, right_inv := ⋯ }) f... | [
" f = g",
" f x✝ = g x✝",
" Function.LeftInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := ⋯, right_inv := ⋯ }) fun e =>\n { hom := ⇑e, inv := ⇑e.symm, hom_inv_id := ⋯, inv_hom_id := ⋯ }",
" Function.RightInverse (fun i => { toFun := i.hom, invFun := i.inv, left_inv := ⋯, right_inv := ⋯ }) f... |
import Mathlib.Data.Set.Subsingleton
import Mathlib.Order.WithBot
#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
universe u v
open Function Set
namespace Set
variable {α β γ : Type*} {ι ι' : Sort*}
section Preimage
variable {f : α → β} {g : β → γ... | Mathlib/Data/Set/Image.lean | 157 | 159 | theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage f^[n] = (Set.preimage f)^[n] := by |
induction' n with n ih; · simp
rw [iterate_succ, iterate_succ', preimage_comp_eq, ih]
| [
" f ⁻¹' s = g ⁻¹' s",
" x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s",
" (fun x => b) ⁻¹' s = if b ∈ s then univ else ∅",
" (fun x => b) ⁻¹' s = ∅",
" ∃ b, f = const α b",
" preimage f^[n] = (preimage f)^[n]",
" preimage f^[0] = (preimage f)^[0]",
" preimage f^[n + 1] = (preimage f)^[n + 1]"
] | [
" f ⁻¹' s = g ⁻¹' s",
" x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s",
" (fun x => b) ⁻¹' s = if b ∈ s then univ else ∅",
" (fun x => b) ⁻¹' s = ∅",
" ∃ b, f = const α b"
] |
import Mathlib.Algebra.Associated
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Algebra.Ring.Divisibility.Basic
#align_import ring_theory.prime from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
section CommRing
variable {α : Ty... | Mathlib/RingTheory/Prime.lean | 65 | 67 | theorem Prime.neg {p : α} (hp : Prime p) : Prime (-p) := by |
obtain ⟨h1, h2, h3⟩ := hp
exact ⟨neg_ne_zero.mpr h1, by rwa [IsUnit.neg_iff], by simpa [neg_dvd] using h3⟩
| [
" Prime (-p)",
" ¬IsUnit (-p)",
" ∀ (a b : α), -p ∣ a * b → -p ∣ a ∨ -p ∣ b"
] | [] |
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.charpoly.linear_map from "leanprover-community/mathlib"@"62c0a4ef1441edb463095ea02a06e87f3dfe135c"
variable {ι : Type*} [Fintype ι]
variable {M : Type*} [AddCommGroup M] (R : Type*) [Co... | Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean | 60 | 65 | theorem PiToModule.fromEnd_apply_single_one [DecidableEq ι] (f : Module.End R M) (i : ι) :
PiToModule.fromEnd R b f (Pi.single i 1) = f (b i) := by |
rw [PiToModule.fromEnd_apply]
congr
convert Fintype.total_apply_single (S := R) R b i (1 : R)
rw [one_smul]
| [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i",
" ((fromEnd R b) f) (Pi.single i 1) = f (b i)",
" f (((Fintype.total R R) b) (Pi.single i 1)) = f (b i)",
" ((Fintype.total R R) b) (Pi.single i 1) = b i",
" b i = 1 • b i"
] | [
" ((fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i",
" ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i"
] |
import Mathlib.Combinatorics.Quiver.Cast
import Mathlib.Combinatorics.Quiver.Symmetric
import Mathlib.Data.Sigma.Basic
import Mathlib.Logic.Equiv.Basic
import Mathlib.Tactic.Common
#align_import combinatorics.quiver.covering from "leanprover-community/mathlib"@"188a411e916e1119e502dbe35b8b475716362401"
open Funct... | Mathlib/Combinatorics/Quiver/Covering.lean | 153 | 163 | theorem Prefunctor.symmetrifyStar (u : U) :
φ.symmetrify.star u =
(Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
Quiver.symmetrifyStar u := by |
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
erw [Equiv.eq_symm_comp]
ext ⟨v, f | g⟩ <;>
-- porting note (#10745): was `simp [Quiver.symmetrifyStar]`
simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>... | [
" Injective fun f => φ.map f",
" f = g",
" φ.star u (Star.mk f) = φ.star u (Star.mk g)",
" ψ.IsCovering",
" Bijective (ψ.star v)",
" Bijective (ψ.costar v)",
" Bijective (ψ.costar (φ.obj u))",
" φ.symmetrify.star u =\n ⇑(Quiver.symmetrifyStar (φ.obj u)).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘ ⇑(Qu... | [
" Injective fun f => φ.map f",
" f = g",
" φ.star u (Star.mk f) = φ.star u (Star.mk g)",
" ψ.IsCovering",
" Bijective (ψ.star v)",
" Bijective (ψ.costar v)",
" Bijective (ψ.costar (φ.obj u))"
] |
import Mathlib.CategoryTheory.Abelian.Subobject
import Mathlib.CategoryTheory.Limits.EssentiallySmall
import Mathlib.CategoryTheory.Preadditive.Injective
import Mathlib.CategoryTheory.Preadditive.Generator
import Mathlib.CategoryTheory.Abelian.Opposite
#align_import category_theory.abelian.generator from "leanprover-... | Mathlib/CategoryTheory/Abelian/Generator.lean | 35 | 52 | theorem has_injective_coseparator [HasLimits C] [EnoughInjectives C] (G : C) (hG : IsSeparator G) :
∃ G : C, Injective G ∧ IsCoseparator G := by |
haveI : WellPowered C := wellPowered_of_isDetector G hG.isDetector
haveI : HasProductsOfShape (Subobject (op G)) C := hasProductsOfShape_of_small _ _
let T : C := Injective.under (piObj fun P : Subobject (op G) => unop P)
refine ⟨T, inferInstance, (Preadditive.isCoseparator_iff _).2 fun X Y f hf => ?_⟩
refin... | [
" ∃ G, Injective G ∧ IsCoseparator G",
" f = 0",
" h ≫ f = 0",
" factorThruImage (h ≫ f) = 0",
" factorThruImage (h ≫ f) ≫ q = 0"
] | [] |
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 | 80 | 83 | theorem Ioc_mul_Ico_subset' (a b c d : α) : Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d) := by |
haveI := covariantClass_le_of_lt
rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩
exact ⟨mul_lt_mul_of_lt_of_le hya hzc, mul_lt_mul_of_le_of_lt hyb hzd⟩
| [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)"
] | [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)"
] |
import Mathlib.Geometry.Euclidean.Inversion.Basic
import Mathlib.Geometry.Euclidean.PerpBisector
open Metric Function AffineMap Set AffineSubspace
open scoped Topology
variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
[NormedAddTorsor V P] {c x y : P} {R : ℝ}
namespace Euclid... | Mathlib/Geometry/Euclidean/Inversion/ImageHyperplane.lean | 46 | 50 | theorem inversion_mem_perpBisector_inversion_iff' (hR : R ≠ 0) (hy : y ≠ c) :
inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c := by |
rcases eq_or_ne x c with rfl | hx
· simp [*]
· simp [inversion_mem_perpBisector_inversion_iff hR hx hy, hx]
| [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c",
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c",
" inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ... | [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c"
] |
import Mathlib.Control.Applicative
import Mathlib.Control.Traversable.Basic
import Mathlib.Data.List.Forall2
import Mathlib.Data.Set.Functor
#align_import control.traversable.instances from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
universe u v
section Option
open Functor
variab... | Mathlib/Control/Traversable/Instances.lean | 41 | 42 | theorem Option.traverse_eq_map_id {α β} (f : α → β) (x : Option α) :
Option.traverse ((pure : _ → Id _) ∘ f) x = (pure : _ → Id _) (f <$> x) := by | cases x <;> rfl
| [
" Option.traverse pure x = x",
" Option.traverse pure none = none",
" Option.traverse pure (some val✝) = some val✝",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Comp.mk (Option.traverse f <$> Option.traverse g x)",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) none = Comp.mk (Option.trav... | [
" Option.traverse pure x = x",
" Option.traverse pure none = none",
" Option.traverse pure (some val✝) = some val✝",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Comp.mk (Option.traverse f <$> Option.traverse g x)",
" Option.traverse (Comp.mk ∘ (fun x => f <$> x) ∘ g) none = Comp.mk (Option.trav... |
import Mathlib.NumberTheory.FLT.Basic
import Mathlib.NumberTheory.PythagoreanTriples
import Mathlib.RingTheory.Coprime.Lemmas
import Mathlib.Tactic.LinearCombination
#align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1"
noncomputable section
open scope... | Mathlib/NumberTheory/FLT/Four.lean | 32 | 35 | theorem comm {a b c : ℤ} : Fermat42 a b c ↔ Fermat42 b a c := by |
delta Fermat42
rw [add_comm]
tauto
| [
" Fermat42 a b c ↔ Fermat42 b a c",
" a ≠ 0 ∧ b ≠ 0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2",
" a ≠ 0 ∧ b ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b ≠ 0 ∧ a ≠ 0 ∧ b ^ 4 + a ^ 4 = c ^ 2"
] | [] |
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.RingTheory.Ideal.Quotient
#align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24"
open Submodule
open Polynomial
variable {R : Type*} [Ring R]
variable {A : Type*} [CommRing A]
variable {M : Type*} [... | Mathlib/LinearAlgebra/SModEq.lean | 92 | 94 | theorem smul (hxy : x ≡ y [SMOD U]) (c : R) : c • x ≡ c • y [SMOD U] := by |
rw [SModEq.def] at hxy ⊢
simp_rw [Quotient.mk_smul, hxy]
| [
" x ≡ y [SMOD U] ↔ x - y ∈ U",
" x ≡ y [SMOD ⊥] ↔ x = y",
" x₁ + x₂ ≡ y₁ + y₂ [SMOD U]",
" Submodule.Quotient.mk (x₁ + x₂) = Submodule.Quotient.mk (y₁ + y₂)",
" c • x ≡ c • y [SMOD U]",
" Submodule.Quotient.mk (c • x) = Submodule.Quotient.mk (c • y)"
] | [
" x ≡ y [SMOD U] ↔ x - y ∈ U",
" x ≡ y [SMOD ⊥] ↔ x = y",
" x₁ + x₂ ≡ y₁ + y₂ [SMOD U]",
" Submodule.Quotient.mk (x₁ + x₂) = Submodule.Quotient.mk (y₁ + y₂)"
] |
import Mathlib.Computability.Halting
import Mathlib.Computability.TuringMachine
import Mathlib.Data.Num.Lemmas
import Mathlib.Tactic.DeriveFintype
#align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8"
open Function (update)
open Relation
namespa... | Mathlib/Computability/TMToPartrec.lean | 158 | 160 | theorem case_eval (f g) :
(case f g).eval = fun v => v.headI.rec (f.eval v.tail) fun y _ => g.eval (y::v.tail) := by |
simp [eval]
| [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval",
" (f.case g).eval = fun v ... | [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval"
] |
import Mathlib.Algebra.Group.Defs
variable {α β δ : Type*} [AddZeroClass δ] [Min δ]
namespace Levenshtein
structure Cost (α β δ : Type*) where
delete : α → δ
insert : β → δ
substitute : α → β → δ
@[simps]
def defaultCost [DecidableEq α] : Cost α α ℕ where
delete _ := 1
insert _ := 1
substi... | Mathlib/Data/List/EditDistance/Defs.lean | 125 | 135 | theorem impl_length (d : {r : List δ // 0 < r.length}) (w : d.1.length = xs.length + 1) :
(impl C xs y d).1.length = xs.length + 1 := by |
induction xs generalizing d with
| nil => rfl
| cons x xs ih =>
dsimp [impl]
match d, w with
| ⟨d₁ :: d₂ :: ds, _⟩, w =>
dsimp
congr 1
exact ih ⟨d₂ :: ds, (by simp)⟩ (by simpa using w)
| [
" 0 < (min (C.delete x + r[0]) (min (C.insert y + d₀) (C.substitute x y + d₁)) :: r).length",
" 0 < [C.insert y + ds.getLast ⋯].length",
" 0 < (min (C.delete x + r[0]) (min (C.insert y + d) (C.substitute x y + ds[0])) :: r).length",
" (impl C xs y d).val.length = xs.length + 1",
" (impl C [] y d).val.length... | [
" 0 < (min (C.delete x + r[0]) (min (C.insert y + d₀) (C.substitute x y + d₁)) :: r).length",
" 0 < [C.insert y + ds.getLast ⋯].length",
" 0 < (min (C.delete x + r[0]) (min (C.insert y + d) (C.substitute x y + ds[0])) :: r).length"
] |
import Mathlib.Algebra.GroupWithZero.Hom
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Algebra.Order.GroupWithZero.Canonical
import Mathlib.Order.Hom.Basic
#align_import algebra.order.hom.monoid from "leanprover-community/mathlib"@"3342d1b2178381196f818146ff79bc0e7ccd9e2d"
open Function
variable {F... | Mathlib/Algebra/Order/Hom/Monoid.lean | 177 | 179 | theorem map_nonneg (ha : 0 ≤ a) : 0 ≤ f a := by |
rw [← map_zero f]
exact OrderHomClass.mono _ ha
| [
" 0 ≤ f a",
" f 0 ≤ f a"
] | [] |
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Analysis.SumOverResidueClass
#align_import analysis.p_series from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
def SuccDiffBounded (C : ℕ) (u : ℕ → ℕ) : Prop :=... | Mathlib/Analysis/PSeries.lean | 78 | 81 | theorem le_sum_condensed (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (n : ℕ) :
(∑ k ∈ range (2 ^ n), f k) ≤ f 0 + ∑ k ∈ range n, 2 ^ k • f (2 ^ k) := by |
convert add_le_add_left (le_sum_condensed' hf n) (f 0)
rw [← sum_range_add_sum_Ico _ n.one_le_two_pow, sum_range_succ, sum_range_zero, zero_add]
| [
" ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)",
" ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈... | [
" ∑ k ∈ Ico (u 0) (u n), f k ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u 0), f k ≤ ∑ k ∈ range 0, (u (k + 1) - u k) • f (u k)",
" ∑ k ∈ Ico (u 0) (u (n + 1)), f k ≤ ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k)",
" ∑ i ∈ Ico (u 0) ?n, f i + ∑ i ∈ Ico ?n (u (n + 1)), f i ≤\n ∑ x ∈... |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.NormedSpace.WithLp
open Real Set Filter RCLike Bornology Uniformity Topology NNReal ENNReal
noncomputable section
variable (p : ℝ≥0∞) (𝕜 α β : Type*)
namespace WithLp
section DistNorm
section EDist
variable [EDist α] [EDist β]
open scope... | Mathlib/Analysis/NormedSpace/ProdLp.lean | 171 | 174 | theorem prod_edist_eq_sup (f g : WithLp ∞ (α × β)) :
edist f g = edist f.fst g.fst ⊔ edist f.snd g.snd := by |
dsimp [edist]
exact if_neg ENNReal.top_ne_zero
| [
" edist f g = (if edist f.1 g.1 = 0 then 0 else 1) + if edist f.2 g.2 = 0 then 0 else 1",
" edist f g = edist f.1 g.1 ⊔ edist f.2 g.2",
" (if ⊤ = 0 then (if edist f.1 g.1 = 0 then 0 else 1) + if edist f.2 g.2 = 0 then 0 else 1\n else if ⊤ = ⊤ then max (edist f.1 g.1) (edist f.2 g.2) else (edist f.1 g.1 ^ 0 +... | [
" edist f g = (if edist f.1 g.1 = 0 then 0 else 1) + if edist f.2 g.2 = 0 then 0 else 1"
] |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.Tactic.FieldSimp
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.Basis
#align_import linear_algebra.determinant from "lea... | Mathlib/LinearAlgebra/Determinant.lean | 77 | 78 | theorem det_comm [DecidableEq n] (M N : Matrix n n A) : det (M * N) = det (N * M) := by |
rw [det_mul, det_mul, mul_comm]
| [
" (M * N).det = (N * M).det"
] | [] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Data.Finset.Pointwise
import Mathlib.Tactic.GCongr
#align_import combinatorics.additive.pluennecke_ruzsa from "leanprover-community/mathlib"@"4aab2abced69a9e579b1e6dc... | Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean | 83 | 86 | theorem card_mul_mul_le_card_mul_mul_card_div (A B C : Finset α) :
(A * C).card * B.card ≤ (A * B).card * (B / C).card := by |
rw [← div_inv_eq_mul, div_eq_mul_inv B]
exact card_div_mul_le_card_mul_mul_card_mul _ _ _
| [
" (A / C).card * B.card ≤ (A / B).card * (B / C).card",
" (A / C).card * B.card ≤ ((A / B) ×ˢ (B / C)).card * 1",
" x.1 * x.2 = b✝",
" (fun b => (a / b, b / c)) b ∈ bipartiteAbove (fun b ac => ac.1 * ac.2 = b) ((A / B) ×ˢ (B / C)) (a / c)",
" (fun b => (a / b, b / c)) b ∈ (A / B) ×ˢ (B / C) ∧\n ((fun b =... | [
" (A / C).card * B.card ≤ (A / B).card * (B / C).card",
" (A / C).card * B.card ≤ ((A / B) ×ˢ (B / C)).card * 1",
" x.1 * x.2 = b✝",
" (fun b => (a / b, b / c)) b ∈ bipartiteAbove (fun b ac => ac.1 * ac.2 = b) ((A / B) ×ˢ (B / C)) (a / c)",
" (fun b => (a / b, b / c)) b ∈ (A / B) ×ˢ (B / C) ∧\n ((fun b =... |
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.Finite
#align_import field_theory.finiteness from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
universe u v
open scoped Classical
open Cardinal
... | Mathlib/FieldTheory/Finiteness.lean | 95 | 97 | theorem range_finsetBasis [IsNoetherian K V] :
Set.range (finsetBasis K V) = Basis.ofVectorSpaceIndex K V := by |
rw [finsetBasis, Basis.range_reindex, Basis.range_ofVectorSpace]
| [
" IsNoetherian K V ↔ Module.rank K V < ℵ₀",
" IsNoetherian K V ↔ (Basis.ofVectorSpaceIndex K V).Finite",
" IsNoetherian K V → (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite → IsNoetherian K V",
" IsNoetherian K V",
" IsNoetherian... | [
" IsNoetherian K V ↔ Module.rank K V < ℵ₀",
" IsNoetherian K V ↔ (Basis.ofVectorSpaceIndex K V).Finite",
" IsNoetherian K V → (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite",
" (Basis.ofVectorSpaceIndex K V).Finite → IsNoetherian K V",
" IsNoetherian K V",
" IsNoetherian... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.HasseDeriv
#align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace Polynomial
open Polynomial... | Mathlib/Algebra/Polynomial/Taylor.lean | 126 | 127 | theorem taylor_eval_sub {R} [CommRing R] (r : R) (f : R[X]) (s : R) :
(taylor r f).eval (s - r) = f.eval s := by | rw [taylor_eval, sub_add_cancel]
| [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... | [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... |
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull
import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix
import Mathlib.Topology.Algebra.Module.Simple
import Mathlib.Topology.Algebra.Module.Determinant
import Mathlib.RingTheory.Ideal.LocalRing
#align_import topology.algebra.module.finite_dimension from "leanprove... | Mathlib/Topology/Algebra/Module/FiniteDimension.lean | 77 | 127 | theorem unique_topology_of_t2 {t : TopologicalSpace 𝕜} (h₁ : @TopologicalAddGroup 𝕜 t _)
(h₂ : @ContinuousSMul 𝕜 𝕜 _ hnorm.toUniformSpace.toTopologicalSpace t) (h₃ : @T2Space 𝕜 t) :
t = hnorm.toUniformSpace.toTopologicalSpace := by |
-- Let `𝓣₀` denote the topology on `𝕜` induced by the norm, and `𝓣` be any T2 vector
-- topology on `𝕜`. To show that `𝓣₀ = 𝓣`, it suffices to show that they have the same
-- neighborhoods of 0.
refine TopologicalAddGroup.ext h₁ inferInstance (le_antisymm ?_ ?_)
· -- To show `𝓣 ≤ 𝓣₀`, we have to show... | [
" t = UniformSpace.toTopologicalSpace",
" nhds 0 ≤ nhds 0",
" ∀ (i' : ℝ), 0 < i' → Metric.closedBall 0 i' ∈ nhds 0",
" Metric.closedBall 0 ε ∈ nhds 0",
" ξ ∈ Metric.closedBall 0 ε",
" 0 ∈ Metric.closedBall 0 ε",
" ‖ξ‖ ≤ ε",
" False",
" (ξ₀ * ξ⁻¹) • ξ ∈ balancedCore 𝕜 {ξ₀}ᶜ",
" ‖ξ₀ * ξ⁻¹‖ ≤ 1",
... | [] |
import Mathlib.Data.PFunctor.Univariate.Basic
#align_import data.pfunctor.univariate.M from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
universe u v w
open Nat Function
open List
variable (F : PFunctor.{u})
-- Porting note: the ♯ tactic is never used
-- local prefix:0 "♯" => cast... | Mathlib/Data/PFunctor/Univariate/M.lean | 89 | 92 | theorem agree_children {n : ℕ} (x : CofixA F (succ n)) (y : CofixA F (succ n + 1)) {i j}
(h₀ : HEq i j) (h₁ : Agree x y) : Agree (children' x i) (children' y j) := by |
cases' h₁ with _ _ _ _ _ _ hagree; cases h₀
apply hagree
| [
" x = CofixA.intro (head' x) (children' x)",
" CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))",
" Agree x y",
" Agree (children' x i) (children' y j)",
" Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) j)",
" Agree (children' (C... | [
" x = CofixA.intro (head' x) (children' x)",
" CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))",
" Agree x y"
] |
import Mathlib.Algebra.Regular.Basic
import Mathlib.GroupTheory.GroupAction.Hom
#align_import algebra.regular.smul from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
variable {R S : Type*} (M : Type*) {a b : R} {s : S}
def IsSMulRegular [SMul R M] (c : R) :=
Function.Injective ((c ... | Mathlib/Algebra/Regular/SMul.lean | 102 | 105 | theorem of_mul [Mul R] [IsScalarTower R R M] (ab : IsSMulRegular M (a * b)) :
IsSMulRegular M b := by |
rw [← smul_eq_mul] at ab
exact ab.of_smul _
| [
" c = d",
" IsSMulRegular M b"
] | [
" c = d"
] |
import Mathlib.RingTheory.Coprime.Lemmas
import Mathlib.Tactic.NormNum.GCD
namespace Tactic
namespace NormNum
open Qq Lean Elab.Tactic Mathlib.Meta.NormNum
| Mathlib/Tactic/NormNum/IsCoprime.lean | 23 | 26 | theorem int_not_isCoprime_helper (x y : ℤ) (d : ℕ) (hd : Int.gcd x y = d)
(h : Nat.beq d 1 = false) : ¬ IsCoprime x y := by |
rw [Int.isCoprime_iff_gcd_eq_one, hd]
exact Nat.ne_of_beq_eq_false h
| [
" ¬IsCoprime x y",
" ¬d = 1"
] | [] |
import Mathlib.Topology.Instances.ENNReal
#align_import order.filter.ennreal from "leanprover-community/mathlib"@"52932b3a083d4142e78a15dc928084a22fea9ba0"
open Filter ENNReal
namespace ENNReal
variable {α : Type*} {f : Filter α}
theorem eventually_le_limsup [CountableInterFilter f] (u : α → ℝ≥0∞) :
∀ᶠ y i... | Mathlib/Order/Filter/ENNReal.lean | 71 | 77 | theorem limsup_mul_le [CountableInterFilter f] (u v : α → ℝ≥0∞) :
f.limsup (u * v) ≤ f.limsup u * f.limsup v :=
calc
f.limsup (u * v) ≤ f.limsup fun x => f.limsup u * v x := by |
refine limsup_le_limsup ?_
filter_upwards [@eventually_le_limsup _ f _ u] with x hx using mul_le_mul' hx le_rfl
_ = f.limsup u * f.limsup v := limsup_const_mul
| [
" limsup (fun x => a * u x) f = a * limsup u f",
" limsup (fun x => ⊥) f = ⊥",
" (fun x => a⁻¹ * x) (g x) = x",
" g ((fun x => a⁻¹ * x) x) = x",
" g x✝² ≤ g x✝¹",
" (fun x => a * u x) x = 0 x",
" ⊥ = a * ⊥",
" ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤",
" ⊤ ≤ if u x = 0 then 0 else ⊤",
" limsu... | [
" limsup (fun x => a * u x) f = a * limsup u f",
" limsup (fun x => ⊥) f = ⊥",
" (fun x => a⁻¹ * x) (g x) = x",
" g ((fun x => a⁻¹ * x) x) = x",
" g x✝² ≤ g x✝¹",
" (fun x => a * u x) x = 0 x",
" ⊥ = a * ⊥",
" ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤",
" ⊤ ≤ if u x = 0 then 0 else ⊤"
] |
import Mathlib.Data.Vector.Basic
#align_import data.vector.mem from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Vector
variable {α β : Type*} {n : ℕ} (a a' : α)
@[simp]
| Mathlib/Data/Vector/Mem.lean | 26 | 28 | theorem get_mem (i : Fin n) (v : Vector α n) : v.get i ∈ v.toList := by |
rw [get_eq_get]
exact List.get_mem _ _ _
| [
" v.get i ∈ v.toList",
" v.toList.get (Fin.cast ⋯ i) ∈ v.toList"
] | [] |
import Mathlib.FieldTheory.PrimitiveElement
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.G... | Mathlib/RingTheory/Norm.lean | 78 | 81 | theorem norm_eq_one_of_not_module_finite (h : ¬Module.Finite R S) (x : S) : norm R x = 1 := by |
refine norm_eq_one_of_not_exists_basis _ (mt ?_ h) _
rintro ⟨s, ⟨b⟩⟩
exact Module.Finite.of_basis b
| [
" (norm R) x = 1",
" (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1",
" (∃ s, Nonempty (Basis { x // x ∈ s } R S)) → Module.Finite R S",
" Module.Finite R S"
] | [
" (norm R) x = 1",
" (if H : ∃ s, Nonempty (Basis { x // x ∈ s } R S) then detAux (Trunc.mk ⋯.some) else 1) ((lmul R S) x) = 1",
" (detAux (Trunc.mk ⋯.some)) ((lmul R S) x) = 1",
" 1 ((lmul R S) x) = 1"
] |
import Mathlib.Order.SuccPred.Basic
#align_import order.succ_pred.relation from "leanprover-community/mathlib"@"9aba7801eeecebb61f58a5763c2b6dd1b47dc6ef"
open Function Order Relation Set
section PartialSucc
variable {α : Type*} [PartialOrder α] [SuccOrder α] [IsSuccArchimedean α]
| Mathlib/Order/SuccPred/Relation.lean | 26 | 35 | theorem reflTransGen_of_succ_of_le (r : α → α → Prop) {n m : α} (h : ∀ i ∈ Ico n m, r i (succ i))
(hnm : n ≤ m) : ReflTransGen r n m := by |
revert h; refine Succ.rec ?_ ?_ hnm
· intro _
exact ReflTransGen.refl
· intro m hnm ih h
have : ReflTransGen r n m := ih fun i hi => h i ⟨hi.1, hi.2.trans_le <| le_succ m⟩
rcases (le_succ m).eq_or_lt with hm | hm
· rwa [← hm]
exact this.tail (h m ⟨hnm, hm⟩)
| [
" ReflTransGen r n m",
" (∀ i ∈ Ico n m, r i (succ i)) → ReflTransGen r n m",
" (∀ i ∈ Ico n n, r i (succ i)) → ReflTransGen r n n",
" ReflTransGen r n n",
" ∀ (n_1 : α),\n n ≤ n_1 →\n ((∀ i ∈ Ico n n_1, r i (succ i)) → ReflTransGen r n n_1) →\n (∀ i ∈ Ico n (succ n_1), r i (succ i)) → ReflTr... | [] |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Unary
variable (xs : Vector α n) (f₁ : β → σ₁ → σ₁ × γ) (f₂ : α → σ₂ → σ₂ × β)
@[simp]
theorem mapAccumr_mapAccumr :
mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
= let m := (... | Mathlib/Data/Vector/MapLemmas.lean | 50 | 52 | theorem map_map (f₁ : β → γ) (f₂ : α → β) :
map f₁ (map f₂ xs) = map (fun x => f₁ <| f₂ x) xs := by |
induction xs <;> simp_all
| [
" mapAccumr f₁ (mapAccumr f₂ xs s₂).2 s₁ =\n let m :=\n mapAccumr\n (fun x s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr f₁ (mapAccumr f₂ nil s₂).2 s₁ =\n let m :=\n mapAccumr\n ... | [
" mapAccumr f₁ (mapAccumr f₂ xs s₂).2 s₁ =\n let m :=\n mapAccumr\n (fun x s =>\n let r₂ := f₂ x s.2;\n let r₁ := f₁ r₂.2 s.1;\n ((r₁.1, r₂.1), r₁.2))\n xs (s₁, s₂);\n (m.1.1, m.2)",
" mapAccumr f₁ (mapAccumr f₂ nil s₂).2 s₁ =\n let m :=\n mapAccumr\n ... |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.List.AList
#align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
namespace AList
variable {α M : Type*} [Zero M]
open List
noncomputable def lookupFinsupp (l : AList fun _x : α => M) : α →₀ M where
... | Mathlib/Data/Finsupp/AList.lean | 102 | 105 | theorem empty_lookupFinsupp : lookupFinsupp (∅ : AList fun _x : α => M) = 0 := by |
classical
ext
simp
| [
" Finset α",
" a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0",
" (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0",
" (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0",
" (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝... | [
" Finset α",
" a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0",
" (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0",
" (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0",
" (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝... |
import Mathlib.Analysis.Convex.Basic
import Mathlib.Analysis.Convex.Hull
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Topology.Bornology.Absorbs
#align_import analysis.locally_convex.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set
open Pointwise Topology
... | Mathlib/Analysis/LocallyConvex/Basic.lean | 81 | 82 | theorem balanced_iff_closedBall_smul : Balanced 𝕜 s ↔ Metric.closedBall (0 : 𝕜) 1 • s ⊆ s := by |
simp [balanced_iff_smul_mem, smul_subset_iff]
| [
" (∃ i, True ∧ ∀ ⦃x : 𝕜⦄, x ∈ norm ⁻¹' Ici i → B ⊆ x • A) ↔ ∃ r, ∀ (c : 𝕜), r ≤ ‖c‖ → B ⊆ c • A",
" (∃ i, ∀ ⦃x : 𝕜⦄, x ∈ norm ⁻¹' Ici i → B ⊆ x • A) ↔ ∃ r, ∀ (c : 𝕜), r ≤ ‖c‖ → B ⊆ c • A",
" Balanced 𝕜 s ↔ Metric.closedBall 0 1 • s ⊆ s"
] | [
" (∃ i, True ∧ ∀ ⦃x : 𝕜⦄, x ∈ norm ⁻¹' Ici i → B ⊆ x • A) ↔ ∃ r, ∀ (c : 𝕜), r ≤ ‖c‖ → B ⊆ c • A",
" (∃ i, ∀ ⦃x : 𝕜⦄, x ∈ norm ⁻¹' Ici i → B ⊆ x • A) ↔ ∃ r, ∀ (c : 𝕜), r ≤ ‖c‖ → B ⊆ c • A"
] |
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 | 132 | 134 | theorem isPiSystem_image_Iio (s : Set α) : IsPiSystem (Iio '' s) := by |
rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ -
exact ⟨a ⊓ b, inf_ind a b ha hb, Iio_inter_Iio.symm⟩
| [
" 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 (⋃... | [
" 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 (⋃... |
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Basic
import Mathlib.RingTheory.Localization.FractionRing
#align_import ring_theory.localization.localization_localization from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
open Function
namespace ... | Mathlib/RingTheory/Localization/LocalizationLocalization.lean | 92 | 108 | theorem localization_localization_exists_of_eq [IsLocalization N T] (x y : R) :
algebraMap R T x = algebraMap R T y →
∃ c : localizationLocalizationSubmodule M N, ↑c * x = ↑c * y := by |
rw [IsScalarTower.algebraMap_apply R S T, IsScalarTower.algebraMap_apply R S T,
IsLocalization.eq_iff_exists N T]
rintro ⟨z, eq₁⟩
rcases IsLocalization.surj M (z : S) with ⟨⟨z', s⟩, eq₂⟩
dsimp only at eq₂
suffices (algebraMap R S) (x * z' : R) = (algebraMap R S) (y * z') by
obtain ⟨c, eq₃ : ↑c * (x *... | [
" x ∈ localizationLocalizationSubmodule M N ↔ ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraMap R S) x) ↔\n ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraM... | [
" x ∈ localizationLocalizationSubmodule M N ↔ ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraMap R S) x) ↔\n ∃ y z, (algebraMap R S) x = ↑y * (algebraMap R S) ↑z",
" (∃ y ∈ N, ∃ z ∈ Submonoid.map (algebraMap R S) M, y * z = (algebraM... |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {α : Type v} {β : Type w}
namespace Matrix
def col (w : m → α) : Matrix m Unit α :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 61 | 63 | theorem col_add [Add α] (v w : m → α) : col (v + w) = col v + col w := by |
ext
rfl
| [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝"
] | [] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.LinearAlgebra.AffineSpace.Restrict
import Mathlib.Tactic.FailIfNoProgress
#align_import analysis.normed_space.affine_isomet... | Mathlib/Analysis/NormedSpace/AffineIsometry.lean | 82 | 83 | theorem coe_toAffineMap : ⇑f.toAffineMap = f := by |
rfl
| [
" f.linear = f.linearIsometry.toLinearMap",
" f.linear x✝ = f.linearIsometry.toLinearMap x✝",
" (fun f => f.toFun) f = (fun f => f.toFun) g → f = g",
" (fun f => f.toFun) { toAffineMap := toAffineMap✝, norm_map := norm_map✝ } = (fun f => f.toFun) g →\n { toAffineMap := toAffineMap✝, norm_map := norm_map✝ }... | [
" f.linear = f.linearIsometry.toLinearMap",
" f.linear x✝ = f.linearIsometry.toLinearMap x✝",
" (fun f => f.toFun) f = (fun f => f.toFun) g → f = g",
" (fun f => f.toFun) { toAffineMap := toAffineMap✝, norm_map := norm_map✝ } = (fun f => f.toFun) g →\n { toAffineMap := toAffineMap✝, norm_map := norm_map✝ }... |
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Pullbacks
#align_import category_theory.limits.constructions.epi_mono from "leanprover-community/mathlib"@"f7baecbb54bd0f24f228576f97b1752fc3c9b318"
... | Mathlib/CategoryTheory/Limits/Constructions/EpiMono.lean | 71 | 77 | theorem reflects_epi_of_reflectsColimit {X Y : C} (f : X ⟶ Y) [ReflectsColimit (span f f) F]
[Epi (F.map f)] : Epi f := by |
have := PushoutCocone.isColimitMkIdId (F.map f)
simp_rw [← F.map_id] at this
apply
PushoutCocone.epi_of_isColimitMkIdId _
(isColimitOfIsColimitPushoutCoconeMap F _ this)
| [
" Mono (F.map f)",
" Mono f",
" Epi (F.map f)",
" Epi f"
] | [
" Mono (F.map f)",
" Mono f",
" Epi (F.map f)"
] |
import Mathlib.LinearAlgebra.Dimension.Finite
import Mathlib.LinearAlgebra.Dimension.Constructions
open Cardinal Submodule Set FiniteDimensional
universe u v
namespace Subalgebra
variable {F E : Type*} [CommRing F] [StrongRankCondition F] [Ring E] [Algebra F E]
{S : Subalgebra F E}
theorem eq_bot_of_rank_le_o... | Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean | 299 | 301 | theorem finrank_eq_one_iff [Nontrivial E] [Module.Free F S] : finrank F S = 1 ↔ S = ⊥ := by |
rw [← Subalgebra.rank_eq_one_iff]
exact toNat_eq_iff one_ne_zero
| [
" S = ⊥",
" x ∈ range ⇑(algebraMap F E)",
" Module.rank F ↥S ≤ 1",
" Module.rank F ↥S = 1 ↔ S = ⊥",
" S = ⊥ → Module.rank F ↥S = 1",
" Module.rank F ↥⊥ = 1",
" Module.rank F ↥⊥ ≤ 1",
" 1 ≤ Module.rank F ↥⊥",
" False",
" finrank F ↥S = 1 ↔ S = ⊥",
" finrank F ↥S = 1 ↔ Module.rank F ↥S = 1"
] | [
" S = ⊥",
" x ∈ range ⇑(algebraMap F E)",
" Module.rank F ↥S ≤ 1",
" Module.rank F ↥S = 1 ↔ S = ⊥",
" S = ⊥ → Module.rank F ↥S = 1",
" Module.rank F ↥⊥ = 1",
" Module.rank F ↥⊥ ≤ 1",
" 1 ≤ Module.rank F ↥⊥",
" False"
] |
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 | 142 | 144 | theorem prod_inter : s ×ˢ (t₁ ∩ t₂) = s ×ˢ t₁ ∩ s ×ˢ t₂ := by |
ext ⟨x, y⟩
simp only [← and_and_left, mem_inter_iff, mem_prod]
| [
" (∃ 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.Analysis.SpecialFunctions.Bernstein
import Mathlib.Topology.Algebra.Algebra
#align_import topology.continuous_function.weierstrass from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3"
open ContinuousMap Filter
open scoped unitInterval
theorem polynomialFunctions_closure... | Mathlib/Topology/ContinuousFunction/Weierstrass.lean | 86 | 89 | theorem continuousMap_mem_polynomialFunctions_closure (a b : ℝ) (f : C(Set.Icc a b, ℝ)) :
f ∈ (polynomialFunctions (Set.Icc a b)).topologicalClosure := by |
rw [polynomialFunctions_closure_eq_top _ _]
simp
| [
" (polynomialFunctions I).topologicalClosure = ⊤",
" ⊤ ≤ (polynomialFunctions I).topologicalClosure",
" f ∈ (polynomialFunctions I).topologicalClosure",
" ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)",
" ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)",
" ∀ (x : ℕ),... | [
" (polynomialFunctions I).topologicalClosure = ⊤",
" ⊤ ≤ (polynomialFunctions I).topologicalClosure",
" f ∈ (polynomialFunctions I).topologicalClosure",
" ∃ᶠ (x : C(↑I, ℝ)) in nhds f, x ∈ ↑(polynomialFunctions I)",
" ∃ᶠ (x : ℕ) in atTop, bernsteinApproximation x f ∈ ↑(polynomialFunctions I)",
" ∀ (x : ℕ),... |
import Mathlib.Algebra.ContinuedFractions.Computation.Translations
import Mathlib.Algebra.ContinuedFractions.TerminatedStable
import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Ring
#align_import algebra.continued_... | Mathlib/Algebra/ContinuedFractions/Computation/CorrectnessTerminating.lean | 104 | 212 | theorem compExactValue_correctness_of_stream_eq_some :
∀ {ifp_n : IntFractPair K}, IntFractPair.stream v n = some ifp_n →
v = compExactValue ((of v).continuantsAux n) ((of v).continuantsAux <| n + 1) ifp_n.fr := by |
let g := of v
induction' n with n IH
· intro ifp_zero stream_zero_eq
-- Nat.zero
have : IntFractPair.of v = ifp_zero := by
have : IntFractPair.stream v 0 = some (IntFractPair.of v) := rfl
simpa only [Nat.zero_eq, this, Option.some.injEq] using stream_zero_eq
cases this
cases' Decidabl... | [
" (↑⌊a⌋ * b + c) / Int.fract a + b = (b * a + c) / Int.fract a",
" ↑⌊a⌋ * b + c + b * Int.fract a = b * a + c",
" ↑⌊a⌋ * b + c + b * (a - ↑⌊a⌋) = b * a + c",
" ∀ {ifp_n : IntFractPair K},\n IntFractPair.stream v n = some ifp_n →\n v = compExactValue ((of v).continuantsAux n) ((of v).continuantsAux (n ... | [
" (↑⌊a⌋ * b + c) / Int.fract a + b = (b * a + c) / Int.fract a",
" ↑⌊a⌋ * b + c + b * Int.fract a = b * a + c",
" ↑⌊a⌋ * b + c + b * (a - ↑⌊a⌋) = b * a + c"
] |
import Mathlib.Algebra.Polynomial.Degree.CardPowDegree
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.Ideal.LocalRing
#align_import number_theory.class_number.admissible_card_pow_degree from "leanprover-community/mathlib"@"0b... | Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean | 36 | 57 | theorem exists_eq_polynomial [Semiring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (hb : natDegree b ≤ d) (A : Fin m.succ → Fq[X])
(hA : ∀ i, degree (A i) < degree b) : ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀ := by |
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `0`, ... `degree b - 1` ≤ `d - 1`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coef... | [
" ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀",
" Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ)",
" A i₁ = A i₀",
" (A i₁).coeff j = (A i₀).coeff j",
" j < d"
] | [] |
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
import Mathlib.Tactic.AdaptationNote
#align_import probability.martingale.upcrossing from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Topological... | Mathlib/Probability/Martingale/Upcrossing.lean | 212 | 216 | theorem lowerCrossingTime_mono (hnm : n ≤ m) :
lowerCrossingTime a b f N n ω ≤ lowerCrossingTime a b f N m ω := by |
suffices Monotone fun n => lowerCrossingTime a b f N n ω by exact this hnm
exact monotone_nat_of_le_succ fun n =>
le_trans lowerCrossingTime_le_upperCrossingTime_succ upperCrossingTime_le_lowerCrossingTime
| [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... | [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... |
import Mathlib.Data.ZMod.Quotient
import Mathlib.GroupTheory.NoncommPiCoprod
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.GCDMonoid.Nat
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Tactic.ByContra
import Mathlib.Tactic.Peel
#align_import group_... | Mathlib/GroupTheory/Exponent.lean | 108 | 113 | theorem exponent_ne_zero : exponent G ≠ 0 ↔ ExponentExists G := by |
rw [exponent]
split_ifs with h
· simp [h, @not_lt_zero' ℕ]
--if this isn't done this way, `to_additive` freaks
· tauto
| [
" Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G",
" (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =\n if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0",
" (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1",
" ∃ n, 0 < n ∧ g ^ n = 1",
" g ^ n✝ = 1",
" exponent G ≠ 0 ↔ E... | [
" Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G",
" (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =\n if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0",
" (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1",
" ∃ n, 0 < n ∧ g ^ n = 1",
" g ^ n✝ = 1"
] |
import Mathlib.FieldTheory.SplittingField.IsSplittingField
import Mathlib.Algebra.CharP.Algebra
#align_import field_theory.splitting_field.construction from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial
universe u v w
variable {... | Mathlib/FieldTheory/SplittingField/Construction.lean | 88 | 93 | theorem X_sub_C_mul_removeFactor (f : K[X]) (hf : f.natDegree ≠ 0) :
(X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f := by |
let ⟨g, hg⟩ := factor_dvd_of_natDegree_ne_zero hf
apply (mul_divByMonic_eq_iff_isRoot
(R := AdjoinRoot f.factor) (a := AdjoinRoot.root f.factor)).mpr
rw [IsRoot.def, eval_map, hg, eval₂_mul, ← hg, AdjoinRoot.eval₂_root, zero_mul]
| [
" Irreducible f.factor",
" Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)",
" Irreducible (Classical.choose H)",
" Irreducible X",
" f.factor ∣ f",
" factor 0 ∣ 0",
" Classical.choose ⋯ ∣ f",
" (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.f... | [
" Irreducible f.factor",
" Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)",
" Irreducible (Classical.choose H)",
" Irreducible X",
" f.factor ∣ f",
" factor 0 ∣ 0",
" Classical.choose ⋯ ∣ f"
] |
namespace Nat
@[reducible] def Coprime (m n : Nat) : Prop := gcd m n = 1
instance (m n : Nat) : Decidable (Coprime m n) := inferInstanceAs (Decidable (_ = 1))
theorem coprime_iff_gcd_eq_one : Coprime m n ↔ gcd m n = 1 := .rfl
theorem Coprime.gcd_eq_one : Coprime m n → gcd m n = 1 := id
theorem Coprime.symm ... | .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean | 53 | 55 | theorem Coprime.gcd_mul_right_cancel_right (n : Nat)
(H : Coprime k m) : gcd m (n * k) = gcd m n := by |
rw [Nat.mul_comm n k, H.gcd_mul_left_cancel_right n]
| [
" k ∣ m",
" k ∣ n * m",
" ((k * m).gcd n).Coprime k",
" (m * k).gcd n = m.gcd n",
" m.gcd (k * n) = m.gcd n",
" m.gcd (n * k) = m.gcd n"
] | [
" k ∣ m",
" k ∣ n * m",
" ((k * m).gcd n).Coprime k",
" (m * k).gcd n = m.gcd n",
" m.gcd (k * n) = m.gcd n"
] |
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
import Mathlib.RingTheory.RootsOfUnity.Minpoly
#align_import ring_theory.polynomial.cyclotomic.roots from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Polynomial
variable {R : Type*} [CommRing R] {n : ℕ}
theorem isRoot_... | Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean | 116 | 124 | theorem cyclotomic.roots_to_finset_eq_primitiveRoots [NeZero (n : R)] :
(⟨(cyclotomic n R).roots, roots_cyclotomic_nodup⟩ : Finset _) = primitiveRoots n R := by |
ext a
-- Porting note: was
-- `simp [cyclotomic_ne_zero n R, isRoot_cyclotomic_iff, mem_primitiveRoots,`
-- ` NeZero.pos_of_neZero_natCast R]`
simp only [mem_primitiveRoots, NeZero.pos_of_neZero_natCast R]
convert isRoot_cyclotomic_iff (n := n) (μ := a)
simp [cyclotomic_ne_zero n R]
| [
" ζ ^ n = 1",
" ζ ^ 0 = 1",
" 1 = 1 + eval ζ (∏ i ∈ n.divisors, cyclotomic i R)",
" eval ζ (∏ i ∈ n.divisors, cyclotomic i R) = 0",
" cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R",
" ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ",
" (cyclotomic n R).IsRoot μ",
" μ ∈ primitiveRoots n R",... | [
" ζ ^ n = 1",
" ζ ^ 0 = 1",
" 1 = 1 + eval ζ (∏ i ∈ n.divisors, cyclotomic i R)",
" eval ζ (∏ i ∈ n.divisors, cyclotomic i R) = 0",
" cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R",
" ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ",
" (cyclotomic n R).IsRoot μ",
" μ ∈ primitiveRoots n R",... |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.RingTheory.IntegralDomain
#align_import field_theory.primitive_element from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87"
noncomputable section
open scoped Classical Polynomial
open FiniteDimensional Polynomial In... | Mathlib/FieldTheory/PrimitiveElement.lean | 104 | 173 | theorem primitive_element_inf_aux [IsSeparable F E] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯ := by |
have hα := IsSeparable.isIntegral F α
have hβ := IsSeparable.isIntegral F β
let f := minpoly F α
let g := minpoly F β
let ιFE := algebraMap F E
let ιEE' := algebraMap E (SplittingField (g.map ιFE))
obtain ⟨c, hc⟩ := primitive_element_inf_aux_exists_c (ιEE'.comp ιFE) (ιEE' α) (ιEE' β) f g
let γ := α + c... | [
" ∃ c, ∀ α' ∈ (Polynomial.map ϕ f).roots, ∀ β' ∈ (Polynomial.map ϕ g).roots, -(α' - α) / (β' - β) ≠ ϕ c",
" ∃ γ, F⟮α, β⟯ = F⟮γ⟯",
" F⟮α, β⟯ = F⟮γ⟯",
" F⟮α, β⟯ ≤ F⟮γ⟯",
" {α, β} ≤ ↑F⟮γ⟯",
" α ∈ F⟮γ⟯",
" α + c • β - c • β ∈ F⟮γ⟯",
" x ∈ ↑F⟮γ⟯",
" F⟮γ⟯ ≤ F⟮α, β⟯",
" γ ∈ F⟮α, β⟯",
" β ∈ F⟮γ⟯",
" β... | [
" ∃ c, ∀ α' ∈ (Polynomial.map ϕ f).roots, ∀ β' ∈ (Polynomial.map ϕ g).roots, -(α' - α) / (β' - β) ≠ ϕ c"
] |
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {α : Type*}
namespace WithTop
@[simp]
theorem preimage_coe_top : (some : α → WithTop α) ⁻¹' {⊤} =... | Mathlib/Order/Interval/Set/WithBotTop.lean | 71 | 71 | theorem preimage_coe_Ioo : (some : α → WithTop α) ⁻¹' Ioo a b = Ioo a b := by | simp [← Ioi_inter_Iio]
| [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤",
" some ⁻¹' Icc ↑a ↑b = Icc a b",
" some ⁻¹' Ico ↑a ↑b = Ico a b",
" some ⁻¹' Ioc ↑a ↑b = Ioc a b",
" some ⁻¹' Ioo ↑a ↑b = Ioo a b"
] | [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤",
" some ⁻¹' Icc ↑a ↑b = Icc a b",
" some ⁻¹' Ico ↑a ↑b = Ico a b",
" some ⁻¹' Ioc ↑a ↑b = Ioc a b"
] |
import Mathlib.Tactic.Qify
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.DiophantineApproximation
import Mathlib.NumberTheory.Zsqrtd.Basic
#align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26"
namespace Pell
open Zsqrtd
theorem is_pell_s... | Mathlib/NumberTheory/Pell.lean | 367 | 434 | theorem exists_of_not_isSquare (h₀ : 0 < d) (hd : ¬IsSquare d) :
∃ x y : ℤ, x ^ 2 - d * y ^ 2 = 1 ∧ y ≠ 0 := by |
let ξ : ℝ := √d
have hξ : Irrational ξ := by
refine irrational_nrt_of_notint_nrt 2 d (sq_sqrt <| Int.cast_nonneg.mpr h₀.le) ?_ two_pos
rintro ⟨x, hx⟩
refine hd ⟨x, @Int.cast_injective ℝ _ _ d (x * x) ?_⟩
rw [← sq_sqrt <| Int.cast_nonneg.mpr h₀.le, Int.cast_mul, ← hx, sq]
obtain ⟨M, hM₁⟩ := exists... | [
" a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)",
" ∃ x y, x ^ 2 - d * y ^ 2 = 1 ∧ y ≠ 0",
" Irrational ξ",
" ¬∃ y, ξ = ↑y",
" False",
" ↑d = ↑(x * x)",
" {q | |q.num ^ 2 - d * ↑q.den ^ 2| < M}.Infinite",
" q ∈ {q | |q.num ^ 2 - d * ↑q.den ^ 2| < M}",
" ↑|d * ↑q.den ^ 2 - q.num ^ 2| / |↑q.den ^ 2|... | [
" a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)"
] |
import Mathlib.LinearAlgebra.LinearIndependent
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe w w' u u' v v'
variable {R : Type u} {R' : Type u'} {M M₁ : Type v} {M' : Type v'}
open Cardinal Submodule Function... | Mathlib/LinearAlgebra/Dimension/Basic.lean | 79 | 84 | theorem cardinal_lift_le_rank {ι : Type w} {v : ι → M}
(hv : LinearIndependent R v) :
Cardinal.lift.{v} #ι ≤ Cardinal.lift.{w} (Module.rank R M) := by |
rw [Module.rank]
refine le_trans ?_ (lift_le.mpr <| le_ciSup (bddAbove_range.{v, v} _) ⟨_, hv.coe_range⟩)
exact lift_mk_le'.mpr ⟨(Equiv.ofInjective _ hv.injective).toEmbedding⟩
| [
" lift.{v, w} #ι ≤ lift.{w, v} (Module.rank R M)",
" lift.{v, w} #ι ≤ lift.{w, v} (⨆ ι, #↑↑ι)",
" lift.{v, w} #ι ≤ lift.{w, v} #↑↑⟨range v, ⋯⟩"
] | [] |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Analysis.Convex.Segment
import Mathlib.Tactic.GCongr
#align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Set
open Convex Pointwise
variable {𝕜 E F : Type*}
section OrderedSemiring
va... | Mathlib/Analysis/Convex/Star.lean | 128 | 133 | theorem starConvex_iUnion {ι : Sort*} {s : ι → Set E} (hs : ∀ i, StarConvex 𝕜 x (s i)) :
StarConvex 𝕜 x (⋃ i, s i) := by |
rintro y hy a b ha hb hab
rw [mem_iUnion] at hy ⊢
obtain ⟨i, hy⟩ := hy
exact ⟨i, hs i hy ha hb hab⟩
| [
" StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" a • x + b • y ∈ s",
" (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s",
" StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃... | [
" StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" a • x + b • y ∈ s",
" (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s",
" StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃... |
import Batteries.Data.List.Lemmas
import Batteries.Data.Array.Basic
import Batteries.Tactic.SeqFocus
import Batteries.Util.ProofWanted
namespace Array
theorem forIn_eq_data_forIn [Monad m]
(as : Array α) (b : β) (f : α → β → m (ForInStep β)) :
forIn as b f = forIn as.data b f := by
let rec loop : ∀ {i h b ... | .lake/packages/batteries/Batteries/Data/Array/Lemmas.lean | 89 | 92 | theorem size_filter_le (p : α → Bool) (l : Array α) :
(l.filter p).size ≤ l.size := by |
simp only [← data_length, filter_data]
apply List.length_filter_le
| [
" forIn as b f = forIn as.data b f",
" forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f",
" forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f",
" forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f",
" (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi... | [
" forIn as b f = forIn as.data b f",
" forIn.loop as f 0 x✝¹ x✝ = forIn (List.drop as.data.length as.data) x✝ f",
" forIn.loop as f 0 x✝¹ x✝ = forIn [] x✝ f",
" forIn.loop as f (i + 1) x✝¹ x✝ = forIn (List.drop j as.data) x✝ f",
" (do\n let __do_lift ← f as[as.size - 1 - i] x✝\n match __do_lift wi... |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.PNat.Prime
import Mathlib.Data.Nat.Factors
import Mathlib.Data.Multiset.Sort
#align_import data.pnat.factors from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
-- Porting note: `deriving` contained Inhabited, Canonic... | Mathlib/Data/PNat/Factors.lean | 130 | 133 | theorem coePNat_nat (v : PrimeMultiset) : ((v : Multiset ℕ+) : Multiset ℕ) = (v : Multiset ℕ) := by |
change (v.map (Coe.coe : Nat.Primes → ℕ+)).map Subtype.val = v.map Subtype.val
rw [Multiset.map_map]
congr
| [
" ∀ (a : PrimeMultiset), ⊥ ≤ a",
" Repr PrimeMultiset",
" Repr (Multiset Nat.Primes)",
" p.Prime",
" Multiset.map PNat.val v.toPNatMultiset = v.toNatMultiset",
" Multiset.map Subtype.val (Multiset.map Coe.coe v) = Multiset.map Subtype.val v",
" Multiset.map (Subtype.val ∘ Coe.coe) v = Multiset.map Subty... | [
" ∀ (a : PrimeMultiset), ⊥ ≤ a",
" Repr PrimeMultiset",
" Repr (Multiset Nat.Primes)",
" p.Prime"
] |
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 | 79 | 80 | theorem exists_prod_set {p : α × β → Prop} : (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y) := by |
simp [and_assoc]
| [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)"
] | [] |
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 | 273 | 277 | theorem linfty_opNorm_def (A : Matrix m n α) :
‖A‖ = ((Finset.univ : Finset m).sup fun i : m => ∑ j : n, ‖A i j‖₊ : ℝ≥0) := by |
-- Porting note: added
change ‖fun i => (WithLp.equiv 1 _).symm (A i)‖ = _
simp [Pi.norm_def, PiLp.nnnorm_eq_sum ENNReal.one_ne_top]
| [
" SeminormedAddCommGroup (m → PiLp 1 fun j => α)",
" NormedAddCommGroup (m → PiLp 1 fun j => α)",
" BoundedSMul R (m → PiLp 1 fun j => α)",
" NormedSpace R (m → PiLp 1 fun j => α)",
" ‖A‖ = ↑(Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊)",
" ‖fun i => (WithLp.equiv 1 (n → α)).symm (A i)‖ = ↑(Finset.univ.sup... | [
" SeminormedAddCommGroup (m → PiLp 1 fun j => α)",
" NormedAddCommGroup (m → PiLp 1 fun j => α)",
" BoundedSMul R (m → PiLp 1 fun j => α)",
" NormedSpace R (m → PiLp 1 fun j => α)"
] |
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
import Mathlib.CategoryTheory.Monoidal.OfChosenFiniteProducts.Basic
#align_import category_theory.monoidal.of_chosen_finite_products.symmetric from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
universe v u
namespace CategoryTheory
... | Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Symmetric.lean | 77 | 83 | theorem symmetry (X Y : C) :
(Limits.BinaryFan.braiding (ℬ X Y).isLimit (ℬ Y X).isLimit).hom ≫
(Limits.BinaryFan.braiding (ℬ Y X).isLimit (ℬ X Y).isLimit).hom =
𝟙 (tensorObj ℬ X Y) := by |
dsimp [tensorHom, Limits.BinaryFan.braiding]
apply (ℬ _ _).isLimit.hom_ext;
rintro ⟨⟨⟩⟩ <;> · dsimp [Limits.IsLimit.conePointUniqueUpToIso]; simp
| [
" tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f",
" (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique... | [
" tensorHom ℬ f g ≫ (BinaryFan.braiding (ℬ Y Y').isLimit (ℬ Y' Y).isLimit).hom =\n (BinaryFan.braiding (ℬ X X').isLimit (ℬ X' X).isLimit).hom ≫ tensorHom ℬ g f",
" (ℬ Y Y').isLimit.lift (BinaryFan.mk (BinaryFan.fst (ℬ X X').cone ≫ f) (BinaryFan.snd (ℬ X X').cone ≫ g)) ≫\n ((ℬ Y Y').isLimit.conePointUnique... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
#align_import linear_algebra.affine_space.affine_subspace from "leanprover-community/mathlib"@"e96bdfbd1e8c98a09ff75f7ac6204d142debc840"
noncomputable section
open Affine
open Set
section
variable (k : Type*) {V : Type*} {P : Type*} [Ring k] [AddCommGroup V]... | Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean | 78 | 79 | theorem vectorSpan_empty : vectorSpan k (∅ : Set P) = (⊥ : Submodule k V) := by |
rw [vectorSpan_def, vsub_empty, Submodule.span_empty]
| [
" vectorSpan k ∅ = ⊥"
] | [] |
import Mathlib.CategoryTheory.Adjunction.Opposites
import Mathlib.CategoryTheory.Comma.Presheaf
import Mathlib.CategoryTheory.Elements
import Mathlib.CategoryTheory.Limits.ConeCategory
import Mathlib.CategoryTheory.Limits.Final
import Mathlib.CategoryTheory.Limits.KanExtension
import Mathlib.CategoryTheory.Limits.Over... | Mathlib/CategoryTheory/Limits/Presheaf.lean | 158 | 175 | theorem extendAlongYoneda_map {X Y : Cᵒᵖ ⥤ Type u₁} (f : X ⟶ Y) :
(extendAlongYoneda A).map f =
colimit.pre ((CategoryOfElements.π Y).leftOp ⋙ A) (CategoryOfElements.map f).op := by |
ext J
erw [colimit.ι_pre ((CategoryOfElements.π Y).leftOp ⋙ A) (CategoryOfElements.map f).op]
dsimp only [extendAlongYoneda, restrictYonedaHomEquiv, IsColimit.homIso', IsColimit.homIso,
uliftTrivial]
-- Porting note: in mathlib3 the rest of the proof was `simp, refl`; this is squeezed
-- and appropriatel... | [
" (((restrictedYoneda yoneda).obj P).map f ≫ ((fun X => yonedaEquiv.toIso) Y).hom) x =\n (((fun X => yonedaEquiv.toIso) X).hom ≫ ((𝟭 (Cᵒᵖ ⥤ Type u₁)).obj P).map f) x",
" x.app Y (𝟙 Y.unop ≫ f.unop) = P.map f (x.app X (𝟙 X.unop))",
" x.app Y (𝟙 Y.unop ≫ f.unop) = x.app Y ((yoneda.op.obj X).unop.map f (𝟙 ... | [
" (((restrictedYoneda yoneda).obj P).map f ≫ ((fun X => yonedaEquiv.toIso) Y).hom) x =\n (((fun X => yonedaEquiv.toIso) X).hom ≫ ((𝟭 (Cᵒᵖ ⥤ Type u₁)).obj P).map f) x",
" x.app Y (𝟙 Y.unop ≫ f.unop) = P.map f (x.app X (𝟙 X.unop))",
" x.app Y (𝟙 Y.unop ≫ f.unop) = x.app Y ((yoneda.op.obj X).unop.map f (𝟙 ... |
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.DirectSum.Internal
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import algebra.monoid_algebra.grading from "leanprover-community/mathlib"@"feb99064803fd3108e37c18b0f77d0a8344677a3"
noncomputable sectio... | Mathlib/Algebra/MonoidAlgebra/Grading.lean | 140 | 150 | theorem decomposeAux_single (m : M) (r : R) :
decomposeAux f (Finsupp.single m r) =
DirectSum.of (fun i : ι => gradeBy R f i) (f m)
⟨Finsupp.single m r, single_mem_gradeBy _ _ _⟩ := by |
refine (lift_single _ _ _).trans ?_
refine (DirectSum.of_smul R _ _ _).symm.trans ?_
apply DirectSum.of_eq_of_gradedMonoid_eq
refine Sigma.subtype_ext rfl ?_
refine (Finsupp.smul_single' _ _ _).trans ?_
rw [mul_one]
rfl
| [
" f m = i",
" a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}",
" a ∈ grade R m ↔ a.support ⊆ {m}",
" a ∈ grade R m ↔ ↑a.support ⊆ {m}",
" a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)",
" (∃ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)",
" ∀ (a_1 : R), a = Finsupp.single m ... | [
" f m = i",
" a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}",
" a ∈ grade R m ↔ a.support ⊆ {m}",
" a ∈ grade R m ↔ ↑a.support ⊆ {m}",
" a ∈ grade R m ↔ a ∈ LinearMap.range (Finsupp.lsingle m)",
" (∃ b, a = Finsupp.single m b) ↔ a ∈ LinearMap.range (Finsupp.lsingle m)",
" ∀ (a_1 : R), a = Finsupp.single m ... |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {α β γ : Type*}
def Finite.equivFin (α : Type*) [Finite α] : α ≃ Fin (Nat.card α) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 145 | 152 | theorem card_eq_zero_of_surjective {f : α → β} (hf : Function.Surjective f) (h : Nat.card β = 0) :
Nat.card α = 0 := by |
cases finite_or_infinite β
· haveI := card_eq_zero_iff.mp h
haveI := Function.isEmpty f
exact Nat.card_of_isEmpty
· haveI := Infinite.of_surjective f hf
exact Nat.card_eq_zero_of_infinite
| [
" α ≃ Fin (Nat.card α)",
" α ≃ Fin n",
" Nat.card α = if h : Finite α then Fintype.card α else 0",
" 0 < Nat.card α ↔ Nonempty α",
" Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)",
" Nat.card α ≤ 1 ↔ Subsingleton α",
" 1 < Nat.card α ↔ Nontrivial α",
" Nat.card (Option α) = Nat.card α + 1",
" Nat.card ... | [
" α ≃ Fin (Nat.card α)",
" α ≃ Fin n",
" Nat.card α = if h : Finite α then Fintype.card α else 0",
" 0 < Nat.card α ↔ Nonempty α",
" Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)",
" Nat.card α ≤ 1 ↔ Subsingleton α",
" 1 < Nat.card α ↔ Nontrivial α",
" Nat.card (Option α) = Nat.card α + 1",
" Nat.card ... |
import Mathlib.Topology.UniformSpace.CompleteSeparated
import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
... | Mathlib/Topology/MetricSpace/Antilipschitz.lean | 110 | 113 | theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : α) :
(K : ℝ≥0∞)⁻¹ * edist x y ≤ edist (f x) (f y) := by |
rw [mul_comm, ← div_eq_mul_inv]
exact ENNReal.div_le_of_le_mul' (hf x y)
| [
" AntilipschitzWith K f ↔ ∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)",
" (∀ (x y : α), ↑(nndist x y) ≤ ↑K * ↑(nndist (f x) (f y))) ↔ ∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)",
" AntilipschitzWith K f ↔ ∀ (x y : α), dist x y ≤ ↑K * dist (f x) (f y)",
" (∀ (x y : α), nndist x y ≤ K * nndist (f x) ... | [
" AntilipschitzWith K f ↔ ∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)",
" (∀ (x y : α), ↑(nndist x y) ≤ ↑K * ↑(nndist (f x) (f y))) ↔ ∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)",
" AntilipschitzWith K f ↔ ∀ (x y : α), dist x y ≤ ↑K * dist (f x) (f y)",
" (∀ (x y : α), nndist x y ≤ K * nndist (f x) ... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_... | Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 505 | 510 | theorem le_of_mem_A {r ε : ℝ} {L : F} {x : ℝ} (hx : x ∈ A f L r ε) {y z : ℝ}
(hy : y ∈ Icc x (x + r / 2)) (hz : z ∈ Icc x (x + r / 2)) :
‖f z - f y - (z - y) • L‖ ≤ ε * r := by |
rcases hx with ⟨r', r'mem, hr'⟩
have A : x + r / 2 ≤ x + r' := by linarith [r'mem.1]
exact hr' _ ((Icc_subset_Icc le_rfl A) hy) _ ((Icc_subset_Icc le_rfl A) hz)
| [
" A f L r ε ∈ 𝓝[>] x",
" ∃ u ∈ Ioi x, Ioo x u ⊆ A f L r ε",
" x + r' - s ∈ Ioi x",
" x < x + r' - s",
" ∀ y ∈ Icc x' (x' + s), ∀ z ∈ Icc x' (x' + s), ‖f z - f y - (z - y) • L‖ ≤ ε * r",
" Icc x' (x' + s) ⊆ Icc x (x + r')",
" x' + s ≤ x + r'",
" ‖f z - f y - (z - y) • L‖ ≤ ε * r",
" B f K r s ε ∈ 𝓝... | [
" A f L r ε ∈ 𝓝[>] x",
" ∃ u ∈ Ioi x, Ioo x u ⊆ A f L r ε",
" x + r' - s ∈ Ioi x",
" x < x + r' - s",
" ∀ y ∈ Icc x' (x' + s), ∀ z ∈ Icc x' (x' + s), ‖f z - f y - (z - y) • L‖ ≤ ε * r",
" Icc x' (x' + s) ⊆ Icc x (x + r')",
" x' + s ≤ x + r'",
" ‖f z - f y - (z - y) • L‖ ≤ ε * r",
" B f K r s ε ∈ 𝓝... |
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.GroupTheory.Abelianization
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.GroupAction.Quotient
import Mathlib.GroupTheory.Index
import Mathlib.GroupTheory.SpecificGroups.Dihedral
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Line... | Mathlib/GroupTheory/CommutingProbability.lean | 62 | 64 | theorem commProb_function {α β : Type*} [Fintype α] [Mul β] :
commProb (α → β) = (commProb β) ^ Fintype.card α := by |
rw [commProb_pi, Finset.prod_const, Finset.card_univ]
| [
" commProb (M × M') = commProb M * commProb M'",
" ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ... | [
" commProb (M × M') = commProb M * commProb M'",
" ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ... |
import Mathlib.LinearAlgebra.Matrix.Gershgorin
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody
import Mathlib.NumberTheory.NumberField.Units.Basic
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import number_theory.number_field.units from "leanprover-community/mathlib"@"00f91228655eecdcd3ac... | Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean | 86 | 98 | theorem sum_logEmbedding_component (x : (𝓞 K)ˣ) :
∑ w, logEmbedding K x w = - mult (w₀ : InfinitePlace K) * Real.log (w₀ (x : K)) := by |
have h := congr_arg Real.log (prod_eq_abs_norm (x : K))
rw [show |(Algebra.norm ℚ) (x : K)| = 1 from isUnit_iff_norm.mp x.isUnit, Rat.cast_one,
Real.log_one, Real.log_prod] at h
· simp_rw [Real.log_pow] at h
rw [← insert_erase (mem_univ w₀), sum_insert (not_mem_erase w₀ univ), add_comm,
add_eq_zero... | [
" (fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log) 0 = 0",
" (fun w => 0) = 0",
" { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log, map_zero' := ⋯ }.toFun\n (x✝¹ + x✝) =\n { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑... | [
" (fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log) 0 = 0",
" (fun w => 0) = 0",
" { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑(Additive.toMul x))).log, map_zero' := ⋯ }.toFun\n (x✝¹ + x✝) =\n { toFun := fun x w => ↑(↑w).mult * (↑w ((algebraMap (𝓞 K) K) ↑... |
import Mathlib.Algebra.Module.Zlattice.Basic
import Mathlib.NumberTheory.NumberField.Embeddings
import Mathlib.NumberTheory.NumberField.FractionalIdeal
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
variable (K : Type*) [F... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean | 72 | 74 | theorem nnnorm_eq [NumberField K] (x : K) :
‖canonicalEmbedding K x‖₊ = Finset.univ.sup (fun φ : K →+* ℂ => ‖φ x‖₊) := by |
simp_rw [Pi.nnnorm_def, apply_at]
| [
" (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" ∀ x ∈ Set.range ⇑(canonicalEmbedding K), (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) ((canonicalEmbedding K) x φ) = (canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) (0 φ) = 0 (ComplexEmbe... | [
" (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" ∀ x ∈ Set.range ⇑(canonicalEmbedding K), (starRingEnd ℂ) (x φ) = x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) ((canonicalEmbedding K) x φ) = (canonicalEmbedding K) x (ComplexEmbedding.conjugate φ)",
" (starRingEnd ℂ) (0 φ) = 0 (ComplexEmbe... |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp
import Mathlib.MeasureTheory.Integral.Bochner
import Mathlib.Order.Filter.IndicatorFunction
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Function.LpSeminorm.Trim
#align_import measure_theory.function.conditional... | Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean | 71 | 75 | theorem add [Add β] [ContinuousAdd β] (hf : AEStronglyMeasurable' m f μ)
(hg : AEStronglyMeasurable' m g μ) : AEStronglyMeasurable' m (f + g) μ := by |
rcases hf with ⟨f', h_f'_meas, hff'⟩
rcases hg with ⟨g', h_g'_meas, hgg'⟩
exact ⟨f' + g', h_f'_meas.add h_g'_meas, hff'.add hgg'⟩
| [
" AEStronglyMeasurable' m g μ",
" AEStronglyMeasurable' m (f + g) μ"
] | [
" AEStronglyMeasurable' m g μ"
] |
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 | 115 | 129 | theorem tendsto_verticalIntegral (hb : 0 < b.re) (c : ℝ) :
Tendsto (verticalIntegral b c) atTop (𝓝 0) := by |
-- complete proof using squeeze theorem:
rw [tendsto_zero_iff_norm_tendsto_zero]
refine
tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds ?_
(eventually_of_forall fun _ => norm_nonneg _)
((eventually_ge_atTop (0 : ℝ)).mp
(eventually_of_forall fun T hT => verticalIntegral_norm_... | [
" ‖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 *... |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.FieldTheory.Galois
universe u v w
open scoped Classical Polynomial
open Polynomial
variable (k : Type u) [Field k] (K : Type v) [Field K]
class IsSepClosed : Prop where
splits_of_separable : ∀ p : k[X], p.Separable → (p.Splits <| RingHom.... | Mathlib/FieldTheory/IsSepClosed.lean | 146 | 160 | theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → Separable p → ∃ x, p.eval x = 0) :
IsSepClosed k := by |
refine ⟨fun p hsep ↦ Or.inr ?_⟩
intro q hq hdvd
simp only [map_id] at hdvd
have hlc : IsUnit (leadingCoeff q)⁻¹ := IsUnit.inv <| Ne.isUnit <|
leadingCoeff_ne_zero.2 <| Irreducible.ne_zero hq
have hsep' : Separable (q * C (leadingCoeff q)⁻¹) :=
Separable.mul (Separable.of_dvd hsep hdvd) ((separable_C ... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)",
" ∃ z, z ^ n = x",
" False",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" 0 ^ n = x",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map ... | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id K) (map f p)",
" ∃ z, z ^ n = x",
" False",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" 0 ^ n = x",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)",
" (map ... |
import Mathlib.Data.W.Basic
import Mathlib.SetTheory.Cardinal.Ordinal
#align_import data.W.cardinal from "leanprover-community/mathlib"@"6eeb941cf39066417a09b1bbc6e74761cadfcb1a"
universe u v
variable {α : Type u} {β : α → Type v}
noncomputable section
namespace WType
open Cardinal
-- Porting note: `W` is a ... | Mathlib/Data/W/Cardinal.lean | 46 | 54 | theorem cardinal_mk_le_of_le' {κ : Cardinal.{max u v}}
(hκ : (sum fun a : α => κ ^ lift.{u} #(β a)) ≤ κ) :
#(WType β) ≤ κ := by |
induction' κ using Cardinal.inductionOn with γ
simp_rw [← lift_umax.{v, u}] at hκ
nth_rewrite 1 [← lift_id'.{v, u} #γ] at hκ
simp_rw [← mk_arrow, ← mk_sigma, le_def] at hκ
cases' hκ with hκ
exact Cardinal.mk_le_of_injective (elim_injective _ hκ.1 hκ.2)
| [
" #((a : α) × (β a → WType β)) = sum fun a => #(WType β) ^ lift.{u, v} #(β a)",
" (sum fun i => lift.{v, max u v} #(WType β) ^ lift.{max u v, v} #(β i)) = sum fun a => #(WType β) ^ lift.{u, v} #(β a)",
" #(WType β) ≤ κ",
" #(WType β) ≤ #γ"
] | [
" #((a : α) × (β a → WType β)) = sum fun a => #(WType β) ^ lift.{u, v} #(β a)",
" (sum fun i => lift.{v, max u v} #(WType β) ^ lift.{max u v, v} #(β i)) = sum fun a => #(WType β) ^ lift.{u, v} #(β a)"
] |
import Mathlib.NumberTheory.NumberField.Embeddings
#align_import number_theory.number_field.units from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
open scoped NumberField
noncomputable section
open NumberField Units
section Rat
| Mathlib/NumberTheory/NumberField/Units/Basic.lean | 40 | 43 | theorem Rat.RingOfIntegers.isUnit_iff {x : 𝓞 ℚ} : IsUnit x ↔ (x : ℚ) = 1 ∨ (x : ℚ) = -1 := by |
simp_rw [(isUnit_map_iff (Rat.ringOfIntegersEquiv : 𝓞 ℚ →+* ℤ) x).symm, Int.isUnit_iff,
RingEquiv.coe_toRingHom, RingEquiv.map_eq_one_iff, RingEquiv.map_eq_neg_one_iff, ←
Subtype.coe_injective.eq_iff]; rfl
| [
" IsUnit x ↔ ↑x = 1 ∨ ↑x = -1",
" ↑x = ↑1 ∨ ↑x = ↑(-1) ↔ ↑x = 1 ∨ ↑x = -1"
] | [] |
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Order.Bounded
import Mathlib.SetTheory.Cardinal.PartENat
import Mathlib.SetTheory.Ordinal.Principal
import Mathlib.Tactic.Linarith
#align_import set_theory.cardinal.ordinal from "leanprover-community/mathlib"@"7c2ce0c2da15516b4e65d0c9e254bb6dc93abd1f"
noncomputa... | Mathlib/SetTheory/Cardinal/Ordinal.lean | 151 | 152 | theorem mk_cardinal : #Cardinal = univ.{u, u + 1} := by |
simpa only [card_type, card_univ] using congr_arg card type_cardinal
| [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" a.alephIdx ≤ b.alephIdx ↔ a ≤ b",
" False",
" ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r], (∀ (c : Cardinal.{u}), c.alephIdx < type r) → False",
" ... | [
" c.ord.IsLimit",
" ℵ₀ = 0",
" c.ord ≤ a",
" c ≤ a.card",
" ℵ₀ ≤ a.card",
" ℵ₀ ≤ (succ a).card",
" ℵ₀.ord.IsLimit",
" ω.IsLimit",
" a.alephIdx ≤ b.alephIdx ↔ a ≤ b",
" False",
" ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r], (∀ (c : Cardinal.{u}), c.alephIdx < type r) → False",
" ... |
import Mathlib.Algebra.BigOperators.Group.Multiset
import Mathlib.Data.Multiset.Dedup
#align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
universe v
variable {α : Type*} {β : Type v} {γ δ : Ty... | Mathlib/Data/Multiset/Bind.lean | 134 | 134 | theorem add_bind : (s + t).bind f = s.bind f + t.bind f := by | simp [bind]
| [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... | [
" (↑(List.map ofList (l :: L))).join = ↑(l :: L).join",
" a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s",
" ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)",
" card (join 0) = (map (⇑card) 0).sum",
" ∀ (a : Multiset α) (s : Multise... |
import Mathlib.Topology.Constructions
import Mathlib.Topology.ContinuousOn
#align_import topology.bases from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology
noncomputable section
namespace TopologicalSpace
universe u
variable {α : Type u} {β : Type*} ... | Mathlib/Topology/Bases.lean | 122 | 129 | theorem IsTopologicalBasis.of_hasBasis_nhds {s : Set (Set α)}
(h_nhds : ∀ a, (𝓝 a).HasBasis (fun t ↦ t ∈ s ∧ a ∈ t) id) : IsTopologicalBasis s where
exists_subset_inter t₁ ht₁ t₂ ht₂ x hx := by |
simpa only [and_assoc, (h_nhds x).mem_iff]
using (inter_mem ((h_nhds _).mem_of_mem ⟨ht₁, hx.1⟩) ((h_nhds _).mem_of_mem ⟨ht₂, hx.2⟩))
sUnion_eq := sUnion_eq_univ_iff.2 fun x ↦ (h_nhds x).ex_mem
eq_generateFrom := ext_nhds fun x ↦ by
simpa only [nhds_generateFrom, and_comm] using (h_nhds x).eq_biInf
| [
" IsTopologicalBasis (insert ∅ s)",
" ⋃₀ insert ∅ s = univ",
" ∀ t₁ ∈ insert ∅ s, ∀ t₂ ∈ insert ∅ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ ∅",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ ∅",
" ∃ t₃ ∈ inser... | [
" IsTopologicalBasis (insert ∅ s)",
" ⋃₀ insert ∅ s = univ",
" ∀ t₁ ∈ insert ∅ s, ∀ t₂ ∈ insert ∅ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ ∅",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ ∅",
" ∃ t₃ ∈ inser... |
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
open Finset DFinsupp Function
open Pointwise
variable {α : Type*}
namespace Mu... | Mathlib/Data/Multiset/Interval.lean | 83 | 84 | theorem card_Iic : (Finset.Iic s).card = ∏ i ∈ s.toFinset, (s.count i + 1) := by |
simp_rw [Iic_eq_Icc, card_Icc, bot_eq_zero, toFinset_zero, empty_union, count_zero, tsub_zero]
| [
" x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t",
" Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)... | [
" x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t",
" Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)... |
import Mathlib.LinearAlgebra.Dimension.DivisionRing
import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition
noncomputable section
universe u v v' v''
variable {K : Type u} {V V₁ : Type v} {V' V'₁ : Type v'} {V'' : Type v''}
open Cardinal Basis Submodule Function Set
namespace LinearMap
section Ring
... | Mathlib/LinearAlgebra/Dimension/LinearMap.lean | 72 | 73 | theorem rank_comp_le_right (g : V →ₗ[K] V') (f : V' →ₗ[K] V'₁) : rank (f.comp g) ≤ rank g := by |
simpa only [Cardinal.lift_id] using lift_rank_comp_le_right g f
| [
" rank 0 = 0",
" (f ∘ₗ g).rank ≤ f.rank",
" range (f ∘ₗ g) ≤ range f",
" Submodule.map f (range g) ≤ range f",
" lift.{v', v''} (f ∘ₗ g).rank ≤ lift.{v'', v'} g.rank",
" lift.{v', v''} (Module.rank K ↥(Submodule.map f (range g))) ≤ lift.{v'', v'} (Module.rank K ↥(range g))",
" (f ∘ₗ g).rank ≤ g.rank"
] | [
" rank 0 = 0",
" (f ∘ₗ g).rank ≤ f.rank",
" range (f ∘ₗ g) ≤ range f",
" Submodule.map f (range g) ≤ range f",
" lift.{v', v''} (f ∘ₗ g).rank ≤ lift.{v'', v'} g.rank",
" lift.{v', v''} (Module.rank K ↥(Submodule.map f (range g))) ≤ lift.{v'', v'} (Module.rank K ↥(range g))"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable sec... | Mathlib/RingTheory/IsAdjoinRoot.lean | 127 | 128 | theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by | rw [h.algebraMap_eq, RingHom.comp_apply]
| [
" (algebraMap R S) x = h.map (C x)"
] | [] |
import Mathlib.CategoryTheory.Abelian.Basic
import Mathlib.CategoryTheory.Preadditive.Opposite
import Mathlib.CategoryTheory.Limits.Opposites
#align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80"
noncomputable section
namespace CategoryTheor... | Mathlib/CategoryTheory/Abelian/Opposite.lean | 129 | 132 | theorem cokernel.π_unop :
(cokernel.π g.unop).op =
(cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom (Opposite.op_unop _).symm := by |
simp
| [
" Abelian Cᵒᵖ",
" (cokernel.π f).op ≫ f.op = 0",
" f ≫ (kernel.ι f.op).unop = 0",
" (kernel.ι f.op ≫ f.op).unop = 0",
" (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop",
" ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel... | [
" Abelian Cᵒᵖ",
" (cokernel.π f).op ≫ f.op = 0",
" f ≫ (kernel.ι f.op).unop = 0",
" (kernel.ι f.op ≫ f.op).unop = 0",
" (kernel.lift f.op (cokernel.π f).op ⋯).unop ≫ cokernel.desc f (kernel.ι f.op).unop ⋯ = 𝟙 (kernel f.op).unop",
" ((cokernel.desc f (kernel.ι f.op).unop ⋯).op ≫ kernel.lift f.op (cokernel... |
import Mathlib.Analysis.Convex.Hull
#align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8"
open Set
variable {ι : Sort*} {𝕜 E : Type*}
section OrderedSemiring
variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] {s t s₁ s₂ t₁ t₂ u : Set ... | Mathlib/Analysis/Convex/Join.lean | 57 | 57 | theorem convexJoin_empty_left (t : Set E) : convexJoin 𝕜 ∅ t = ∅ := by | simp [convexJoin]
| [
" x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b",
" ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s",
" convexJoin 𝕜 ∅ t = ∅"
] | [
" x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b",
" ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s"
] |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 137 | 138 | theorem sameCycle_inv_apply_left : SameCycle f (f⁻¹ x) y ↔ SameCycle f x y := by |
rw [← sameCycle_apply_left, apply_inv_self]
| [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z",
" SameCycle 1 x y ↔ x = y",
" (∃ b, (f⁻¹ ^ (Equiv.symm (Equiv.neg ℤ)) b) x = y) ↔ f.SameCycle x y",
" ((g * f * g⁻¹) ^ i) x = y ↔ (f ^ i) (g⁻¹ x) = g⁻¹ y",
" f.SameCycle x y → (g * f * g⁻¹).SameCycle (g x) (g y)",
" f x = x ↔ f y = y",
... | [
" f.SameCycle x y",
" (f ^ (-i)) y = x",
" (f ^ (j + i)) x = z",
" SameCycle 1 x y ↔ x = y",
" (∃ b, (f⁻¹ ^ (Equiv.symm (Equiv.neg ℤ)) b) x = y) ↔ f.SameCycle x y",
" ((g * f * g⁻¹) ^ i) x = y ↔ (f ^ i) (g⁻¹ x) = g⁻¹ y",
" f.SameCycle x y → (g * f * g⁻¹).SameCycle (g x) (g y)",
" f x = x ↔ f y = y",
... |
import Mathlib.Algebra.Module.Card
import Mathlib.SetTheory.Cardinal.CountableCover
import Mathlib.SetTheory.Cardinal.Continuum
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Topology.MetricSpace.Perfect
universe u v
open Filter Pointwise Set Function Cardinal
open scoped Cardinal Topology
theorem c... | Mathlib/Topology/Algebra/Module/Cardinality.lean | 49 | 54 | theorem continuum_le_cardinal_of_module
(𝕜 : Type u) (E : Type v) [NontriviallyNormedField 𝕜] [CompleteSpace 𝕜]
[AddCommGroup E] [Module 𝕜 E] [Nontrivial E] : 𝔠 ≤ #E := by |
have A : lift.{v} (𝔠 : Cardinal.{u}) ≤ lift.{v} (#𝕜) := by
simpa using continuum_le_cardinal_of_nontriviallyNormedField 𝕜
simpa using A.trans (Cardinal.mk_le_of_module 𝕜 E)
| [
" 𝔠 ≤ #𝕜",
" ∃ f, range f ⊆ Set.univ ∧ Continuous f ∧ Injective f",
" Perfect Set.univ",
" ∃ y ∈ U ∩ Set.univ, y ≠ x",
" x + c ^ n ∈ U ∩ Set.univ",
" x + c ^ n ≠ x",
" ¬c ^ n = 0",
" c ≠ 0",
" 𝔠 ≤ #E",
" lift.{v, u} 𝔠 ≤ lift.{v, u} #𝕜"
] | [
" 𝔠 ≤ #𝕜",
" ∃ f, range f ⊆ Set.univ ∧ Continuous f ∧ Injective f",
" Perfect Set.univ",
" ∃ y ∈ U ∩ Set.univ, y ≠ x",
" x + c ^ n ∈ U ∩ Set.univ",
" x + c ^ n ≠ x",
" ¬c ^ n = 0",
" c ≠ 0"
] |
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Data.Nat.Cast.Order
import Mathlib.Tactic.Common
#align_import data.nat.cast.field from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
namespace Nat
variable {α : Type*}
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_... | Mathlib/Data/Nat/Cast/Field.lean | 65 | 67 | theorem one_div_pos_of_nat {n : ℕ} : 0 < 1 / ((n : α) + 1) := by |
rw [one_div]
exact inv_pos_of_nat
| [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False",
" ↑(m / d) / ↑(n / d) = ↑m / ↑n",
" ↑(m / 0) / ↑(n / 0) = ↑m / ↑n",
" ↑d ≠ 0",
" (↑0)⁻¹ ≤ 1",
" 1 ≤ ↑(n + 1)",
" ↑(m / n) ≤ ↑m / ↑n",
" ↑(m / 0) ≤ ↑m / ↑0",
" ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)",
" m / (n✝ + 1) * (n✝ +... | [
" ↑(m / n) = ↑m / ↑n",
" ↑(n * k / n) = ↑(n * k) / ↑n",
" n ≠ 0",
" False",
" ↑(m / d) / ↑(n / d) = ↑m / ↑n",
" ↑(m / 0) / ↑(n / 0) = ↑m / ↑n",
" ↑d ≠ 0",
" (↑0)⁻¹ ≤ 1",
" 1 ≤ ↑(n + 1)",
" ↑(m / n) ≤ ↑m / ↑n",
" ↑(m / 0) ≤ ↑m / ↑0",
" ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)",
" m / (n✝ + 1) * (n✝ +... |
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
#align_import analysis.special_functions.pow.asymptotics from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
set_option linter.uppercaseLean3 false
noncomputable section
open scoped Classical
open Real Topology NNReal ENNReal Filter C... | Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean | 200 | 207 | theorem isTheta_exp_arg_mul_im (hl : IsBoundedUnder (· ≤ ·) l fun x => |(g x).im|) :
(fun x => Real.exp (arg (f x) * im (g x))) =Θ[l] fun _ => (1 : ℝ) := by |
rcases hl with ⟨b, hb⟩
refine Real.isTheta_exp_comp_one.2 ⟨π * b, ?_⟩
rw [eventually_map] at hb ⊢
refine hb.mono fun x hx => ?_
erw [abs_mul]
exact mul_le_mul (abs_arg_le_pi _) hx (abs_nonneg _) Real.pi_pos.le
| [
" (fun x => rexp ((f x).arg * (g x).im)) =Θ[l] fun x => 1",
" ∀ᶠ (x : ℝ) in Filter.map (fun x => |(f x).arg * (g x).im|) l, (fun x x_1 => x ≤ x_1) x (π * b)",
" ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) |(f a).arg * (g a).im| (π * b)",
" (fun x x_1 => x ≤ x_1) |(f x).arg * (g x).im| (π * b)",
" (fun x x_1 => ... | [] |
import Mathlib.Analysis.LocallyConvex.Basic
#align_import analysis.locally_convex.balanced_core_hull from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Set Pointwise Topology Filter
variable {𝕜 E ι : Type*}
section balancedHull
section SeminormedRing
variable [SeminormedRing ... | Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean | 108 | 109 | theorem mem_balancedHull_iff : x ∈ balancedHull 𝕜 s ↔ ∃ r : 𝕜, ‖r‖ ≤ 1 ∧ x ∈ r • s := by |
simp [balancedHull]
| [
" x ∈ balancedCore 𝕜 s ↔ ∃ t, Balanced 𝕜 t ∧ t ⊆ s ∧ x ∈ t",
" a • balancedCore 𝕜 s ⊆ balancedCore 𝕜 s",
" (fun x => a • x) y ∈ balancedCore 𝕜 s",
" x ∈ balancedHull 𝕜 s ↔ ∃ r, ‖r‖ ≤ 1 ∧ x ∈ r • s"
] | [
" x ∈ balancedCore 𝕜 s ↔ ∃ t, Balanced 𝕜 t ∧ t ⊆ s ∧ x ∈ t",
" a • balancedCore 𝕜 s ⊆ balancedCore 𝕜 s",
" (fun x => a • x) y ∈ balancedCore 𝕜 s"
] |
import Mathlib.Geometry.Euclidean.Inversion.Basic
import Mathlib.Geometry.Euclidean.PerpBisector
open Metric Function AffineMap Set AffineSubspace
open scoped Topology
variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P]
[NormedAddTorsor V P] {c x y : P} {R : ℝ}
namespace Euclid... | Mathlib/Geometry/Euclidean/Inversion/ImageHyperplane.lean | 56 | 59 | theorem preimage_inversion_perpBisector (hR : R ≠ 0) (hy : y ≠ c) :
inversion c R ⁻¹' perpBisector c y = sphere (inversion c R y) (R ^ 2 / dist y c) \ {c} := by |
rw [← dist_inversion_center, ← preimage_inversion_perpBisector_inversion hR,
inversion_inversion] <;> simp [*]
| [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c",
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c",
" inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ... | [
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c",
" R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c",
" inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c",
" inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ... |
import Mathlib.Deprecated.Group
#align_import deprecated.ring from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
universe u v w
variable {α : Type u}
structure IsSemiringHom {α : Type u} {β : Type v} [Semiring α] [Semiring β] (f : α → β) : Prop where
map_zero : f 0 = 0
map... | Mathlib/Deprecated/Ring.lean | 100 | 103 | theorem map_zero (hf : IsRingHom f) : f 0 = 0 :=
calc
f 0 = f (0 + 0) - f 0 := by | rw [hf.map_add]; simp
_ = 0 := by simp
| [
" f 0 = f (0 + 0) - f 0",
" f 0 = f 0 + f 0 - f 0",
" f (0 + 0) - f 0 = 0"
] | [] |
import Mathlib.Data.Bracket
import Mathlib.LinearAlgebra.Basic
#align_import algebra.lie.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe u v w w₁ w₂
open Function
class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where
protected add_lie : ∀ x y z ... | Mathlib/Algebra/Lie/Basic.lean | 169 | 171 | theorem lie_neg : ⁅x, -m⁆ = -⁅x, m⁆ := by |
rw [← sub_eq_zero, sub_neg_eq_add, ← lie_add]
simp
| [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆",
" ⁅-x, m⁆ = -⁅x, m⁆",
" ⁅-x + x, m⁆ = 0",
" ⁅x, -m⁆ = -⁅x, m⁆",
" ⁅x, -m + m⁆ = 0"
] | [
" -⁅y, x⁆ = ⁅x, y⁆",
" ⁅x + y, x⁆ + ⁅x + y, y⁆ = 0",
" ⁅x + y, x + y⁆ = 0",
" ⁅t • x, m⁆ = t • ⁅x, m⁆",
" ∀ (t : R) (x m : L), ⁅x, t • m⁆ = t • ⁅x, m⁆",
" ⁅-x, m⁆ = -⁅x, m⁆",
" ⁅-x + x, m⁆ = 0"
] |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.TensorProduct.Opposite
import Mathlib.RingTheory.TensorProduct.Basic
variable {R A V : Type*}
variable [CommRing R] [CommRing A] [AddCommGroup V]
variable [Algebra R A] [Mod... | Mathlib/LinearAlgebra/CliffordAlgebra/BaseChange.lean | 104 | 113 | theorem toBaseChange_comp_involute (Q : QuadraticForm R V) :
(toBaseChange A Q).comp (involute : CliffordAlgebra (Q.baseChange A) →ₐ[A] _) =
(Algebra.TensorProduct.map (AlgHom.id _ _) involute).comp (toBaseChange A Q) := by |
ext v
show toBaseChange A Q (involute (ι (Q.baseChange A) (1 ⊗ₜ[R] v)))
= (Algebra.TensorProduct.map (AlgHom.id _ _) involute :
A ⊗[R] CliffordAlgebra Q →ₐ[A] _)
(toBaseChange A Q (ι (Q.baseChange A) (1 ⊗ₜ[R] v)))
rw [toBaseChange_ι, involute_ι, map_neg (toBaseChange A Q), toBaseChange_ι,
A... | [
" { f // ∀ (m : V), f m * f m = (algebraMap R (CliffordAlgebra (QuadraticForm.baseChange A Q))) (Q m) }",
" (↑R (ι (QuadraticForm.baseChange A Q)) ∘ₗ (TensorProduct.mk R A V) 1) v *\n (↑R (ι (QuadraticForm.baseChange A Q)) ∘ₗ (TensorProduct.mk R A V) 1) v =\n (algebraMap R (CliffordAlgebra (QuadraticForm.... | [
" { f // ∀ (m : V), f m * f m = (algebraMap R (CliffordAlgebra (QuadraticForm.baseChange A Q))) (Q m) }",
" (↑R (ι (QuadraticForm.baseChange A Q)) ∘ₗ (TensorProduct.mk R A V) 1) v *\n (↑R (ι (QuadraticForm.baseChange A Q)) ∘ₗ (TensorProduct.mk R A V) 1) v =\n (algebraMap R (CliffordAlgebra (QuadraticForm.... |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
theorem Int.Prime.dvd_mul {m n : ℤ} {p : ℕ} (hp : Nat.Prime p) (h : (p ... | Mathlib/RingTheory/Int/Basic.lean | 111 | 118 | theorem prime_two_or_dvd_of_dvd_two_mul_pow_self_two {m : ℤ} {p : ℕ} (hp : Nat.Prime p)
(h : (p : ℤ) ∣ 2 * m ^ 2) : p = 2 ∨ p ∣ Int.natAbs m := by |
cases' Int.Prime.dvd_mul hp h with hp2 hpp
· apply Or.intro_left
exact le_antisymm (Nat.le_of_dvd zero_lt_two hp2) (Nat.Prime.two_le hp)
· apply Or.intro_right
rw [sq, Int.natAbs_mul] at hpp
exact or_self_iff.mp ((Nat.Prime.dvd_mul hp).mp hpp)
| [
" p ∣ m.natAbs ∨ p ∣ n.natAbs",
" ↑p ∣ m ∨ ↑p ∣ n",
" p ∣ n.natAbs",
" ↑p ∣ n",
" p = 2 ∨ p ∣ m.natAbs",
" p = 2",
" p ∣ m.natAbs"
] | [
" p ∣ m.natAbs ∨ p ∣ n.natAbs",
" ↑p ∣ m ∨ ↑p ∣ n",
" p ∣ n.natAbs",
" ↑p ∣ n"
] |
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 | 158 | 164 | theorem card_le_of_injective [StrongRankCondition R] {α β : Type*} [Fintype α] [Fintype β]
(f : (α → R) →ₗ[R] β → R) (i : Injective f) : Fintype.card α ≤ Fintype.card β := by |
let P := LinearEquiv.funCongrLeft R R (Fintype.equivFin α)
let Q := LinearEquiv.funCongrLeft R R (Fintype.equivFin β)
exact
le_of_fin_injective R ((Q.symm.toLinearMap.comp f).comp P.toLinearMap)
(((LinearEquiv.symm Q).injective.comp i).comp (LinearEquiv.injective P))
| [
" 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 β"
] | [
" 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"
] |
import Mathlib.Data.Fintype.Option
import Mathlib.Topology.Separation
import Mathlib.Topology.Sets.Opens
#align_import topology.alexandroff from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Set Filter Topology
variable {X : Type*}
def OnePoint (X : Type*) :=
Option X
#ali... | Mathlib/Topology/Compactification/OnePoint.lean | 140 | 141 | theorem compl_image_coe (s : Set X) : ((↑) '' s : Set (OnePoint X))ᶜ = (↑) '' sᶜ ∪ {∞} := by |
rw [coe_injective.compl_image_eq, compl_range_coe]
| [
" (some '' s)ᶜ = some '' sᶜ ∪ {∞}"
] | [] |
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 | 110 | 112 | theorem eraseLead_support_card_lt (h : f ≠ 0) : (eraseLead f).support.card < f.support.card := by |
rw [eraseLead_support]
exact card_lt_card (erase_ssubset <| natDegree_mem_support_of_nonzero h)
| [
" 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",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... | [
" 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",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... |
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Cast
import Mathlib.Data.Nat.Choose.Vandermonde
import Mathlib.Tactic.FieldSimp
#align_import data.polynomial.hasse_deriv from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358... | Mathlib/Algebra/Polynomial/HasseDeriv.lean | 133 | 134 | theorem hasseDeriv_apply_one (hk : 0 < k) : hasseDeriv k (1 : R[X]) = 0 := by |
rw [← C_1, hasseDeriv_C k _ hk]
| [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... | [
" (hasseDeriv k) f = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (f.sum fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = f.sum fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
" (fun x x_1 => (monomial (x - k)) (x.choose k • x_1)) = fun i r => (monomial (i - k)) (↑(i.choose k) * r)",
"... |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric Meas... | Mathlib/MeasureTheory/Function/L1Space.lean | 133 | 139 | theorem HasFiniteIntegral.mono {f : α → β} {g : α → γ} (hg : HasFiniteIntegral g μ)
(h : ∀ᵐ a ∂μ, ‖f a‖ ≤ ‖g a‖) : HasFiniteIntegral f μ := by |
simp only [hasFiniteIntegral_iff_norm] at *
calc
(∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) ≤ ∫⁻ a : α, ENNReal.ofReal ‖g a‖ ∂μ :=
lintegral_mono_ae (h.mono fun a h => ofReal_le_ofReal h)
_ < ∞ := hg
| [
" ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist... | [
" ∫⁻ (a : α), ↑‖f a‖₊ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ",
" ∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) + edist... |
import Mathlib.NumberTheory.LegendreSymbol.Basic
import Mathlib.Analysis.Normed.Field.Basic
#align_import number_theory.legendre_symbol.gauss_eisenstein_lemmas from "leanprover-community/mathlib"@"8818fdefc78642a7e6afcd20be5c184f3c7d9699"
open Finset Nat
open scoped Nat
section GaussEisenstein
namespace ZMod
... | Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean | 30 | 60 | theorem Ico_map_valMinAbs_natAbs_eq_Ico_map_id (p : ℕ) [hp : Fact p.Prime] (a : ZMod p)
(hap : a ≠ 0) : ((Ico 1 (p / 2).succ).1.map fun (x : ℕ) => (a * x).valMinAbs.natAbs) =
(Ico 1 (p / 2).succ).1.map fun a => a := by |
have he : ∀ {x}, x ∈ Ico 1 (p / 2).succ → x ≠ 0 ∧ x ≤ p / 2 := by
simp (config := { contextual := true }) [Nat.lt_succ_iff, Nat.succ_le_iff, pos_iff_ne_zero]
have hep : ∀ {x}, x ∈ Ico 1 (p / 2).succ → x < p := fun hx =>
lt_of_le_of_lt (he hx).2 (Nat.div_lt_self hp.1.pos (by decide))
have hpe : ∀ {x}, x ∈... | [
" Multiset.map (fun x => (a * ↑x).valMinAbs.natAbs) (Ico 1 (p / 2).succ).val =\n Multiset.map (fun a => a) (Ico 1 (p / 2).succ).val",
" ∀ {x : ℕ}, x ∈ Ico 1 (p / 2).succ → x ≠ 0 ∧ x ≤ p / 2",
" 1 < 2",
" ∀ x ∈ Ico 1 (p / 2).succ, (a * ↑x).valMinAbs.natAbs ∈ Ico 1 (p / 2).succ",
" (a * ↑x).valMinAbs.natAb... | [] |
import Mathlib.Data.PFunctor.Multivariate.W
import Mathlib.Data.QPF.Multivariate.Basic
#align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe u v
namespace MvQPF
open TypeVec
open MvFunctor (LiftP LiftR)
open MvFunctor
var... | Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean | 71 | 75 | theorem recF_eq' {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) (x : q.P.W α) :
recF g x = g (abs (appendFun id (recF g) <$$> q.P.wDest' x)) := by |
apply q.P.w_cases _ x
intro a f' f
rw [recF_eq, q.P.wDest'_wMk, MvPFunctor.map_eq, appendFun_comp_splitFun, TypeVec.id_comp]
| [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)",
" recF g x = g (abs ((TypeVec.id ::: r... | [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)"
] |
import Mathlib.MeasureTheory.Covering.VitaliFamily
import Mathlib.MeasureTheory.Measure.Regular
import Mathlib.MeasureTheory.Function.AEMeasurableOrder
import Mathlib.MeasureTheory.Integral.Lebesgue
import Mathlib.MeasureTheory.Integral.Average
import Mathlib.MeasureTheory.Decomposition.Lebesgue
#align_import measure... | Mathlib/MeasureTheory/Covering/Differentiation.lean | 160 | 201 | theorem ae_eventually_measure_zero_of_singular (hρ : ρ ⟂ₘ μ) :
∀ᵐ x ∂μ, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 0) := by |
have A : ∀ ε > (0 : ℝ≥0), ∀ᵐ x ∂μ, ∀ᶠ a in v.filterAt x, ρ a < ε * μ a := by
intro ε εpos
set s := {x | ¬∀ᶠ a in v.filterAt x, ρ a < ε * μ a} with hs
change μ s = 0
obtain ⟨o, _, ρo, μo⟩ : ∃ o : Set α, MeasurableSet o ∧ ρ o = 0 ∧ μ oᶜ = 0 := hρ
apply le_antisymm _ bot_le
calc
μ s ≤ μ (s... | [
" ∀ᵐ (x : α) ∂μ, ∀ᶠ (a : Set α) in v.filterAt x, 0 < μ a",
" μ s = 0",
" v.FineSubfamilyOn f s",
" ∃ a ∈ v.setsAt x ∩ f x, a ⊆ closedBall x ε",
" μ s ≤ 0",
" ∑' (x : ↑h.index), μ (h.covering ↑x) = ∑' (x : ↑h.index), 0",
" (fun x => μ (h.covering ↑x)) = fun x => 0",
" μ (h.covering ↑x) = 0",
" ∑' (x ... | [
" ∀ᵐ (x : α) ∂μ, ∀ᶠ (a : Set α) in v.filterAt x, 0 < μ a",
" μ s = 0",
" v.FineSubfamilyOn f s",
" ∃ a ∈ v.setsAt x ∩ f x, a ⊆ closedBall x ε",
" μ s ≤ 0",
" ∑' (x : ↑h.index), μ (h.covering ↑x) = ∑' (x : ↑h.index), 0",
" (fun x => μ (h.covering ↑x)) = fun x => 0",
" μ (h.covering ↑x) = 0",
" ∑' (x ... |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Int.Basic
import Mathlib.Tactic.Ring
import Mathlib.Tactic.FieldSimp
import Mathlib.Data.Int.NatPrime
import Mathlib.Data.ZMod.Basic
#align_import number_theory.pythagorean_tri... | Mathlib/NumberTheory/PythagoreanTriples.lean | 32 | 34 | theorem sq_ne_two_fin_zmod_four (z : ZMod 4) : z * z ≠ 2 := by |
change Fin 4 at z
fin_cases z <;> decide
| [
" z * z ≠ 2",
" ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2",
" ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2",
" ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2",
" ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2"
] | [] |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Data.Set.NAry
import Mathlib.Order.Directed
#align_import order.bounds.basic from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010"
open Function Set
open OrderDual (toDual ofDual)
universe u v w x
variable {α : Type u} {β : Type v}... | Mathlib/Order/Bounds/Basic.lean | 139 | 141 | theorem not_bddAbove_iff {α : Type*} [LinearOrder α] {s : Set α} :
¬BddAbove s ↔ ∀ x, ∃ y ∈ s, x < y := by |
simp only [not_bddAbove_iff', not_le]
| [
" ¬BddAbove s ↔ ∀ (x : α), ∃ y ∈ s, ¬y ≤ x",
" ¬BddAbove s ↔ ∀ (x : α), ∃ y ∈ s, x < y"
] | [
" ¬BddAbove s ↔ ∀ (x : α), ∃ y ∈ s, ¬y ≤ x"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.