Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Rat
import Mathlib.Data.PNat.Defs
#align_import data.rat.lemmas from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
namespace Rat
o... | Mathlib/Data/Rat/Lemmas.lean | 81 | 84 | theorem add_den_dvd (q₁ q₂ : ℚ) : (q₁ + q₂).den ∣ q₁.den * q₂.den := by |
rw [add_def, normalize_eq]
apply Nat.div_dvd_of_dvd
apply Nat.gcd_dvd_right
| [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... | [
" (a /. b).num ∣ a",
" { num := n, den := d, den_nz := h, reduced := c }.num ∣ a",
" n.natAbs ∣ a.natAbs * d",
" ↑(a /. b).den ∣ b",
" ↑{ num := n, den := d, den_nz := h, reduced := c }.den ∣ b",
" d ∣ n.natAbs * b.natAbs",
" ↑d ∣ a * ↑d",
" ∃ c, n = c * q.num ∧ d = c * ↑q.den",
" ∃ c, 0 = c * q.num... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Fin
import Mathlib.GroupTheory.GroupAction.Pi
import Mathlib.Logic.Equiv.Fin
#align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013"
open Fins... | Mathlib/Algebra/BigOperators/Fin.lean | 69 | 72 | theorem prod_univ_succAbove [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) (x : Fin (n + 1)) :
∏ i, f i = f x * ∏ i : Fin n, f (x.succAbove i) := by |
rw [univ_succAbove, prod_cons, Finset.prod_map _ x.succAboveEmb]
rfl
| [
" (List.ofFn f).prod = ∏ i : Fin n, f i",
" ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod",
" ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)",
" f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)"
] | [
" (List.ofFn f).prod = ∏ i : Fin n, f i",
" ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod"
] |
import Mathlib.Algebra.FreeMonoid.Basic
import Mathlib.Algebra.Group.Submonoid.MulOpposite
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Int.Order.Lemmas
#align_import group_theory.submonoid.membership fro... | Mathlib/Algebra/Group/Submonoid/Membership.lean | 332 | 333 | theorem mem_closure_singleton {x y : M} : y ∈ closure ({x} : Set M) ↔ ∃ n : ℕ, x ^ n = y := by |
rw [closure_singleton_eq, mem_mrange]; rfl
| [
" y ∈ closure {x} ↔ ∃ n, x ^ n = y",
" (∃ x_1, ((powersHom M) x) x_1 = y) ↔ ∃ n, x ^ n = y"
] | [] |
import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.RingTheory.SimpleModule
#align_import representation_theory.maschke from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v w
noncomputable section
open Module MonoidAlgeb... | Mathlib/RepresentationTheory/Maschke.lean | 125 | 127 | theorem equivariantProjection_apply (v : W) :
π.equivariantProjection G v = ⅟(Fintype.card G : k) • ∑ g : G, π.conjugate g v := by |
simp only [equivariantProjection, smul_apply, sumOfConjugatesEquivariant_apply]
| [
" (π.conjugate g) (i v) = v",
" (sumOfConjugates G π) (MonoidAlgebra.single g 1 • v) = MonoidAlgebra.single g 1 • (sumOfConjugates G π) v",
" ∑ x : G, MonoidAlgebra.single x⁻¹ 1 • π (MonoidAlgebra.single x 1 • MonoidAlgebra.single g 1 • v) =\n ∑ x : G, MonoidAlgebra.single g 1 • MonoidAlgebra.single x⁻¹ 1 • ... | [
" (π.conjugate g) (i v) = v",
" (sumOfConjugates G π) (MonoidAlgebra.single g 1 • v) = MonoidAlgebra.single g 1 • (sumOfConjugates G π) v",
" ∑ x : G, MonoidAlgebra.single x⁻¹ 1 • π (MonoidAlgebra.single x 1 • MonoidAlgebra.single g 1 • v) =\n ∑ x : G, MonoidAlgebra.single g 1 • MonoidAlgebra.single x⁻¹ 1 • ... |
import Mathlib.Analysis.Complex.RealDeriv
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas
#align_import analysis.special_functions.exp_deriv from "leanprover-community/mathlib"@"6a5c85000ab93fe5dcfdf620676f614ba8e18c26"
noncomputable section
open Filter Asym... | Mathlib/Analysis/SpecialFunctions/ExpDeriv.lean | 64 | 73 | theorem contDiff_exp : ∀ {n}, ContDiff 𝕜 n exp := by |
-- Porting note: added `@` due to `∀ {n}` weirdness above
refine @(contDiff_all_iff_nat.2 fun n => ?_)
have : ContDiff ℂ (↑n) exp := by
induction' n with n ihn
· exact contDiff_zero.2 continuous_exp
· rw [contDiff_succ_iff_deriv]
use differentiable_exp
rwa [deriv_exp]
exact this.restric... | [
" HasDerivAt cexp (cexp x) x",
" (fun h => cexp (x + h) - cexp x - h • cexp x) =o[𝓝 0] fun h => h",
" 1 < 2",
" ∀ᶠ (x_1 : ℂ) in 𝓝 0, ‖cexp (x + x_1) - cexp x - x_1 • cexp x‖ ≤ ‖cexp x‖ * ‖x_1 ^ 2‖",
" ∀ a ∈ Metric.ball 0 1, ‖cexp (x + a) - cexp x - a • cexp x‖ ≤ ‖cexp x‖ * ‖a ^ 2‖",
" ∀ (a : ℂ), ‖a‖ < 1... | [
" HasDerivAt cexp (cexp x) x",
" (fun h => cexp (x + h) - cexp x - h • cexp x) =o[𝓝 0] fun h => h",
" 1 < 2",
" ∀ᶠ (x_1 : ℂ) in 𝓝 0, ‖cexp (x + x_1) - cexp x - x_1 • cexp x‖ ≤ ‖cexp x‖ * ‖x_1 ^ 2‖",
" ∀ a ∈ Metric.ball 0 1, ‖cexp (x + a) - cexp x - a • cexp x‖ ≤ ‖cexp x‖ * ‖a ^ 2‖",
" ∀ (a : ℂ), ‖a‖ < 1... |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 109 | 129 | theorem content_X_mul {p : R[X]} : content (X * p) = content p := by |
rw [content, content, Finset.gcd_def, Finset.gcd_def]
refine congr rfl ?_
have h : (X * p).support = p.support.map ⟨Nat.succ, Nat.succ_injective⟩ := by
ext a
simp only [exists_prop, Finset.mem_map, Function.Embedding.coeFn_mk, Ne, mem_support_iff]
cases' a with a
· simp [coeff_X_mul_zero, Nat.suc... | [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1",
" (X * p).content = p.content",
" (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd",
" Multis... | [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1"
] |
import Mathlib.Algebra.Category.GroupCat.Basic
import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects
#align_import algebra.category.Group.zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
open CategoryTheory
open CategoryTheory.Limits
universe u
namespace GroupCat
@[to_addi... | Mathlib/Algebra/Category/GroupCat/Zero.lean | 28 | 34 | theorem isZero_of_subsingleton (G : GroupCat) [Subsingleton G] : IsZero G := by |
refine ⟨fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨1⟩, fun f => ?_⟩⟩⟩
· ext x
have : x = 1 := Subsingleton.elim _ _
rw [this, map_one, map_one]
· ext
apply Subsingleton.elim
| [
" IsZero G",
" f = default",
" f x = default x",
" f x✝ = default x✝"
] | [] |
import Mathlib.Algebra.Quaternion
import Mathlib.Tactic.Ring
#align_import algebra.quaternion_basis from "leanprover-community/mathlib"@"3aa5b8a9ed7a7cabd36e6e1d022c9858ab8a8c2d"
open Quaternion
namespace QuaternionAlgebra
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) ... | Mathlib/Algebra/QuaternionBasis.lean | 104 | 106 | theorem k_mul_k : q.k * q.k = -((c₁ * c₂) • (1 : A)) := by |
rw [← i_mul_j, mul_assoc, ← mul_assoc q.j _ _, j_mul_i, ← i_mul_j, ← mul_assoc, mul_neg, ←
mul_assoc, i_mul_i, smul_mul_assoc, one_mul, neg_mul, smul_mul_assoc, j_mul_j, smul_smul]
| [
" q₁ = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂",
" { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ... | [
" q₁ = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := i_mul_j✝, j_mul_i := j_mul_i✝ } = q₂",
" { i := i✝, j := j✝, k := k✝, i_mul_i := i_mul_i✝, j_mul_j := j_mul_j✝, i_mul_j := q₁_i_mul_j, j_mul_i := j_mul_i✝ } =\n q₂",
" { i := i✝¹, j := j✝¹, k := k✝¹, i_mul_i := ... |
import Mathlib.SetTheory.Ordinal.FixedPoint
#align_import set_theory.ordinal.principal from "leanprover-community/mathlib"@"31b269b60935483943542d547a6dd83a66b37dc7"
universe u v w
noncomputable section
open Order
namespace Ordinal
-- Porting note: commented out, doesn't seem necessary
--local infixr:0 "^" => ... | Mathlib/SetTheory/Ordinal/Principal.lean | 62 | 66 | theorem principal_one_iff {op : Ordinal → Ordinal → Ordinal} : Principal op 1 ↔ op 0 0 = 0 := by |
refine ⟨fun h => ?_, fun h a b ha hb => ?_⟩
· rw [← lt_one_iff_zero]
exact h zero_lt_one zero_lt_one
· rwa [lt_one_iff_zero, ha, hb] at *
| [
" Principal op o ↔ Principal (Function.swap op) o",
" Principal op o → Principal (Function.swap op) o",
" Principal (Function.swap op) o → Principal op o",
" Principal op 1 ↔ op 0 0 = 0",
" op 0 0 = 0",
" op 0 0 < 1",
" op a b < 1"
] | [
" Principal op o ↔ Principal (Function.swap op) o",
" Principal op o → Principal (Function.swap op) o",
" Principal (Function.swap op) o → Principal op o"
] |
import Mathlib.Algebra.DualNumber
import Mathlib.Algebra.QuaternionBasis
import Mathlib.Data.Complex.Module
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.CliffordAlgebra.Star
import Mathlib.LinearAlgebra.QuadraticForm.Prod
#align_import linear_algebra.clifford_algebra.equivs fr... | Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean | 223 | 228 | theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x := by |
induction x using CliffordAlgebra.induction with
| algebraMap r => exact reverse.commutes _
| ι x => rw [reverse_ι]
| mul x₁ x₂ hx₁ hx₂ => rw [reverse.map_mul, mul_comm, hx₁, hx₂]
| add x₁ x₂ hx₁ hx₂ => rw [reverse.map_add, hx₁, hx₂]
| [
" (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)",
" ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))",
" ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))",
" toComplex (involute c) = (starRingEnd ℂ) (toComplex c)",
" toComplex (involute ((ι ... | [
" (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)",
" ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))",
" ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))",
" toComplex (involute c) = (starRingEnd ℂ) (toComplex c)",
" toComplex (involute ((ι ... |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Set.Finite
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Data.Setoid.Basic
import Mathlib.GroupTheory.GroupAction.Defs
import Mathlib.GroupTheory.GroupAction.Group
#align_import group_theory.group_action.basic fro... | Mathlib/GroupTheory/GroupAction/Basic.lean | 312 | 317 | theorem smul_cancel_of_non_zero_divisor {M R : Type*} [Monoid M] [NonUnitalNonAssocRing R]
[DistribMulAction M R] (k : M) (h : ∀ x : R, k • x = 0 → x = 0) {a b : R} (h' : k • a = k • b) :
a = b := by |
rw [← sub_eq_zero]
refine h _ ?_
rw [smul_sub, h', sub_self]
| [
" a = b",
" a - b = 0",
" k • (a - b) = 0"
] | [] |
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.NodupEquivFin
import Mathlib.Data.Set.Image
#align_import data.fintype.card from "leanprover-community/mathlib"@"bf2428c9486c407ca38b5b3fb10b87dad0bc99fa"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Fu... | Mathlib/Data/Fintype/Card.lean | 139 | 140 | theorem card_of_finset' {p : Set α} (s : Finset α) (H : ∀ x, x ∈ s ↔ x ∈ p) [Fintype p] :
Fintype.card p = s.card := by | rw [← card_ofFinset s H]; congr; apply Subsingleton.elim
| [
" Trunc (α ≃ Fin (card α))",
" Trunc (α ≃ Fin (Multiset.card univ.val))",
" Trunc { f // Bijective f }",
" card { x // p x } = s.card",
" card { x // p x } = card { x // p x }",
" inst✝ = Fintype.subtype s H",
" card ↑p = s.card",
" card ↑p = card ↑p",
" inst✝ = ofFinset s H"
] | [
" Trunc (α ≃ Fin (card α))",
" Trunc (α ≃ Fin (Multiset.card univ.val))",
" Trunc { f // Bijective f }",
" card { x // p x } = s.card",
" card { x // p x } = card { x // p x }",
" inst✝ = Fintype.subtype s H"
] |
import Mathlib.Data.W.Basic
#align_import data.pfunctor.univariate.basic from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
-- "W", "Idx"
set_option linter.uppercaseLean3 false
universe u v v₁ v₂ v₃
@[pp_with_univ]
structure PFunctor where
A : Type u
B : A → Type u
#align p... | Mathlib/Data/PFunctor/Univariate/Basic.lean | 158 | 162 | theorem iget_map [DecidableEq P.A] [Inhabited α] [Inhabited β] (x : P α)
(f : α → β) (i : P.Idx) (h : i.1 = x.1) : (P.map f x).iget i = f (x.iget i) := by |
simp only [Obj.iget, fst_map, *, dif_pos, eq_self_iff_true]
cases x
rfl
| [
" (mk p).dest = p",
" (mk ⟨fst✝, snd✝⟩).dest = ⟨fst✝, snd✝⟩",
" mk p.dest = p",
" mk (dest (WType.mk a✝ f✝)) = WType.mk a✝ f✝",
" (P.map f x).fst = x.fst",
" (P.map f ⟨fst✝, snd✝⟩).fst = ⟨fst✝, snd✝⟩.fst",
" (P.map f x).iget i = f (x.iget i)",
" (P.map f x).snd (cast ⋯ i.snd) = f (x.snd (cast ⋯ i.snd)... | [
" (mk p).dest = p",
" (mk ⟨fst✝, snd✝⟩).dest = ⟨fst✝, snd✝⟩",
" mk p.dest = p",
" mk (dest (WType.mk a✝ f✝)) = WType.mk a✝ f✝",
" (P.map f x).fst = x.fst",
" (P.map f ⟨fst✝, snd✝⟩).fst = ⟨fst✝, snd✝⟩.fst"
] |
import Mathlib.Probability.Martingale.Upcrossing
import Mathlib.MeasureTheory.Function.UniformIntegrable
import Mathlib.MeasureTheory.Constructions.Polish
#align_import probability.martingale.convergence from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Filter Me... | Mathlib/Probability/Martingale/Convergence.lean | 110 | 127 | theorem not_frequently_of_upcrossings_lt_top (hab : a < b) (hω : upcrossings a b f ω ≠ ∞) :
¬((∃ᶠ n in atTop, f n ω < a) ∧ ∃ᶠ n in atTop, b < f n ω) := by |
rw [← lt_top_iff_ne_top, upcrossings_lt_top_iff] at hω
replace hω : ∃ k, ∀ N, upcrossingsBefore a b f N ω < k := by
obtain ⟨k, hk⟩ := hω
exact ⟨k + 1, fun N => lt_of_le_of_lt (hk N) k.lt_succ_self⟩
rintro ⟨h₁, h₂⟩
rw [frequently_atTop] at h₁ h₂
refine Classical.not_not.2 hω ?_
push_neg
intro k
... | [
" ¬((∃ᶠ (n : ℕ) in atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in atTop, b < f n ω)",
" ∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" False",
" ¬∃ k, ∀ (N : ℕ), upcrossingsBefore a b f N ω < k",
" ∀ (k : ℕ), ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, k ≤ upcrossingsBefore a b f N ω",
" ∃ N, 0 ≤ upcrossingsB... | [] |
import Mathlib.CategoryTheory.EqToHom
#align_import category_theory.sums.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace CategoryTheory
universe v₁ u₁
-- morphism levels before object levels. See note [category_theory universes].
open Sum
section
variable (C : Ty... | Mathlib/CategoryTheory/Sums/Basic.lean | 66 | 67 | theorem hom_inr_inl_false {X : C} {Y : D} (f : Sum.inr X ⟶ Sum.inl Y) : False := by |
cases f
| [
" False"
] | [
" False"
] |
import Mathlib.Combinatorics.Quiver.Basic
#align_import combinatorics.quiver.push from "leanprover-community/mathlib"@"2258b40dacd2942571c8ce136215350c702dc78f"
namespace Quiver
universe v v₁ v₂ u u₁ u₂
variable {V : Type*} [Quiver V] {W : Type*} (σ : V → W)
@[nolint unusedArguments]
def Push (_ : V → W) :=
... | Mathlib/Combinatorics/Quiver/Push.lean | 73 | 89 | theorem lift_comp : (of σ ⋙q lift σ φ τ h) = φ := by |
fapply Prefunctor.ext
· rintro X
simp only [Prefunctor.comp_obj]
apply Eq.symm
exact h X
· rintro X Y f
simp only [Prefunctor.comp_map]
apply eq_of_heq
iterate 2 apply (cast_heq _ _).trans
apply HEq.symm
apply (eqRec_heq _ _).trans
have : ∀ {α γ} {β : α → γ → Sort _} {a a'} (p... | [
" (fun X Y x => τ X ⟶ τ Y) (σ X) (σ Y) (PushQuiver.arrow f)",
" τ (σ X) ⟶ τ (σ Y)",
" φ.obj X ⟶ φ.obj Y",
" of σ ⋙q lift σ φ τ h = φ",
" ∀ (X : V), (of σ ⋙q lift σ φ τ h).obj X = φ.obj X",
" (of σ ⋙q lift σ φ τ h).obj X = φ.obj X",
" (lift σ φ τ h).obj ((of σ).obj X) = φ.obj X",
" φ.obj X = (lift σ φ ... | [
" (fun X Y x => τ X ⟶ τ Y) (σ X) (σ Y) (PushQuiver.arrow f)",
" τ (σ X) ⟶ τ (σ Y)",
" φ.obj X ⟶ φ.obj Y"
] |
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.MeanValue
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Set Fin Filter Function
open scoped NNReal Topology
section Real
variab... | Mathlib/Analysis/Calculus/ContDiff/RCLike.lean | 87 | 101 | theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {f : E → F}
{p : E → FormalMultilinearSeries ℝ E F} {s : Set E} {x : E}
(hf : HasFTaylorSeriesUpToOn 1 f p (insert x s)) (hs : Convex ℝ s) (K : ℝ... |
set f' := fun y => continuousMultilinearCurryFin1 ℝ E F (p y 1)
have hder : ∀ y ∈ s, HasFDerivWithinAt f (f' y) s y := fun y hy =>
(hf.hasFDerivWithinAt le_rfl (subset_insert x s hy)).mono (subset_insert x s)
have hcont : ContinuousWithinAt f' s x :=
(continuousMultilinearCurryFin1 ℝ E F).continuousAt.co... | [
" HasStrictFDerivAt f f' x",
" ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t",
" ‖f' x‖₊ < K"
] | [
" HasStrictFDerivAt f f' x"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 106 | 108 | theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S → WithTop R) :
trop (⨅ i : S, f i) = ∑ i : S, trop (f i) := by |
rw [iInf, ← Set.image_univ, ← coe_univ, trop_sInf_image]
| [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... | [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
open Set
noncomputable section
namespace Complex
theorem isHomeomorphicTrivialFiber... | Mathlib/Analysis/Complex/ReImTopology.lean | 114 | 115 | theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a } := by |
simpa only [closure_Iio] using closure_preimage_re (Iio a)
| [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}"
] | [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}"
] |
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.RingTheory.Localization.Basic
#align_import ring_theory.localization.ideal from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74"
namespace IsLocalization
section CommRing
variable {R : Type*} [CommRing R] (M : Submonoid R... | Mathlib/RingTheory/Localization/Ideal.lean | 171 | 204 | theorem surjective_quotientMap_of_maximal_of_localization {I : Ideal S} [I.IsPrime] {J : Ideal R}
{H : J ≤ I.comap (algebraMap R S)} (hI : (I.comap (algebraMap R S)).IsMaximal) :
Function.Surjective (Ideal.quotientMap I (algebraMap R S) H) := by |
intro s
obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective s
obtain ⟨r, ⟨m, hm⟩, rfl⟩ := mk'_surjective M s
by_cases hM : (Ideal.Quotient.mk (I.comap (algebraMap R S))) m = 0
· have : I = ⊤ := by
rw [Ideal.eq_top_iff_one]
rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_comap] at hM
convert I.mul... | [
" Function.Surjective ⇑(Ideal.quotientMap I (algebraMap R S) H)",
" ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = s",
" ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) s",
" ∃ a, (Ideal.quotientMap I (algebraMap R S) H) a = (Ideal.Quotient.mk I) (mk' S r ⟨m, hm⟩)",
" I = ⊤",
" ... | [] |
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 | 426 | 431 | theorem irreducible_mul_leadingCoeff_inv {p : K[X]} :
Irreducible (p * C (leadingCoeff p)⁻¹) ↔ Irreducible p := by |
by_cases hp0 : p = 0
· simp [hp0]
exact irreducible_mul_isUnit
(isUnit_C.mpr (IsUnit.mk0 _ (inv_ne_zero (leadingCoeff_ne_zero.mpr hp0))))
| [
" Irreducible (p * C p.leadingCoeff⁻¹) ↔ Irreducible p"
] | [] |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.Lifts
import Mathlib.GroupTheory.MonoidLocalization
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Localization.FractionRing
import M... | Mathlib/RingTheory/Localization/Integral.lean | 80 | 90 | theorem integerNormalization_spec (p : S[X]) :
∃ b : M, ∀ i, algebraMap R S ((integerNormalization M p).coeff i) = (b : R) • p.coeff i := by |
use Classical.choose (exist_integer_multiples_of_finset M (p.support.image p.coeff))
intro i
rw [integerNormalization_coeff, coeffIntegerNormalization]
split_ifs with hi
· exact
Classical.choose_spec
(Classical.choose_spec (exist_integer_multiples_of_finset M (p.support.image p.coeff))
... | [
" coeffIntegerNormalization M p i = 0",
" i ∈ p.support",
" ¬coeffIntegerNormalization M p i ≠ 0",
" (integerNormalization M p).coeff i = coeffIntegerNormalization M p i",
" ∃ b, ∀ (i : ℕ), (algebraMap R S) ((integerNormalization M p).coeff i) = ↑b • p.coeff i",
" ∀ (i : ℕ), (algebraMap R S) ((integerNorm... | [
" coeffIntegerNormalization M p i = 0",
" i ∈ p.support",
" ¬coeffIntegerNormalization M p i ≠ 0",
" (integerNormalization M p).coeff i = coeffIntegerNormalization M p i"
] |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 389 | 389 | theorem inv_lt' : a⁻¹ < b ↔ b⁻¹ < a := by | rw [← inv_lt_inv_iff, inv_inv]
| [
" b ≤ c",
" a⁻¹ < b⁻¹ ↔ b < a",
" a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a",
" a⁻¹ < b ↔ b⁻¹ < a"
] | [
" b ≤ c",
" a⁻¹ < b⁻¹ ↔ b < a",
" a * a⁻¹ * b < a * b⁻¹ * b ↔ b < a"
] |
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 | 86 | 89 | theorem eqToHom_iso_hom_naturality {f g : β → C} (z : ∀ b, f b ≅ g b) {j j' : β} (w : j = j') :
(z j).hom ≫ eqToHom (by simp [w]) = eqToHom (by simp [w]) ≫ (z j').hom := by |
cases w
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.Analysis.Normed.Group.Hom
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Algebra.Star.SelfAdjoint
import Mathlib.Algebra.Star.Subalgebra
import Mathlib.Algebra.Star.Unitary
import Mathlib.Topology.Algebra.Module.Star
#align_import analysis.no... | Mathlib/Analysis/NormedSpace/Star/Basic.lean | 149 | 150 | theorem mul_star_self_ne_zero_iff (x : E) : x * x⋆ ≠ 0 ↔ x ≠ 0 := by |
simp only [Ne, mul_star_self_eq_zero_iff]
| [
" ‖x⋆ * x‖ = ‖x‖ * ‖x‖",
" ∀ (x : E), ‖x⋆‖ = ‖x‖",
" ‖x⋆‖ = ‖x‖",
" ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖",
" ‖x * x⋆‖ = ‖x‖ * ‖x‖",
" ‖x⋆⋆ * x⋆‖ = ‖x‖ * ‖x‖",
" ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖",
" x⋆ * x = 0 ↔ x = 0",
" ‖x‖ * ‖x‖ = 0 ↔ x = 0",
" x⋆ * x ≠ 0 ↔ x ≠ 0",
" x * x⋆ = 0 ↔ x = 0",
" x * x⋆ ≠ 0 ↔ x ≠ 0"
] | [
" ‖x⋆ * x‖ = ‖x‖ * ‖x‖",
" ∀ (x : E), ‖x⋆‖ = ‖x‖",
" ‖x⋆‖ = ‖x‖",
" ‖x⋆‖ * ‖x⋆‖ = ‖x * x⋆‖",
" ‖x * x⋆‖ = ‖x‖ * ‖x‖",
" ‖x⋆⋆ * x⋆‖ = ‖x‖ * ‖x‖",
" ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖",
" x⋆ * x = 0 ↔ x = 0",
" ‖x‖ * ‖x‖ = 0 ↔ x = 0",
" x⋆ * x ≠ 0 ↔ x ≠ 0",
" x * x⋆ = 0 ↔ x = 0"
] |
import Mathlib.Algebra.ContinuedFractions.Basic
import Mathlib.Algebra.GroupWithZero.Basic
#align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
section General
variable {α : Type*} {g : Gen... | Mathlib/Algebra/ContinuedFractions/Translations.lean | 53 | 55 | theorem terminatedAt_iff_part_denom_none :
g.TerminatedAt n ↔ g.partialDenominators.get? n = none := by |
rw [terminatedAt_iff_s_none, part_denom_none_iff_s_none]
| [
" g.TerminatedAt n ↔ g.s.TerminatedAt n",
" g.TerminatedAt n ↔ g.s.get? n = none",
" g.partialNumerators.get? n = none ↔ g.s.get? n = none",
" g.partialNumerators.get? n = none ↔ none = none",
" g.partialNumerators.get? n = none ↔ some val✝ = none",
" g.TerminatedAt n ↔ g.partialNumerators.get? n = none",... | [
" g.TerminatedAt n ↔ g.s.TerminatedAt n",
" g.TerminatedAt n ↔ g.s.get? n = none",
" g.partialNumerators.get? n = none ↔ g.s.get? n = none",
" g.partialNumerators.get? n = none ↔ none = none",
" g.partialNumerators.get? n = none ↔ some val✝ = none",
" g.TerminatedAt n ↔ g.partialNumerators.get? n = none",... |
import Mathlib.Analysis.BoxIntegral.DivergenceTheorem
import Mathlib.Analysis.BoxIntegral.Integrability
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.FDeriv.Equiv
#align_impo... | Mathlib/MeasureTheory/Integral/DivergenceTheorem.lean | 143 | 245 | theorem integral_divergence_of_hasFDerivWithinAt_off_countable_aux₂ (I : Box (Fin (n + 1)))
(f : ℝⁿ⁺¹ → Eⁿ⁺¹)
(f' : ℝⁿ⁺¹ → ℝⁿ⁺¹ →L[ℝ] Eⁿ⁺¹)
(s : Set ℝⁿ⁺¹) (hs : s.Countable) (Hc : ContinuousOn f (Box.Icc I))
(Hd : ∀ x ∈ Box.Ioo I \ s, HasFDerivAt f (f' x) x)
(Hi : IntegrableOn (∑ i, f' · (e i) i) (B... |
/- Choose a monotone sequence `J k` of subboxes that cover the interior of `I` and prove that
these boxes satisfy the assumptions of the previous lemma. -/
rcases I.exists_seq_mono_tendsto with ⟨J, hJ_sub, hJl, hJu⟩
have hJ_sub' : ∀ k, Box.Icc (J k) ⊆ Box.Icc I := fun k => (hJ_sub k).trans I.Ioo_subset_Icc
... | [
" ∫ (x : Fin (n + 1) → ℝ) in Box.Icc I, ∑ i : Fin (n + 1), (f' x) (e i) i =\n ∑ i : Fin (n + 1),\n ((∫ (x : Fin n → ℝ) in Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -\n ∫ (x : Fin n → ℝ) in Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)",
" ∫ (x : Fin (n + 1) → ℝ) in ↑I, ∑ i : Fin (... | [
" ∫ (x : Fin (n + 1) → ℝ) in Box.Icc I, ∑ i : Fin (n + 1), (f' x) (e i) i =\n ∑ i : Fin (n + 1),\n ((∫ (x : Fin n → ℝ) in Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -\n ∫ (x : Fin n → ℝ) in Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)",
" ∫ (x : Fin (n + 1) → ℝ) in ↑I, ∑ i : Fin (... |
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 | 308 | 309 | theorem logb_le_logb_of_base_lt_one (h : 0 < x) (h₁ : 0 < y) : logb b x ≤ logb b y ↔ y ≤ x := by |
rw [logb, logb, div_le_div_right_of_neg (log_neg b_pos b_lt_one), log_le_log_iff h₁ h]
| [
" 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.MeasureTheory.Integral.SetIntegral
import Mathlib.Probability.Independence.Basic
#align_import probability.integration from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740"
noncomputable section
open Set MeasureTheory
open scoped ENNReal MeasureTheory
variable {Ω : Type*... | Mathlib/Probability/Integration.lean | 45 | 73 | theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : MeasurableSpace Ω}
{μ : Measure Ω} (hMf : Mf ≤ mΩ) (c : ℝ≥0∞) {T : Set Ω} (h_meas_T : MeasurableSet T)
(h_ind : IndepSets {s | MeasurableSet[Mf] s} {T} μ) (h_meas_f : Measurable[Mf] f) :
(∫⁻ ω, f ω * T.indicator (fun _ => c) ω ∂μ)... |
revert f
have h_mul_indicator : ∀ g, Measurable g → Measurable fun a => g a * T.indicator (fun _ => c) a :=
fun g h_mg => h_mg.mul (measurable_const.indicator h_meas_T)
apply @Measurable.ennreal_induction _ Mf
· intro c' s' h_meas_s'
simp_rw [← inter_indicator_mul]
rw [lintegral_indicator _ (Measur... | [
" ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ {f : Ω → ℝ≥0∞},\n Measurable f →\n ∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ",
" ∀ (c_1 : ℝ≥0∞) ⦃s : Set Ω⦄,... | [] |
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Noetherian
import Mathlib.RingTheory.ChainOfDivisors
import Mathlib.RingTheory.DedekindDomain.Basic
import Mathlib.RingTheory.FractionalIdeal.Operations
#align_impo... | Mathlib/RingTheory/DedekindDomain/Ideal.lean | 87 | 92 | theorem inv_anti_mono (hI : I ≠ 0) (hJ : J ≠ 0) (hIJ : I ≤ J) : J⁻¹ ≤ I⁻¹ := by |
-- Porting note: in Lean3, introducing `x` would just give `x ∈ J⁻¹ → x ∈ I⁻¹`, but
-- in Lean4, it goes all the way down to the subtypes
intro x
simp only [val_eq_coe, mem_coe, mem_inv_iff hJ, mem_inv_iff hI]
exact fun h y hy => h y (hIJ hy)
| [
" ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J",
" J⁻¹ ≤ I⁻¹",
" x ∈ (fun a => ↑a) J⁻¹ → x ∈ (fun a => ↑a) I⁻¹",
" (∀ y ∈ J, x * y ∈ 1) → ∀ y ∈ I, x * y ∈ 1"
] | [
" ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J"
] |
import Mathlib.Combinatorics.SimpleGraph.Basic
namespace SimpleGraph
variable {V : Type*} (G : SimpleGraph V)
structure Dart extends V × V where
adj : G.Adj fst snd
deriving DecidableEq
#align simple_graph.dart SimpleGraph.Dart
initialize_simps_projections Dart (+toProd, -fst, -snd)
attribute [simp] Dart.a... | Mathlib/Combinatorics/SimpleGraph/Dart.lean | 33 | 34 | theorem Dart.ext_iff (d₁ d₂ : G.Dart) : d₁ = d₂ ↔ d₁.toProd = d₂.toProd := by |
cases d₁; cases d₂; simp
| [
" d₁ = d₂ ↔ d₁.toProd = d₂.toProd",
" { toProd := toProd✝, adj := adj✝ } = d₂ ↔ { toProd := toProd✝, adj := adj✝ }.toProd = d₂.toProd",
" { toProd := toProd✝¹, adj := adj✝¹ } = { toProd := toProd✝, adj := adj✝ } ↔\n { toProd := toProd✝¹, adj := adj✝¹ }.toProd = { toProd := toProd✝, adj := adj✝ }.toProd"
] | [] |
import Mathlib.CategoryTheory.Sites.Plus
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
#align_import category_theory.sites.sheafification from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory
open CategoryTheory.Limits Opposite
universe w v u
var... | Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean | 477 | 479 | theorem sheafifyMap_id (P : Cᵒᵖ ⥤ D) : J.sheafifyMap (𝟙 P) = 𝟙 (J.sheafify P) := by |
dsimp [sheafifyMap, sheafify]
simp
| [
" J.sheafifyMap (𝟙 P) = 𝟙 (J.sheafify P)",
" J.plusMap (J.plusMap (𝟙 P)) = 𝟙 (J.plusObj (J.plusObj P))"
] | [] |
import Mathlib.Data.Nat.Bitwise
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Game.Impartial
#align_import set_theory.game.nim from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
noncomputable section
universe u
namespace SetTheory
open scoped PGame
namespace PGame... | Mathlib/SetTheory/Game/Nim.lean | 73 | 75 | theorem moveLeft_nim_hEq (o : Ordinal) :
have : IsWellOrder (Quotient.out o).α (· < ·) := inferInstance
HEq (nim o).moveLeft fun i : o.out.α => nim (typein (· < ·) i) := by | rw [nim_def]; rfl
| [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... | [
" let_fun this := ⋯;\n nim o =\n mk (Quotient.out o).α (Quotient.out o).α (fun o₂ => nim (typein (fun x x_1 => x < x_1) o₂)) fun o₂ =>\n nim (typein (fun x x_1 => x < x_1) o₂)",
" let_fun this := ⋯;\n (mk (Quotient.out o).α (Quotient.out o).α\n (fun o₂ =>\n let_fun x := ⋯;\n nim (type... |
import Mathlib.Data.Nat.Cast.WithTop
import Mathlib.RingTheory.Prime
import Mathlib.RingTheory.Polynomial.Content
import Mathlib.RingTheory.Ideal.Quotient
#align_import ring_theory.eisenstein_criterion from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
open Polynomial Ideal.Quotient
v... | Mathlib/RingTheory/EisensteinCriterion.lean | 52 | 61 | theorem le_natDegree_of_map_eq_mul_X_pow {n : ℕ} {P : Ideal R} (hP : P.IsPrime) {q : R[X]}
{c : Polynomial (R ⧸ P)} (hq : map (mk P) q = c * X ^ n) (hc0 : c.degree = 0) :
n ≤ q.natDegree :=
Nat.cast_le.1
(calc
↑n = degree (q.map (mk P)) := by |
rw [hq, degree_mul, hc0, zero_add, degree_pow, degree_X, nsmul_one]
_ ≤ degree q := degree_map_le _ _
_ ≤ natDegree q := degree_le_natDegree
)
| [
" (map (mk P) f).coeff n = (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).coeff n",
" ¬n = f.natDegree",
" False",
" (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).degree < ↑n",
" ↑f.natDegree < ↑n",
" (map (mk P) f).degree < ↑n",
" ↑n = (map (mk P) q).degree"
] | [
" (map (mk P) f).coeff n = (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).coeff n",
" ¬n = f.natDegree",
" False",
" (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).degree < ↑n",
" ↑f.natDegree < ↑n",
" (map (mk P) f).degree < ↑n"
] |
import Mathlib.Topology.Separation
import Mathlib.Topology.Bases
#align_import topology.dense_embedding from "leanprover-community/mathlib"@"148aefbd371a25f1cff33c85f20c661ce3155def"
noncomputable section
open Set Filter
open scoped Topology
variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
structure D... | Mathlib/Topology/DenseEmbedding.lean | 117 | 124 | theorem tendsto_comap_nhds_nhds {d : δ} {a : α} (di : DenseInducing i)
(H : Tendsto h (𝓝 d) (𝓝 (i a))) (comm : h ∘ g = i ∘ f) : Tendsto f (comap g (𝓝 d)) (𝓝 a) := by |
have lim1 : map g (comap g (𝓝 d)) ≤ 𝓝 d := map_comap_le
replace lim1 : map h (map g (comap g (𝓝 d))) ≤ map h (𝓝 d) := map_mono lim1
rw [Filter.map_map, comm, ← Filter.map_map, map_le_iff_le_comap] at lim1
have lim2 : comap i (map h (𝓝 d)) ≤ comap i (𝓝 (i a)) := comap_mono H
rw [← di.nhds_eq_comap] at l... | [
" closure (i '' s) ∈ 𝓝 (i a)",
" U ⊆ closure (i '' s)",
" Dense (i '' s) ↔ Dense s",
" x ∈ closure s",
" x ∈ univ",
" interior s = ∅",
" False",
" Tendsto f (comap g (𝓝 d)) (𝓝 a)"
] | [
" closure (i '' s) ∈ 𝓝 (i a)",
" U ⊆ closure (i '' s)",
" Dense (i '' s) ↔ Dense s",
" x ∈ closure s",
" x ∈ univ",
" interior s = ∅",
" False"
] |
import Mathlib.Tactic.CategoryTheory.Coherence
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
#align_import category_theory.monoidal.coherence_lemmas from "leanprover-community/mathlib"@"b8b8bf3ea0c625fa1f950034a184e07c67f7bcfe"
open CategoryTheory Category Iso
namespace CategoryTheory.MonoidalCategory
v... | Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean | 63 | 64 | theorem unitors_equal : (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom := by |
coherence
| [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... | [
" (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom = (λ_ X).hom ⊗ 𝟙 Y",
" (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)",
" (λ_ (X ⊗ Y)).inv = ((λ_ X).inv ⊗ 𝟙 Y) ≫ (α_ (𝟙_ C) X Y).hom",
" 𝟙 X ⊗ (ρ_ Y).inv = (ρ_ (X ⊗ Y)).inv ≫ (α_ X Y (𝟙_ C)).hom",
" (λ_ X).inv ⊗ 𝟙 Y = (λ_ (X ⊗ Y)).inv ≫ (α_ (𝟙... |
import Mathlib.CategoryTheory.Monoidal.Category
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.PEmpty
#align_import category_theory.monoidal.of_chosen_finite_products.basic from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
universe v u
names... | Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean | 242 | 246 | theorem tensor_id (X₁ X₂ : C) : tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂) := by |
apply IsLimit.hom_ext (ℬ _ _).isLimit;
rintro ⟨⟨⟩⟩ <;>
· dsimp [tensorHom]
simp
| [
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂)",
" ∀ (j : Discrete WalkingPair),\n tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app j = 𝟙 (tensorObj ℬ X₁ X₂) ≫ (ℬ X₁ X₂).cone.π.app j",
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app { as := WalkingPair.left } =\n 𝟙 (tensorObj ℬ X₁ X₂) ≫ (... | [] |
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Sign
import Mathlib.LinearAlgebra.AffineSpace.Combination
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
import Mathlib.LinearAlgebra.Basis.VectorSpace
#align_import linear_algebra.affine_space.independent from "leanprover-c... | Mathlib/LinearAlgebra/AffineSpace/Independent.lean | 72 | 81 | theorem affineIndependent_iff_of_fintype [Fintype ι] (p : ι → P) :
AffineIndependent k p ↔
∀ w : ι → k, ∑ i, w i = 0 → Finset.univ.weightedVSub p w = (0 : V) → ∀ i, w i = 0 := by |
constructor
· exact fun h w hw hs i => h Finset.univ w hw hs i (Finset.mem_univ _)
· intro h s w hw hs i hi
rw [Finset.weightedVSub_indicator_subset _ _ (Finset.subset_univ s)] at hs
rw [← Finset.sum_indicator_subset _ (Finset.subset_univ s)] at hw
replace h := h ((↑s : Set ι).indicator w) hw hs i
... | [
" AffineIndependent k p ↔ ∀ (w : ι → k), ∑ i : ι, w i = 0 → (univ.weightedVSub p) w = 0 → ∀ (i : ι), w i = 0",
" AffineIndependent k p → ∀ (w : ι → k), ∑ i : ι, w i = 0 → (univ.weightedVSub p) w = 0 → ∀ (i : ι), w i = 0",
" (∀ (w : ι → k), ∑ i : ι, w i = 0 → (univ.weightedVSub p) w = 0 → ∀ (i : ι), w i = 0) → A... | [] |
import Mathlib.ModelTheory.Syntax
import Mathlib.ModelTheory.Semantics
import Mathlib.Algebra.Ring.Equiv
variable {α : Type*}
namespace FirstOrder
open FirstOrder
inductive ringFunc : ℕ → Type
| add : ringFunc 2
| mul : ringFunc 2
| neg : ringFunc 1
| zero : ringFunc 0
| one : ringFunc 0
deriving D... | Mathlib/ModelTheory/Algebra/Ring/Basic.lean | 138 | 140 | theorem card_ring : card Language.ring = 5 := by |
have : Fintype.card Language.ring.Symbols = 5 := rfl
simp [Language.card, this]
| [
" DecidableEq (ring.Functions n)",
" DecidableEq (ringFunc n)",
" DecidableEq (ring.Relations n)",
" DecidableEq Empty",
" (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup",
" ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,... | [
" DecidableEq (ring.Functions n)",
" DecidableEq (ringFunc n)",
" DecidableEq (ring.Relations n)",
" DecidableEq Empty",
" (↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2, mul⟩, Sum.inl ⟨1, neg⟩, Sum.inl ⟨0, zero⟩, Sum.inl ⟨0, one⟩]).Nodup",
" ∀ (x : ring.Symbols),\n x ∈\n { val := ↑[Sum.inl ⟨2, add⟩, Sum.inl ⟨2,... |
import Mathlib.LinearAlgebra.Span
import Mathlib.RingTheory.Ideal.IsPrimary
import Mathlib.RingTheory.Ideal.QuotientOperations
import Mathlib.RingTheory.Noetherian
#align_import ring_theory.ideal.associated_prime from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
variable {R : Type*} [... | Mathlib/RingTheory/Ideal/AssociatedPrime.lean | 83 | 103 | theorem exists_le_isAssociatedPrime_of_isNoetherianRing [H : IsNoetherianRing R] (x : M)
(hx : x ≠ 0) : ∃ P : Ideal R, IsAssociatedPrime P M ∧ (R ∙ x).annihilator ≤ P := by |
have : (R ∙ x).annihilator ≠ ⊤ := by
rwa [Ne, Ideal.eq_top_iff_one, Submodule.mem_annihilator_span_singleton, one_smul]
obtain ⟨P, ⟨l, h₁, y, rfl⟩, h₃⟩ :=
set_has_maximal_iff_noetherian.mpr H
{ P | (R ∙ x).annihilator ≤ P ∧ P ≠ ⊤ ∧ ∃ y : M, P = (R ∙ y).annihilator }
⟨(R ∙ x).annihilator, rfl.le... | [
" IsAssociatedPrime I M'",
" IsAssociatedPrime (Submodule.span R {x}).annihilator M'",
" (Submodule.span R {x}).annihilator = (Submodule.span R {f x}).annihilator",
" r ∈ (Submodule.span R {x}).annihilator ↔ r ∈ (Submodule.span R {f x}).annihilator",
" ¬IsAssociatedPrime I M",
" False",
" I = ⊤",
" ∃ ... | [
" IsAssociatedPrime I M'",
" IsAssociatedPrime (Submodule.span R {x}).annihilator M'",
" (Submodule.span R {x}).annihilator = (Submodule.span R {f x}).annihilator",
" r ∈ (Submodule.span R {x}).annihilator ↔ r ∈ (Submodule.span R {f x}).annihilator",
" ¬IsAssociatedPrime I M",
" False",
" I = ⊤"
] |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {𝕜 V W Q P : Type*}
section AddTorsor
variable (𝕜) [Ring 𝕜] [AddCommGroup V] [Modu... | Mathlib/Analysis/Convex/Intrinsic.lean | 147 | 149 | theorem intrinsicClosure_singleton (x : P) : intrinsicClosure 𝕜 ({x} : Set P) = {x} := by |
simpa only [intrinsicClosure, preimage_coe_affineSpan_singleton, closure_univ, image_univ,
Subtype.range_coe] using coe_affineSpan_singleton _ _ _
| [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False",
" intrinsicInterior 𝕜 {x} = {x}",
" intrinsicFrontier 𝕜 {x} = ∅",
" intrinsicClosure 𝕜 {x} = {x}"
] | [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅",
" (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty",
" intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅",
" False",
" intrinsicInterior 𝕜 {x} = {x}",
" intrinsicFrontier 𝕜 {x} = ∅"
] |
import Mathlib.MeasureTheory.Decomposition.RadonNikodym
import Mathlib.Probability.Kernel.Disintegration.CdfToKernel
#align_import probability.kernel.cond_cdf from "leanprover-community/mathlib"@"3b88f4005dc2e28d42f974cc1ce838f0dafb39b8"
open MeasureTheory Set Filter TopologicalSpace
open scoped NNReal ENNReal Me... | Mathlib/Probability/Kernel/Disintegration/CondCdf.lean | 54 | 58 | theorem IicSnd_apply (r : ℝ) {s : Set α} (hs : MeasurableSet s) :
ρ.IicSnd r s = ρ (s ×ˢ Iic r) := by |
rw [IicSnd, fst_apply hs,
restrict_apply' (MeasurableSet.univ.prod (measurableSet_Iic : MeasurableSet (Iic r))), ←
prod_univ, prod_inter_prod, inter_univ, univ_inter]
| [
" (ρ.IicSnd r) s = ρ (s ×ˢ Iic r)"
] | [] |
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv
import Mathlib.LinearAlgebra.Dual
#align_import analysis.calculus.lagrange_multipliers from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Filter Set
open scoped Topology Fi... | Mathlib/Analysis/Calculus/LagrangeMultipliers.lean | 108 | 121 | theorem IsLocalExtrOn.exists_multipliers_of_hasStrictFDerivAt {ι : Type*} [Fintype ι]
{f : ι → E → ℝ} {f' : ι → E →L[ℝ] ℝ} (hextr : IsLocalExtrOn φ {x | ∀ i, f i x = f i x₀} x₀)
(hf' : ∀ i, HasStrictFDerivAt (f i) (f' i) x₀) (hφ' : HasStrictFDerivAt φ φ' x₀) :
∃ (Λ : ι → ℝ) (Λ₀ : ℝ), (Λ, Λ₀) ≠ 0 ∧ (∑ i, Λ i... |
letI := Classical.decEq ι
replace hextr : IsLocalExtrOn φ {x | (fun i => f i x) = fun i => f i x₀} x₀ := by
simpa only [Function.funext_iff] using hextr
rcases hextr.exists_linear_map_of_hasStrictFDerivAt (hasStrictFDerivAt_pi.2 fun i => hf' i)
hφ' with
⟨Λ, Λ₀, h0, hsum⟩
rcases (LinearEquiv.piRin... | [
" LinearMap.range (f'.prod φ') ≠ ⊤",
" False",
" map φ (𝓝[f ⁻¹' {f x₀}] x₀) = 𝓝 (φ x₀)",
" map (Prod.snd ∘ fφ) (𝓝[fφ ⁻¹' {p | p.1 = f x₀}] x₀) = 𝓝 (φ x₀)",
" map Prod.snd (𝓝 (f x₀, φ x₀) ⊓ 𝓟 {p | p.1 = f x₀}) = 𝓝 (φ x₀)",
" ∃ Λ Λ₀, (Λ, Λ₀) ≠ 0 ∧ ∀ (x : E), Λ (f' x) + Λ₀ • φ' x = 0",
" Λ (f' x) + ... | [
" LinearMap.range (f'.prod φ') ≠ ⊤",
" False",
" map φ (𝓝[f ⁻¹' {f x₀}] x₀) = 𝓝 (φ x₀)",
" map (Prod.snd ∘ fφ) (𝓝[fφ ⁻¹' {p | p.1 = f x₀}] x₀) = 𝓝 (φ x₀)",
" map Prod.snd (𝓝 (f x₀, φ x₀) ⊓ 𝓟 {p | p.1 = f x₀}) = 𝓝 (φ x₀)",
" ∃ Λ Λ₀, (Λ, Λ₀) ≠ 0 ∧ ∀ (x : E), Λ (f' x) + Λ₀ • φ' x = 0",
" Λ (f' x) + ... |
import Mathlib.Algebra.Module.Zlattice.Basic
import Mathlib.NumberTheory.NumberField.Embeddings
import Mathlib.NumberTheory.NumberField.FractionalIdeal
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
variable (K : Type*) [F... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean | 286 | 288 | theorem normAtPlace_apply_isReal {w : InfinitePlace K} (hw : IsReal w) (x : E K):
normAtPlace w x = ‖x.1 ⟨w, hw⟩‖ := by |
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_pos]
| [
" Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))",
" finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K",
" Function.Injective ⇑(mixedEmbedding K)",
" (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0",
" { toFun := fun x => if hw : w.IsRea... | [
" Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))",
" finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K",
" Function.Injective ⇑(mixedEmbedding K)",
" (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0",
" { toFun := fun x => if hw : w.IsRea... |
import Mathlib.Algebra.DualNumber
import Mathlib.Algebra.QuaternionBasis
import Mathlib.Data.Complex.Module
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.CliffordAlgebra.Star
import Mathlib.LinearAlgebra.QuadraticForm.Prod
#align_import linear_algebra.clifford_algebra.equivs fr... | Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean | 182 | 185 | theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ := by |
ext1
dsimp only [AlgHom.comp_apply, Subtype.coe_mk, AlgHom.id_apply]
rw [ofComplex_I, toComplex_ι, one_smul]
| [
" (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)",
" ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))",
" ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))",
" toComplex (involute c) = (starRingEnd ℂ) (toComplex c)",
" toComplex (involute ((ι ... | [
" (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r * (LinearMap.toSpanSingleton ℝ ℂ Complex.I) r = (algebraMap ℝ ℂ) (Q r)",
" ↑r * Complex.I * (↑r * Complex.I) = ↑(-(r * r))",
" ↑r * ↑r * (Complex.I * Complex.I) = ↑(-(r * r))",
" toComplex (involute c) = (starRingEnd ℂ) (toComplex c)",
" toComplex (involute ((ι ... |
import Mathlib.Order.Monotone.Odd
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
#align_import analysis.special_functions.trigonometric.deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
noncomputable section
open s... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean | 35 | 41 | theorem hasStrictDerivAt_sin (x : ℂ) : HasStrictDerivAt sin (cos x) x := by |
simp only [cos, div_eq_mul_inv]
convert ((((hasStrictDerivAt_id x).neg.mul_const I).cexp.sub
((hasStrictDerivAt_id x).mul_const I).cexp).mul_const I).mul_const (2 : ℂ)⁻¹ using 1
simp only [Function.comp, id]
rw [sub_mul, mul_assoc, mul_assoc, I_mul_I, neg_one_mul, neg_neg, mul_one, one_mul, mul_assoc,
... | [
" HasStrictDerivAt sin x.cos x",
" HasStrictDerivAt sin ((cexp (x * I) + cexp (-x * I)) * 2⁻¹) x",
" (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-id x * I) * (-1 * I) - cexp (id x * I) * (1 * I)) * I * 2⁻¹",
" (cexp (x * I) + cexp (-x * I)) * 2⁻¹ = (cexp (-x * I) * (-1 * I) - cexp (x * I) * (1 * I)) * I * 2... | [] |
import Mathlib.Control.Applicative
import Mathlib.Control.Traversable.Basic
import Mathlib.Data.List.Forall2
import Mathlib.Data.Set.Functor
#align_import control.traversable.instances from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607"
universe u v
section Option
open Functor
variab... | Mathlib/Control/Traversable/Instances.lean | 31 | 32 | theorem Option.id_traverse {α} (x : Option α) : Option.traverse (pure : α → Id α) x = x := by |
cases x <;> rfl
| [
" Option.traverse pure x = x",
" Option.traverse pure none = none",
" Option.traverse pure (some val✝) = some val✝"
] | [] |
import Mathlib.CategoryTheory.Limits.Shapes.Biproducts
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero
#align_import category_theory.limits.preserves.shapes.biproducts from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe w₁ w₂ v₁ v₂ u₁ u₂
noncomputable section
open ... | Mathlib/CategoryTheory/Limits/Preserves/Shapes/Biproducts.lean | 349 | 351 | theorem biprodComparison'_comp_biprodComparison :
biprodComparison' F X Y ≫ biprodComparison F X Y = 𝟙 (F.obj X ⊞ F.obj Y) := by |
ext <;> simp [← Functor.map_comp]
| [
" F.biprodComparison' X Y ≫ F.biprodComparison X Y = 𝟙 (F.obj X ⊞ F.obj Y)",
" (biprod.inl ≫ F.biprodComparison' X Y ≫ F.biprodComparison X Y) ≫ biprod.fst =\n (biprod.inl ≫ 𝟙 (F.obj X ⊞ F.obj Y)) ≫ biprod.fst",
" (biprod.inl ≫ F.biprodComparison' X Y ≫ F.biprodComparison X Y) ≫ biprod.snd =\n (biprod.i... | [] |
import Mathlib.Algebra.MvPolynomial.Degrees
#align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
open Set Function Finsupp AddMonoidAlgebra
universe u v w
variable {R : Type u} {S : Type v}
namespace MvPolynomial
varia... | Mathlib/Algebra/MvPolynomial/Variables.lean | 87 | 88 | theorem vars_C : (C r : MvPolynomial σ R).vars = ∅ := by |
classical rw [vars_def, degrees_C, Multiset.toFinset_zero]
| [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support",
" (C r).vars = ∅"
] | [
" p.vars = p.degrees.toFinset",
" p.degrees.toFinset = p.degrees.toFinset",
" vars 0 = ∅",
" ((monomial s) r).vars = s.support"
] |
import Mathlib.Topology.Bases
import Mathlib.Order.Filter.CountableInter
import Mathlib.Topology.Compactness.SigmaCompact
open Set Filter Topology TopologicalSpace
universe u v
variable {X : Type u} {Y : Type v} {ι : Type*}
variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X}
section Lindelof
def I... | Mathlib/Topology/Compactness/Lindelof.lean | 129 | 151 | theorem IsLindelof.elim_countable_subcover {ι : Type v} (hs : IsLindelof s) (U : ι → Set X)
(hUo : ∀ i, IsOpen (U i)) (hsU : s ⊆ ⋃ i, U i) :
∃ r : Set ι, r.Countable ∧ (s ⊆ ⋃ i ∈ r, U i) := by |
have hmono : ∀ ⦃s t : Set X⦄, s ⊆ t → (∃ r : Set ι, r.Countable ∧ t ⊆ ⋃ i ∈ r, U i)
→ (∃ r : Set ι, r.Countable ∧ s ⊆ ⋃ i ∈ r, U i) := by
intro _ _ hst ⟨r, ⟨hrcountable, hsub⟩⟩
exact ⟨r, hrcountable, Subset.trans hst hsub⟩
have hcountable_union : ∀ (S : Set (Set X)), S.Countable
→ (∀ s ∈ S, ∃ r... | [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f",
" p s",
" ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f",
" IsLindelof (s ∩ t)",
" ∃ x ∈ s ∩ t, ClusterPt x f",
" IsLindelof (f '' s)",
" ∃ x ∈ f '' s, ClusterPt x l",
" ClusterPt... | [
" sᶜ ∈ f",
" ∃ x ∈ s, sᶜ ∉ 𝓝 x ⊓ f",
" ∃ x ∈ s, (𝓝 x ⊓ (f ⊓ 𝓟 s)).NeBot",
" sᶜ ∈ 𝓝 x ⊓ f",
" ∃ i ∈ 𝓝 x ⊓ 𝓟 s, (id i)ᶜ ∈ f",
" p s",
" ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f",
" IsLindelof (s ∩ t)",
" ∃ x ∈ s ∩ t, ClusterPt x f",
" IsLindelof (f '' s)",
" ∃ x ∈ f '' s, ClusterPt x l",
" ClusterPt... |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Nilpotent
import Mathlib.Order.Radical
def frattini (G : Type*) [Group G] : Subgroup G :=
Order.radical (Subgroup G)
variable {G H : Type*} [Group G] [Group H] {φ : G →* H} (hφ : Function.Surjective φ)
lemma... | Mathlib/GroupTheory/Frattini.lean | 59 | 74 | theorem frattini_nilpotent [Finite G] : Group.IsNilpotent (frattini G) := by |
-- We use the characterisation of nilpotency in terms of all Sylow subgroups being normal.
have q := (isNilpotent_of_finite_tfae (G := frattini G)).out 0 3
rw [q]; clear q
-- Consider each prime `p` and Sylow `p`-subgroup `P` of `frattini G`.
intro p p_prime P
-- The Frattini argument shows that the normal... | [
" frattini G ≤ comap φ (frattini H)",
" ∀ i ∈ {H_1 | IsCoatom H_1}, ⨅ a ∈ {H | IsCoatom H}, a ≤ comap φ i",
" ⨅ a ∈ {H | IsCoatom H}, a ≤ comap φ M",
" comap φ M ∈ {H | IsCoatom H}",
" (frattini G).Characteristic",
" ∀ (ϕ : G ≃* G), comap ϕ.toMonoidHom (frattini G) = frattini G",
" comap φ.toMonoidHom (... | [
" frattini G ≤ comap φ (frattini H)",
" ∀ i ∈ {H_1 | IsCoatom H_1}, ⨅ a ∈ {H | IsCoatom H}, a ≤ comap φ i",
" ⨅ a ∈ {H | IsCoatom H}, a ≤ comap φ M",
" comap φ M ∈ {H | IsCoatom H}",
" (frattini G).Characteristic",
" ∀ (ϕ : G ≃* G), comap ϕ.toMonoidHom (frattini G) = frattini G",
" comap φ.toMonoidHom (... |
import Mathlib.Algebra.CharZero.Lemmas
import Mathlib.Algebra.GroupWithZero.Commute
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Ring.Pow
import Mathlib.Algebra.Ring.Int
#align_import algebra.order.field.power from "leanprover-community/mathlib"@"acb3d204d4ee883eb686f45d486a2a6811a01329"
... | Mathlib/Algebra/Order/Field/Power.lean | 150 | 152 | theorem Even.zpow_pos_iff (hn : Even n) (h : n ≠ 0) : 0 < a ^ n ↔ a ≠ 0 := by |
obtain ⟨k, rfl⟩ := hn
rw [zpow_add' (by simp [em']), mul_self_pos, zpow_ne_zero_iff (by simpa using h)]
| [
" 0 ≤ a ^ n",
" 0 ≤ a ^ (k + k)",
" a ≠ 0 ∨ k + k ≠ 0 ∨ k = 0 ∧ k = 0",
" 0 ≤ a ^ k * a ^ k",
" 0 < a ^ n ↔ a ≠ 0",
" 0 < a ^ (k + k) ↔ a ≠ 0",
" k ≠ 0"
] | [
" 0 ≤ a ^ n",
" 0 ≤ a ^ (k + k)",
" a ≠ 0 ∨ k + k ≠ 0 ∨ k = 0 ∧ k = 0",
" 0 ≤ a ^ k * a ^ k"
] |
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Topology.Algebra.Module.Basic
#align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156"
open Metric Set Function Filter
open scoped NNReal Topology
instance Real.punctured_nhds_module_neBot {E ... | Mathlib/Analysis/NormedSpace/Real.lean | 61 | 73 | theorem closure_ball (x : E) {r : ℝ} (hr : r ≠ 0) : closure (ball x r) = closedBall x r := by |
refine Subset.antisymm closure_ball_subset_closedBall fun y hy => ?_
have : ContinuousWithinAt (fun c : ℝ => c • (y - x) + x) (Ico 0 1) 1 :=
((continuous_id.smul continuous_const).add continuous_const).continuousWithinAt
convert this.mem_closure _ _
· rw [one_smul, sub_add_cancel]
· simp [closure_Ico zer... | [
" ‖x‖⁻¹ • x ∈ closedBall 0 1",
" ‖t • x‖ = t * ‖x‖",
" dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖",
" ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x",
" (1 - r) * dist y x ≤ (1 - 0) * dist y x",
" 0 ≤ r",
" (1 - 0) * dist y x = dist y x",
" closure (ball x r) = closedBall x r",
" y ∈ closure (ball x r... | [
" ‖x‖⁻¹ • x ∈ closedBall 0 1",
" ‖t • x‖ = t * ‖x‖",
" dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖",
" ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x",
" (1 - r) * dist y x ≤ (1 - 0) * dist y x",
" 0 ≤ r",
" (1 - 0) * dist y x = dist y x"
] |
import Mathlib.SetTheory.Game.State
#align_import set_theory.game.domineering from "leanprover-community/mathlib"@"b134b2f5cf6dd25d4bbfd3c498b6e36c11a17225"
namespace SetTheory
namespace PGame
namespace Domineering
open Function
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ :=
(Equiv.refl ℤ).prodCongr (Equiv.addRig... | Mathlib/SetTheory/Game/Domineering.lean | 79 | 83 | theorem fst_pred_mem_erase_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
(m.1 - 1, m.2) ∈ b.erase m := by |
rw [mem_right] at h
apply Finset.mem_erase_of_ne_of_mem _ h.2
exact ne_of_apply_ne Prod.fst (pred_ne_self m.1)
| [
" (m.1 - 1, m.2) ∈ Finset.erase b m",
" (m.1 - 1, m.2) ≠ m"
] | [] |
import Mathlib.Data.Matrix.Basis
import Mathlib.RingTheory.TensorProduct.Basic
#align_import ring_theory.matrix_algebra from "leanprover-community/mathlib"@"6c351a8fb9b06e5a542fdf427bfb9f46724f9453"
suppress_compilation
universe u v w
open TensorProduct
open TensorProduct
open Algebra.TensorProduct
open Matri... | Mathlib/RingTheory/MatrixAlgebra.lean | 99 | 101 | theorem invFun_smul (a : A) (M : Matrix n n A) :
invFun R A n (a • M) = a ⊗ₜ 1 * invFun R A n M := by |
simp [invFun, Finset.mul_sum]
| [
" ∀ (a₁ a₂ : A) (b₁ b₂ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) =\n (toFunLinear R A n) (a₁ ⊗ₜ[R] b₁) * (toFunLinear R A n) (a₂ ⊗ₜ[R] b₂)",
" (toFunLinear R A n) ((a₁✝ * a₂✝) ⊗ₜ[R] (b₁✝ * b₂✝)) =\n (toFunLinear R A n) (a₁✝ ⊗ₜ[R] b₁✝) * (toFunLinear R A n) (a₂✝ ⊗ₜ[R] b₂✝)",
"... | [
" ∀ (a₁ a₂ : A) (b₁ b₂ : Matrix n n R),\n (toFunLinear R A n) ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) =\n (toFunLinear R A n) (a₁ ⊗ₜ[R] b₁) * (toFunLinear R A n) (a₂ ⊗ₜ[R] b₂)",
" (toFunLinear R A n) ((a₁✝ * a₂✝) ⊗ₜ[R] (b₁✝ * b₂✝)) =\n (toFunLinear R A n) (a₁✝ ⊗ₜ[R] b₁✝) * (toFunLinear R A n) (a₂✝ ⊗ₜ[R] b₂✝)",
"... |
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Int.GCD
import Mathlib.RingTheory.Coprime.Basic
#align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
universe u v
section RelPrime
variable {α I} [Comm... | Mathlib/RingTheory/Coprime/Lemmas.lean | 235 | 240 | theorem IsRelPrime.prod_left : (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x := by |
classical
refine Finset.induction_on t (fun _ ↦ isRelPrime_one_left) fun b t hbt ih H ↦ ?_
rw [Finset.prod_insert hbt]
rw [Finset.forall_mem_insert] at H
exact H.1.mul_left (ih H.2)
| [
" (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x",
" IsRelPrime (∏ i ∈ insert b t, s i) x",
" IsRelPrime (s b * ∏ x ∈ t, s x) x"
] | [] |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α}
namespace Finset
def nonMemberSubfamily (a : α) (𝒜 : ... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 99 | 110 | theorem memberSubfamily_union_nonMemberSubfamily (a : α) (𝒜 : Finset (Finset α)) :
𝒜.memberSubfamily a ∪ 𝒜.nonMemberSubfamily a = 𝒜.image fun s => s.erase a := by |
ext s
simp only [mem_union, mem_memberSubfamily, mem_nonMemberSubfamily, mem_image, exists_prop]
constructor
· rintro (h | h)
· exact ⟨_, h.1, erase_insert h.2⟩
· exact ⟨_, h.1, erase_eq_of_not_mem h.2⟩
· rintro ⟨s, hs, rfl⟩
by_cases ha : a ∈ s
· exact Or.inl ⟨by rwa [insert_erase ha], not_me... | [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s",
" s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" a ∈ insert a s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s",
" insert a (s.erase a) ∈ 𝒜... | [
" s ∈ nonMemberSubfamily a 𝒜 ↔ s ∈ 𝒜 ∧ a ∉ s",
" s ∈ memberSubfamily a 𝒜 ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) ↔ insert a s ∈ 𝒜 ∧ a ∉ s",
" a ∈ insert a s",
" (∃ a_1, (a_1 ∈ 𝒜 ∧ a ∈ a_1) ∧ a_1.erase a = s) → insert a s ∈ 𝒜 ∧ a ∉ s",
" insert a (s.erase a) ∈ 𝒜... |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Geometry.Manifold.LocalInvariantProperties
#align_import geometry.manifold.cont_mdiff from "leanprover-community/mathlib"@"e5ab837fc252451f3eb9124ae6e7b6f57455e7b9"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scope... | Mathlib/Geometry/Manifold/ContMDiff/Defs.lean | 116 | 154 | theorem contDiffWithinAt_localInvariantProp (n : ℕ∞) :
(contDiffGroupoid ∞ I).LocalInvariantProp (contDiffGroupoid ∞ I')
(ContDiffWithinAtProp I I' n) where
is_local {s x u f} u_open xu := by |
have : I.symm ⁻¹' (s ∩ u) ∩ range I = I.symm ⁻¹' s ∩ range I ∩ I.symm ⁻¹' u := by
simp only [inter_right_comm, preimage_inter]
rw [ContDiffWithinAtProp, ContDiffWithinAtProp, this]
symm
apply contDiffWithinAt_inter
have : u ∈ 𝓝 (I.symm (I x)) := by
rw [ModelWithCorners.left_inv]
... | [
" ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (↑I' ∘ f) s x",
" ContDiffWithinAtProp I I' n f s x ↔ ContDiffWithinAtProp I I' n f (s ∩ u) x",
" ↑I.symm ⁻¹' (s ∩ u) ∩ range ↑I = ↑I.symm ⁻¹' s ∩ range ↑I ∩ ↑I.symm ⁻¹' u",
" ContDiffWithinAt 𝕜 n (↑I' ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ range ↑... | [
" ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (↑I' ∘ f) s x"
] |
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 | 107 | 137 | theorem mul_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) (h : constantCoeff σ R φ = u) :
φ * invOfUnit φ u = 1 :=
ext fun n =>
letI := Classical.decEq (σ →₀ ℕ)
if H : n = 0 then by
rw [H]
simp [coeff_mul, support_single_ne_zero, h]
else by
classical
have : ((0 : σ →₀ ℕ), n) ∈ ant... | rw [mem_antidiagonal, zero_add]
rw [coeff_one, if_neg H, coeff_mul, ← Finset.insert_erase this,
Finset.sum_insert (Finset.not_mem_erase _ _), coeff_zero_eq_constantCoeff_apply, h,
coeff_invOfUnit, if_neg H, neg_mul, mul_neg, Units.mul_inv_cancel_left, ←
Finset.insert_erase this, Finset.su... | [
" 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.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
namespace Int
theorem gcd_eq_one_iff_coprime {a b : ℤ} : Int.gcd a b ... | Mathlib/RingTheory/Int/Basic.lean | 49 | 50 | theorem coprime_iff_nat_coprime {a b : ℤ} : IsCoprime a b ↔ Nat.Coprime a.natAbs b.natAbs := by |
rw [← gcd_eq_one_iff_coprime, Nat.coprime_iff_gcd_eq_one, gcd_eq_natAbs]
| [
" a.gcd b = 1 ↔ IsCoprime a b",
" a.gcd b = 1 → IsCoprime a b",
" IsCoprime a b",
" a.natAbs.gcdA b.natAbs * ua * a + a.natAbs.gcdB b.natAbs * ub * b = 1",
" IsCoprime a b → a.gcd b = 1",
" a.gcd b = 1",
" False",
" p ∣ 1",
" ↑p ∣ r * a + s * b",
" IsCoprime a b ↔ a.natAbs.Coprime b.natAbs"
] | [
" a.gcd b = 1 ↔ IsCoprime a b",
" a.gcd b = 1 → IsCoprime a b",
" IsCoprime a b",
" a.natAbs.gcdA b.natAbs * ua * a + a.natAbs.gcdB b.natAbs * ub * b = 1",
" IsCoprime a b → a.gcd b = 1",
" a.gcd b = 1",
" False",
" p ∣ 1",
" ↑p ∣ r * a + s * b"
] |
import Mathlib.Tactic.Ring
#align_import algebra.group_power.identities from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
variable {R : Type*} [CommRing R] {a b x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ y₁ y₂ y₃ y₄ y₅ y₆ y₇ y₈ n : R}
theorem sq_add_sq_mul_sq_add_sq :
(x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 +... | Mathlib/Algebra/Ring/Identities.lean | 55 | 60 | theorem sum_four_sq_mul_sum_four_sq :
(x₁ ^ 2 + x₂ ^ 2 + x₃ ^ 2 + x₄ ^ 2) * (y₁ ^ 2 + y₂ ^ 2 + y₃ ^ 2 + y₄ ^ 2) =
(x₁ * y₁ - x₂ * y₂ - x₃ * y₃ - x₄ * y₄) ^ 2 + (x₁ * y₂ + x₂ * y₁ + x₃ * y₄ - x₄ * y₃) ^ 2 +
(x₁ * y₃ - x₂ * y₄ + x₃ * y₁ + x₄ * y₂) ^ 2 +
(x₁ * y₄ + x₂ * y₃ - x₃ * y₂ + x₄ * y₁) ... |
ring
| [
" (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2",
" (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2",
" a ^ 4 + 4 * b ^ 4 = ((a - b) ^ 2 + b ^ 2) * ((a + b) ^ 2 + b ^ 2)",
" a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a... | [
" (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2",
" (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) = (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2",
" a ^ 4 + 4 * b ^ 4 = ((a - b) ^ 2 + b ^ 2) * ((a + b) ^ 2 + b ^ 2)",
" a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a... |
import Mathlib.RingTheory.Ideal.Basic
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import ring_theory.graded_algebra.homogeneous_ideal from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441"
open SetLike Direc... | Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean | 102 | 107 | theorem HomogeneousIdeal.ext' {I J : HomogeneousIdeal 𝒜} (h : ∀ i, ∀ x ∈ 𝒜 i, x ∈ I ↔ x ∈ J) :
I = J := by |
ext
rw [I.isHomogeneous.mem_iff, J.isHomogeneous.mem_iff]
apply forall_congr'
exact fun i ↦ h i _ (decompose 𝒜 _ i).2
| [
" x ∈ I ↔ ∀ (i : ι), ↑(((decompose 𝒜) x) i) ∈ I",
" x ∈ I",
" ∑ i ∈ DFinsupp.support ((decompose 𝒜) x), ↑(((decompose 𝒜) x) i) ∈ I",
" { toSubmodule := x, is_homogeneous' := hx } = { toSubmodule := y, is_homogeneous' := hy }",
" I = J",
" x✝ ∈ I.toIdeal ↔ x✝ ∈ J.toIdeal",
" (∀ (i : ι), ↑(((decompose ... | [
" x ∈ I ↔ ∀ (i : ι), ↑(((decompose 𝒜) x) i) ∈ I",
" x ∈ I",
" ∑ i ∈ DFinsupp.support ((decompose 𝒜) x), ↑(((decompose 𝒜) x) i) ∈ I",
" { toSubmodule := x, is_homogeneous' := hx } = { toSubmodule := y, is_homogeneous' := hy }"
] |
import Mathlib.CategoryTheory.Abelian.Basic
#align_import category_theory.idempotents.basic from "leanprover-community/mathlib"@"3a061790136d13594ec10c7c90d202335ac5d854"
open CategoryTheory
open CategoryTheory.Category
open CategoryTheory.Limits
open CategoryTheory.Preadditive
open Opposite
namespace Catego... | Mathlib/CategoryTheory/Idempotents/Basic.lean | 63 | 92 | theorem isIdempotentComplete_iff_hasEqualizer_of_id_and_idempotent :
IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p := by |
constructor
· intro
intro X p hp
rcases IsIdempotentComplete.idempotents_split X p hp with ⟨Y, i, e, ⟨h₁, h₂⟩⟩
exact
⟨Nonempty.intro
{ cone := Fork.ofι i (show i ≫ 𝟙 X = i ≫ p by rw [comp_id, ← h₂, ← assoc, h₁, id_comp])
isLimit := by
apply Fork.IsLimit.mk'
... | [
" IsIdempotentComplete C ↔ ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" IsIdempotentComplete C → ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" ∀ (X : C) (p : X ⟶ X), p ≫ p = p → HasEqualizer (𝟙 X) p",
" HasEqualizer (𝟙 X) p",
" i ≫ 𝟙 X = i ≫ p",
" IsLimit (Fork.ofι i ⋯)",... | [] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polyn... | Mathlib/Algebra/Polynomial/Eval.lean | 77 | 78 | theorem eval₂_monomial {n : ℕ} {r : R} : (monomial n r).eval₂ f x = f r * x ^ n := by |
simp [eval₂_eq_sum]
| [
" eval₂ f x p = p.sum fun e a => f a * x ^ e",
" f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ",
" eval₂ f s φ = eval₂ f s φ",
" eval₂ f 0 p = f (p.coeff 0)",
" eval₂ f x 0 = 0",
" eval₂ f x (C a) = f a",
" eval₂ f x X = x",
" eval₂ f x ((monomial n) r) = f r * x ^ n"
] | [
" eval₂ f x p = p.sum fun e a => f a * x ^ e",
" f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ",
" eval₂ f s φ = eval₂ f s φ",
" eval₂ f 0 p = f (p.coeff 0)",
" eval₂ f x 0 = 0",
" eval₂ f x (C a) = f a",
" eval₂ f x X = x"
] |
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 | 49 | 50 | theorem bernoulliFun_eval_zero (k : ℕ) : bernoulliFun k 0 = bernoulli k := by |
rw [bernoulliFun, Polynomial.eval_zero_map, Polynomial.bernoulli_eval_zero, eq_ratCast]
| [
" bernoulliFun k 0 = ↑(bernoulli k)"
] | [] |
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 | 132 | 161 | theorem even_odd_of_coprime (hc : Int.gcd x y = 1) :
x % 2 = 0 ∧ y % 2 = 1 ∨ x % 2 = 1 ∧ y % 2 = 0 := by |
cases' Int.emod_two_eq_zero_or_one x with hx hx <;>
cases' Int.emod_two_eq_zero_or_one y with hy hy
-- x even, y even
· exfalso
apply Nat.not_coprime_of_dvd_of_dvd (by decide : 1 < 2) _ _ hc
· apply Int.natCast_dvd.1
apply Int.dvd_of_emod_eq_zero hx
· apply Int.natCast_dvd.1
apply Int... | [
" 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.Analysis.Convex.Between
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.Topology.MetricSpace.Holder
import Mathlib.Topology.MetricSpace.MetricSeparated
#align_import measure_theory.measure.hausdorff from "leanprover-communit... | Mathlib/MeasureTheory/Measure/Hausdorff.lean | 159 | 226 | theorem borel_le_caratheodory (hm : IsMetric μ) : borel X ≤ μ.caratheodory := by |
rw [borel_eq_generateFrom_isClosed]
refine MeasurableSpace.generateFrom_le fun t ht => μ.isCaratheodory_iff_le.2 fun s => ?_
set S : ℕ → Set X := fun n => {x ∈ s | (↑n)⁻¹ ≤ infEdist x t}
have Ssep (n) : IsMetricSeparated (S n) t :=
⟨n⁻¹, ENNReal.inv_ne_zero.2 (ENNReal.natCast_ne_top _),
fun x hx y hy... | [
" μ (⋃ i ∈ I, s i) = ∑ i ∈ I, μ (s i)",
" μ (⋃ i ∈ ∅, s i) = ∑ i ∈ ∅, μ (s i)",
" μ (⋃ i_1 ∈ insert i I, s i_1) = ∑ i ∈ insert i I, μ (s i)",
" IsMetricSeparated (s i) (⋃ x ∈ I, s x)",
" borel X ≤ μ.caratheodory",
" MeasurableSpace.generateFrom {s | IsClosed s} ≤ μ.caratheodory",
" μ (s ∩ t) + μ (s \\ t... | [
" μ (⋃ i ∈ I, s i) = ∑ i ∈ I, μ (s i)",
" μ (⋃ i ∈ ∅, s i) = ∑ i ∈ ∅, μ (s i)",
" μ (⋃ i_1 ∈ insert i I, s i_1) = ∑ i ∈ insert i I, μ (s i)",
" IsMetricSeparated (s i) (⋃ x ∈ I, s x)"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.Matrix.Trace
#align_import data.matrix.basis from "leanprover-community/mathlib"@"320df450e9abeb5fc6417971e75acb6ae8bc3794"
variable {l m n : Type*}
variable {R α : Type*}
namespace Matrix
open Matrix
variable [DecidableEq l] [DecidableEq m] [Decida... | Mathlib/Data/Matrix/Basis.lean | 51 | 54 | theorem stdBasisMatrix_add (i : m) (j : n) (a b : α) :
stdBasisMatrix i j (a + b) = stdBasisMatrix i j a + stdBasisMatrix i j b := by |
unfold stdBasisMatrix; ext
split_ifs with h <;> simp [h]
| [
" r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0",
" stdBasisMatrix i j 0 = 0",
" (fun i' j'... | [
" r • stdBasisMatrix i j a = stdBasisMatrix i j (r • a)",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) = fun i' j' => if i = i' ∧ j = j' then r • a else 0",
" (r • fun i' j' => if i = i' ∧ j = j' then a else 0) i✝ j✝ = if i = i✝ ∧ j = j✝ then r • a else 0",
" stdBasisMatrix i j 0 = 0",
" (fun i' j'... |
import Mathlib.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 | 80 | 82 | theorem boundary_inf (a b : α) : ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b := by |
unfold boundary
rw [hnot_inf_distrib, inf_sup_left, inf_right_comm, ← inf_assoc]
| [
" ∂ ⊤ = ⊥",
" ∂ (¬¬a) = ∂ (¬a)",
" ¬∂ a = ⊤",
" ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b",
" a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)"
] | [
" ∂ ⊤ = ⊥",
" ∂ (¬¬a) = ∂ (¬a)",
" ¬∂ a = ⊤"
] |
import Mathlib.Algebra.BigOperators.Finsupp
import Mathlib.Algebra.BigOperators.Finprod
import Mathlib.Data.Fintype.BigOperators
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.SetTheory.Cardinal.Cofinality
#align_import linear_algebra.basis from "leanprover-communit... | Mathlib/LinearAlgebra/Basis.lean | 167 | 169 | theorem repr_total (v) : b.repr (Finsupp.total _ _ _ b v) = v := by |
rw [← b.coe_repr_symm]
exact b.repr.apply_symm_apply v
| [
" { repr := b } = default",
" f = g",
" { repr := repr✝ } = g",
" { repr := repr✝¹ } = { repr := repr✝ }",
" ↑f.repr.symm = ↑g.repr.symm",
" (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i 1)",
" b... | [
" { repr := b } = default",
" f = g",
" { repr := repr✝ } = g",
" { repr := repr✝¹ } = { repr := repr✝ }",
" ↑f.repr.symm = ↑g.repr.symm",
" (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1",
" b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i 1)",
" b... |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Algebra.Group.Prod
import Mathlib.Data.Multiset.Basic
#align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4"
assert_not_exists MonoidWithZero
variable {F ι α β γ : Type*}
names... | Mathlib/Algebra/BigOperators/Group/Multiset.lean | 125 | 127 | theorem prod_filter_mul_prod_filter_not (p) [DecidablePred p] :
(s.filter p).prod * (s.filter (fun a ↦ ¬ p a)).prod = s.prod := by |
rw [← prod_add, filter_add_not]
| [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... | [
" (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)",
" (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y",
" foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s",
" s.toList... |
import Mathlib.Data.Set.Subsingleton
import Mathlib.Order.WithBot
#align_import data.set.image from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29"
universe u v
open Function Set
namespace Set
variable {α β γ : Type*} {ι ι' : Sort*}
section Image
variable {f : α → β} {s t : Set... | Mathlib/Data/Set/Image.lean | 263 | 263 | theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) := by | aesop
| [
" (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)",
" (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)",
" f '' s = g '' s",
" x ∈ f '' s ↔ x ∈ g '' s",
" f a = x ↔ g a = x",
" f '' s ⊆ f '' t",
" f a ∈ f '' t",
" f ∘ g '' a = f '' (g '' a)"
] | [
" (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)",
" (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)",
" f '' s = g '' s",
" x ∈ f '' s ↔ x ∈ g '' s",
" f a = x ↔ g a = x",
" f '' s ⊆ f '' t",
" f a ∈ f '' t"
] |
import Mathlib.CategoryTheory.Limits.Preserves.Finite
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Topology.Category.TopCat.Limits.Products
universe w w' v u
open CategoryTheory Opposit... | Mathlib/Topology/Category/TopCat/Yoneda.lean | 48 | 58 | theorem piComparison_fac {α : Type} (X : α → TopCat) :
piComparison (yonedaPresheaf'.{w, w'} Y) (fun x ↦ op (X x)) =
(yonedaPresheaf' Y).map ((opCoproductIsoProduct X).inv ≫ (TopCat.sigmaIsoSigma X).inv.op) ≫
(equivEquivIso (sigmaEquiv Y (fun x ↦ (X x).1))).inv ≫ (Types.productIso _).inv := by |
rw [← Category.assoc, Iso.eq_comp_inv]
ext
simp only [yonedaPresheaf', unop_op, piComparison, types_comp_apply,
Types.productIso_hom_comp_eval_apply, Types.pi_lift_π_apply, comp_apply, TopCat.coe_of,
unop_comp, Quiver.Hom.unop_op, sigmaEquiv, equivEquivIso_hom, Equiv.toIso_inv,
Equiv.coe_fn_symm_mk, ... | [
" (piComparison (yonedaPresheaf' Y) fun x => { unop := X x }) =\n (yonedaPresheaf' Y).map ((opCoproductIsoProduct X).inv ≫ (TopCat.sigmaIsoSigma X).inv.op) ≫\n (equivEquivIso (sigmaEquiv Y fun x => ↑(X x))).inv ≫ (Types.productIso fun i => C(↑(X i), Y)).inv",
" (piComparison (yonedaPresheaf' Y) fun x => {... | [] |
import Mathlib.CategoryTheory.Balanced
import Mathlib.CategoryTheory.Limits.EssentiallySmall
import Mathlib.CategoryTheory.Limits.Opposites
import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms
import Mathlib.CategoryTheory.Subobject.Lattice
import Mathlib.CategoryTheory.Subobject.WellPowered
import Mathlib.Data.S... | Mathlib/CategoryTheory/Generator.lean | 109 | 110 | theorem isCoseparating_unop_iff (𝒢 : Set Cᵒᵖ) : IsCoseparating 𝒢.unop ↔ IsSeparating 𝒢 := by |
rw [← isSeparating_op_iff, Set.unop_op]
| [
" IsSeparating 𝒢.op ↔ IsCoseparating 𝒢",
" f = g",
" (h ≫ f.op).unop = (h ≫ g.op).unop",
" (f.unop ≫ h).op = (g.unop ≫ h).op",
" IsCoseparating 𝒢.op ↔ IsSeparating 𝒢",
" (f.op ≫ h).unop = (g.op ≫ h).unop",
" (h ≫ f.unop).op = (h ≫ g.unop).op",
" IsCoseparating 𝒢.unop ↔ IsSeparating 𝒢"
] | [
" IsSeparating 𝒢.op ↔ IsCoseparating 𝒢",
" f = g",
" (h ≫ f.op).unop = (h ≫ g.op).unop",
" (f.unop ≫ h).op = (g.unop ≫ h).op",
" IsCoseparating 𝒢.op ↔ IsSeparating 𝒢",
" (f.op ≫ h).unop = (g.op ≫ h).unop",
" (h ≫ f.unop).op = (h ≫ g.unop).op"
] |
import Mathlib.Analysis.Convex.Hull
#align_import analysis.convex.extreme from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963"
open Function Set
open scoped Classical
open Affine
variable {𝕜 E F ι : Type*} {π : ι → Type*}
section SMul
variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoi... | Mathlib/Analysis/Convex/Extreme.lean | 111 | 117 | theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
(hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i) := by |
obtain i := Classical.arbitrary ι
refine ⟨iInter_subset_of_subset i (hAF i).1, fun x₁ hx₁A x₂ hx₂A x hxF hx ↦ ?_⟩
simp_rw [mem_iInter] at hxF ⊢
have h := fun i ↦ (hAF i).2 hx₁A hx₂A (hxF i) hx
exact ⟨fun i ↦ (h i).1, fun i ↦ (h i).2⟩
| [
" IsExtreme 𝕜 A C",
" x₁ ∈ C ∧ x₂ ∈ C",
" IsExtreme 𝕜 A (B ∩ C)",
" ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x : E⦄, x ∈ B ∩ C → x ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C",
" x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C",
" IsExtreme 𝕜 A (⋂ i, F i)",
" x₁ ∈ ⋂ i, F i ∧ x₂ ∈ ⋂ i, F i",
" (∀ (i : ι), x₁ ∈ F i... | [
" IsExtreme 𝕜 A C",
" x₁ ∈ C ∧ x₂ ∈ C",
" IsExtreme 𝕜 A (B ∩ C)",
" ∀ ⦃x₁ : E⦄, x₁ ∈ A → ∀ ⦃x₂ : E⦄, x₂ ∈ A → ∀ ⦃x : E⦄, x ∈ B ∩ C → x ∈ openSegment 𝕜 x₁ x₂ → x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C",
" x₁ ∈ B ∩ C ∧ x₂ ∈ B ∩ C"
] |
import Mathlib.CategoryTheory.Adjunction.Unique
import Mathlib.CategoryTheory.Adjunction.FullyFaithful
import Mathlib.CategoryTheory.Sites.Sheaf
import Mathlib.CategoryTheory.Limits.Preserves.Finite
universe v₁ v₂ u₁ u₂
namespace CategoryTheory
open Limits
variable {C : Type u₁} [Category.{v₁} C] (J : Grothendiec... | Mathlib/CategoryTheory/Sites/Sheafification.lean | 131 | 138 | theorem isIso_toSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : IsIso (toSheafify J P) := by |
refine ⟨(sheafificationAdjunction J D |>.counit.app ⟨P, hP⟩).val, ?_, ?_⟩
· change _ = (𝟙 (sheafToPresheaf J D ⋙ 𝟭 (Cᵒᵖ ⥤ D)) : _).app ⟨P, hP⟩
rw [← sheafificationAdjunction J D |>.right_triangle]
rfl
· change (sheafToPresheaf _ _).map _ ≫ _ = _
change _ ≫ (sheafificationAdjunction J D).unit.app ((... | [
" PreservesFiniteLimits (sheafToPresheaf J A).leftAdjoint",
" sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P)",
" sheafifyMap J (η ≫ γ) = sheafifyMap J η ≫ sheafifyMap J γ",
" IsIso (toSheafify J P)",
" toSheafify J P ≫ ((sheafificationAdjunction J D).counit.app { val := P, cond := hP }).val = 𝟙 P",
" toSheafif... | [
" PreservesFiniteLimits (sheafToPresheaf J A).leftAdjoint",
" sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P)",
" sheafifyMap J (η ≫ γ) = sheafifyMap J η ≫ sheafifyMap J γ"
] |
import Mathlib.Algebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.DirectSum.TensorProduct
#align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d"
noncomputable section
open DirectSum TensorProduct
ope... | Mathlib/LinearAlgebra/DirectSum/Finsupp.lean | 137 | 142 | theorem finsuppRight_apply (t : M ⊗[R] (ι →₀ N)) (i : ι) :
finsuppRight R M N ι t i = lTensor M (Finsupp.lapply i) t := by |
induction t using TensorProduct.induction_on with
| zero => simp
| tmul m f => simp [finsuppRight_apply_tmul_apply]
| add x y hx hy => simp [map_add, hx, hy]
| [
" (finsuppLeft R M N ι) (p ⊗ₜ[R] n) = p.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" ∀ (f g : ι →₀ M),\n ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →\n ((finsuppLeft ... | [
" (finsuppLeft R M N ι) (p ⊗ₜ[R] n) = p.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)",
" ∀ (f g : ι →₀ M),\n ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →\n ((finsuppLeft ... |
import Mathlib.Analysis.BoxIntegral.Partition.Basic
#align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f"
noncomputable section
open scoped Classical
open Filter
open Function Set Filter
namespace BoxIntegral
variable {ι M : Type*} {... | Mathlib/Analysis/BoxIntegral/Partition/Split.lean | 147 | 153 | theorem splitLower_ne_splitUpper (I : Box ι) (i : ι) (x : ℝ) :
I.splitLower i x ≠ I.splitUpper i x := by |
cases' le_or_lt x (I.lower i) with h
· rw [splitUpper_eq_self.2 h, splitLower_eq_bot.2 h]
exact WithBot.bot_ne_coe
· refine (disjoint_splitLower_splitUpper I i x).ne ?_
rwa [Ne, splitLower_eq_bot, not_le]
| [
" ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}",
" (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}",
" ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧... | [
" ↑(I.splitLower i x) = ↑I ∩ {y | y i ≤ x}",
" (univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) = ↑I ∩ {y | y i ≤ x}",
" (y ∈ univ.pi fun i_1 => Ioc (I.lower i_1) (update I.upper i (min x (I.upper i)) i_1)) ↔ y ∈ ↑I ∩ {y | y i ≤ x}",
" ((∀ (x : ι), I.lower x < y x) ∧ y i ≤ x ∧... |
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Inverse
#align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputab... | Mathlib/Analysis/Calculus/ContDiff/Basic.lean | 117 | 118 | theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt 𝕜 n f s x := by |
rw [Subsingleton.elim f fun _ => 0]; exact contDiffWithinAt_const
| [
" iteratedFDerivWithin 𝕜 i (fun x => 0) s x = 0",
" iteratedFDerivWithin 𝕜 0 (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 0 (fun x => 0) s x) x✝ = 0 x✝",
" iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x) m = 0 m",
" ((fderivWithin 𝕜 (fun ... | [
" iteratedFDerivWithin 𝕜 i (fun x => 0) s x = 0",
" iteratedFDerivWithin 𝕜 0 (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 0 (fun x => 0) s x) x✝ = 0 x✝",
" iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x = 0",
" (iteratedFDerivWithin 𝕜 (i + 1) (fun x => 0) s x) m = 0 m",
" ((fderivWithin 𝕜 (fun ... |
import Mathlib.Init.Control.Combinators
import Mathlib.Data.Option.Defs
import Mathlib.Logic.IsEmpty
import Mathlib.Logic.Relator
import Mathlib.Util.CompileInductive
import Aesop
#align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a"
universe u
namespace Op... | Mathlib/Data/Option/Basic.lean | 108 | 110 | theorem bind_congr {f g : α → Option β} {x : Option α}
(h : ∀ a ∈ x, f a = g a) : x.bind f = x.bind g := by |
cases x <;> simp only [some_bind, none_bind, mem_def, h]
| [
" y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y",
" f a ∈ Option.map f o ↔ a ∈ o",
" (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)",
" (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)",
" some a₁ = some a₂",
" x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b",
" none.bind f = so... | [
" y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y",
" f a ∈ Option.map f o ↔ a ∈ o",
" (∀ (y : β), y ∈ Option.map f o → p y) ↔ ∀ (x : α), x ∈ o → p (f x)",
" (∃ y, y ∈ Option.map f o ∧ p y) ↔ ∃ x, x ∈ o ∧ p (f x)",
" some a₁ = some a₂",
" x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b",
" none.bind f = so... |
import Mathlib.Algebra.Polynomial.Expand
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.FieldTheory.Minpoly.Field
import Mathlib.RingTheory.PowerBasis
#align_import field_theory.separable from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
... | Mathlib/FieldTheory/Separable.lean | 138 | 149 | theorem _root_.Associated.separable {f g : R[X]}
(ha : Associated f g) (h : f.Separable) : g.Separable := by |
obtain ⟨⟨u, v, h1, h2⟩, ha⟩ := ha
obtain ⟨a, b, h⟩ := h
refine ⟨a * v + b * derivative v, b * v, ?_⟩
replace h := congr($h * $(h1))
have h3 := congr(derivative $(h1))
simp only [← ha, derivative_mul, derivative_one] at h3 ⊢
calc
_ = (a * f + b * derivative f) * (u * v)
+ (b * f) * (derivative u... | [
" ¬Separable 0",
" False",
" f.Separable",
" (X + C a).Separable",
" IsCoprime (X + C a) 1",
" X.Separable",
" IsCoprime X 1",
" (C r).Separable ↔ IsUnit r",
" g.Separable",
" IsCoprime f g",
" IsUnit f ∨ f.Separable ∧ n + 2 = 1 ∨ n + 2 = 0",
" Polynomial.map f a * Polynomial.map f p + Polynom... | [
" ¬Separable 0",
" False",
" f.Separable",
" (X + C a).Separable",
" IsCoprime (X + C a) 1",
" X.Separable",
" IsCoprime X 1",
" (C r).Separable ↔ IsUnit r",
" g.Separable",
" IsCoprime f g",
" IsUnit f ∨ f.Separable ∧ n + 2 = 1 ∨ n + 2 = 0",
" Polynomial.map f a * Polynomial.map f p + Polynom... |
import Mathlib.Data.Set.Equitable
import Mathlib.Logic.Equiv.Fin
import Mathlib.Order.Partition.Finpartition
#align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset Fintype
namespace Finpartition
variable {α : Type*} [DecidableEq α] ... | Mathlib/Order/Partition/Equipartition.lean | 61 | 66 | theorem IsEquipartition.card_part_eq_average_iff (hP : P.IsEquipartition) (ht : t ∈ P.parts) :
t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1 := by |
have a := hP.card_parts_eq_average ht
have b : ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1) := by
by_contra h; exact absurd (h.1 ▸ h.2) (lt_add_one _).ne
tauto
| [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1",
" ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)",
" False"
] | [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1"
] |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Set.Subsingleton
#align_import combinatorics.double_counting from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe"
open Finset Function Relator
variable {α β : Type*}
namespace Finset
section Bipartite
varia... | Mathlib/Combinatorics/Enumerative/DoubleCounting.lean | 110 | 120 | theorem card_le_card_of_forall_subsingleton (hs : ∀ a ∈ s, ∃ b, b ∈ t ∧ r a b)
(ht : ∀ b ∈ t, ({ a ∈ s | r a b } : Set α).Subsingleton) : s.card ≤ t.card := by |
classical
rw [← mul_one s.card, ← mul_one t.card]
exact card_mul_le_card_mul r
(fun a h ↦ card_pos.2 (by
rw [← coe_nonempty, coe_bipartiteAbove]
exact hs _ h : (t.bipartiteAbove r a).Nonempty))
(fun b h ↦ card_le_one.2 (by
simp_rw [mem_bipartiteBelow]
exact ht _ h)... | [
" ∑ a ∈ s, (bipartiteAbove r t a).card = ∑ b ∈ t, (bipartiteBelow r s b).card",
" (∑ x ∈ s, ∑ a ∈ t, if r x a then 1 else 0) = ∑ x ∈ t, ∑ a ∈ s, if r a x then 1 else 0",
" s.card ≤ t.card",
" s.card * 1 ≤ t.card * 1",
" (bipartiteAbove r t a).Nonempty",
" {b | b ∈ t ∧ r a b}.Nonempty",
" ∀ a ∈ bipartite... | [
" ∑ a ∈ s, (bipartiteAbove r t a).card = ∑ b ∈ t, (bipartiteBelow r s b).card",
" (∑ x ∈ s, ∑ a ∈ t, if r x a then 1 else 0) = ∑ x ∈ t, ∑ a ∈ s, if r a x then 1 else 0"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finsupp.Defs
import Mathlib.Data.Finset.Pairwise
#align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
variable {ι M : Type*} [DecidableEq ι]
theorem List.support_sum_subset [Add... | Mathlib/Data/Finsupp/BigOperators.lean | 81 | 96 | theorem List.support_sum_eq [AddMonoid M] (l : List (ι →₀ M))
(hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) :
l.sum.support = l.foldr (Finsupp.support · ⊔ ·) ∅ := by |
induction' l with hd tl IH
· simp
· simp only [List.pairwise_cons] at hl
simp only [List.sum_cons, List.foldr_cons, Function.comp_apply]
rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union]
suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x ⊔ y)) ∅) by
exact Fi... | [
" l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l",
" [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []",
" (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" hd.support ⊆ hd.support",... | [
" l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l",
" [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []",
" (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)",
" hd.support ⊆ hd.support",... |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Mul
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
noncomputable section
open scoped Classical... | Mathlib/Analysis/Calculus/Deriv/Mul.lean | 336 | 339 | theorem HasDerivAt.finset_prod (hf : ∀ i ∈ u, HasDerivAt (f i) (f' i) x) :
HasDerivAt (∏ i ∈ u, f i ·) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) x := by |
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using
(HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt
| [
" HasDerivAt (fun x => ∏ i ∈ u, f i x) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) x"
] | [] |
import Mathlib.Data.Matroid.Restrict
variable {α : Type*} {M : Matroid α} {E B I X R J : Set α}
namespace Matroid
open Set
section EmptyOn
def emptyOn (α : Type*) : Matroid α where
E := ∅
Base := (· = ∅)
Indep := (· = ∅)
indep_iff' := by simp [subset_empty_iff]
exists_base := ⟨∅, rfl⟩
base_exchange... | Mathlib/Data/Matroid/Constructions.lean | 57 | 59 | theorem ground_eq_empty_iff : (M.E = ∅) ↔ M = emptyOn α := by |
simp only [emptyOn, eq_iff_indep_iff_indep_forall, iff_self_and]
exact fun h ↦ by simp [h, subset_empty_iff]
| [
" ∀ ⦃I : Set α⦄, (fun x => x = ∅) I ↔ ∃ B, (fun x => x = ∅) B ∧ I ⊆ B",
" ExchangeProperty fun x => x = ∅",
" (fun x => x = ∅) Y✝ → ∀ a ∈ ∅ \\ Y✝, ∃ b ∈ Y✝ \\ ∅, (fun x => x = ∅) (insert b (∅ \\ {a}))",
" ∀ X ⊆ ∅, ExistsMaximalSubsetProperty (fun x => x = ∅) X",
" (maximals (fun x x_1 => x ⊆ x_1) {Y | (fun ... | [
" ∀ ⦃I : Set α⦄, (fun x => x = ∅) I ↔ ∃ B, (fun x => x = ∅) B ∧ I ⊆ B",
" ExchangeProperty fun x => x = ∅",
" (fun x => x = ∅) Y✝ → ∀ a ∈ ∅ \\ Y✝, ∃ b ∈ Y✝ \\ ∅, (fun x => x = ∅) (insert b (∅ \\ {a}))",
" ∀ X ⊆ ∅, ExistsMaximalSubsetProperty (fun x => x = ∅) X",
" (maximals (fun x x_1 => x ⊆ x_1) {Y | (fun ... |
import Mathlib.Analysis.SpecialFunctions.Exponential
#align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84e0d918668460a34aa19d02fe2e0e2286da0"
open NormedSpace
open scoped Nat
section SinCos
theorem Complex.hasSum_cos' (z : ℂ) :
HasSum (fun n : ℕ => (z *... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean | 75 | 79 | theorem Complex.hasSum_sin (z : ℂ) :
HasSum (fun n : ℕ => (-1) ^ n * z ^ (2 * n + 1) / ↑(2 * n + 1)!) (Complex.sin z) := by |
convert Complex.hasSum_sin' z using 1
simp_rw [mul_pow, pow_succ, pow_mul, Complex.I_sq, ← mul_assoc, mul_div_assoc, div_right_comm,
div_self Complex.I_ne_zero, mul_comm _ ((-1 : ℂ) ^ _), mul_one_div, mul_div_assoc, mul_assoc]
| [
" HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos",
" HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp ℂ (z * I) + NormedSpace.exp ℂ (-z * I)) / 2)",
" HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +... | [
" HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos",
" HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp ℂ (z * I) + NormedSpace.exp ℂ (-z * I)) / 2)",
" HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +... |
import Mathlib.LinearAlgebra.Eigenspace.Basic
import Mathlib.FieldTheory.IsAlgClosed.Spectrum
#align_import linear_algebra.eigenspace.is_alg_closed from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1"
open Set Function Module FiniteDimensional
variable {K V : Type*} [Field K] [AddCommGro... | Mathlib/LinearAlgebra/Eigenspace/Triangularizable.lean | 64 | 123 | theorem iSup_genEigenspace_eq_top [IsAlgClosed K] [FiniteDimensional K V] (f : End K V) :
⨆ (μ : K) (k : ℕ), f.genEigenspace μ k = ⊤ := by |
-- We prove the claim by strong induction on the dimension of the vector space.
induction' h_dim : finrank K V using Nat.strong_induction_on with n ih generalizing V
cases' n with n
-- If the vector space is 0-dimensional, the result is trivial.
· rw [← top_le_iff]
simp only [Submodule.finrank_eq_zero.1 ... | [
" ∃ c, f.HasEigenvalue c",
" ∃ c, c ∈ spectrum K f",
" ⨆ μ, ⨆ k, (f.genEigenspace μ) k = ⊤",
" ⊤ ≤ ⨆ μ, ⨆ k, (f.genEigenspace μ) k",
" 0 < finrank ?m.11865 V",
" 0 < n + 1",
" 0 < finrank K ↥ES",
" 0 < finrank K ↥((f.genEigenspace μ₀) (finrank K V))",
" 0 < finrank K ↥((f.genEigenspace μ₀) (n + 1))"... | [
" ∃ c, f.HasEigenvalue c",
" ∃ c, c ∈ spectrum K f"
] |
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex
#align_import analysis.special_functions.trigonometric.complex_deriv from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
noncomputable section
namespace Complex
open Set Filter
open scoped Real
theorem hasStrictDerivAt_t... | Mathlib/Analysis/SpecialFunctions/Trigonometric/ComplexDeriv.lean | 53 | 56 | theorem continuousAt_tan {x : ℂ} : ContinuousAt tan x ↔ cos x ≠ 0 := by |
refine ⟨fun hc h₀ => ?_, fun h => (hasDerivAt_tan h).continuousAt⟩
exact not_tendsto_nhds_of_tendsto_atTop (tendsto_abs_tan_of_cos_eq_zero h₀) _
(hc.norm.tendsto.mono_left inf_le_left)
| [
" HasStrictDerivAt tan (1 / x.cos ^ 2) x",
" 1 / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2",
" (x.sin ^ 2 + x.cos ^ 2) / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2",
" Tendsto (fun x => abs x.tan) (𝓝[≠] x) atTop",
" Tendsto (fun x => ‖x.sin‖ / ‖x.cos‖) (𝓝[≠] x) atTop",
" Fal... | [
" HasStrictDerivAt tan (1 / x.cos ^ 2) x",
" 1 / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2",
" (x.sin ^ 2 + x.cos ^ 2) / x.cos ^ 2 = (x.cos * x.cos - x.sin * -x.sin) / x.cos ^ 2",
" Tendsto (fun x => abs x.tan) (𝓝[≠] x) atTop",
" Tendsto (fun x => ‖x.sin‖ / ‖x.cos‖) (𝓝[≠] x) atTop",
" Fal... |
import Mathlib.Topology.Perfect
import Mathlib.Topology.MetricSpace.Polish
import Mathlib.Topology.MetricSpace.CantorScheme
#align_import topology.perfect from "leanprover-community/mathlib"@"3905fa80e62c0898131285baab35559fbc4e5cda"
open Set Filter
section CantorInjMetric
open Function ENNReal
variable {α : T... | Mathlib/Topology/MetricSpace/Perfect.lean | 80 | 129 | theorem Perfect.exists_nat_bool_injection [CompleteSpace α] :
∃ f : (ℕ → Bool) → α, range f ⊆ C ∧ Continuous f ∧ Injective f := by |
obtain ⟨u, -, upos', hu⟩ := exists_seq_strictAnti_tendsto' (zero_lt_one' ℝ≥0∞)
have upos := fun n => (upos' n).1
let P := Subtype fun E : Set α => Perfect E ∧ E.Nonempty
choose C0 C1 h0 h1 hdisj using
fun {C : Set α} (hC : Perfect C) (hnonempty : C.Nonempty) {ε : ℝ≥0∞} (hε : 0 < ε) =>
hC.small_diam_spl... | [
" let D := closure (EMetric.ball x (ε / 2) ∩ C);\n Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε",
" x ∈ EMetric.ball x (ε / 2)",
" 0 < ε / 2",
" ε ≠ 0 ∧ 2 ≠ ⊤",
" 2 ≠ ⊤",
" closure (EMetric.ball x (ε / 2) ∩ C) ⊆ C",
" EMetric.ball x (ε / 2) ∩ C ⊆ C",
" EMetric.diam (closure (EMetric.ball x (ε ... | [
" let D := closure (EMetric.ball x (ε / 2) ∩ C);\n Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε",
" x ∈ EMetric.ball x (ε / 2)",
" 0 < ε / 2",
" ε ≠ 0 ∧ 2 ≠ ⊤",
" 2 ≠ ⊤",
" closure (EMetric.ball x (ε / 2) ∩ C) ⊆ C",
" EMetric.ball x (ε / 2) ∩ C ⊆ C",
" EMetric.diam (closure (EMetric.ball x (ε ... |
import Mathlib.Analysis.Calculus.ContDiff.Bounds
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Normed.Group.ZeroAtInfty
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Ana... | Mathlib/Analysis/Distribution/SchwartzSpace.lean | 210 | 214 | theorem decay_smul_aux (k n : ℕ) (f : 𝓢(E, F)) (c : 𝕜) (x : E) :
‖x‖ ^ k * ‖iteratedFDeriv ℝ n (c • (f : E → F)) x‖ =
‖c‖ * ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ := by |
rw [mul_comm ‖c‖, mul_assoc, iteratedFDeriv_const_smul_apply (f.smooth _),
norm_smul c (iteratedFDeriv ℝ n (⇑f) x)]
| [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1",
" ‖x‖ ^ ... | [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1",
" ‖x‖ ^ ... |
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Covering.Besicovitch
import Mathlib.Tactic.AdaptationNote
#align_import measure_theory.covering.besicovitch_vector_space from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
universe u
open Metric Set Fini... | Mathlib/MeasureTheory/Covering/BesicovitchVectorSpace.lean | 87 | 89 | theorem centerAndRescale_radius {N : ℕ} {τ : ℝ} (a : SatelliteConfig E N τ) :
a.centerAndRescale.r (last N) = 1 := by |
simp [SatelliteConfig.centerAndRescale, inv_mul_cancel (a.rpos _).ne']
| [
" 0 < (fun i => (a.r (last N))⁻¹ * a.r i) i",
" (fun i j =>\n (fun i => (a.r (last N))⁻¹ * a.r i) i ≤\n dist ((fun i => (a.r (last N))⁻¹ • (a.c i - a.c (last N))) i)\n ((fun i => (a.r (last N))⁻¹ • (a.c i - a.c (last N))) j) ∧\n (fun i => (a.r (last N))⁻¹ * a.r i) j ≤ τ * (fu... | [
" 0 < (fun i => (a.r (last N))⁻¹ * a.r i) i",
" (fun i j =>\n (fun i => (a.r (last N))⁻¹ * a.r i) i ≤\n dist ((fun i => (a.r (last N))⁻¹ • (a.c i - a.c (last N))) i)\n ((fun i => (a.r (last N))⁻¹ • (a.c i - a.c (last N))) j) ∧\n (fun i => (a.r (last N))⁻¹ * a.r i) j ≤ τ * (fu... |
import Mathlib.FieldTheory.Normal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.Integral
#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
universe u v w
open scoped Classical Polynomial
open Polynomial
vari... | Mathlib/FieldTheory/IsAlgClosed/Basic.lean | 104 | 111 | theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by |
refine ⟨fun h => ?_, fun hp => by rw [hp, roots_C]⟩
rcases le_or_lt (degree p) 0 with hd | hd
· exact eq_C_of_degree_le_zero hd
· obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hd.ne'
rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz
simp at hz
| [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1",
" p.roots = 0 ↔ p = C (p.coeff 0)",
" p.roots = 0",
" p = C (p.coeff 0)"
] | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1"
] |
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.PEquiv
#align_import data.matrix.pequiv from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1"
namespace PEquiv
open Matrix
universe u v
variable {k l m n : Type*}
variable {α : Type v}
open Matrix
def toMatrix [DecidableEq n] [Zer... | Mathlib/Data/Matrix/PEquiv.lean | 62 | 67 | theorem mul_matrix_apply [Fintype m] [DecidableEq m] [Semiring α] (f : l ≃. m) (M : Matrix m n α)
(i j) : (f.toMatrix * M :) i j = Option.casesOn (f i) 0 fun fi => M fi j := by |
dsimp [toMatrix, Matrix.mul_apply]
cases' h : f i with fi
· simp [h]
· rw [Finset.sum_eq_single fi] <;> simp (config := { contextual := true }) [h, eq_comm]
| [
" (f.toMatrix * M) i j = Option.casesOn (f i) 0 fun fi => M fi j",
" ∑ j_1 : m, (if j_1 ∈ f i then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) (f i)",
" ∑ j_1 : m, (if j_1 ∈ none then 1 else 0) * M j_1 j = Option.rec 0 (fun val => M val j) none",
" ∑ j_1 : m, (if j_1 ∈ some fi then 1 else 0) * M j... | [] |
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks
import Mathlib.CategoryTheory.Limits.Shapes.StrongEpi
import Mathlib.CategoryTheory.MorphismProperty.Factorization
#align_import category_theory.limits.shapes.images from "leanprover-community/mathlib"@"563aed... | Mathlib/CategoryTheory/Limits/Shapes/Images.lean | 108 | 115 | theorem ext {F F' : MonoFactorisation f} (hI : F.I = F'.I)
(hm : F.m = eqToHom hI ≫ F'.m) : F = F' := by |
cases' F with _ Fm _ _ Ffac; cases' F' with _ Fm' _ _ Ffac'
cases' hI
simp? at hm says simp only [eqToHom_refl, Category.id_comp] at hm
congr
apply (cancel_mono Fm).1
rw [Ffac, hm, Ffac']
| [
" F = F'",
" mk I✝ Fm e✝ Ffac = F'",
" mk I✝¹ Fm e✝¹ Ffac = mk I✝ Fm' e✝ Ffac'",
" mk I✝ Fm e✝¹ Ffac = mk I✝ Fm' e✝ Ffac'",
" e✝¹ = e✝",
" e✝¹ ≫ Fm = e✝ ≫ Fm"
] | [] |
import Mathlib.Data.Set.Image
import Mathlib.Order.Interval.Set.Basic
#align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
variable {α : Type*}
namespace WithTop
@[simp]
theorem preimage_coe_top : (some : α → WithTop α) ⁻¹' {⊤} =... | Mathlib/Order/Interval/Set/WithBotTop.lean | 59 | 59 | theorem preimage_coe_Icc : (some : α → WithTop α) ⁻¹' Icc a b = Icc a b := by | simp [← Ici_inter_Iic]
| [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤",
" some ⁻¹' Icc ↑a ↑b = Icc a b"
] | [
" range some = Iio ⊤",
" x ∈ range some ↔ x ∈ Iio ⊤"
] |
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Analysis.NormedSpace.Dual
import Mathlib.Analysis.NormedSpace.Star.Basic
#align_import analysis.inner_product_space.dual from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open scoped Classical
o... | Mathlib/Analysis/InnerProductSpace/Dual.lean | 82 | 91 | theorem ext_inner_left_basis {ι : Type*} {x y : E} (b : Basis ι 𝕜 E)
(h : ∀ i : ι, ⟪b i, x⟫ = ⟪b i, y⟫) : x = y := by |
apply (toDualMap 𝕜 E).map_eq_iff.mp
refine (Function.Injective.eq_iff ContinuousLinearMap.coe_injective).mp (Basis.ext b ?_)
intro i
simp only [ContinuousLinearMap.coe_coe]
rw [toDualMap_apply, toDualMap_apply]
rw [← inner_conj_symm]
conv_rhs => rw [← inner_conj_symm]
exact congr_arg conj (h i)
| [
" x = y",
" (toDualMap 𝕜 E) x = (toDualMap 𝕜 E) y",
" ∀ (i : ι), ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ↑((toDualMap 𝕜 E) x) (b i) = ↑((toDualMap 𝕜 E) y) (b i)",
" ((toDualMap 𝕜 E) x) (b i) = ((toDualMap 𝕜 E) y) (b i)",
" ⟪x, b i⟫_𝕜 = ⟪y, b i⟫_𝕜",
" (starRingEnd 𝕜) ⟪b i, ... | [] |
import Mathlib.Algebra.Bounds
import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc
import Mathlib.Data.Set.Pointwise.SMul
#align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Set
open Pointwise
variable ... | Mathlib/Algebra/Order/Pointwise.lean | 211 | 222 | theorem smul_Ico : r • Ico a b = Ico (r • a) (r • b) := by |
ext x
simp only [mem_smul_set, smul_eq_mul, mem_Ico]
constructor
· rintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩
constructor
· exact (mul_le_mul_left hr).mpr a_h_left_left
· exact (mul_lt_mul_left hr).mpr a_h_left_right
· rintro ⟨a_left, a_right⟩
use x / r
refine ⟨⟨(le_div_iff' hr).mpr... | [
" r • Ioo a b = Ioo (r • a) (r • b)",
" x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)",
" (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b",
" (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b",
" r * a✝ < r * a ∧ r * a < r * b",
" r * a✝ < r * a",
" r * a < r * b",
" r * a < x ∧ x < r ... | [
" r • Ioo a b = Ioo (r • a) (r • b)",
" x ∈ r • Ioo a b ↔ x ∈ Ioo (r • a) (r • b)",
" (∃ y, (a < y ∧ y < b) ∧ r * y = x) ↔ r * a < x ∧ x < r * b",
" (∃ y, (a < y ∧ y < b) ∧ r * y = x) → r * a < x ∧ x < r * b",
" r * a✝ < r * a ∧ r * a < r * b",
" r * a✝ < r * a",
" r * a < r * b",
" r * a < x ∧ x < r ... |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 106 | 106 | theorem content_one : content (1 : R[X]) = 1 := by | rw [← C_1, content_C, normalize_one]
| [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0",
" content 1 = 1"
] | [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0"
] |
import Mathlib.Algebra.MvPolynomial.PDeriv
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.LinearAlgebra.LinearIndependent
import Mathlib.RingTheory.Polynomial.Pochhammer
#align_import ring_theory.polynomial.bernstein from "le... | Mathlib/RingTheory/Polynomial/Bernstein.lean | 93 | 99 | theorem eval_at_1 (n ν : ℕ) : (bernsteinPolynomial R n ν).eval 1 = if ν = n then 1 else 0 := by |
rw [bernsteinPolynomial]
split_ifs with h
· subst h; simp
· obtain hνn | hnν := Ne.lt_or_lt h
· simp [zero_pow $ Nat.sub_ne_zero_of_lt hνn]
· simp [Nat.choose_eq_zero_of_lt hnν]
| [
" bernsteinPolynomial ℤ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n ν = 0",
" Polynomial.map f (bernsteinPolynomial R n ν) = bernsteinPolynomial S n ν",
" (bernsteinPolynomial R n ν).comp (1 - X) = bernsteinPolynomial R n (n - ν)",
" bernsteinPol... | [
" bernsteinPolynomial ℤ 3 2 = 3 * X ^ 2 - 3 * X ^ 3",
" 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3",
" bernsteinPolynomial R n ν = 0",
" Polynomial.map f (bernsteinPolynomial R n ν) = bernsteinPolynomial S n ν",
" (bernsteinPolynomial R n ν).comp (1 - X) = bernsteinPolynomial R n (n - ν)",
" bernsteinPol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.