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.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.Order.Minimal
#align_import ring_theory.ideal.minimal_prime from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
section
variable {R S : Type*} [CommSemiring R] [CommSemiring S] (I J ... | Mathlib/RingTheory/Ideal/MinimalPrime.lean | 134 | 164 | theorem Ideal.exists_comap_eq_of_mem_minimalPrimes {I : Ideal S} (f : R →+* S) (p)
(H : p ∈ (I.comap f).minimalPrimes) : ∃ p' : Ideal S, p'.IsPrime ∧ I ≤ p' ∧ p'.comap f = p := by |
have := H.1.1
let f' := (Ideal.Quotient.mk I).comp f
have e : RingHom.ker f' = I.comap f := by
ext1
exact Submodule.Quotient.mk_eq_zero _
have : RingHom.ker (Ideal.Quotient.mk <| RingHom.ker f') ≤ p := by
rw [Ideal.mk_ker, e]
exact H.1.2
suffices _ by
have ⟨p', hp₁, hp₂⟩ := Ideal.exists_c... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime",
" ∃ p ∈ I.minimalPrimes, p ≤ J",
" ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m",
" OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}",
" J.IsPrime",
" ∀ c ⊆ {p | IsPrime ... | [
" {p | p.IsPrime ∧ ⊥ ≤ p} = setOf Ideal.IsPrime",
" ∃ p ∈ I.minimalPrimes, p ≤ J",
" ∃ m ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}, OrderDual.toDual J ≤ m ∧ ∀ z ∈ {p | IsPrime p ∧ I ≤ p}, m ≤ z → z = m",
" OrderDual.toDual J ∈ {p | IsPrime p ∧ I ≤ OrderDual.ofDual p}",
" J.IsPrime",
" ∀ c ⊆ {p | IsPrime ... |
import Mathlib.Topology.Connected.Basic
open Set Function
universe u v
variable {α : Type u} {β : Type v} {ι : Type*} {π : ι → Type*} [TopologicalSpace α]
{s t u v : Set α}
section TotallyDisconnected
def IsTotallyDisconnected (s : Set α) : Prop :=
∀ t, t ⊆ s → IsPreconnected t → t.Subsingleton
#align is_t... | Mathlib/Topology/Connected/TotallyDisconnected.lean | 93 | 104 | theorem isTotallyDisconnected_of_isClopen_set {X : Type*} [TopologicalSpace X]
(hX : Pairwise fun x y => ∃ (U : Set X), IsClopen U ∧ x ∈ U ∧ y ∉ U) :
IsTotallyDisconnected (Set.univ : Set X) := by |
rintro S - hS
unfold Set.Subsingleton
by_contra! h_contra
rcases h_contra with ⟨x, hx, y, hy, hxy⟩
obtain ⟨U, hU, hxU, hyU⟩ := hX hxy
specialize
hS U Uᶜ hU.2 hU.compl.2 (fun a _ => em (a ∈ U)) ⟨x, hx, hxU⟩ ⟨y, hy, hyU⟩
rw [inter_compl_self, Set.inter_empty] at hS
exact Set.not_nonempty_empty hS
| [
" TotallyDisconnectedSpace (α ⊕ β)",
" s.Subsingleton",
" (Sum.inl '' t).Subsingleton",
" (Sum.inr '' t).Subsingleton",
" TotallyDisconnectedSpace ((i : ι) × π i)",
" ∅.Subsingleton",
" (Sigma.mk a '' t).Subsingleton",
" IsTotallyDisconnected univ",
" S.Subsingleton",
" ∀ ⦃x : X⦄, x ∈ S → ∀ ⦃y : X... | [
" TotallyDisconnectedSpace (α ⊕ β)",
" s.Subsingleton",
" (Sum.inl '' t).Subsingleton",
" (Sum.inr '' t).Subsingleton",
" TotallyDisconnectedSpace ((i : ι) × π i)",
" ∅.Subsingleton",
" (Sigma.mk a '' t).Subsingleton"
] |
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 | 214 | 221 | theorem _root_.IntermediateField.AdjoinSimple.norm_gen_eq_one {x : L} (hx : ¬IsIntegral K x) :
norm K (AdjoinSimple.gen K x) = 1 := by |
rw [norm_eq_one_of_not_exists_basis]
contrapose! hx
obtain ⟨s, ⟨b⟩⟩ := hx
refine .of_mem_of_fg K⟮x⟯.toSubalgebra ?_ x ?_
· exact (Submodule.fg_iff_finiteDimensional _).mpr (of_fintype_basis b)
· exact IntermediateField.subset_adjoin K _ (Set.mem_singleton x)
| [
" (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) ... | [
" (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) ... |
import Mathlib.Algebra.Polynomial.Eval
#align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
noncomputable section
open Polynomial
open Finsupp Finset
namespace Polynomial
universe u v w
variable {R : Type u} {S : Type v} {ι : Type w} {a b ... | Mathlib/Algebra/Polynomial/Degree/Lemmas.lean | 438 | 440 | theorem monic_mul_leadingCoeff_inv {p : K[X]} (h : p ≠ 0) : Monic (p * C (leadingCoeff p)⁻¹) := by |
rw [Monic, leadingCoeff_mul, leadingCoeff_C,
mul_inv_cancel (show leadingCoeff p ≠ 0 from mt leadingCoeff_eq_zero.1 h)]
| [
" Irreducible (p * C p.leadingCoeff⁻¹) ↔ Irreducible p",
" (p * C p.leadingCoeff⁻¹).Monic"
] | [
" Irreducible (p * C p.leadingCoeff⁻¹) ↔ Irreducible p"
] |
import Mathlib.Topology.MetricSpace.Algebra
import Mathlib.Analysis.Normed.Field.Basic
#align_import analysis.normed.mul_action from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
variable {α β : Type*}
section SeminormedAddGroup
variable [SeminormedAddGroup α] [SeminormedAddGroup β] ... | Mathlib/Analysis/Normed/MulAction.lean | 29 | 30 | theorem norm_smul_le (r : α) (x : β) : ‖r • x‖ ≤ ‖r‖ * ‖x‖ := by |
simpa [smul_zero] using dist_smul_pair r 0 x
| [
" ‖r • x‖ ≤ ‖r‖ * ‖x‖"
] | [] |
import Mathlib.Analysis.Convex.Between
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic
import Mathlib.Analysis.NormedSpace.AffineIsometry
#align_import geometry.euclidean.angle.unoriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f... | Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean | 61 | 64 | theorem _root_.AffineIsometry.angle_map {V₂ P₂ : Type*} [NormedAddCommGroup V₂]
[InnerProductSpace ℝ V₂] [MetricSpace P₂] [NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[ℝ] P₂) (p₁ p₂ p₃ : P) : ∠ (f p₁) (f p₂) (f p₃) = ∠ p₁ p₂ p₃ := by |
simp_rw [angle, ← AffineIsometry.map_vsub, LinearIsometry.angle_map]
| [
" ContinuousAt (fun y => ∠ y.1 y.2.1 y.2.2) x",
" (f x).1 ≠ 0",
" (f x).2 ≠ 0",
" ∠ (f p₁) (f p₂) (f p₃) = ∠ p₁ p₂ p₃"
] | [
" ContinuousAt (fun y => ∠ y.1 y.2.1 y.2.2) x",
" (f x).1 ≠ 0",
" (f x).2 ≠ 0"
] |
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.SesquilinearForm
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import linear_algebra.quadratic_form.basic from "leanprover-community/mathlib"@"d11f435d4e34a6cea0a1797d6b625b0c170be845"
universe u v w
variable {S T : ... | Mathlib/LinearAlgebra/QuadraticForm/Basic.lean | 98 | 100 | theorem polar_add (f g : M → R) (x y : M) : polar (f + g) x y = polar f x y + polar g x y := by |
simp only [polar, Pi.add_apply]
abel
| [
" polar (f + g) x y = polar f x y + polar g x y",
" f (x + y) + g (x + y) - (f x + g x) - (f y + g y) = f (x + y) - f x - f y + (g (x + y) - g x - g y)"
] | [] |
import Mathlib.SetTheory.Cardinal.ENat
#align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
universe u v
open Function Set
namespace Cardinal
variable {α : Type u} {c d : Cardinal.{u}}
noncomputable def toNat : Cardinal →*₀ ℕ :=
ENat.toNat.com... | Mathlib/SetTheory/Cardinal/ToNat.lean | 60 | 61 | theorem cast_toNat_of_aleph0_le {c : Cardinal} (h : ℵ₀ ≤ c) : ↑(toNat c) = (0 : Cardinal) := by |
rw [toNat_apply_of_aleph0_le h, Nat.cast_zero]
| [
" toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c",
" toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀",
" ↑(toNat c) = c",
" ↑(toNat ↑c) = ↑c",
" ↑(toNat c) = ↑(Classical.choose ⋯)",
" toNat c = 0",
" ↑(toNat c) = 0"
] | [
" toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c",
" toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀",
" ↑(toNat c) = c",
" ↑(toNat ↑c) = ↑c",
" ↑(toNat c) = ↑(Classical.choose ⋯)",
" toNat c = 0"
] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.GeomSum
import Mathlib.LinearAlgebra.Matrix.Block
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.Nondegenerate
#align_import linear_algebra.vandermonde from "leanprover-community/mathlib"@"70fd9563a21e7b963887c93... | Mathlib/LinearAlgebra/Vandermonde.lean | 59 | 64 | theorem vandermonde_succ {n : ℕ} (v : Fin n.succ → R) :
vandermonde v =
Fin.cons (fun (j : Fin n.succ) => v 0 ^ (j : ℕ)) fun i =>
Fin.cons 1 fun j => v i.succ * vandermonde (Fin.tail v) i j := by |
conv_lhs => rw [← Fin.cons_self_tail v, vandermonde_cons]
rfl
| [
" vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j",
" vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j",
" vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j... | [
" vandermonde (Fin.cons v0 v) = Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * vandermonde v i j",
" vandermonde (Fin.cons v0 v) i j =\n Fin.cons (fun j => v0 ^ ↑j) (fun i => Fin.cons 1 fun j => v i * vandermonde v i j) i j",
" vandermonde (Fin.cons v0 v) 0 j =\n Fin.cons (fun j => v0 ^ ↑j... |
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 | 159 | 162 | theorem Int.coprime_of_sq_sum' {r s : ℤ} (h : IsCoprime r s) :
IsCoprime (r ^ 2 + s ^ 2) (r * s) := by |
apply IsCoprime.mul_right (Int.coprime_of_sq_sum (isCoprime_comm.mp h))
rw [add_comm]; apply Int.coprime_of_sq_sum h
| [
" IsCoprime (r ^ 2 + s ^ 2) r",
" IsCoprime (r * r + s * s) r",
" IsCoprime (r ^ 2 + s ^ 2) (r * s)",
" IsCoprime (r ^ 2 + s ^ 2) s",
" IsCoprime (s ^ 2 + r ^ 2) s"
] | [
" IsCoprime (r ^ 2 + s ^ 2) r",
" IsCoprime (r * r + s * s) r"
] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 64 | 66 | theorem ascPochhammer_succ_left (n : ℕ) :
ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1) := by |
rw [ascPochhammer]
| [
" ascPochhammer S 1 = X",
" ascPochhammer S (n + 1) = X * (ascPochhammer S n).comp (X + 1)"
] | [
" ascPochhammer S 1 = X"
] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order
#align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
open Set Filter ENNReal Topology NNReal TopologicalSpace
namespace MeasureTh... | Mathlib/MeasureTheory/Measure/Regular.lean | 369 | 374 | theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular μ] {A : Set α}
(hA : MeasurableSet A) (hA' : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ A) < ε := by |
rcases A.exists_isOpen_lt_add hA' hε with ⟨U, hAU, hUo, hU⟩
use U, hAU, hUo, hU.trans_le le_top
exact measure_diff_lt_of_lt_add hA hAU hA' hU
| [
" ∃ U ⊇ A, IsOpen U ∧ μ U < r",
" r > ?m.3205 (toMeasurable μ A)",
" μ A = ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U ≤ μ A",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U < r",
" ∃ U ⊇ A, IsOpen U ∧ μ U ≤ μ A + ε",
" μ univ ≤ μ A + ε",
" ∃ U ⊇ A, IsOpen U ∧ ... | [
" ∃ U ⊇ A, IsOpen U ∧ μ U < r",
" r > ?m.3205 (toMeasurable μ A)",
" μ A = ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U ≤ μ A",
" ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), μ U < r",
" ∃ U ⊇ A, IsOpen U ∧ μ U ≤ μ A + ε",
" μ univ ≤ μ A + ε"
] |
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.Hom.Set
#align_import order.bounds.order_iso from "leanprover-community/mathlib"@"a59dad53320b73ef180174aae867addd707ef00e"
set_option autoImplicit true
open Set
namespace OrderIso
variable [Preorder α] [Preorder β] (f : α ≃o β)
theorem upperBounds_image {... | Mathlib/Order/Bounds/OrderIso.lean | 41 | 42 | theorem isLUB_image' {s : Set α} {x : α} : IsLUB (f '' s) (f x) ↔ IsLUB s x := by |
rw [isLUB_image, f.symm_apply_apply]
| [
" ∀ {x y : α}, f x ≤ f y ↔ x ≤ y",
" ∀ {x y : β}, f.symm x ≤ f.symm y ↔ x ≤ y",
" IsLUB (⇑f '' s) (f x) ↔ IsLUB s x"
] | [
" ∀ {x y : α}, f x ≤ f y ↔ x ≤ y",
" ∀ {x y : β}, f.symm x ≤ f.symm y ↔ x ≤ y"
] |
import Mathlib.Analysis.Fourier.FourierTransform
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.EuclideanDist
import Mathlib.MeasureTheory.Function.ContinuousMapDense
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.M... | Mathlib/Analysis/Fourier/RiemannLebesgueLemma.lean | 68 | 92 | theorem fourierIntegral_half_period_translate {w : V} (hw : w ≠ 0) :
(∫ v : V, 𝐞 (-⟪v, w⟫) • f (v + i w)) = -∫ v : V, 𝐞 (-⟪v, w⟫) • f v := by |
have hiw : ⟪i w, w⟫ = 1 / 2 := by
rw [inner_smul_left, inner_self_eq_norm_sq_to_K, RCLike.ofReal_real_eq_id, id,
RCLike.conj_to_real, ← div_div, div_mul_cancel₀]
rwa [Ne, sq_eq_zero_iff, norm_eq_zero]
have :
(fun v : V => 𝐞 (-⟪v, w⟫) • f (v + i w)) =
fun v : V => (fun x : V => -(𝐞 (-⟪x, w... | [
" ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = -∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v",
" ⟪i w, w⟫_ℝ = 1 / 2",
" ‖w‖ ^ 2 ≠ 0",
" (fun v => 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w)) = fun v => (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)",
" 𝐞 (-⟪v, w⟫_ℝ) • f (v + i w) = (fun x => -(𝐞 (-⟪x, w⟫_ℝ) • f x)) (v + i w)",
" cexp (... | [] |
import Mathlib.AlgebraicTopology.DoldKan.Projections
import Mathlib.CategoryTheory.Idempotents.FunctorCategories
import Mathlib.CategoryTheory.Idempotents.FunctorExtension
#align_import algebraic_topology.dold_kan.p_infty from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open Category... | Mathlib/AlgebraicTopology/DoldKan/PInfty.lean | 36 | 42 | theorem P_is_eventually_constant {q n : ℕ} (hqn : n ≤ q) :
((P (q + 1)).f n : X _[n] ⟶ _) = (P q).f n := by |
rcases n with (_|n)
· simp only [Nat.zero_eq, P_f_0_eq]
· simp only [P_succ, add_right_eq_self, comp_add, HomologicalComplex.comp_f,
HomologicalComplex.add_f_apply, comp_id]
exact (HigherFacesVanish.of_P q n).comp_Hσ_eq_zero (Nat.succ_le_iff.mp hqn)
| [
" (P (q + 1)).f n = (P q).f n",
" (P (q + 1)).f 0 = (P q).f 0",
" (P (q + 1)).f (n + 1) = (P q).f (n + 1)",
" (P q).f (n + 1) ≫ (Hσ q).f (n + 1) = 0"
] | [] |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Tactic.Common
#align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
variable {α : Type*}
namespace Coheyting
variable [CoheytingAlgebra α] {a b : α}
def boundary (a : α) : α :=
a ⊓ ¬a
#align cohe... | Mathlib/Order/Heyting/Boundary.lean | 132 | 132 | theorem boundary_idem (a : α) : ∂ ∂ a = ∂ a := by | rw [boundary, hnot_boundary, inf_top_eq]
| [
" ∂ ⊤ = ⊥",
" ∂ (¬¬a) = ∂ (¬a)",
" ¬∂ a = ⊤",
" ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b",
" a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)",
" ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" a ⊓ ¬(a ⊔ b) ⊔ b ⊓ ¬(a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" (a ∧ b ∨ ¬(a ∧ b)) ∧ ((a ∨ b) ∨ ¬(a ∨ b)) → a ∨ ¬a",
" a ∨ ¬a",
" ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)",
... | [
" ∂ ⊤ = ⊥",
" ∂ (¬¬a) = ∂ (¬a)",
" ¬∂ a = ⊤",
" ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b",
" a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)",
" ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" a ⊓ ¬(a ⊔ b) ⊔ b ⊓ ¬(a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" (a ∧ b ∨ ¬(a ∧ b)) ∧ ((a ∨ b) ∨ ¬(a ∨ b)) → a ∨ ¬a",
" a ∨ ¬a",
" ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)",
... |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Integral.PeakFunction
#align_import analysis.special_functions.trigonometric.euler_sine_prod from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open scoped Real Topology
open Real Set Filter intervalIntegra... | Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean | 278 | 295 | theorem tendsto_integral_cos_pow_mul_div {f : ℝ → ℂ} (hf : ContinuousOn f (Icc 0 (π / 2))) :
Tendsto
(fun n : ℕ => (∫ x in (0 : ℝ)..π / 2, (cos x : ℂ) ^ n * f x) /
(∫ x in (0 : ℝ)..π / 2, cos x ^ n : ℝ))
atTop (𝓝 <| f 0) := by |
simp_rw [div_eq_inv_mul (α := ℂ), ← Complex.ofReal_inv, integral_of_le pi_div_two_pos.le,
← MeasureTheory.integral_Icc_eq_integral_Ioc, ← Complex.ofReal_pow, ← Complex.real_smul]
have c_lt : ∀ y : ℝ, y ∈ Icc 0 (π / 2) → y ≠ 0 → cos y < cos 0 := fun y hy hy' =>
cos_lt_cos_of_nonneg_of_le_pi_div_two (le_refl... | [
" Tendsto (fun n => (∫ (x : ℝ) in 0 ..π / 2, ↑x.cos ^ n * f x) / ↑(∫ (x : ℝ) in 0 ..π / 2, x.cos ^ n)) atTop (𝓝 (f 0))",
" Tendsto\n (fun n => (∫ (x : ℝ) in Icc 0 (π / 2), x.cos ^ n ∂volume)⁻¹ • ∫ (x : ℝ) in Icc 0 (π / 2), x.cos ^ n • f x ∂volume)\n atTop (𝓝 (f 0))",
" 0 < cos 0",
" 0 < 1",
" 0 ∈ cl... | [] |
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 | 86 | 93 | theorem limsup_liminf_le_liminf_limsup {β} [Countable β] {f : Filter α} [CountableInterFilter f]
{g : Filter β} (u : α → β → ℝ≥0∞) :
(f.limsup fun a : α => g.liminf fun b : β => u a b) ≤
g.liminf fun b => f.limsup fun a => u a b :=
have h1 : ∀ᶠ a in f, ∀ b, u a b ≤ f.limsup fun a' => u a' b := by |
rw [eventually_countable_forall]
exact fun b => ENNReal.eventually_le_limsup fun a => u a b
sInf_le <| h1.mono fun x hx => Filter.liminf_le_liminf (Filter.eventually_of_forall hx)
| [
" 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 ⊤",
" limsu... |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Data.Finset.Pointwise
import Mathlib.Data.Finsupp.Indicator
import Mathlib.Data.Fintype.BigOperators
#align_import data.finset.finsupp from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
noncomputable section
open Finsupp
open... | Mathlib/Data/Finset/Finsupp.lean | 62 | 74 | theorem mem_finsupp_iff_of_support_subset {t : ι →₀ Finset α} (ht : t.support ⊆ s) :
f ∈ s.finsupp t ↔ ∀ i, f i ∈ t i := by |
refine
mem_finsupp_iff.trans
(forall_and.symm.trans <|
forall_congr' fun i =>
⟨fun h => ?_, fun h =>
⟨fun hi => ht <| mem_support_iff.2 fun H => mem_support_iff.1 hi ?_, fun _ => h⟩⟩)
· by_cases hi : i ∈ s
· exact h.2 hi
· rw [not_mem_support_iff.1 (mt h.1 hi), not_m... | [
" f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" (∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f) → f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" ({ toFun := indicator s, inj' := ⋯ } f).support ⊆ s ∧ ∀ i ∈ s, ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i",
" ({ toFun := indicator s, inj' := ⋯ } ... | [
" f ∈ s.finsupp t ↔ f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" (∃ a ∈ s.pi t, { toFun := indicator s, inj' := ⋯ } a = f) → f.support ⊆ s ∧ ∀ i ∈ s, f i ∈ t i",
" ({ toFun := indicator s, inj' := ⋯ } f).support ⊆ s ∧ ∀ i ∈ s, ({ toFun := indicator s, inj' := ⋯ } f) i ∈ t i",
" ({ toFun := indicator s, inj' := ⋯ } ... |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set... | Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 165 | 167 | theorem measure_sUnion₀ {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint μ))
(h : ∀ s ∈ S, NullMeasurableSet s μ) : μ (⋃₀ S) = ∑' s : S, μ s := by |
rw [sUnion_eq_biUnion, measure_biUnion₀ hs hd h]
| [
" (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x",
" μ (s ∪ t) + μ (s ∩ t) = μ s + μ t",
" μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t",
" μ (s ∆ t) = μ (s \\ t) + μ (t \\ s)",
" μ (⋃ b ∈ s, f b) = ∑' (p : ↑s), μ (f ↑p)",
" μ (⋃ x, ... | [
" (∀ᵐ (x : α) ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ (x : α) ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ (x : α) ∂μ, x ∈ Ioc b a → P x",
" μ (s ∪ t) + μ (s ∩ t) = μ s + μ t",
" μ t + μ (s \\ t) + μ (s ∩ t) = μ (s ∩ t) + μ (s \\ t) + μ t",
" μ (s ∆ t) = μ (s \\ t) + μ (t \\ s)",
" μ (⋃ b ∈ s, f b) = ∑' (p : ↑s), μ (f ↑p)",
" μ (⋃ x, ... |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {α : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n ... | Mathlib/Data/List/OfFn.lean | 135 | 136 | theorem ofFn_eq_nil_iff {n : ℕ} {f : Fin n → α} : ofFn f = [] ↔ n = 0 := by |
cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero]
| [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1",
" (ofFn f).length = n",
" j + k < n",
" (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,... | [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1",
" (ofFn f).length = n",
" j + k < n",
" (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,... |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Fi... | Mathlib/RingTheory/MvPowerSeries/Inverse.lean | 90 | 97 | theorem coeff_invOfUnit [DecidableEq σ] (n : σ →₀ ℕ) (φ : MvPowerSeries σ R) (u : Rˣ) :
coeff R n (invOfUnit φ u) =
if n = 0 then ↑u⁻¹
else
-↑u⁻¹ *
∑ x ∈ antidiagonal n,
if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0 := by |
convert coeff_inv_aux n (↑u⁻¹) φ
| [
" inv.aux a φ n =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x.2 < n then (coeff R x.1) φ * (coeff R x.2) (inv.aux a φ) else 0",
" (if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x_1 : x.2 < n then (coeff R x.1) φ * inv.aux a φ x.2 else 0) =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if... | [
" inv.aux a φ n =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x.2 < n then (coeff R x.1) φ * (coeff R x.2) (inv.aux a φ) else 0",
" (if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if x_1 : x.2 < n then (coeff R x.1) φ * inv.aux a φ x.2 else 0) =\n if n = 0 then a else -a * ∑ x ∈ antidiagonal n, if... |
import Mathlib.Analysis.NormedSpace.lpSpace
import Mathlib.Topology.Sets.Compacts
#align_import topology.metric_space.kuratowski from "leanprover-community/mathlib"@"95d4f6586d313c8c28e00f36621d2a6a66893aa6"
noncomputable section
set_option linter.uppercaseLean3 false
open Set Metric TopologicalSpace NNReal ENNR... | Mathlib/Topology/MetricSpace/Kuratowski.lean | 61 | 87 | theorem embeddingOfSubset_isometry (H : DenseRange x) : Isometry (embeddingOfSubset x) := by |
refine Isometry.of_dist_eq fun a b => ?_
refine (embeddingOfSubset_dist_le x a b).antisymm (le_of_forall_pos_le_add fun e epos => ?_)
-- First step: find n with dist a (x n) < e
rcases Metric.mem_closure_range_iff.1 (H a) (e / 2) (half_pos epos) with ⟨n, hn⟩
-- Second step: use the norm control at index n to... | [
" (fun n => dist a (x n) - dist (x 0) (x n)) ∈ lp (fun i => ℝ) ⊤",
" BddAbove (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)",
" dist a (x 0) ∈ upperBounds (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)",
" (fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖) n ≤ dist a ... | [
" (fun n => dist a (x n) - dist (x 0) (x n)) ∈ lp (fun i => ℝ) ⊤",
" BddAbove (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)",
" dist a (x 0) ∈ upperBounds (range fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖)",
" (fun i => ‖(fun n => dist a (x n) - dist (x 0) (x n)) i‖) n ≤ dist a ... |
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
#align_import linear_algebra.exterior_algebra.of_alternating from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a"
variable {R M N N' : Type*}
variable [CommRing R] [AddCommGroup M] [AddCo... | Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean | 79 | 85 | theorem liftAlternating_ι_mul (f : ∀ i, M [⋀^Fin i]→ₗ[R] N) (m : M)
(x : ExteriorAlgebra R M) :
liftAlternating (R := R) (M := M) (N := N) f (ι R m * x) =
liftAlternating (R := R) (M := M) (N := N) (fun i => (f i.succ).curryLeft m) x := by |
dsimp [liftAlternating]
rw [foldl_mul, foldl_ι]
rfl
| [
" Module R (M [⋀^ι]→ₗ[R] N)",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] N",
" M [⋀^Fin 0]→ₗ[R] N ≃ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] (i : ℕ) → M [⋀^Fin i]→ₗ[R] N",
" M →ₗ[R] ((i : ℕ) → M [⋀^Fin i]→ₗ[R]... | [
" Module R (M [⋀^ι]→ₗ[R] N)",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] N",
" M [⋀^Fin 0]→ₗ[R] N ≃ₗ[R] N",
" ((i : ℕ) → M [⋀^Fin i]→ₗ[R] N) →ₗ[R] ExteriorAlgebra R M →ₗ[R] (i : ℕ) → M [⋀^Fin i]→ₗ[R] N",
" M →ₗ[R] ((i : ℕ) → M [⋀^Fin i]→ₗ[R]... |
import Mathlib.Topology.ContinuousFunction.Bounded
import Mathlib.Topology.UniformSpace.Compact
import Mathlib.Topology.CompactOpen
import Mathlib.Topology.Sets.Compacts
import Mathlib.Analysis.Normed.Group.InfiniteSum
#align_import topology.continuous_function.compact from "leanprover-community/mathlib"@"d3af0609f6d... | Mathlib/Topology/ContinuousFunction/Compact.lean | 137 | 138 | theorem dist_le (C0 : (0 : ℝ) ≤ C) : dist f g ≤ C ↔ ∀ x : α, dist (f x) (g x) ≤ C := by |
simp only [← dist_mkOfCompact, BoundedContinuousFunction.dist_le C0, mkOfCompact_apply]
| [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... | [
" (mkOfCompact f).toContinuousMap = f",
" (mkOfCompact f).toContinuousMap a✝ = f a✝",
" mkOfCompact f.toContinuousMap = f",
" (mkOfCompact f.toContinuousMap) x✝ = f x✝",
" ∀ (s : Set (C(α, β) × C(α, β))),\n s ∈ uniformity C(α, β) ↔\n ∃ t ∈ uniformity (α →ᵇ β),\n ∀ (x y : C(α, β)), ((equivBoun... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 66 | 75 | theorem rank_quotient_add_rank_le [Nontrivial R] (M' : Submodule R M) :
Module.rank R (M ⧸ M') + Module.rank R M' ≤ Module.rank R M := by |
conv_lhs => simp only [Module.rank_def]
have := nonempty_linearIndependent_set R (M ⧸ M')
have := nonempty_linearIndependent_set R M'
rw [Cardinal.ciSup_add_ciSup _ (bddAbove_range.{v, v} _) _ (bddAbove_range.{v, v} _)]
refine ciSup_le fun ⟨s, hs⟩ ↦ ciSup_le fun ⟨t, ht⟩ ↦ ?_
choose f hf using Quotient.mk_s... | [
" LinearIndependent R (Sum.elim (fun x => ↑(f x)) g)",
" Disjoint (span R (range fun x => ↑(f x))) (span R (range g))",
" x = 0",
" (c.sum fun i a => a • g i) = 0",
" LinearIndependent (ι := ↑(s ∪ t)) R Subtype.val",
" LinearIndependent (ι := ↑s) R (⇑M'.subtype ∘ ⇑(s.embeddingOfSubset (↑M') hs))",
" ran... | [
" LinearIndependent R (Sum.elim (fun x => ↑(f x)) g)",
" Disjoint (span R (range fun x => ↑(f x))) (span R (range g))",
" x = 0",
" (c.sum fun i a => a • g i) = 0",
" LinearIndependent (ι := ↑(s ∪ t)) R Subtype.val",
" LinearIndependent (ι := ↑s) R (⇑M'.subtype ∘ ⇑(s.embeddingOfSubset (↑M') hs))",
" ran... |
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Data.List.Infix
import Mathlib.Data.List.MinMax
import Mathlib.Data.List.EditDistance.Defs
set_option autoImplicit true
variable {C : Levenshtein.Cost α β δ} [CanonicallyLinearOrderedAddCommMonoid δ]
| Mathlib/Data/List/EditDistance/Bounds.lean | 26 | 56 | theorem suffixLevenshtein_minimum_le_levenshtein_cons (xs : List α) (y ys) :
(suffixLevenshtein C xs ys).1.minimum ≤ levenshtein C xs (y :: ys) := by |
induction xs with
| nil =>
simp only [suffixLevenshtein_nil', levenshtein_nil_cons,
List.minimum_singleton, WithTop.coe_le_coe]
exact le_add_of_nonneg_left (by simp)
| cons x xs ih =>
suffices
(suffixLevenshtein C (x :: xs) ys).1.minimum ≤ (C.delete x + levenshtein C xs (y :: ys)) ∧... | [
" (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))",
" (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))",
" levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys",
" 0 ≤ C.insert y",
" (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :... | [] |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
universe uD uE uF uG
variable {𝕜 : Type*} [NontriviallyNormedField ... | Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean | 60 | 62 | theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} :
ContDiff 𝕜 (n + 1 : ℕ) f ↔ Differentiable 𝕜 f ∧ ∀ y, ContDiff 𝕜 n fun x => fderiv 𝕜 f x y := by |
rw [contDiff_succ_iff_fderiv, contDiff_clm_apply_iff]
| [
" ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => (f x) y) s",
" ContDiffOn 𝕜 n f s",
" ContDiffOn 𝕜 n ((⇑e₂.symm ∘ ⇑e₂) ∘ f) s",
" ContDiff 𝕜 n f ↔ ∀ (y : F), ContDiff 𝕜 n fun x => (f x) y",
" ContDiff 𝕜 (↑(n + 1)) f ↔ Differentiable 𝕜 f ∧ ∀ (y : E), ContDiff 𝕜 ↑n fun x => (fderiv 𝕜 f x)... | [
" ContDiffOn 𝕜 n f s ↔ ∀ (y : F), ContDiffOn 𝕜 n (fun x => (f x) y) s",
" ContDiffOn 𝕜 n f s",
" ContDiffOn 𝕜 n ((⇑e₂.symm ∘ ⇑e₂) ∘ f) s",
" ContDiff 𝕜 n f ↔ ∀ (y : F), ContDiff 𝕜 n fun x => (f x) y"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Int.Log
#align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {b x y : ℝ}
-- @... | Mathlib/Analysis/SpecialFunctions/Log/Base.lean | 137 | 143 | theorem rpow_logb_eq_abs (hx : x ≠ 0) : b ^ logb b x = |x| := by |
apply log_injOn_pos
· simp only [Set.mem_Ioi]
apply rpow_pos_of_pos b_pos
· simp only [abs_pos, mem_Ioi, Ne, hx, not_false_iff]
rw [log_rpow b_pos, logb, log_abs]
field_simp [log_b_ne_zero b_pos b_ne_one]
| [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x",
" (a.logb b)⁻¹ = b.logb a",
" ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹",
" c.logb ... | [
" b.logb 0 = 0",
" b.logb 1 = 0",
" False",
" b.logb |x| = b.logb x",
" b.logb (-x) = b.logb x",
" b.logb (x * y) = b.logb x + b.logb y",
" b.logb (x / y) = b.logb x - b.logb y",
" b.logb x⁻¹ = -b.logb x",
" (a.logb b)⁻¹ = b.logb a",
" ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹",
" c.logb ... |
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 | 78 | 82 | theorem mul (k : ℤ) : PythagoreanTriple (k * x) (k * y) (k * z) :=
calc
k * x * (k * x) + k * y * (k * y) = k ^ 2 * (x * x + y * y) := by | ring
_ = k ^ 2 * (z * z) := by rw [h.eq]
_ = k * z * (k * z) := by ring
| [
" z * z ≠ 2",
" ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2",
" ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2",
" ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2",
" ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2",
" z * z % 4 ≠ 2",
" ¬z * z % ↑4 = 2 % ↑4",
" ¬↑(z * z) = ↑2",
" PythagoreanTriple x y z ↔ PythagoreanTriple y x z",
" x * x + y * y = z * z ↔ y * y + x * x = z * z",
" PythagoreanTriple ... | [
" z * z ≠ 2",
" ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2",
" ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2",
" ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2",
" ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2",
" z * z % 4 ≠ 2",
" ¬z * z % ↑4 = 2 % ↑4",
" ¬↑(z * z) = ↑2",
" PythagoreanTriple x y z ↔ PythagoreanTriple y x z",
" x * x + y * y = z * z ↔ y * y + x * x = z * z",
" PythagoreanTriple ... |
import Mathlib.Algebra.MvPolynomial.Basic
#align_import data.mv_polynomial.rename from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
variable {σ τ α R S : Type*} [CommSemiring R] [CommSemiring S]
namespace MvPolynomial... | Mathlib/Algebra/MvPolynomial/Rename.lean | 93 | 99 | theorem rename_monomial (f : σ → τ) (d : σ →₀ ℕ) (r : R) :
rename f (monomial d r) = monomial (d.mapDomain f) r := by |
rw [rename, aeval_monomial, monomial_eq (s := Finsupp.mapDomain f d),
Finsupp.prod_mapDomain_index]
· rfl
· exact fun n => pow_zero _
· exact fun n i₁ i₂ => pow_add _ _ _
| [
" (map f) ((rename g) p) = (rename g) ((map f) p)",
" (map f) ((rename g) (C a)) = (rename g) ((map f) (C a))",
" (map f) ((rename g) (p + q)) = (rename g) ((map f) (p + q))",
" (map f) ((rename g) (p * X n)) = (rename g) ((map f) (p * X n))",
" (rename g) (eval₂ C (X ∘ f) p) = (rename (g ∘ f)) p",
" (eva... | [
" (map f) ((rename g) p) = (rename g) ((map f) p)",
" (map f) ((rename g) (C a)) = (rename g) ((map f) (C a))",
" (map f) ((rename g) (p + q)) = (rename g) ((map f) (p + q))",
" (map f) ((rename g) (p * X n)) = (rename g) ((map f) (p * X n))",
" (rename g) (eval₂ C (X ∘ f) p) = (rename (g ∘ f)) p",
" (eva... |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {α : Type*}
namespace List
inductive Duplicate (x : α) : List α → Prop
| cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
| cons_duplicate {y : α} {l ... | Mathlib/Data/List/Duplicate.lean | 117 | 126 | theorem duplicate_iff_sublist : x ∈+ l ↔ [x, x] <+ l := by |
induction' l with y l IH
· simp
· by_cases hx : x = y
· simp [hx, cons_sublist_cons, singleton_sublist]
· rw [duplicate_cons_iff_of_ne hx, IH]
refine ⟨sublist_cons_of_sublist y, fun h => ?_⟩
cases h
· assumption
· contradiction
| [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l",
" x ∈+ y :: l ↔ x ∈+ l",
" x ∈+ l'",
" x ∈+ []",
" x ∈+ y ... | [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l",
" x ∈+ y :: l ↔ x ∈+ l",
" x ∈+ l'",
" x ∈+ []",
" x ∈+ y ... |
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Order.Filter.Cofinite
#align_import number_theory.fermat_psp from "leanprover-community/mathlib"@"c0439b4877c24a117bfdd9e32faf62eee9b115eb"
namespace Nat
def ProbablePrime (n b : ℕ) : Prop :=
n ∣ b ^ (n - 1) - 1
#align fermat_psp.probable_prime Nat.Probabl... | Mathlib/NumberTheory/FermatPsp.lean | 127 | 130 | theorem fermatPsp_base_one {n : ℕ} (h₁ : 1 < n) (h₂ : ¬n.Prime) : FermatPsp n 1 := by |
refine ⟨show n ∣ 1 ^ (n - 1) - 1 from ?_, h₂, h₁⟩
exact show 0 = 1 ^ (n - 1) - 1 by
set_option tactic.skipAssignedInstances false in norm_num ▸ dvd_zero n
| [
" n.Coprime b",
" ∀ (k : ℕ), k.Prime → k ∣ n → ¬k ∣ b",
" False",
" k ∣ 1",
" k ∣ (k * j) ^ (k * m - 1)",
" k * m - 1 ≠ 0",
" n = 1",
" Coprime 1 b",
" n.ProbablePrime b ↔ b ^ (n - 1) ≡ 1 [MOD n]",
" n.ProbablePrime b ↔ 1 ≡ b ^ (n - 1) [MOD n]",
" n.ProbablePrime b → 1 ≡ b ^ (n - 1) [MOD n]",
... | [
" n.Coprime b",
" ∀ (k : ℕ), k.Prime → k ∣ n → ¬k ∣ b",
" False",
" k ∣ 1",
" k ∣ (k * j) ^ (k * m - 1)",
" k * m - 1 ≠ 0",
" n = 1",
" Coprime 1 b",
" n.ProbablePrime b ↔ b ^ (n - 1) ≡ 1 [MOD n]",
" n.ProbablePrime b ↔ 1 ≡ b ^ (n - 1) [MOD n]",
" n.ProbablePrime b → 1 ≡ b ^ (n - 1) [MOD n]",
... |
import Mathlib.Data.Set.Pairwise.Basic
import Mathlib.Data.Set.Lattice
import Mathlib.Order.SuccPred.Basic
#align_import order.succ_pred.interval_succ from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open Set Order
variable {α β : Type*} [LinearOrder α]
namespace Monotone
| Mathlib/Order/SuccPred/IntervalSucc.lean | 38 | 48 | theorem biUnion_Ico_Ioc_map_succ [SuccOrder α] [IsSuccArchimedean α] [LinearOrder β] {f : α → β}
(hf : Monotone f) (m n : α) : ⋃ i ∈ Ico m n, Ioc (f i) (f (succ i)) = Ioc (f m) (f n) := by |
rcases le_total n m with hnm | hmn
· rw [Ico_eq_empty_of_le hnm, Ioc_eq_empty_of_le (hf hnm), biUnion_empty]
· refine Succ.rec ?_ ?_ hmn
· simp only [Ioc_self, Ico_self, biUnion_empty]
· intro k hmk ihk
rw [← Ioc_union_Ioc_eq_Ioc (hf hmk) (hf <| le_succ _), union_comm, ← ihk]
by_cases hk : Is... | [
" ⋃ i ∈ Ico m n, Ioc (f i) (f (succ i)) = Ioc (f m) (f n)",
" ⋃ i ∈ Ico m m, Ioc (f i) (f (succ i)) = Ioc (f m) (f m)",
" ∀ (n : α),\n m ≤ n →\n ⋃ i ∈ Ico m n, Ioc (f i) (f (succ i)) = Ioc (f m) (f n) →\n ⋃ i ∈ Ico m (succ n), Ioc (f i) (f (succ i)) = Ioc (f m) (f (succ n))",
" ⋃ i ∈ Ico m (suc... | [] |
import Mathlib.Order.BooleanAlgebra
import Mathlib.Logic.Equiv.Basic
#align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904"
open Function OrderDual
variable {ι α β : Type*} {π : ι → Type*}
def symmDiff [Sup α] [SDiff α] (a b : α) : α :=
a \ b ⊔ b \ a
#ali... | Mathlib/Order/SymmDiff.lean | 141 | 142 | theorem symmDiff_of_ge {a b : α} (h : b ≤ a) : a ∆ b = a \ b := by |
rw [symmDiff, sdiff_eq_bot_iff.2 h, sup_bot_eq]
| [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a",
" ⊥ ∆ a = a",
" a ∆ b = ⊥ ↔ a = b",
" a ∆ b = b \\ a",
" a ∆ b = a \\ b"
] | [
" ∀ (p q : Bool), p ∆ q = xor p q",
" a ∆ b = b ∆ a",
" a ∆ a = ⊥",
" a ∆ ⊥ = a",
" ⊥ ∆ a = a",
" a ∆ b = ⊥ ↔ a = b",
" a ∆ b = b \\ a"
] |
import Mathlib.Order.ConditionallyCompleteLattice.Finset
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.lattice from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54"
assert_not_exists MonoidWithZero
open Set
namespace Nat
open scoped Classical
noncomputable instance : ... | Mathlib/Data/Nat/Lattice.lean | 91 | 98 | theorem nonempty_of_pos_sInf {s : Set ℕ} (h : 0 < sInf s) : s.Nonempty := by |
by_contra contra
rw [Set.not_nonempty_iff_eq_empty] at contra
have h' : sInf s ≠ 0 := ne_of_gt h
apply h'
rw [Nat.sInf_eq_zero]
right
assumption
| [
" sInf s = 0 ↔ 0 ∈ s ∨ s = ∅",
" sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅",
" sInf ∅ = 0",
" 0 ∈ ∅ ∨ ∅ = ∅",
" ∅ = ∅",
" iInf f = 0",
" ⨅ i, 0 = 0",
" (0 ∈ range fun i => 0) ∨ (range fun i => 0) = ∅",
" sInf s ∈ s",
" Nat.find h ∈ s",
" m ∉ s",
" m ∉ ∅",
" sInf s ≤ m",
" Nat.find ⋯ ≤ m",
" s.Nonempty"... | [
" sInf s = 0 ↔ 0 ∈ s ∨ s = ∅",
" sInf ∅ = 0 ↔ 0 ∈ ∅ ∨ ∅ = ∅",
" sInf ∅ = 0",
" 0 ∈ ∅ ∨ ∅ = ∅",
" ∅ = ∅",
" iInf f = 0",
" ⨅ i, 0 = 0",
" (0 ∈ range fun i => 0) ∨ (range fun i => 0) = ∅",
" sInf s ∈ s",
" Nat.find h ∈ s",
" m ∉ s",
" m ∉ ∅",
" sInf s ≤ m",
" Nat.find ⋯ ≤ m"
] |
import Mathlib.Analysis.Convex.Basic
import Mathlib.Order.Closure
#align_import analysis.convex.hull from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set
open Pointwise
variable {𝕜 E F : Type*}
section convexHull
section OrderedSemiring
variable [OrderedSemiring 𝕜]
secti... | Mathlib/Analysis/Convex/Hull.lean | 144 | 158 | theorem Convex.convex_remove_iff_not_mem_convexHull_remove {s : Set E} (hs : Convex 𝕜 s) (x : E) :
Convex 𝕜 (s \ {x}) ↔ x ∉ convexHull 𝕜 (s \ {x}) := by |
constructor
· rintro hsx hx
rw [hsx.convexHull_eq] at hx
exact hx.2 (mem_singleton _)
rintro hx
suffices h : s \ {x} = convexHull 𝕜 (s \ {x}) by
rw [h]
exact convex_convexHull 𝕜 _
exact
Subset.antisymm (subset_convexHull 𝕜 _) fun y hy =>
⟨convexHull_min diff_subset hs hy, by
... | [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅",
... | [
" (convexHull 𝕜) s = ⋂ t, ⋂ (_ : s ⊆ t), ⋂ (_ : Convex 𝕜 t), t",
" x ∈ (convexHull 𝕜) s ↔ ∀ (t : Set E), s ⊆ t → Convex 𝕜 t → x ∈ t",
" (convexHull 𝕜) s = ∅ ↔ s = ∅",
" (convexHull 𝕜) s = ∅ → s = ∅",
" s = ∅",
" s ⊆ (convexHull 𝕜) s",
" s = ∅ → (convexHull 𝕜) s = ∅",
" (convexHull 𝕜) ∅ = ∅",
... |
import Mathlib.Analysis.NormedSpace.IndicatorFunction
import Mathlib.MeasureTheory.Function.EssSup
import Mathlib.MeasureTheory.Function.AEEqFun
import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic
#align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27... | Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean | 87 | 88 | theorem snorm_eq_snorm' (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) {f : α → F} :
snorm f p μ = snorm' f (ENNReal.toReal p) μ := by | simp [snorm, hp_ne_zero, hp_ne_top]
| [
" snorm f p μ = snorm' f p.toReal μ"
] | [] |
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.Ring
#align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
open Finset
namespace Nat
variable (p : ℕ → Prop)
section Count
variable [DecidablePred p]
def count (n : ℕ) : ℕ :=
(List.range n).... | Mathlib/Data/Nat/Count.lean | 38 | 39 | theorem count_zero : count p 0 = 0 := by |
rw [count, List.range_zero, List.countP, List.countP.go]
| [
" count p 0 = 0"
] | [] |
import Mathlib.Algebra.Lie.Submodule
#align_import algebra.lie.ideal_operations from "leanprover-community/mathlib"@"8983bec7cdf6cb2dd1f21315c8a34ab00d7b2f6d"
universe u v w w₁ w₂
namespace LieSubmodule
variable {R : Type u} {L : Type v} {M : Type w} {M₂ : Type w₁}
variable [CommRing R] [LieRing L] [LieAlgebra ... | Mathlib/Algebra/Lie/IdealOperations.lean | 119 | 121 | theorem lie_le_right : ⁅I, N⁆ ≤ N := by |
rw [lieIdeal_oper_eq_span, lieSpan_le]; rintro m ⟨x, n, hn⟩; rw [← hn]
exact N.lie_mem n.property
| [
" ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s",
" ⁅y, m'⁆ ∈ Submodule.span R s",
" ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x",
" ⁅y, m''⁆ ∈ Submodule.span R s"... | [
" ↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ↑⁅I, N⁆ ≤ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}",
" ∀ (y : L), ∀ m' ∈ Submodule.span R s, ⁅y, m'⁆ ∈ Submodule.span R s",
" ⁅y, m'⁆ ∈ Submodule.span R s",
" ∀ x ∈ s, (fun m' => ⁅y, m'⁆ ∈ Submodule.span R s) x",
" ⁅y, m''⁆ ∈ Submodule.span R s"... |
import Mathlib.Algebra.Ring.Prod
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Tactic.FinCases
#align_import data.zmod.basic from "leanprover-community/mathlib"@"74ad1c88c77e799d2fea62801d1dbbd698cff1b7"
assert_not_exists Submodule
open Function
namespace ZMod
instance charZero : CharZero (ZMod 0) :=... | Mathlib/Data/ZMod/Basic.lean | 151 | 152 | theorem natCast_self' (n : ℕ) : (n + 1 : ZMod (n + 1)) = 0 := by |
rw [← Nat.cast_add_one, natCast_self (n + 1)]
| [
" a.val < n",
" a.val < 0",
" a.val < n✝ + 1",
" (↑a).val = a % n",
" (↑a).val = a % 0",
" (↑a).val = a",
" (↑a).val = a % (n✝ + 1)",
" IsUnit n ↔ n.val = 1",
" IsUnit n ↔ Int.natAbs n = 1",
" n = 1",
" ∀ (x : ℕ), ↑x = 0 ↔ n ∣ x",
" ↑k = 0 ↔ n ∣ k",
" ↑k = 0 ↔ 0 ∣ k",
" ↑k = 0 ↔ n + 1 ∣ k"... | [
" a.val < n",
" a.val < 0",
" a.val < n✝ + 1",
" (↑a).val = a % n",
" (↑a).val = a % 0",
" (↑a).val = a",
" (↑a).val = a % (n✝ + 1)",
" IsUnit n ↔ n.val = 1",
" IsUnit n ↔ Int.natAbs n = 1",
" n = 1",
" ∀ (x : ℕ), ↑x = 0 ↔ n ∣ x",
" ↑k = 0 ↔ n ∣ k",
" ↑k = 0 ↔ 0 ∣ k",
" ↑k = 0 ↔ n + 1 ∣ k"... |
import Mathlib.Data.Countable.Basic
import Mathlib.Logic.Encodable.Basic
import Mathlib.Order.SuccPred.Basic
import Mathlib.Order.Interval.Finset.Defs
#align_import order.succ_pred.linear_locally_finite from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
open Order
variable {ι : Type*}... | Mathlib/Order/SuccPred/LinearLocallyFinite.lean | 77 | 84 | theorem isGLB_Ioc_of_isGLB_Ioi {i j k : ι} (hij_lt : i < j) (h : IsGLB (Set.Ioi i) k) :
IsGLB (Set.Ioc i j) k := by |
simp_rw [IsGLB, IsGreatest, mem_upperBounds, mem_lowerBounds] at h ⊢
refine ⟨fun x hx ↦ h.1 x hx.1, fun x hx ↦ h.2 x ?_⟩
intro y hy
rcases le_or_lt y j with h_le | h_lt
· exact hx y ⟨hy, h_le⟩
· exact le_trans (hx j ⟨hij_lt, le_rfl⟩) h_lt.le
| [
" i ≤ succFn i",
" ∀ x ∈ Set.Ioi i, i ≤ x",
" IsGLB (Set.Ioc i j) k",
" (∀ x ∈ Set.Ioc i j, k ≤ x) ∧ ∀ (x : ι), (∀ x_1 ∈ Set.Ioc i j, x ≤ x_1) → x ≤ k",
" ∀ x_1 ∈ Set.Ioi i, x ≤ x_1",
" x ≤ y"
] | [
" i ≤ succFn i",
" ∀ x ∈ Set.Ioi i, i ≤ x"
] |
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Integral.CircleIntegral
#align_import measure_theory.integral.torus_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
variable {n : ℕ}
variable {E : Type*} [NormedAddCommGroup E]
noncomputa... | Mathlib/MeasureTheory/Integral/TorusIntegral.lean | 84 | 85 | theorem torusMap_sub_center (c : ℂⁿ) (R : ℝⁿ) (θ : ℝⁿ) : torusMap c R θ - c = torusMap 0 R θ := by |
ext1 i; simp [torusMap]
| [
" torusMap c R θ - c = torusMap 0 R θ",
" (torusMap c R θ - c) i = torusMap 0 R θ i"
] | [] |
import Mathlib.FieldTheory.Finite.Basic
#align_import number_theory.wilson from "leanprover-community/mathlib"@"c471da714c044131b90c133701e51b877c246677"
open Finset Nat FiniteField ZMod
open scoped Nat
namespace ZMod
variable (p : ℕ) [Fact p.Prime]
@[simp]
| Mathlib/NumberTheory/Wilson.lean | 40 | 69 | theorem wilsons_lemma : ((p - 1)! : ZMod p) = -1 := by |
refine
calc
((p - 1)! : ZMod p) = ∏ x ∈ Ico 1 (succ (p - 1)), (x : ZMod p) := by
rw [← Finset.prod_Ico_id_eq_factorial, prod_natCast]
_ = ∏ x : (ZMod p)ˣ, (x : ZMod p) := ?_
_ = -1 := by
-- Porting note: `simp` is less powerful.
-- simp_rw [← Units.coeHom_apply, ← (Units... | [
" ↑(p - 1)! = -1",
" ↑(p - 1)! = ∏ x ∈ Ico 1 (p - 1).succ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = -1",
" ∏ x : (ZMod p)ˣ, (Units.coeHom (ZMod p)) x = -1",
" (Units.coeHom (ZMod p)) (∏ x : (ZMod p)ˣ, x) = -1",
" ∏ x ∈ Ico 1 (p - 1).succ, ↑x = ∏ x : (ZMod p)ˣ, ↑x",
" ∏ x : (ZMod p)ˣ, ↑x = ∏ x ∈ Ico 1 (p - 1).succ, ... | [] |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.Order.Fin
import Mathlib.Order.PiLex
import Mathlib.Order.Interval.Set.Basic
#align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b"
assert_not_exists MonoidWithZero
un... | Mathlib/Data/Fin/Tuple/Basic.lean | 162 | 165 | theorem consCases_cons {P : (∀ i : Fin n.succ, α i) → Sort v} (h : ∀ x₀ x, P (Fin.cons x₀ x))
(x₀ : α 0) (x : ∀ i : Fin n, α i.succ) : @consCases _ _ _ h (cons x₀ x) = h x₀ x := by |
rw [consCases, cast_eq]
congr
| [
" Unique ((i : Fin 0) → α i)",
" tail (cons x p) = p",
" cons x p i.succ = p i",
" cons x p 0 = x",
" cons x p 1 = p 0",
" cons x p 1 = cons x p (succ 0)",
" cons x (update p i y) = update (cons x p) i.succ y",
" cons x (update p i y) j = update (cons x p) i.succ y j",
" cons x (update p i y) 0 = up... | [
" Unique ((i : Fin 0) → α i)",
" tail (cons x p) = p",
" cons x p i.succ = p i",
" cons x p 0 = x",
" cons x p 1 = p 0",
" cons x p 1 = cons x p (succ 0)",
" cons x (update p i y) = update (cons x p) i.succ y",
" cons x (update p i y) j = update (cons x p) i.succ y j",
" cons x (update p i y) 0 = up... |
import Mathlib.ModelTheory.Satisfiability
import Mathlib.Combinatorics.SimpleGraph.Basic
#align_import model_theory.graph from "leanprover-community/mathlib"@"e56b8fea84d60fe434632b9d3b829ee685fb0c8f"
set_option linter.uppercaseLean3 false
universe u v w w'
namespace FirstOrder
namespace Language
open FirstOr... | Mathlib/ModelTheory/Graph.lean | 75 | 79 | theorem Theory.simpleGraph_model_iff [Language.graph.Structure V] :
V ⊨ Theory.simpleGraph ↔
(Irreflexive fun x y : V => RelMap adj ![x, y]) ∧
Symmetric fun x y : V => RelMap adj ![x, y] := by |
simp [Theory.simpleGraph]
| [
" V ⊨ Theory.simpleGraph ↔ (Irreflexive fun x y => RelMap adj ![x, y]) ∧ Symmetric fun x y => RelMap adj ![x, y]"
] | [] |
import Mathlib.Algebra.Polynomial.Inductions
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.Ideal.Maps
#align_import data.polynomial.div from "leanprover-community/mathlib"@"e1e7190efdcefc925cb36f257a8362ef22944204"
noncomputable section
open Polynomial
... | Mathlib/Algebra/Polynomial/Div.lean | 186 | 192 | theorem zero_divByMonic (p : R[X]) : 0 /ₘ p = 0 := by |
classical
unfold divByMonic divModByMonicAux
dsimp
by_cases hp : Monic p
· rw [dif_pos hp, if_neg (mt And.right (not_not_intro rfl))]
· rw [dif_neg hp]
| [
" ↑q.natDegree ≤ ↑p.natDegree",
" p.leadingCoeff ≠ 0 → q ≠ 0 → PartialOrder (WithBot ℕ)",
" p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree",
" p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff",
" (p %ₘ q).degree < q.degree",
" (if hq : ... | [
" ↑q.natDegree ≤ ↑p.natDegree",
" p.leadingCoeff ≠ 0 → q ≠ 0 → PartialOrder (WithBot ℕ)",
" p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree",
" p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff",
" (p %ₘ q).degree < q.degree",
" (if hq : ... |
import Mathlib.Data.List.Nodup
#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open List Function
universe u v
variable {ι : Type u} {α : ι → Type v} {i j : ι} {l : List ι} {f : ∀ i, α i}
namespace List
variable (α)
abbrev TProd (l : List ι) : Type v... | Mathlib/Data/Prod/TProd.lean | 99 | 103 | theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by |
apply elim_of_ne
rintro rfl
exact hl.not_mem hj
| [
" α j",
" v.elim ⋯ = v.1",
" v.elim hj = TProd.elim v.2 ⋯",
" v.elim ⋯ = TProd.elim v.2 hj",
" j ≠ i",
" False"
] | [
" α j",
" v.elim ⋯ = v.1",
" v.elim hj = TProd.elim v.2 ⋯"
] |
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 | 56 | 59 | theorem _root_.isRoot_of_unity_iff (h : 0 < n) (R : Type*) [CommRing R] [IsDomain R] {ζ : R} :
ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ := by |
rw [← mem_nthRoots h, nthRoots, mem_roots <| X_pow_sub_C_ne_zero h _, C_1, ←
prod_cyclotomic_eq_X_pow_sub_one h, isRoot_prod]
| [
" ζ ^ 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 ζ"
] | [
" ζ ^ 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"
] |
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Data.SetLike.Fintype
import Mathlib.GroupTheory.GroupAction.ConjAct
import Mathlib.GroupTheory.PGroup
import Mathlib.GroupTheory.NoncommPiCoprod
import Mathlib.Order.Atoms.Finite
import Mathlib.Data.Set.Lattice
#align_import group_theory.sylow from "leanprove... | Mathlib/GroupTheory/Sylow.lean | 493 | 495 | theorem QuotientGroup.card_preimage_mk [Fintype G] (s : Subgroup G) (t : Set (G ⧸ s)) :
Fintype.card (QuotientGroup.mk ⁻¹' t) = Fintype.card s * Fintype.card t := by |
rw [← Fintype.card_prod, Fintype.card_congr (preimageMkEquivSubgroupProdSet _ _)]
| [
" Fintype.card ↑(mk ⁻¹' t) = Fintype.card ↥s * Fintype.card ↑t"
] | [] |
import Mathlib.MeasureTheory.OuterMeasure.OfFunction
import Mathlib.MeasureTheory.PiSystem
#align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set Function Filter
open scoped Classical NNReal Topology ENNReal
... | Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean | 97 | 100 | theorem isCaratheodory_inter (h₁ : IsCaratheodory m s₁) (h₂ : IsCaratheodory m s₂) :
IsCaratheodory m (s₁ ∩ s₂) := by |
rw [← isCaratheodory_compl_iff, Set.compl_inter]
exact isCaratheodory_union _ (isCaratheodory_compl _ h₁) (isCaratheodory_compl _ h₂)
| [
" m.IsCaratheodory ∅",
" m.IsCaratheodory s₁ → m.IsCaratheodory s₁ᶜ",
" m.IsCaratheodory s",
" m t = m (t ∩ (s₁ ∪ s₂)) + m (t \\ (s₁ ∪ s₂))",
" m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + (m (t \\ s₁ ∩ s₂) + m ((t \\ s₁) \\ s₂)) =\n m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + m (t ∩ (s₂ \\ s₁)) + m (t \\ (s₁ ∪ s₂)... | [
" m.IsCaratheodory ∅",
" m.IsCaratheodory s₁ → m.IsCaratheodory s₁ᶜ",
" m.IsCaratheodory s",
" m t = m (t ∩ (s₁ ∪ s₂)) + m (t \\ (s₁ ∪ s₂))",
" m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + (m (t \\ s₁ ∩ s₂) + m ((t \\ s₁) \\ s₂)) =\n m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \\ s₂) + m (t ∩ (s₂ \\ s₁)) + m (t \\ (s₁ ∪ s₂)... |
import Mathlib.Analysis.Calculus.FDeriv.Bilinear
#align_import analysis.calculus.fderiv.mul from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
open scoped Classical
open Filter Asymptotics ContinuousLinearMap Set Metric Topology NNReal ENNReal
noncomputable section
section
variable ... | Mathlib/Analysis/Calculus/FDeriv/Mul.lean | 319 | 321 | theorem HasFDerivAt.smul_const (hc : HasFDerivAt c c' x) (f : F) :
HasFDerivAt (fun y => c y • f) (c'.smulRight f) x := by |
simpa only [smul_zero, zero_add] using hc.smul (hasFDerivAt_const f x)
| [
" HasStrictFDerivAt (fun y => c y • f) (c'.smulRight f) x",
" HasFDerivWithinAt (fun y => c y • f) (c'.smulRight f) s x",
" HasFDerivAt (fun y => c y • f) (c'.smulRight f) x"
] | [
" HasStrictFDerivAt (fun y => c y • f) (c'.smulRight f) x",
" HasFDerivWithinAt (fun y => c y • f) (c'.smulRight f) s x"
] |
import Mathlib.Data.List.Basic
#align_import data.list.infix from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2"
open Nat
variable {α β : Type*}
namespace List
variable {l l₁ l₂ l₃ : List α} {a b : α} {m n : ℕ}
section Fix
#align list.prefix_append List.prefix_append
#align list.... | Mathlib/Data/List/Infix.lean | 70 | 70 | theorem prefix_concat (a : α) (l) : l <+: concat l a := by | simp
| [
" l <+: l.concat a"
] | [] |
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.Dual
#align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2... | Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean | 144 | 146 | theorem contractLeft_algebraMap_mul (r : R) (b : CliffordAlgebra Q) :
d⌋(algebraMap _ _ r * b) = algebraMap _ _ r * (d⌋b) := by |
rw [← Algebra.smul_def, map_smul, Algebra.smul_def]
| [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... | [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... |
import Mathlib.Analysis.Convex.Between
import Mathlib.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.NormedSpace.AddTorsor
#align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052... | Mathlib/Analysis/Convex/Normed.lean | 75 | 80 | theorem Convex.cthickening (hs : Convex ℝ s) (δ : ℝ) : Convex ℝ (cthickening δ s) := by |
obtain hδ | hδ := le_total 0 δ
· rw [cthickening_eq_iInter_thickening hδ]
exact convex_iInter₂ fun _ _ => hs.thickening _
· rw [cthickening_of_nonpos hδ]
exact hs.closure
| [
" ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖",
" ConvexOn ℝ s fun z' => dist z' z",
" Convex ℝ (ball a r)",
" Convex ℝ (closedBall a r)",
" Convex ℝ (Metric.thickening δ s)",
" Convex ℝ (s + ball 0 δ)",
" Convex ℝ (Metric.cthickening δ s)",
" Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)",
" Conve... | [
" ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖",
" ConvexOn ℝ s fun z' => dist z' z",
" Convex ℝ (ball a r)",
" Convex ℝ (closedBall a r)",
" Convex ℝ (Metric.thickening δ s)",
" Convex ℝ (s + ball 0 δ)"
] |
import Mathlib.MeasureTheory.Integral.Bochner
import Mathlib.MeasureTheory.Group.Measure
#align_import measure_theory.group.integration from "leanprover-community/mathlib"@"ec247d43814751ffceb33b758e8820df2372bf6f"
namespace MeasureTheory
open Measure TopologicalSpace
open scoped ENNReal
variable {𝕜 M α G E F ... | Mathlib/MeasureTheory/Group/Integral.lean | 103 | 105 | theorem integral_eq_zero_of_mul_right_eq_neg [IsMulRightInvariant μ] (hf' : ∀ x, f (x * g) = -f x) :
∫ x, f x ∂μ = 0 := by |
simp_rw [← self_eq_neg ℝ E, ← integral_neg, ← hf', integral_mul_right_eq_self]
| [
" ∫ (x : G), f (g * x) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x * g) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x / g) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x * g⁻¹) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f x ∂μ = 0"
] | [
" ∫ (x : G), f (g * x) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x * g) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x / g) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f (x * g⁻¹) ∂μ = ∫ (x : G), f x ∂μ",
" ∫ (x : G), f x ∂μ = 0"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.GeomSum
import Mathlib.Data.Fintype.BigOperators
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.Tactic.FieldSimp
#align_import number_theory.bernoulli from "leanprover-community/mat... | Mathlib/NumberTheory/Bernoulli.lean | 110 | 112 | theorem bernoulli'_one : bernoulli' 1 = 1 / 2 := by |
rw [bernoulli'_def]
norm_num
| [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k",
" ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1",
" ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0",
" ↑(n.choose x) / (↑n - ↑... | [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k",
" ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1",
" ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0",
" ↑(n.choose x) / (↑n - ↑... |
import Mathlib.Order.Filter.Bases
#align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451"
open Set Function
open scoped Classical
open Filter
namespace Filter
variable {ι : Type*} {α : ι → Type*} {f f₁ f₂ : (i : ι) → Filter (α i)} {s : (i : ι) → Set (α i)}
... | Mathlib/Order/Filter/Pi.lean | 254 | 255 | theorem coprodᵢ_eq_bot_iff [∀ i, Nonempty (α i)] : Filter.coprodᵢ f = ⊥ ↔ f = ⊥ := by |
simpa [funext_iff] using coprodᵢ_neBot_iff.not
| [
" s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s",
" sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i",
" (Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot",
" (Filter.coprodᵢ f).NeBot ↔ ∃ d, (f d).NeBot",
" Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥"... | [
" s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s",
" sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i",
" (Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot",
" (Filter.coprodᵢ f).NeBot ↔ ∃ d, (f d).NeBot",
" Filter.coprodᵢ f = ⊥ ↔ (∃ i, IsEmpty (α i)) ∨ f = ⊥"... |
import Mathlib.RingTheory.DedekindDomain.Dvr
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.dedekind_domain.pid from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
variable {R : Type*} [CommRing R]
open Ideal
open UniqueFactorizationMonoid
open scoped nonZer... | Mathlib/RingTheory/DedekindDomain/PID.lean | 38 | 74 | theorem Ideal.eq_span_singleton_of_mem_of_not_mem_sq_of_not_mem_prime_ne {P : Ideal R}
(hP : P.IsPrime) [IsDedekindDomain R] {x : R} (x_mem : x ∈ P) (hxP2 : x ∉ P ^ 2)
(hxQ : ∀ Q : Ideal R, IsPrime Q → Q ≠ P → x ∉ Q) : P = Ideal.span {x} := by |
letI := Classical.decEq (Ideal R)
have hx0 : x ≠ 0 := by
rintro rfl
exact hxP2 (zero_mem _)
by_cases hP0 : P = ⊥
· subst hP0
-- Porting note: was `simpa using hxP2` but that hypothesis didn't even seem relevant in Lean 3
rwa [eq_comm, span_singleton_eq_bot, ← mem_bot]
have hspan0 : span ({x} ... | [
" P = span {x}",
" x ≠ 0",
" False",
" ⊥ = span {x}",
" P ∣ span {x}",
" normalizedFactors (span {x}) ≤ normalizedFactors P",
" ∀ (a : Ideal R), Multiset.count a (normalizedFactors (span {x})) ≤ if a = P then 1 else 0",
" Multiset.count Q (normalizedFactors (span {x})) ≤ if Q = P then 1 else 0",
" M... | [] |
import Mathlib.CategoryTheory.Opposites
#align_import category_theory.eq_to_hom from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe v₁ v₂ v₃ u₁ u₂ u₃
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Opposite
variable ... | Mathlib/CategoryTheory/EqToHom.lean | 116 | 119 | theorem congrArg_mpr_hom_left {X Y Z : C} (p : X = Y) (q : Y ⟶ Z) :
(congrArg (fun W : C => W ⟶ Z) p).mpr q = eqToHom p ≫ q := by |
cases p
simp
| [
" X ⟶ Y",
" Y ⟶ Y",
" eqToHom p ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯",
" f = (f ≫ eqToHom p) ≫ eqToHom ⋯",
" f ≫ eqToHom p = g",
" g = eqToHom ⋯ ≫ eqToHom p ≫ g",
" eqToHom p ≫ eqToHom ⋯ ≫ f = f",
" g j = g j'",
" f j = f j'",
" z ... | [
" X ⟶ Y",
" Y ⟶ Y",
" eqToHom p ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯",
" f = (f ≫ eqToHom p) ≫ eqToHom ⋯",
" f ≫ eqToHom p = g",
" g = eqToHom ⋯ ≫ eqToHom p ≫ g",
" eqToHom p ≫ eqToHom ⋯ ≫ f = f",
" g j = g j'",
" f j = f j'",
" z ... |
import Mathlib.CategoryTheory.Category.Grpd
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Homotopy.Path
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473... | Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean | 189 | 197 | theorem continuous_transAssocReparamAux : Continuous transAssocReparamAux := by |
refine continuous_if_le ?_ ?_ (Continuous.continuousOn ?_)
(continuous_if_le ?_ ?_
(Continuous.continuousOn ?_) (Continuous.continuousOn ?_) ?_).continuousOn
?_ <;>
[continuity; continuity; continuity; continuity; continuity; continuity; continuity; skip;
skip] <;>
· intro x hx
se... | [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... | [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... |
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.Algebra.Module.Torsion
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Filtration
import Mathlib.RingTheory.Nakayama
#align_import ring_theory.ideal.cota... | Mathlib/RingTheory/Ideal/Cotangent.lean | 132 | 136 | theorem to_quotient_square_range :
LinearMap.range I.cotangentToQuotientSquare = I.cotangentIdeal.restrictScalars R := by |
trans LinearMap.range (I.cotangentToQuotientSquare.comp I.toCotangent)
· rw [LinearMap.range_comp, I.toCotangent_range, Submodule.map_top]
· rw [to_quotient_square_comp_toCotangent, LinearMap.range_comp, I.range_subtype]; ext; rfl
| [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ... | [
" AddCommGroup I.Cotangent",
" AddCommGroup (↥I ⧸ I • ⊤)",
" Module (R ⧸ I) I.Cotangent",
" Module (R ⧸ I) (↥I ⧸ I • ⊤)",
" Submodule.map (Submodule.subtype I) (LinearMap.ker I.toCotangent) = I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ I ^ 2",
" x ∈ LinearMap.ker I.toCotangent ↔ ↑x ∈ Submodule.map ... |
import Mathlib.Algebra.BigOperators.Group.Finset
#align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab"
namespace Nat
variable {ι : Type*}
theorem coprime_list_prod_left_iff {l : List ℕ} {k : ℕ} :
Coprime l.prod k ↔ ∀ n ∈ l, Coprime n k := by
... | Mathlib/Data/Nat/GCD/BigOperators.lean | 32 | 34 | theorem coprime_multiset_prod_right_iff {k : ℕ} {m : Multiset ℕ} :
Coprime k m.prod ↔ ∀ n ∈ m, Coprime k n := by |
induction m using Quotient.inductionOn; simpa using coprime_list_prod_right_iff
| [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... | [
" l.prod.Coprime k ↔ ∀ n ∈ l, n.Coprime k",
" [].prod.Coprime k ↔ ∀ n ∈ [], n.Coprime k",
" (head✝ :: tail✝).prod.Coprime k ↔ ∀ n ∈ head✝ :: tail✝, n.Coprime k",
" k.Coprime l.prod ↔ ∀ n ∈ l, k.Coprime n",
" m.prod.Coprime k ↔ ∀ n ∈ m, n.Coprime k",
" (Multiset.prod ⟦a✝⟧).Coprime k ↔ ∀ n ∈ ⟦a✝⟧, n.Coprime... |
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Fintype.BigOperators
#align_import data.sign from "leanprover-community/mathlib"@"2445c98ae4b87eabebdde552593519b9b6dc350c"
-- Porting note (#11081): cannot automatically derive Fintype, adde... | Mathlib/Data/Sign.lean | 174 | 174 | theorem nonpos_iff_ne_one {a : SignType} : a ≤ 0 ↔ a ≠ 1 := by | cases a <;> decide
| [
" x ∈ ↑[zero, neg, pos]",
" zero ∈ ↑[zero, neg, pos]",
" neg ∈ ↑[zero, neg, pos]",
" pos ∈ ↑[zero, neg, pos]",
" Decidable (a.LE b)",
" Decidable (SignType.zero.LE b)",
" Decidable (neg.LE b)",
" Decidable (pos.LE b)",
" Decidable (SignType.zero.LE SignType.zero)",
" SignType.zero.LE SignType.zero... | [
" x ∈ ↑[zero, neg, pos]",
" zero ∈ ↑[zero, neg, pos]",
" neg ∈ ↑[zero, neg, pos]",
" pos ∈ ↑[zero, neg, pos]",
" Decidable (a.LE b)",
" Decidable (SignType.zero.LE b)",
" Decidable (neg.LE b)",
" Decidable (pos.LE b)",
" Decidable (SignType.zero.LE SignType.zero)",
" SignType.zero.LE SignType.zero... |
import Mathlib.Algebra.MvPolynomial.Counit
import Mathlib.Algebra.MvPolynomial.Invertible
import Mathlib.RingTheory.WittVector.Defs
#align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a"
noncomputable section
open MvPolynomial Function
variable... | Mathlib/RingTheory/WittVector/Basic.lean | 111 | 111 | theorem sub : mapFun f (x - y) = mapFun f x - mapFun f y := by | map_fun_tac
| [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0",
" mapFun (⇑f) 1 = 1",
" mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y",
" mapFun ... | [
" Injective (mapFun f)",
" a₁✝ = a₂✝",
" a₁✝.coeff p = a₂✝.coeff p",
" mapFun f (mk p fun n => Classical.choose ⋯) = x",
" (mapFun f (mk p fun n => Classical.choose ⋯)).coeff n = x.coeff n",
" mapFun (⇑f) 0 = 0",
" mapFun (⇑f) 1 = 1",
" mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y"
] |
import Mathlib.Algebra.Homology.ComplexShape
import Mathlib.CategoryTheory.Subobject.Limits
import Mathlib.CategoryTheory.GradedObject
import Mathlib.Algebra.Homology.ShortComplex.Basic
#align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347"
... | Mathlib/Algebra/Homology/HomologicalComplex.lean | 316 | 321 | theorem isZero_zero [HasZeroObject V] : IsZero (zero : HomologicalComplex V c) := by |
refine ⟨fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩⟩
all_goals
ext
dsimp [zero]
apply Subsingleton.elim
| [
" f.f i ≫ B.d i j = A.d i j ≫ f.f j",
" f = g",
" f.f = g.f",
" f.f x✝ = g.f x✝",
" (eqToHom h).f n = eqToHom ⋯",
" (eqToHom ⋯).f n = eqToHom ⋯",
" Function.Injective fun f => f.f",
" IsZero zero",
" f = default",
" f.f i✝ = default.f i✝",
" f.f i✝ = 0"
] | [
" f.f i ≫ B.d i j = A.d i j ≫ f.f j",
" f = g",
" f.f = g.f",
" f.f x✝ = g.f x✝",
" (eqToHom h).f n = eqToHom ⋯",
" (eqToHom ⋯).f n = eqToHom ⋯",
" Function.Injective fun f => f.f"
] |
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open MeasureTheory NNReal ENNReal Topology
namespace MeasureTheory
open Set Filt... | Mathlib/MeasureTheory/Function/Egorov.lean | 59 | 70 | theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
(hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by |
simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
rw [← nonpos_iff_eq_zero, ← hfg]
refine measure_mono fun x => ?_
simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
push_neg
rintro ⟨hmem, hx⟩
refine ⟨hmem, 1 / (n + 1 : ℝ), Nat.one_div_pos_of_nat, fun N => ?_⟩
obtain ⟨n, hn₁... | [
" x ∈ notConvergentSeq f g n j ↔ ∃ k ≥ j, 1 / (↑n + 1) < dist (f k x) (g x)",
" μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0",
" μ (s ∩ ⋂ j, notConvergentSeq f g n j) ≤ μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)}",
" x ∈ s ∩ ⋂ j, notConvergentSeq f g n j → x ∈ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ ... | [
" x ∈ notConvergentSeq f g n j ↔ ∃ k ≥ j, 1 / (↑n + 1) < dist (f k x) (g x)"
] |
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.LinearAlgebra.Matrix.Trace
import Mathlib.LinearAlgebra.Matrix.Symmetric
#align_import combinatorics.simple_graph.adj_matrix from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1... | Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean | 69 | 70 | theorem apply_ne_one_iff [MulZeroOneClass α] [Nontrivial α] (h : IsAdjMatrix A) (i j : V) :
¬A i j = 1 ↔ A i j = 0 := by | obtain h | h := h.zero_or_one i j <;> simp [h]
| [
" ¬A i i = 1",
" ¬A i j = 1 ↔ A i j = 0"
] | [
" ¬A i i = 1"
] |
import Mathlib.CategoryTheory.Adjunction.Reflective
import Mathlib.Topology.StoneCech
import Mathlib.CategoryTheory.Monad.Limits
import Mathlib.Topology.UrysohnsLemma
import Mathlib.Topology.Category.TopCat.Limits.Basic
import Mathlib.Data.Set.Subsingleton
import Mathlib.CategoryTheory.Elementwise
#align_import topol... | Mathlib/Topology/Category/CompHaus/Basic.lean | 123 | 135 | theorem isIso_of_bijective {X Y : CompHaus.{u}} (f : X ⟶ Y) (bij : Function.Bijective f) :
IsIso f := by |
let E := Equiv.ofBijective _ bij
have hE : Continuous E.symm := by
rw [continuous_iff_isClosed]
intro S hS
rw [← E.image_eq_preimage]
exact isClosedMap f S hS
refine ⟨⟨⟨E.symm, hE⟩, ?_, ?_⟩⟩
· ext x
apply E.symm_apply_apply
· ext x
apply E.apply_symm_apply
| [
" IsIso f",
" Continuous ⇑E.symm",
" ∀ (s : Set ((forget CompHaus).obj X)), IsClosed s → IsClosed (⇑E.symm ⁻¹' s)",
" IsClosed (⇑E.symm ⁻¹' S)",
" IsClosed (⇑E '' S)",
" f ≫ { toFun := ⇑E.symm, continuous_toFun := hE } = 𝟙 X",
" (f ≫ { toFun := ⇑E.symm, continuous_toFun := hE }) x = (𝟙 X) x",
" { to... | [] |
import Mathlib.Data.List.Chain
#align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
variable {α : Type*} (l : List α) (R : α → α → Prop) [DecidableRel R] {a b : α}
namespace List
@[simp]
theorem destutter'_nil : destutter' R a [] = [a] :=
rfl
#align ... | Mathlib/Data/List/Destutter.lean | 60 | 61 | theorem destutter'_singleton : [b].destutter' R a = if R a b then [a, b] else [a] := by |
split_ifs with h <;> simp! [h]
| [
" destutter' R b (a :: l) = b :: destutter' R a l",
" destutter' R b (a :: l) = destutter' R b l",
" destutter' R a [b] = if R a b then [a, b] else [a]",
" destutter' R a [b] = [a, b]",
" destutter' R a [b] = [a]"
] | [
" destutter' R b (a :: l) = b :: destutter' R a l",
" destutter' R b (a :: l) = destutter' R b l"
] |
import Mathlib.Order.Filter.Basic
#align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
open Set
open Filter
namespace Filter
variable {α β γ δ : Type*} {ι : Sort*}
section Prod
variable {s : Set α} {t : Set β} {f : Filter α} {g : Filter β}
protected ... | Mathlib/Order/Filter/Prod.lean | 107 | 109 | theorem comap_prod (f : α → β × γ) (b : Filter β) (c : Filter γ) :
comap f (b ×ˢ c) = comap (Prod.fst ∘ f) b ⊓ comap (Prod.snd ∘ f) c := by |
erw [comap_inf, Filter.comap_comap, Filter.comap_comap]
| [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... | [
" s ∈ f ×ˢ g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ ×ˢ t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" s ∈ comap Prod.fst f ⊓ comap Prod.snd g → ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s",
" ∃ t₁_1 ∈ f, ∃ t₂_1 ∈ g, t₁_1.prod t₂_1 ⊆ t₁ ∩ t₂",
" (∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁.prod t₂ ⊆ s) → s ... |
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.Topology.Category.TopCat.Limits.Basic
#align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967"
-- Porting note: every ML3 decl has an uppercase letter
set_option linter.uppercaseLean3 ... | Mathlib/Topology/Category/TopCat/Limits/Konig.lean | 130 | 146 | theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCat.{max v u})
[IsCofilteredOrEmpty J]
[∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
Nonempty (TopCat.limitCone F).pt := by |
classical
obtain ⟨u, hu⟩ :=
IsCompact.nonempty_iInter_of_directed_nonempty_isCompact_isClosed (fun G => partialSections F _)
(partialSections.directed F) (fun G => partialSections.nonempty F _)
(fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
partialSections.closed F _
us... | [
" (partialSections F H).Nonempty",
" (fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some) ∈ partialSections F H",
" (F.map ⟨X, ⟨Y, ⟨hX, ⟨hY, f⟩⟩⟩⟩.snd.snd.snd.snd)\n ((fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some)\n ⟨X, ⟨Y, ⟨hX, ⟨... | [
" (partialSections F H).Nonempty",
" (fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some) ∈ partialSections F H",
" (F.map ⟨X, ⟨Y, ⟨hX, ⟨hY, f⟩⟩⟩⟩.snd.snd.snd.snd)\n ((fun j => if hj : j ∈ G then (F.map (IsCofiltered.infTo G H hj)) ⋯.some else ⋯.some)\n ⟨X, ⟨Y, ⟨hX, ⟨... |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04"
namespace Set
variable {α β : Type*} {s t : Set α}
noncomputable def encard (s : Set α) : ℕ∞ := PartENat.withTopEquiv (PartENat.card s)
@[simp] theorem encard_uni... | Mathlib/Data/Set/Card.lean | 111 | 114 | theorem encard_union_eq (h : Disjoint s t) : (s ∪ t).encard = s.encard + t.encard := by |
classical
have e := (Equiv.Set.union (by rwa [subset_empty_iff, ← disjoint_iff_inter_eq_empty])).symm
simp [encard, ← PartENat.card_congr e, PartENat.card_sum, PartENat.withTopEquiv]
| [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card",
" (↑s).encard = ↑s.card",
" ↑⋯.toFinset.card = ↑s.card",
" s.encard = ⊤",
" s.encard = 0 ↔ s = ∅",
" ∅.encard = 0",
" s.Nonempty",
" s.encard ≠ 0 ↔... | [
" univ.encard = s.encard",
" univ.encard = PartENat.withTopEquiv (PartENat.card α)",
" s.encard = ↑h.toFinset.card",
" s.encard = ↑s.toFinset.card",
" (↑s).encard = ↑s.card",
" ↑⋯.toFinset.card = ↑s.card",
" s.encard = ⊤",
" s.encard = 0 ↔ s = ∅",
" ∅.encard = 0",
" s.Nonempty",
" s.encard ≠ 0 ↔... |
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 | 86 | 88 | theorem toAffineMap_injective : Injective (toAffineMap : (P →ᵃⁱ[𝕜] P₂) → P →ᵃ[𝕜] P₂) := by |
rintro ⟨f, _⟩ ⟨g, _⟩ rfl
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.Analysis.Convex.Jensen
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
import Mathlib.Data.Real.ConjExponents
#align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
universe u... | Mathlib/Analysis/MeanInequalities.lean | 180 | 183 | theorem geom_mean_eq_arith_mean_weighted_of_constant (w z : ι → ℝ) (x : ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) (hx : ∀ i ∈ s, w i ≠ 0 → z i = x) :
∏ i ∈ s, z i ^ w i = ∑ i ∈ s, w i * z i := by |
rw [geom_mean_weighted_of_constant, arith_mean_weighted_of_constant] <;> assumption
| [
" ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i",
" 0 ≤ ∑ i ∈ s, w i * z i",
" z i ^ w i = 0",
" 0 ^ w i = 0",
" ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)",
" ∑ i ∈ s, w i * z i = ∑ x ∈ s, w x * rexp (z x).log",
" ∀ x ∈ s, z x ^ w x = rexp ((z x).log * w x)",
" ∀ x ∈ s, w x * z x = w x * rexp (z ... | [
" ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i",
" 0 ≤ ∑ i ∈ s, w i * z i",
" z i ^ w i = 0",
" 0 ^ w i = 0",
" ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)",
" ∑ i ∈ s, w i * z i = ∑ x ∈ s, w x * rexp (z x).log",
" ∀ x ∈ s, z x ^ w x = rexp ((z x).log * w x)",
" ∀ x ∈ s, w x * z x = w x * rexp (z ... |
import Mathlib.SetTheory.Game.Basic
import Mathlib.SetTheory.Ordinal.NaturalOps
#align_import set_theory.game.ordinal from "leanprover-community/mathlib"@"b90e72c7eebbe8de7c8293a80208ea2ba135c834"
universe u
open SetTheory PGame
open scoped NaturalOps PGame
namespace Ordinal
noncomputable def toPGame : Ordin... | Mathlib/SetTheory/Game/Ordinal.lean | 53 | 54 | theorem toPGame_leftMoves (o : Ordinal) : o.toPGame.LeftMoves = o.out.α := by |
rw [toPGame, LeftMoves]
| [
" let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim",
" o.toPGame.LeftMoves = (Quotient.out o).α"
] | [
" let_fun this := ⋯;\n o.toPGame = mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (typein (fun x x_1 => x < x_1) x).toPGame) PEmpty.elim"
] |
import Mathlib.Algebra.Lie.Abelian
import Mathlib.Algebra.Lie.Solvable
import Mathlib.LinearAlgebra.Dual
#align_import algebra.lie.character from "leanprover-community/mathlib"@"132328c4dd48da87adca5d408ca54f315282b719"
universe u v w w₁
namespace LieAlgebra
variable (R : Type u) (L : Type v) [CommRing R] [LieR... | Mathlib/Algebra/Lie/Character.lean | 52 | 60 | theorem lieCharacter_apply_of_mem_derived (χ : LieCharacter R L) {x : L}
(h : x ∈ derivedSeries R L 1) : χ x = 0 := by |
rw [derivedSeries_def, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, ←
LieSubmodule.mem_coeSubmodule, LieSubmodule.lieIdeal_oper_eq_linear_span] at h
refine Submodule.span_induction h ?_ ?_ ?_ ?_
· rintro y ⟨⟨z, hz⟩, ⟨⟨w, hw⟩, rfl⟩⟩; apply lieCharacter_apply_lie
· exact χ.map_zero
· intro y z hy ... | [
" χ ⁅x, y⁆ = 0",
" ⁅χ x, χ y⁆ = 0",
" χ x = 0",
" ∀ x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m}, χ x = 0",
" χ ⁅↑⟨z, hz⟩, ↑⟨w, hw⟩⁆ = 0",
" χ 0 = 0",
" ∀ (x y : L), χ x = 0 → χ y = 0 → χ (x + y) = 0",
" χ (y + z) = 0",
" ∀ (a : R) (x : L), χ x = 0 → χ (a • x) = 0",
" χ (t • y) = 0"
] | [
" χ ⁅x, y⁆ = 0",
" ⁅χ x, χ y⁆ = 0"
] |
import Mathlib.Data.Real.Irrational
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Algebra.LinearRecurrence
import Mathlib.Tactic.NormNum.NatFib
import Mathlib.Tactic.NormNum.Prime
#align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712... | Mathlib/Data/Real/GoldenRatio.lean | 44 | 47 | theorem inv_gold : φ⁻¹ = -ψ := by |
have : 1 + √5 ≠ 0 := ne_of_gt (add_pos (by norm_num) <| Real.sqrt_pos.mpr (by norm_num))
field_simp [sub_mul, mul_add]
norm_num
| [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1"
] | [] |
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 | 148 | 151 | theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by |
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans_le (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [mem_ball.1 hy, r'r.2, @dist_nonneg _ _ y x]
| [
" IsOpen (A f L r ε)",
" ∀ x ∈ A f L r ε, ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" r' - s > 0",
" ∀ y ∈ ball x' s, ∀ z ∈ ball x' s, ‖f z - f y - L (z - y)‖ < ε * r",
" ‖f z - f y - L (z - y)‖ < ε * r",
" IsOpen (B f K r s ε)",
" A f L r ε ⊆ A f L r δ",
" x ∈ A f L ... | [
" IsOpen (A f L r ε)",
" ∀ x ∈ A f L r ε, ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" ∃ ε_1 > 0, ball x ε_1 ⊆ A f L r ε",
" r' - s > 0",
" ∀ y ∈ ball x' s, ∀ z ∈ ball x' s, ‖f z - f y - L (z - y)‖ < ε * r",
" ‖f z - f y - L (z - y)‖ < ε * r",
" IsOpen (B f K r s ε)"
] |
import Mathlib.Algebra.CharP.Defs
import Mathlib.Algebra.FreeAlgebra
import Mathlib.RingTheory.Localization.FractionRing
#align_import algebra.char_p.algebra from "leanprover-community/mathlib"@"96782a2d6dcded92116d8ac9ae48efb41d46a27c"
theorem charP_of_injective_ringHom {R A : Type*} [NonAssocSemiring R] [NonAs... | Mathlib/Algebra/CharP/Algebra.lean | 121 | 123 | theorem Algebra.ringChar_eq : ringChar K = ringChar L := by |
rw [ringChar.eq_iff, Algebra.charP_iff K L]
apply ringChar.charP
| [
" ↑x = 0 ↔ p ∣ x",
" f ↑x✝² = f ↑x✝¹",
" CharP R p",
" ringChar K = ringChar L",
" CharP L (ringChar L)"
] | [
" ↑x = 0 ↔ p ∣ x",
" f ↑x✝² = f ↑x✝¹",
" CharP R p"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Sum
#align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open scoped Classical
universe u v
namespace ... | Mathlib/Combinatorics/HalesJewett.lean | 197 | 200 | theorem horizontal_apply {α ι ι'} (l : Line α ι) (v : ι' → α) (x : α) :
l.horizontal v x = Sum.elim (l x) v := by |
funext i
cases i <;> rfl
| [
" Inhabited (ColorFocused C)",
" h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) ⋯.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... | [
" Inhabited (ColorFocused C)",
" h ∈ 0 → (fun x i => (h.line.idxFun i).getD x) none = fun x => none",
" (fun i => Option.map f (l.idxFun i)) ⋯.choose = none",
" (fun x i => (l.idxFun i).getD x) x i = x",
" some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i",
" (fun x i => ((map f l).idxFun i).getD x... |
import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
-- TODO:
-- assert_not_exists OrderedComm... | Mathlib/Data/Finset/Fold.lean | 116 | 120 | theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁ b₂ : β} :
((s₁ ∪ s₂).fold op b₁ f * (s₁ ∩ s₂).fold op b₂ f) = s₁.fold op b₂ f * s₂.fold op b₁ f := by |
unfold fold
rw [← fold_add op, ← Multiset.map_add, union_val, inter_val, union_add_inter, Multiset.map_add,
hc.comm, fold_add]
| [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... | [
" fold op b f (cons a s h) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val))",
" fold op b f (insert a s) = op (f a) (fold op b f s)",
" Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b ... |
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Conj
import Mathlib.CategoryTheory.Functor.ReflectsIso
#align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a"
universe v₁ v₂ v₃ u₁ u₂ u₃
noncomputable s... | Mathlib/CategoryTheory/Adjunction/Reflective.lean | 87 | 89 | theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) :
IsIso ((reflectorAdjunction i).unit.app A) := by |
rwa [isIso_unit_app_iff_mem_essImage]
| [
" (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =\n i.map ((reflector i).map ((reflectorAdjunction i).unit.app X))",
" (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) ≫\n i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X)) =\n i.map\n ((reflector i).map... | [
" (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) =\n i.map ((reflector i).map ((reflectorAdjunction i).unit.app X))",
" (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) ≫\n i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X)) =\n i.map\n ((reflector i).map... |
import Mathlib.LinearAlgebra.TensorProduct.Graded.External
import Mathlib.RingTheory.GradedAlgebra.Basic
import Mathlib.GroupTheory.GroupAction.Ring
suppress_compilation
open scoped TensorProduct
variable {R ι A B : Type*}
variable [CommSemiring ι] [Module ι (Additive ℤˣ)] [DecidableEq ι]
variable [CommRing R] [R... | Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean | 133 | 135 | theorem auxEquiv_one : auxEquiv R 𝒜 ℬ 1 = 1 := by |
rw [← of_one, Algebra.TensorProduct.one_def, auxEquiv_tmul 𝒜 ℬ, DirectSum.decompose_one,
DirectSum.decompose_one, Algebra.TensorProduct.one_def]
| [
" (auxEquiv R 𝒜 ℬ) 1 = 1"
] | [] |
import Mathlib.RingTheory.Finiteness
import Mathlib.Logic.Equiv.TransferInstance
universe u v w
open Function
variable (R : Type u) [Semiring R]
@[mk_iff]
class OrzechProperty : Prop where
injective_of_surjective_of_submodule' : ∀ {M : Type u} [AddCommMonoid M] [Module R M]
[Module.Finite R M] {N : Submod... | Mathlib/RingTheory/OrzechProperty.lean | 69 | 82 | theorem injective_of_surjective_of_injective
{N : Type w} [AddCommMonoid N] [Module R N]
(i f : N →ₗ[R] M) (hi : Injective i) (hf : Surjective f) : Injective f := by |
obtain ⟨n, g, hg⟩ := Module.Finite.exists_fin' R M
haveI := small_of_surjective hg
letI := Equiv.addCommMonoid (equivShrink M).symm
letI := Equiv.module R (equivShrink M).symm
let j : Shrink.{u} M ≃ₗ[R] M := Equiv.linearEquiv R (equivShrink M).symm
haveI := Module.Finite.equiv j.symm
let i' := j.symm.toL... | [
" Injective ⇑f",
" Injective ⇑i'",
" Surjective ⇑f'"
] | [] |
import Mathlib.LinearAlgebra.Dual
open Function Module
variable (R M N : Type*) [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N]
structure PerfectPairing :=
toLin : M →ₗ[R] N →ₗ[R] R
bijectiveLeft : Bijective toLin
bijectiveRight : Bijective toLin.flip
attribute [nolint docBlame] P... | Mathlib/LinearAlgebra/PerfectPairing.lean | 102 | 105 | theorem toDualRight_symm_comp_toDualLeft :
p.toDualRight.symm.dualMap ∘ₗ (p.toDualLeft : M →ₗ[R] Dual R N) = Dual.eval R M := by |
ext1 x
exact p.toDualRight_symm_toDualLeft x
| [
" x = y",
" { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y",
" { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }",
" (p (p.toDual... | [
" x = y",
" { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y",
" { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }",
" (p (p.toDual... |
import Mathlib.Algebra.Polynomial.Module.Basic
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.taylor from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
open scoped... | Mathlib/Analysis/Calculus/Taylor.lean | 141 | 146 | theorem monomial_has_deriv_aux (t x : ℝ) (n : ℕ) :
HasDerivAt (fun y => (x - y) ^ (n + 1)) (-(n + 1) * (x - t) ^ n) t := by |
simp_rw [sub_eq_neg_add]
rw [← neg_one_mul, mul_comm (-1 : ℝ), mul_assoc, mul_comm (-1 : ℝ), ← mul_assoc]
convert HasDerivAt.pow (n + 1) ((hasDerivAt_id t).neg.add_const x)
simp only [Nat.cast_add, Nat.cast_one]
| [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... | [
" taylorWithin f (n + 1) s x₀ =\n taylorWithin f n s x₀ +\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ((PolynomialModule.single ℝ (n + 1)) (taylorCoeffWithin f (n + 1) s x₀))",
" ∑ k ∈ Finset.range (n + 1 + 1),\n (PolynomialModule.comp (Polynomial.X - Polynomial.C x₀))\n ... |
import Mathlib.CategoryTheory.NatIso
import Mathlib.CategoryTheory.EqToHom
#align_import category_theory.quotient from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
def HomRel (C) [Quiver C] :=
∀ ⦃X Y : C⦄, (X ⟶ Y) → (X ⟶ Y) → Prop
#align hom_rel HomRel
-- Porting Note: `deriving I... | Mathlib/CategoryTheory/Quotient.lean | 65 | 66 | theorem CompClosure.of {a b : C} (m₁ m₂ : a ⟶ b) (h : r m₁ m₂) : CompClosure r m₁ m₂ := by |
simpa using CompClosure.intro (𝟙 _) m₁ m₂ (𝟙 _) h
| [
" CompClosure r m₁ m₂"
] | [] |
import Mathlib.Combinatorics.SimpleGraph.DegreeSum
import Mathlib.Combinatorics.SimpleGraph.Subgraph
#align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508"
universe u
namespace SimpleGraph
variable {V : Type u} {G : SimpleGraph V} (M : Su... | Mathlib/Combinatorics/SimpleGraph/Matching.lean | 63 | 67 | theorem IsMatching.toEdge_eq_of_adj {M : Subgraph G} (h : M.IsMatching) {v w : V} (hv : v ∈ M.verts)
(hvw : M.Adj v w) : h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩ := by |
simp only [IsMatching.toEdge, Subtype.mk_eq_mk]
congr
exact ((h (M.edge_vert hvw)).choose_spec.2 w hvw).symm
| [
" h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩",
" s(v, Exists.choose ⋯) = s(v, w)",
" Exists.choose ⋯ = w"
] | [] |
import Mathlib.NumberTheory.BernoulliPolynomials
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Fourier.AddCircle
import Mathlib.Analysis.PSeries
#align_import number_theory.zeta_values from "leanprover-community/mathlib"@"f0c8bf9245297... | Mathlib/NumberTheory/ZetaValues.lean | 80 | 87 | theorem integral_bernoulliFun_eq_zero {k : ℕ} (hk : k ≠ 0) :
∫ x : ℝ in (0)..1, bernoulliFun k x = 0 := by |
rw [integral_eq_sub_of_hasDerivAt (fun x _ => antideriv_bernoulliFun k x)
((Polynomial.continuous _).intervalIntegrable _ _)]
rw [bernoulliFun_eval_one]
split_ifs with h
· exfalso; exact hk (Nat.succ_inj'.mp h)
· simp
| [
" bernoulliFun k 0 = ↑(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0",
" bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + 1",
" ↑(1 / 2) = ↑(-1 / 2) + 1",... | [
" bernoulliFun k 0 = ↑(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0",
" bernoulliFun k 1 = bernoulliFun k 0 + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + if k = 1 then 1 else 0",
" (algebraMap ℚ ℝ) (bernoulli' k) = ↑(bernoulli k) + 1",
" ↑(1 / 2) = ↑(-1 / 2) + 1",... |
import Mathlib.NumberTheory.Cyclotomic.Discriminant
import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral
import Mathlib.RingTheory.Ideal.Norm
#align_import number_theory.cyclotomic.rat from "leanprover-community/mathlib"@"b353176c24d96c23f0ce1cc63efc3f55019702d9"
universe u
open Algebra IsCyclotomicExtensio... | Mathlib/NumberTheory/Cyclotomic/Rat.lean | 65 | 69 | theorem discr_prime_pow_eq_unit_mul_pow' [IsCyclotomicExtension {p ^ k} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑(p ^ k)) :
∃ (u : ℤˣ) (n : ℕ), discr ℚ (hζ.subOnePowerBasis ℚ).basis = u * p ^ n := by |
rw [hζ.discr_zeta_eq_discr_zeta_sub_one.symm]
exact discr_prime_pow_eq_unit_mul_pow hζ (cyclotomic.irreducible_rat (p ^ k).pos)
| [
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))",
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis",
" Algebra.discr ℚ ⇑(IsPrimitiveRo... | [
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n (-1) ^ (φ (↑p ^ (k + 1)) / 2) * ↑↑p ^ (↑p ^ k * ((↑p - 1) * (k + 1) - 1))",
" Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =\n Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis",
" Algebra.discr ℚ ⇑(IsPrimitiveRo... |
import Mathlib.Data.ULift
import Mathlib.Data.ZMod.Defs
import Mathlib.SetTheory.Cardinal.PartENat
#align_import set_theory.cardinal.finite from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
set_option autoImplicit true
open Cardinal Function
noncomputable section
variable {α β : Typ... | Mathlib/SetTheory/Cardinal/Finite.lean | 144 | 146 | theorem card_of_subsingleton (a : α) [Subsingleton α] : Nat.card α = 1 := by |
letI := Fintype.ofSubsingleton a
rw [card_eq_fintype_card, Fintype.card_ofSubsingleton a]
| [
" Nat.card { x // x ∈ s } = s.card",
" Nat.card ↑s = s.toFinset.card",
" Nat.card ↑s = hs.toFinset.card",
" Nat.card α = 0",
" Nat.card α = 0 ↔ IsEmpty α ∨ Infinite α",
" Nat.card α ≠ 0 ↔ Nonempty α ∧ Finite α",
" 0 < Nat.card α ↔ Nonempty α ∧ Finite α",
" Nat.card α ≤ Nat.card β",
" lift.{u, v} #β ... | [
" Nat.card { x // x ∈ s } = s.card",
" Nat.card ↑s = s.toFinset.card",
" Nat.card ↑s = hs.toFinset.card",
" Nat.card α = 0",
" Nat.card α = 0 ↔ IsEmpty α ∨ Infinite α",
" Nat.card α ≠ 0 ↔ Nonempty α ∧ Finite α",
" 0 < Nat.card α ↔ Nonempty α ∧ Finite α",
" Nat.card α ≤ Nat.card β",
" lift.{u, v} #β ... |
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
#align_import analysis.calculus.cont_diff_def from "leanprover-community/mathlib"@"3a69562db5a458db8322b190ec8d9a8bbd8a5b14"
noncomputable section
open scoped Classical
open NNReal Topology Filter
local notatio... | Mathlib/Analysis/Calculus/ContDiff/Defs.lean | 204 | 208 | theorem HasFTaylorSeriesUpToOn.congr (h : HasFTaylorSeriesUpToOn n f p s)
(h₁ : ∀ x ∈ s, f₁ x = f x) : HasFTaylorSeriesUpToOn n f₁ p s := by |
refine ⟨fun x hx => ?_, h.fderivWithin, h.cont⟩
rw [h₁ x hx]
exact h.zero_eq x hx
| [
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)",
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (p x 0).uncurry0",
" HasFTaylorSeriesUpToOn n f₁ p s",
" (p x 0).uncurry0 = f₁ x",
" (p x 0).uncurry0 = f x"
] | [
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)",
" p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (p x 0).uncurry0"
] |
import Mathlib.Algebra.Group.Even
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Algebra.Order.Sub.Defs
#align_import algebra.order.sub.canonical from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c"
variable {α : Type*}
section ExistsAddOfLE
variable [AddCommSemigrou... | Mathlib/Algebra/Order/Sub/Canonical.lean | 44 | 45 | theorem tsub_le_tsub_iff_right (h : c ≤ b) : a - c ≤ b - c ↔ a ≤ b := by |
rw [tsub_le_iff_right, tsub_add_cancel_of_le h]
| [
" a + (b - a) = b",
" a + (b - a) ≤ b",
" a + (a + c - a) ≤ a + c",
" b - a + a = b",
" a - c ≤ b - c ↔ a ≤ b"
] | [
" a + (b - a) = b",
" a + (b - a) ≤ b",
" a + (a + c - a) ≤ a + c",
" b - a + a = b"
] |
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.WellFounded
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Data.Set.Lattice
#align_import order.conditionally_complete_lattice.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
open Func... | Mathlib/Order/ConditionallyCompleteLattice/Basic.lean | 110 | 113 | theorem WithTop.coe_iInf [Nonempty ι] [InfSet α] {f : ι → α} (hf : BddBelow (range f)) :
↑(⨅ i, f i) = (⨅ i, f i : WithTop α) := by |
rw [iInf, iInf, WithTop.coe_sInf' (range_nonempty f) hf, ← range_comp]
rfl
| [
" ¬(s ⊆ {⊤} ∨ ¬BddBelow s)",
" ∅ ⊆ {⊤} ∨ ¬BddBelow ∅",
" ⨅ i, f i = ⊤",
" ↑(sInf s) = sInf ((fun a => ↑a) '' s)",
" ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))",
" ↑(sInf s) = ⊤",
" ↑(sInf s) = ↑(sInf ((f... | [
" ¬(s ⊆ {⊤} ∨ ¬BddBelow s)",
" ∅ ⊆ {⊤} ∨ ¬BddBelow ∅",
" ⨅ i, f i = ⊤",
" ↑(sInf s) = sInf ((fun a => ↑a) '' s)",
" ↑(sInf s) =\n if (fun a => ↑a) '' s ⊆ {⊤} ∨ ¬BddBelow ((fun a => ↑a) '' s) then ⊤\n else ↑(sInf ((fun a => ↑a) ⁻¹' ((fun a => ↑a) '' s)))",
" ↑(sInf s) = ⊤",
" ↑(sInf s) = ↑(sInf ((f... |
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Algebra.CharZero.Defs
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Data.Nat.Cast.NeZero
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {α β : T... | Mathlib/Data/Nat/Cast/Order.lean | 138 | 138 | theorem one_le_cast : 1 ≤ (n : α) ↔ 1 ≤ n := by | rw [← cast_one, cast_le]
| [
" ↑n ≤ ↑(n + 1)",
" ↑n ≤ ↑n + 1",
" 1 < ↑n ↔ 1 < n",
" 1 ≤ ↑n ↔ 1 ≤ n"
] | [
" ↑n ≤ ↑(n + 1)",
" ↑n ≤ ↑n + 1",
" 1 < ↑n ↔ 1 < n"
] |
import Mathlib.NumberTheory.Liouville.Basic
#align_import number_theory.liouville.liouville_number from "leanprover-community/mathlib"@"04e80bb7e8510958cd9aacd32fe2dc147af0b9f1"
noncomputable section
open scoped Nat
open Real Finset
def liouvilleNumber (m : ℝ) : ℝ :=
∑' i : ℕ, 1 / m ^ i !
#align liouville_n... | Mathlib/NumberTheory/Liouville/LiouvilleNumber.lean | 110 | 134 | theorem remainder_lt' (n : ℕ) {m : ℝ} (m1 : 1 < m) :
remainder m n < (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) :=
-- two useful inequalities
have m0 : 0 < m := zero_lt_one.trans m1
have mi : 1 / m < 1 := (div_lt_one m0).mpr m1
-- to show the strict inequality between these series, we prove that:
calc
(∑' i, ... |
simp only [pow_add, one_div, mul_inv, inv_pow]
-- factor the constant `(1 / m ^ (n + 1)!)` out of the series
_ = (∑' i, (1 / m) ^ i) * (1 / m ^ (n + 1)!) := tsum_mul_right
-- the series is the geometric series
_ = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!) := by rw [tsum_geometric_of_lt_one (by positivit... | [
" Summable fun i => 1 / m ^ (i + (k + 1))!",
" 0 ≤ 1 / m ^ (x✝ + (k + 1))!",
" 0 < 1 / m ^ (0 + (k + 1))!",
" ∑' (i : ℕ), 1 / m ^ (i + (n + 1)!) = ∑' (i : ℕ), (1 / m) ^ i * (1 / m ^ (n + 1)!)",
" (∑' (i : ℕ), (1 / m) ^ i) * (1 / m ^ (n + 1)!) = (1 - 1 / m)⁻¹ * (1 / m ^ (n + 1)!)",
" 0 ≤ 1 / m"
] | [
" Summable fun i => 1 / m ^ (i + (k + 1))!",
" 0 ≤ 1 / m ^ (x✝ + (k + 1))!",
" 0 < 1 / m ^ (0 + (k + 1))!"
] |
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
import Mathlib.CategoryTheory.Monoidal.Functor
#align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055"
noncomputable section
open scoped Classical
namespace CategoryTheory
open Cat... | Mathlib/CategoryTheory/Monoidal/Preadditive.lean | 118 | 120 | theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
(∑ j ∈ s, g j) ⊗ f = ∑ j ∈ s, g j ⊗ f := by |
simp only [tensorHom_def, sum_whiskerRight, Preadditive.sum_comp]
| [
" ∀ {X Y Z : D}, X ◁ 0 = 0",
" X✝ ◁ 0 = 0",
" F.map (X✝ ◁ 0) = F.map 0",
" ∀ {X Y Z : D}, 0 ▷ X = 0",
" 0 ▷ X✝ = 0",
" F.map (0 ▷ X✝) = F.map 0",
" ∀ {X Y Z : D} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g",
" X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝",
" F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",... | [
" ∀ {X Y Z : D}, X ◁ 0 = 0",
" X✝ ◁ 0 = 0",
" F.map (X✝ ◁ 0) = F.map 0",
" ∀ {X Y Z : D}, 0 ▷ X = 0",
" 0 ▷ X✝ = 0",
" F.map (0 ▷ X✝) = F.map 0",
" ∀ {X Y Z : D} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g",
" X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝",
" F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",... |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.BilinearMap
#align_import linear_algebra.basis.bilinear from "leanprover-community/mathlib"@"87c54600fe3cdc7d32ff5b50873ac724d86aef8d"
namespace LinearMap
variable {ι₁ ι₂ : Type*}
variable {R R₂ S S₂ M N P Rₗ : Type*}
variable {Mₗ Nₗ Pₗ : Type*}
--... | Mathlib/LinearAlgebra/Basis/Bilinear.lean | 44 | 49 | theorem sum_repr_mul_repr_mulₛₗ {B : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (x y) :
((b₁.repr x).sum fun i xi => (b₂.repr y).sum fun j yj => ρ₁₂ xi • σ₁₂ yj • B (b₁ i) (b₂ j)) =
B x y := by |
conv_rhs => rw [← b₁.total_repr x, ← b₂.total_repr y]
simp_rw [Finsupp.total_apply, Finsupp.sum, map_sum₂, map_sum, LinearMap.map_smulₛₗ₂,
LinearMap.map_smulₛₗ]
| [
" ((b₁.repr x).sum fun i xi => (b₂.repr y).sum fun j yj => ρ₁₂ xi • σ₁₂ yj • (B (b₁ i)) (b₂ j)) = (B x) y",
"ι₁ : Type u_1\nι₂ : Type u_2\nR : Type u_3\nR₂ : Type u_4\nS : Type u_5\nS₂ : Type u_6\nM : Type u_7\nN : Type u_8\nP : Type u_9\nRₗ : Type u_10\nMₗ : Type u_11\nNₗ : Type u_12\nPₗ : Type u_13\ninst✝¹⁸ : S... | [] |
import Mathlib.Algebra.Group.Hom.Defs
#align_import algebra.group.ext from "leanprover-community/mathlib"@"e574b1a4e891376b0ef974b926da39e05da12a06"
assert_not_exists MonoidWithZero
assert_not_exists DenselyOrdered
open Function
universe u
@[to_additive (attr := ext)]
theorem Monoid.ext {M : Type u} ⦃m₁ m₂ : Mo... | Mathlib/Algebra/Group/Ext.lean | 103 | 106 | theorem CancelMonoid.toLeftCancelMonoid_injective {M : Type u} :
Function.Injective (@CancelMonoid.toLeftCancelMonoid M) := by |
rintro ⟨⟩ ⟨⟩ h
congr
| [
" m₁ = m₂",
" Monoid.npow = Monoid.npow",
" Monoid.npow n x = Monoid.npow n x",
" mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝ = m₂",
" mk one_mul✝¹ mul_one✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ = mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝",
" Injective (@toMonoid M)",
" mk mul_comm✝¹ = mk mul_comm... | [
" m₁ = m₂",
" Monoid.npow = Monoid.npow",
" Monoid.npow n x = Monoid.npow n x",
" mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝ = m₂",
" mk one_mul✝¹ mul_one✝¹ npow✝¹ npow_zero✝¹ npow_succ✝¹ = mk one_mul✝ mul_one✝ npow✝ npow_zero✝ npow_succ✝",
" Injective (@toMonoid M)",
" mk mul_comm✝¹ = mk mul_comm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.