Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.Num.Lemmas
import Mathlib.Data.Option.Basic
import Mathlib.SetTheory.Cardinal.Basic
#align_import computability.encoding from "leanprover-community/mathlib"@"b6395b3a5acd655b16385fa0cdbf1961d6c34b3e"
universe u v
open Cardinal
namespace Computability
struc... | Mathlib/Computability/Encoding.lean | 43 | 45 | theorem Encoding.encode_injective {α : Type u} (e : Encoding α) : Function.Injective e.encode := by |
refine fun _ _ h => Option.some_injective _ ?_
rw [← e.decode_encode, ← e.decode_encode, h]
| [
" Function.Injective e.encode",
" some x✝¹ = some x✝"
] | [] |
import Mathlib.RingTheory.RingHomProperties
#align_import ring_theory.ring_hom.finite from "leanprover-community/mathlib"@"b5aecf07a179c60b6b37c1ac9da952f3b565c785"
namespace RingHom
open scoped TensorProduct
open TensorProduct Algebra.TensorProduct
| Mathlib/RingTheory/RingHom/Finite.lean | 23 | 25 | theorem finite_stableUnderComposition : StableUnderComposition @Finite := by |
introv R hf hg
exact hg.comp hf
| [
" StableUnderComposition @Finite",
" (g.comp f).Finite"
] | [] |
import Mathlib.Data.Real.Basic
#align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Real
noncomputable def sign (r : ℝ) : ℝ :=
if r < 0 then -1 else if 0 < r then 1 else 0
#align real.sign Real.sign
theorem sign_of_neg {r : ℝ} (hr : r < 0) : si... | Mathlib/Data/Real/Sign.lean | 43 | 43 | theorem sign_zero : sign 0 = 0 := by | rw [sign, if_neg (lt_irrefl _), if_neg (lt_irrefl _)]
| [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0"
] | [
" r.sign = -1",
" r.sign = 1"
] |
import Batteries.Data.Char
import Batteries.Data.List.Lemmas
import Batteries.Data.String.Basic
import Batteries.Tactic.Lint.Misc
import Batteries.Tactic.SeqFocus
namespace String
attribute [ext] ext
theorem lt_trans {s₁ s₂ s₃ : String} : s₁ < s₂ → s₂ < s₃ → s₁ < s₃ :=
List.lt_trans' (α := Char) Nat.lt_trans
... | .lake/packages/batteries/Batteries/Data/String/Lemmas.lean | 148 | 157 | theorem utf8GetAux_of_valid (cs cs' : List Char) {i p : Nat} (hp : i + utf8Len cs = p) :
utf8GetAux (cs ++ cs') ⟨i⟩ ⟨p⟩ = cs'.headD default := by |
match cs, cs' with
| [], [] => rfl
| [], c::cs' => simp [← hp, utf8GetAux]
| c::cs, cs' =>
simp [utf8GetAux, -List.headD_eq_head?]; rw [if_neg]
case hnc => simp [← hp, Pos.ext_iff]; exact ne_self_add_add_csize
refine utf8GetAux_of_valid cs cs' ?_
simpa [Nat.add_assoc, Nat.add_comm] using hp
| [
" utf8Len (cs₁ ++ cs₂) = utf8Len cs₁ + utf8Len cs₂",
" utf8Len ([] ++ cs₂) = utf8Len [] + utf8Len cs₂",
" utf8Len (head✝ :: tail✝ ++ cs₂) = utf8Len (head✝ :: tail✝) + utf8Len cs₂",
" utf8Len (cs₁.reverseAux cs₂) = utf8Len cs₁ + utf8Len cs₂",
" utf8Len ([].reverseAux cs₂) = utf8Len [] + utf8Len cs₂",
" utf... | [
" utf8Len (cs₁ ++ cs₂) = utf8Len cs₁ + utf8Len cs₂",
" utf8Len ([] ++ cs₂) = utf8Len [] + utf8Len cs₂",
" utf8Len (head✝ :: tail✝ ++ cs₂) = utf8Len (head✝ :: tail✝) + utf8Len cs₂",
" utf8Len (cs₁.reverseAux cs₂) = utf8Len cs₁ + utf8Len cs₂",
" utf8Len ([].reverseAux cs₂) = utf8Len [] + utf8Len cs₂",
" utf... |
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 | 61 | 63 | theorem sSup_inv (s : Set α) : sSup s⁻¹ = (sInf s)⁻¹ := by |
rw [← image_inv, sSup_image]
exact ((OrderIso.inv α).map_sInf _).symm
| [
" sSup s⁻¹ = (sInf s)⁻¹",
" ⨆ a ∈ s, a⁻¹ = (sInf s)⁻¹"
] | [] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Data.Tree.Basic
import Mathlib.Logic.Basic
import Mathlib.Tactic.NormNum.Core
import Mathlib.Util.SynthesizeUsing
import Mathlib.Util.Qq
open Lean Parser Tactic Mathlib Meta NormNum Qq
initialize registerTraceClass `CancelDen... | Mathlib/Tactic/CancelDenoms/Core.lean | 89 | 102 | theorem cancel_factors_eq {α} [Field α] {a b ad bd a' b' gcd : α} (ha : ad * a = a')
(hb : bd * b = b') (had : ad ≠ 0) (hbd : bd ≠ 0) (hgcd : gcd ≠ 0) :
(a = b) = (1 / gcd * (bd * a') = 1 / gcd * (ad * b')) := by |
rw [← ha, ← hb, ← mul_assoc bd, ← mul_assoc ad, mul_comm bd]
ext; constructor
· rintro rfl
rfl
· intro h
simp only [← mul_assoc] at h
refine mul_left_cancel₀ (mul_ne_zero ?_ ?_) h
on_goal 1 => apply mul_ne_zero
on_goal 1 => apply div_ne_zero
· exact one_ne_zero
all_goals assumption
| [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2",
" k * e⁻¹ = n",
" (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))",
" 0 < ad * bd",
" 0 < 1 / gcd",
" (a ≤ b) = (1 / gcd... | [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1",
" e * n = e'",
" n * (e1 + e2) = t1 + t2",
" n * (e1 - e2) = t1 - t2",
" n * -e = -t",
" k * e1 ^ e2 = l * t1 ^ e2",
" k * e⁻¹ = n",
" (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))",
" 0 < ad * bd",
" 0 < 1 / gcd",
" (a ≤ b) = (1 / gcd... |
import Mathlib.NumberTheory.LegendreSymbol.AddCharacter
import Mathlib.NumberTheory.LegendreSymbol.ZModChar
import Mathlib.Algebra.CharP.CharAndCard
#align_import number_theory.legendre_symbol.gauss_sum from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
universe u v
open AddChar MulCh... | Mathlib/NumberTheory/GaussSum.lean | 74 | 78 | theorem gaussSum_mulShift (χ : MulChar R R') (ψ : AddChar R R') (a : Rˣ) :
χ a * gaussSum χ (mulShift ψ a) = gaussSum χ ψ := by |
simp only [gaussSum, mulShift_apply, Finset.mul_sum]
simp_rw [← mul_assoc, ← map_mul]
exact Fintype.sum_bijective _ a.mulLeft_bijective _ _ fun x => rfl
| [
" χ ↑a * gaussSum χ (ψ.mulShift ↑a) = gaussSum χ ψ",
" ∑ i : R, χ ↑a * (χ i * ψ (↑a * i)) = ∑ a : R, χ a * ψ a",
" ∑ x : R, χ (↑a * x) * ψ (↑a * x) = ∑ a : R, χ a * ψ a"
] | [] |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Algebra.Group.Action.Defs
import Mathlib.Algebra.Group.Units
#align_import algebra.free_monoid.basic from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec"
variable {α : Type*} {β : Type*} {γ : Type*} {M : Type*} [Monoid M] {N :... | Mathlib/Algebra/FreeMonoid/Basic.lean | 111 | 112 | theorem toList_prod (xs : List (FreeMonoid α)) : toList xs.prod = (xs.map toList).join := by |
induction xs <;> simp [*, List.join]
| [
" toList xs.prod = (List.map (⇑toList) xs).join",
" toList [].prod = (List.map ⇑toList []).join",
" toList (head✝ :: tail✝).prod = (List.map (⇑toList) (head✝ :: tail✝)).join"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 98 | 110 | theorem strictConvexOn_zpow {m : ℤ} (hm₀ : m ≠ 0) (hm₁ : m ≠ 1) :
StrictConvexOn ℝ (Ioi 0) fun x : ℝ => x ^ m := by |
apply strictConvexOn_of_deriv2_pos' (convex_Ioi 0)
· exact (continuousOn_zpow₀ m).mono fun x hx => ne_of_gt hx
intro x hx
rw [mem_Ioi] at hx
rw [iter_deriv_zpow]
refine mul_pos ?_ (zpow_pos_of_pos hx _)
norm_cast
refine int_prod_range_pos (by decide) fun hm => ?_
rw [← Finset.coe_Ico] at hm
norm_ca... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.Algebra.MvPolynomial.Degrees
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
#align_import ring_theory.mv_polynomial.basic from "leanprover-community/mathlib"@"2f5b500a507... | Mathlib/RingTheory/MvPolynomial/Basic.lean | 107 | 110 | theorem mem_restrictTotalDegree (p : MvPolynomial σ R) :
p ∈ restrictTotalDegree σ R m ↔ p.totalDegree ≤ m := by |
rw [totalDegree, Finset.sup_le_iff]
rfl
| [
" p ∈ restrictTotalDegree σ R m ↔ p.totalDegree ≤ m",
" p ∈ restrictTotalDegree σ R m ↔ ∀ b ∈ p.support, (b.sum fun x e => e) ≤ m"
] | [] |
import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
suppress_compilation
universe uR uM₁ uM₂ uM₃ uM₄
variable {R : Type uR} {M₁ : Type uM₁} {M₂ : Type uM₂} {M₃ : Type uM₃} {M₄ : Type uM₄}
open scoped TensorProduct
namespace QuadraticForm
variable [Co... | Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean | 79 | 85 | theorem tmul_comp_tensorComm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
(Q₂.tmul Q₁).comp (TensorProduct.comm R M₁ M₂) = Q₁.tmul Q₂ := by |
refine (QuadraticForm.associated_rightInverse R).injective ?_
ext m₁ m₂ m₁' m₂'
dsimp [-associated_apply]
simp only [associated_tmul, QuadraticForm.associated_comp]
exact mul_comm _ _
| [
" (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃",
" (associatedHom R) ((Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap)) = (associatedHom R) (Q₁.tmul Q₃)",
" ((TensorProduct.AlgebraTensorModule.curry\n (((TensorProduct.AlgebraTensorModule.curry\n ... | [
" (Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap) = Q₁.tmul Q₃",
" (associatedHom R) ((Q₂.tmul Q₄).comp (TensorProduct.map f.toLinearMap g.toLinearMap)) = (associatedHom R) (Q₁.tmul Q₃)",
" ((TensorProduct.AlgebraTensorModule.curry\n (((TensorProduct.AlgebraTensorModule.curry\n ... |
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals
import Mathlib.Analysis.Calculus.ParametricIntegral
import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
#align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb"
open MeasureTheory Set Filter A... | Mathlib/Analysis/MellinTransform.lean | 210 | 231 | theorem mellin_convergent_top_of_isBigO {f : ℝ → ℝ}
(hfc : AEStronglyMeasurable f <| volume.restrict (Ioi 0)) {a s : ℝ}
(hf : f =O[atTop] (· ^ (-a))) (hs : s < a) :
∃ c : ℝ, 0 < c ∧ IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioi c) := by |
obtain ⟨d, hd'⟩ := hf.isBigOWith
simp_rw [IsBigOWith, eventually_atTop] at hd'
obtain ⟨e, he⟩ := hd'
have he' : 0 < max e 1 := zero_lt_one.trans_le (le_max_right _ _)
refine ⟨max e 1, he', ?_, ?_⟩
· refine AEStronglyMeasurable.mul ?_ (hfc.mono_set (Ioi_subset_Ioi he'.le))
refine (ContinuousAt.continuou... | [
" IntegrableOn (fun t => ↑t ^ (s - 1) • f t) T volume ↔ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) T volume",
" AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (volume.restrict T)",
" ∀ x ∈ T, ContinuousAt (fun t => ↑t ^ (s - 1)) x",
" IntegrableOn (fun a => ‖↑a ^ (s - 1) • f a‖) T volume ↔ IntegrableO... | [
" IntegrableOn (fun t => ↑t ^ (s - 1) • f t) T volume ↔ IntegrableOn (fun t => t ^ (s.re - 1) * ‖f t‖) T volume",
" AEStronglyMeasurable (fun t => ↑t ^ (s - 1) • f t) (volume.restrict T)",
" ∀ x ∈ T, ContinuousAt (fun t => ↑t ^ (s - 1)) x",
" IntegrableOn (fun a => ‖↑a ^ (s - 1) • f a‖) T volume ↔ IntegrableO... |
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Data.List.OfFn
import Mathlib.Data.Set.Pointwise.Basic
#align_import data.set.pointwise.list_of_fn from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Set
variable {F α β γ : Type*}
variable [Monoid α] {s t : Set α}... | Mathlib/Data/Set/Pointwise/ListOfFn.lean | 26 | 31 | theorem mem_prod_list_ofFn {a : α} {s : Fin n → Set α} :
a ∈ (List.ofFn s).prod ↔ ∃ f : ∀ i : Fin n, s i, (List.ofFn fun i ↦ (f i : α)).prod = a := by |
induction' n with n ih generalizing a
· simp_rw [List.ofFn_zero, List.prod_nil, Fin.exists_fin_zero_pi, eq_comm, Set.mem_one]
· simp_rw [List.ofFn_succ, List.prod_cons, Fin.exists_fin_succ_pi, Fin.cons_zero, Fin.cons_succ,
mem_mul, @ih, exists_exists_eq_and, SetCoe.exists, exists_prop]
| [
" a ∈ (List.ofFn s).prod ↔ ∃ f, (List.ofFn fun i => ↑(f i)).prod = a"
] | [] |
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.class_group from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
variable {R K L : Type*} [CommRing R]
variable [Field K] [Field L] [DecidableEq L]
variable [Algebra R K] [Is... | Mathlib/RingTheory/ClassGroup.lean | 61 | 63 | theorem coe_toPrincipalIdeal (x : Kˣ) :
(toPrincipalIdeal R K x : FractionalIdeal R⁰ K) = spanSingleton _ (x : K) := by |
simp only [toPrincipalIdeal]; rfl
| [
" spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1",
" spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1",
" ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1",
" ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ... | [
" spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1",
" spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1",
" ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1",
" ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ... |
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.fold from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
variable {α β : Type*}
section Fold
variable (op : α → α → α) [hc : Std.Commutative op] [ha : Std.Associative op]
local notation a " * " b => ... | Mathlib/Data/Multiset/Fold.lean | 108 | 110 | theorem fold_union_inter [DecidableEq α] (s₁ s₂ : Multiset α) (b₁ b₂ : α) :
((s₁ ∪ s₂).fold op b₁ * (s₁ ∩ s₂).fold op b₂) = s₁.fold op b₁ * s₂.fold op b₂ := by |
rw [← fold_add op, union_add_inter, fold_add op]
| [
" List.foldl (fun x y => op y x) b l = List.foldl op b l",
" fold op b (a ::ₘ s) = op (fold op b s) a",
" fold op b (a ::ₘ s) = fold op (op b a) s",
" fold op b (a ::ₘ s) = fold op (op a b) s",
" fold op (op b₁ b₂) (s₁ + 0) = op (fold op b₁ s₁) (fold op b₂ 0)",
" fold op (op b₁ b₂) (s₁ + a ::ₘ b) = op (fo... | [
" List.foldl (fun x y => op y x) b l = List.foldl op b l",
" fold op b (a ::ₘ s) = op (fold op b s) a",
" fold op b (a ::ₘ s) = fold op (op b a) s",
" fold op b (a ::ₘ s) = fold op (op a b) s",
" fold op (op b₁ b₂) (s₁ + 0) = op (fold op b₁ s₁) (fold op b₂ 0)",
" fold op (op b₁ b₂) (s₁ + a ::ₘ b) = op (fo... |
import Mathlib.MeasureTheory.Measure.Content
import Mathlib.MeasureTheory.Group.Prod
import Mathlib.Topology.Algebra.Group.Compact
#align_import measure_theory.measure.haar.basic from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
open Set Inv Function Topological... | Mathlib/MeasureTheory/Measure/Haar/Basic.lean | 102 | 104 | theorem index_empty {V : Set G} : index ∅ V = 0 := by |
simp only [index, Nat.sInf_eq_zero]; left; use ∅
simp only [Finset.card_empty, empty_subset, mem_setOf_eq, eq_self_iff_true, and_self_iff]
| [
" index ∅ V = 0",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∨\n Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} = ∅",
" 0 ∈ Finset.card '' {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}",
" ∅ ∈ {t | ∅ ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V} ∧ ∅.card = 0"
] | [] |
import Mathlib.Data.ZMod.Quotient
import Mathlib.GroupTheory.NoncommPiCoprod
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.GCDMonoid.Nat
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Tactic.ByContra
import Mathlib.Tactic.Peel
#align_import group_... | Mathlib/GroupTheory/Exponent.lean | 151 | 155 | theorem pow_exponent_eq_one (g : G) : g ^ exponent G = 1 := by |
by_cases h : ExponentExists G
· simp_rw [exponent, dif_pos h]
exact (Nat.find_spec h).2 g
· simp_rw [exponent, dif_neg h, pow_zero]
| [
" Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G",
" (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =\n if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0",
" (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1",
" ∃ n, 0 < n ∧ g ^ n = 1",
" g ^ n✝ = 1",
" exponent G ≠ 0 ↔ E... | [
" Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G",
" (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =\n if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0",
" (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1",
" ∃ n, 0 < n ∧ g ^ n = 1",
" g ^ n✝ = 1",
" exponent G ≠ 0 ↔ E... |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Data.Prod.Lex
import Mathlib.Data.Set.Image
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Order.Monotone.Monovary
import Mathlib.Tactic.Abel
#align_impo... | Mathlib/Algebra/Order/Rearrangement.lean | 62 | 108 | theorem MonovaryOn.sum_smul_comp_perm_le_sum_smul (hfg : MonovaryOn f g s)
(hσ : { x | σ x ≠ x } ⊆ s) : (∑ i ∈ s, f i • g (σ i)) ≤ ∑ i ∈ s, f i • g i := by |
classical
revert hσ σ hfg
-- Porting note: Specify `p` to get around `∀ {σ}` in the current goal.
apply Finset.induction_on_max_value (fun i ↦ toLex (g i, f i))
(p := fun t ↦ ∀ {σ : Perm ι}, MonovaryOn f g t → { x | σ x ≠ x } ⊆ t →
(∑ i ∈ t, f i • g (σ i)) ≤ ∑ i ∈ t, f i • g i) s
· simp... | [
" ∑ i ∈ s, f i • g (σ i) ≤ ∑ i ∈ s, f i • g i",
" ∀ {σ : Perm ι}, MonovaryOn f g ↑s → {x | σ x ≠ x} ⊆ ↑s → ∑ i ∈ s, f i • g (σ i) ≤ ∑ i ∈ s, f i • g i",
" ∀ {σ : Perm ι}, MonovaryOn f g ↑∅ → {x | σ x ≠ x} ⊆ ↑∅ → ∑ i ∈ ∅, f i • g (σ i) ≤ ∑ i ∈ ∅, f i • g i",
" ∀ (a : ι) (s : Finset ι),\n a ∉ s →\n (∀ x... | [] |
import Mathlib.Data.Multiset.Bind
import Mathlib.Control.Traversable.Lemmas
import Mathlib.Control.Traversable.Instances
#align_import data.multiset.functor from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58"
universe u
namespace Multiset
open List
instance functor : Functor Multiset... | Mathlib/Data/Multiset/Functor.lean | 102 | 105 | theorem id_traverse {α : Type*} (x : Multiset α) : traverse (pure : α → Id α) x = x := by |
refine Quotient.inductionOn x ?_
intro
simp [traverse, Coe.coe]
| [
" ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x",
" ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x",
" Multiset α' → F (Multiset β')",
" ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t... | [
" ∀ {α : Type ?u.133} (x : Multiset α), id <$> x = x",
" ∀ {α β γ : Type ?u.133} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x",
" Multiset α' → F (Multiset β')",
" ∀ (a b : List α'),\n a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.t... |
import Mathlib.Order.Filter.Basic
import Mathlib.Data.Set.Countable
#align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a"
open Set Filter
open Filter
variable {ι : Sort*} {α β : Type*}
class CountableInterFilter (l : Filter α) : Prop where
... | Mathlib/Order/Filter/CountableInter.lean | 65 | 68 | theorem eventually_countable_forall [Countable ι] {p : α → ι → Prop} :
(∀ᶠ x in l, ∀ i, p x i) ↔ ∀ i, ∀ᶠ x in l, p x i := by |
simpa only [Filter.Eventually, setOf_forall] using
@countable_iInter_mem _ _ l _ _ fun i => { x | p x i }
| [
" ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l",
" ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l",
" (∀ᶠ (x : α) in l, ∀ (i : ι), p x i) ↔ ∀ (i : ι), ∀ᶠ (x : α) in l, p x i"
] | [
" ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l",
" ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l"
] |
import Mathlib.Order.Filter.Ultrafilter
import Mathlib.Order.Filter.Germ
#align_import order.filter.filter_product from "leanprover-community/mathlib"@"2738d2ca56cbc63be80c3bd48e9ed90ad94e947d"
universe u v
variable {α : Type u} {β : Type v} {φ : Ultrafilter α}
open scoped Classical
namespace Filter
local not... | Mathlib/Order/Filter/FilterProduct.lean | 161 | 162 | theorem const_max [LinearOrder β] (x y : β) : (↑(max x y : β) : β*) = max ↑x ↑y := by |
rw [max_def, map₂_const]
| [
" ((fun x => Inv.inv ∘ x) fun x => 0) =ᶠ[↑φ] fun x => 0",
" ↑f < ↑g ↔ ∀* (x : α), f x < g x",
" (fun x x_1 => x < x_1) = LiftRel fun x x_1 => x < x_1",
" Quot.mk Setoid.r f < Quot.mk Setoid.r g ↔ LiftRel (fun x x_1 => x < x_1) (Quot.mk Setoid.r f) (Quot.mk Setoid.r g)",
" max ↑a ↑b = map₂ max ↑a ↑b",
" b ... | [
" ((fun x => Inv.inv ∘ x) fun x => 0) =ᶠ[↑φ] fun x => 0",
" ↑f < ↑g ↔ ∀* (x : α), f x < g x",
" (fun x x_1 => x < x_1) = LiftRel fun x x_1 => x < x_1",
" Quot.mk Setoid.r f < Quot.mk Setoid.r g ↔ LiftRel (fun x x_1 => x < x_1) (Quot.mk Setoid.r f) (Quot.mk Setoid.r g)",
" max ↑a ↑b = map₂ max ↑a ↑b",
" b ... |
import Mathlib.Analysis.Calculus.FDeriv.Bilinear
#align_import analysis.calculus.fderiv.mul from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
open scoped Classical
open Filter Asymptotics ContinuousLinearMap Set Metric Topology NNReal ENNReal
noncomputable section
section
variable ... | Mathlib/Analysis/Calculus/FDeriv/Mul.lean | 313 | 315 | theorem HasFDerivWithinAt.smul_const (hc : HasFDerivWithinAt c c' s x) (f : F) :
HasFDerivWithinAt (fun y => c y • f) (c'.smulRight f) s x := by |
simpa only [smul_zero, zero_add] using hc.smul (hasFDerivWithinAt_const f x s)
| [
" HasStrictFDerivAt (fun y => c y • f) (c'.smulRight f) x",
" HasFDerivWithinAt (fun y => c y • f) (c'.smulRight f) s x"
] | [
" HasStrictFDerivAt (fun y => c y • f) (c'.smulRight f) x"
] |
import Mathlib.Algebra.MvPolynomial.Derivation
import Mathlib.Algebra.MvPolynomial.Variables
#align_import data.mv_polynomial.pderiv from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
noncomputable section
universe u v
namespace MvPolynomial
open Set Function Finsupp
variable {R : ... | Mathlib/Algebra/MvPolynomial/PDeriv.lean | 96 | 96 | theorem pderiv_X_self (i : σ) : pderiv i (X i : MvPolynomial σ R) = 1 := by | classical simp
| [
" pderiv i = mkDerivation R (Pi.single i 1)",
" mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)",
" (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))",
" (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *... | [
" pderiv i = mkDerivation R (Pi.single i 1)",
" mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)",
" (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))",
" (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *... |
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.DirectSum.Internal
import Mathlib.RingTheory.GradedAlgebra.Basic
#align_import algebra.monoid_algebra.grading from "leanprover-community/mathlib"@"feb99064803fd3108e37c18b0f77d0a8344677a3"
noncomputable sectio... | Mathlib/Algebra/MonoidAlgebra/Grading.lean | 67 | 69 | theorem mem_grade_iff (m : M) (a : R[M]) : a ∈ grade R m ↔ a.support ⊆ {m} := by |
rw [← Finset.coe_subset, Finset.coe_singleton]
rfl
| [
" f m = i",
" a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}",
" a ∈ grade R m ↔ a.support ⊆ {m}",
" a ∈ grade R m ↔ ↑a.support ⊆ {m}"
] | [
" f m = i",
" a ∈ gradeBy R f i ↔ ↑a.support ⊆ f ⁻¹' {i}"
] |
import Mathlib.RingTheory.DiscreteValuationRing.Basic
import Mathlib.RingTheory.MvPowerSeries.Inverse
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.RingTheory.PowerSeries.Order
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
... | Mathlib/RingTheory/PowerSeries/Inverse.lean | 100 | 102 | theorem constantCoeff_invOfUnit (φ : R⟦X⟧) (u : Rˣ) :
constantCoeff R (invOfUnit φ u) = ↑u⁻¹ := by |
rw [← coeff_zero_eq_constantCoeff_apply, coeff_invOfUnit, if_pos rfl]
| [
" (coeff R n) (inv.aux a φ) =\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 single () n = 0 then a\n else\n -a *\n ∑ x ∈ antidiagonal (single () n),\n if x.2 < single () n then\n (MvPowerSeries.c... | [
" (coeff R n) (inv.aux a φ) =\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 single () n = 0 then a\n else\n -a *\n ∑ x ∈ antidiagonal (single () n),\n if x.2 < single () n then\n (MvPowerSeries.c... |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Pi.Basic
import Mathlib.Order.Fin
import Mathlib.Order.PiLex
import Mathlib.Order.Interval.Set.Basic
#align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b"
assert_not_exists MonoidWithZero
un... | Mathlib/Data/Fin/Tuple/Basic.lean | 82 | 82 | theorem cons_zero : cons x p 0 = x := by | simp [cons]
| [
" Unique ((i : Fin 0) → α i)",
" tail (cons x p) = p",
" cons x p i.succ = p i",
" cons x p 0 = x"
] | [
" Unique ((i : Fin 0) → α i)",
" tail (cons x p) = p",
" cons x p i.succ = p i"
] |
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 | 96 | 97 | theorem sheafifyMap_id (P : Cᵒᵖ ⥤ D) : sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P) := by |
simp [sheafifyMap, sheafify]
| [
" PreservesFiniteLimits (sheafToPresheaf J A).leftAdjoint",
" sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P)"
] | [
" PreservesFiniteLimits (sheafToPresheaf J A).leftAdjoint"
] |
import Mathlib.Algebra.Homology.Additive
import Mathlib.AlgebraicTopology.MooreComplex
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.CategoryTheory.Preadditive.Opposite
import Mathlib.CategoryTheory.Idempotents.FunctorCategories
#align_import algebraic_topology.alternating_face_map_complex from "leanprover-c... | Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean | 132 | 135 | theorem obj_d_eq (X : SimplicialObject C) (n : ℕ) :
(AlternatingFaceMapComplex.obj X).d (n + 1) n
= ∑ i : Fin (n + 2), (-1 : ℤ) ^ (i : ℕ) • X.δ i := by |
apply ChainComplex.of_d
| [
" objD X (n + 1) ≫ objD X n = 0",
" (∑ i : Fin (n + 1 + 2), (-1) ^ ↑i • X.δ i) ≫ ∑ i : Fin (n + 2), (-1) ^ ↑i • X.δ i = 0",
" ∑ x ∈ Finset.univ ×ˢ Finset.univ, ((-1) ^ ↑x.2 • X.δ x.2) ≫ ((-1) ^ ↑x.1 • X.δ x.1) = 0",
" ∑ i ∈ S, ((-1) ^ ↑i.2 • X.δ i.2) ≫ ((-1) ^ ↑i.1 • X.δ i.1) =\n ∑ x ∈ Sᶜ, -((-1) ^ ↑x.2 • ... | [
" objD X (n + 1) ≫ objD X n = 0",
" (∑ i : Fin (n + 1 + 2), (-1) ^ ↑i • X.δ i) ≫ ∑ i : Fin (n + 2), (-1) ^ ↑i • X.δ i = 0",
" ∑ x ∈ Finset.univ ×ˢ Finset.univ, ((-1) ^ ↑x.2 • X.δ x.2) ≫ ((-1) ^ ↑x.1 • X.δ x.1) = 0",
" ∑ i ∈ S, ((-1) ^ ↑i.2 • X.δ i.2) ≫ ((-1) ^ ↑i.1 • X.δ i.1) =\n ∑ x ∈ Sᶜ, -((-1) ^ ↑x.2 • ... |
import Mathlib.Analysis.Complex.Circle
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Haar.OfBasis
import Mathlib.MeasureTheory.Constructions.Prod.Integral
import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace
import Mathlib.Alge... | Mathlib/Analysis/Fourier/FourierTransform.lean | 84 | 92 | theorem fourierIntegral_smul_const (e : AddChar 𝕜 𝕊) (μ : Measure V)
(L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜) (f : V → E) (r : ℂ) :
fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f := by |
ext1 w
-- Porting note: was
-- simp only [Pi.smul_apply, fourierIntegral, smul_comm _ r, integral_smul]
simp only [Pi.smul_apply, fourierIntegral, ← integral_smul]
congr 1 with v
rw [smul_comm]
| [
" fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f",
" fourierIntegral e μ L (r • f) w = (r • fourierIntegral e μ L f) w",
" ∫ (v : V), e (-(L v) w) • r • f v ∂μ = ∫ (a : V), r • e (-(L a) w) • f a ∂μ",
" e (-(L v) w) • r • f v = r • e (-(L v) w) • f v"
] | [] |
import Mathlib.Analysis.Convex.Cone.Basic
import Mathlib.Analysis.InnerProductSpace.Projection
#align_import analysis.convex.cone.dual from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
open Set LinearMap
open scoped Classical
open Pointwise
variable {𝕜 E F G : Type*}
section Dua... | Mathlib/Analysis/Convex/Cone/InnerDual.lean | 125 | 127 | theorem innerDualCone_eq_iInter_innerDualCone_singleton :
(s.innerDualCone : Set H) = ⋂ i : s, (({↑i} : Set H).innerDualCone : Set H) := by |
rw [← ConvexCone.coe_iInf, ← innerDualCone_iUnion, iUnion_of_singleton_coe]
| [
" 0 ≤ ⟪x, c • y⟫_ℝ",
" 0 ≤ c * ⟪x, y⟫_ℝ",
" 0 ≤ ⟪x, u + v⟫_ℝ",
" 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ",
" univ.innerDualCone = 0",
" ↑univ.innerDualCone = ↑0",
" ∀ x ∈ univ.innerDualCone, x = 0",
" x = 0",
" 0 ≤ ⟪x, 0⟫_ℝ",
" (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone",
" (⋃ i, f i).inne... | [
" 0 ≤ ⟪x, c • y⟫_ℝ",
" 0 ≤ c * ⟪x, y⟫_ℝ",
" 0 ≤ ⟪x, u + v⟫_ℝ",
" 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ",
" univ.innerDualCone = 0",
" ↑univ.innerDualCone = ↑0",
" ∀ x ∈ univ.innerDualCone, x = 0",
" x = 0",
" 0 ≤ ⟪x, 0⟫_ℝ",
" (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone",
" (⋃ i, f i).inne... |
import Mathlib.Topology.Constructions
import Mathlib.Topology.ContinuousOn
#align_import topology.bases from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Function Topology
noncomputable section
namespace TopologicalSpace
universe u
variable {α : Type u} {β : Type*} ... | Mathlib/Topology/Bases.lean | 108 | 119 | theorem isTopologicalBasis_of_subbasis {s : Set (Set α)} (hs : t = generateFrom s) :
IsTopologicalBasis ((fun f => ⋂₀ f) '' { f : Set (Set α) | f.Finite ∧ f ⊆ s }) := by |
subst t; letI := generateFrom s
refine ⟨?_, ?_, le_antisymm (le_generateFrom ?_) <| generateFrom_anti fun t ht => ?_⟩
· rintro _ ⟨t₁, ⟨hft₁, ht₁b⟩, rfl⟩ _ ⟨t₂, ⟨hft₂, ht₂b⟩, rfl⟩ x h
exact ⟨_, ⟨_, ⟨hft₁.union hft₂, union_subset ht₁b ht₂b⟩, sInter_union t₁ t₂⟩, h, Subset.rfl⟩
· rw [sUnion_image, iUnion₂_eq_... | [
" IsTopologicalBasis (insert ∅ s)",
" ⋃₀ insert ∅ s = univ",
" ∀ t₁ ∈ insert ∅ s, ∀ t₂ ∈ insert ∅ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ ∅",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ ∅",
" ∃ t₃ ∈ inser... | [
" IsTopologicalBasis (insert ∅ s)",
" ⋃₀ insert ∅ s = univ",
" ∀ t₁ ∈ insert ∅ s, ∀ t₂ ∈ insert ∅ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ ∅",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ ∅ ∩ t₂",
" ∃ t₃ ∈ insert ∅ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ ∅",
" ∃ t₃ ∈ inser... |
import Mathlib.Algebra.Algebra.Subalgebra.Unitization
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Topology.Algebra.StarSubalgebra
import Mathlib.Topology.ContinuousFunction.ContinuousMapZero
import Mathlib.Topology.ContinuousFunction.Weierstrass
#align_import topology.continuous_function.stone_weierstrass fro... | Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean | 116 | 121 | theorem abs_mem_subalgebra_closure (A : Subalgebra ℝ C(X, ℝ)) (f : A) :
|(f : C(X, ℝ))| ∈ A.topologicalClosure := by |
let f' := attachBound (f : C(X, ℝ))
let abs : C(Set.Icc (-‖f‖) ‖f‖, ℝ) := { toFun := fun x : Set.Icc (-‖f‖) ‖f‖ => |(x : ℝ)| }
change abs.comp f' ∈ A.topologicalClosure
apply comp_attachBound_mem_closure
| [
" (g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)",
" ((g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝",
" Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g",
" (g.toContinuousMapOn (Set.Icc (... | [
" (g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)",
" ((g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝",
" Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g",
" (g.toContinuousMapOn (Set.Icc (... |
import Mathlib.Algebra.Homology.ImageToKernel
import Mathlib.Algebra.Homology.HomologicalComplex
import Mathlib.CategoryTheory.GradedObject
#align_import algebra.homology.homology from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff"
universe v u
open CategoryTheory CategoryTheory.Limits... | Mathlib/Algebra/Homology/Homology.lean | 97 | 100 | theorem boundaries_eq_bot [HasZeroObject V] {j} (h : ¬c.Rel (c.prev j) j) : C.boundaries j = ⊥ := by |
rw [eq_bot_iff]
refine imageSubobject_le _ 0 ?_
rw [C.dTo_eq_zero h, zero_comp]
| [
" C.boundaries j = ⊥",
" C.boundaries j ≤ ⊥",
" 0 ≫ ⊥.arrow = C.dTo j"
] | [] |
import Mathlib.Algebra.Group.Commute.Defs
import Mathlib.Algebra.Group.Units
import Mathlib.Algebra.GroupWithZero.Defs
import Mathlib.Algebra.Order.Monoid.Unbundled.Basic
import Mathlib.Tactic.NthRewrite
#align_import algebra.regular.basic from "leanprover-community/mathlib"@"5cd3c25312f210fec96ba1edb2aebfb2ccf2010f"... | Mathlib/Algebra/Regular/Basic.lean | 91 | 94 | theorem IsRightRegular.left_of_commute {a : R}
(ca : ∀ b, Commute a b) (h : IsRightRegular a) : IsLeftRegular a := by |
simp_rw [@Commute.symm_iff R _ a] at ca
exact fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm
| [
" IsLeftRegular a"
] | [] |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator
import Mathlib.MeasureTheory.Function.UniformIntegrable
import Mathlib.MeasureTheory.Decomposition.RadonNikodym
#align_import measure_theory.function.conditional_expectation.real from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean | 92 | 113 | theorem integral_abs_condexp_le (f : α → ℝ) : ∫ x, |(μ[f|m]) x| ∂μ ≤ ∫ x, |f x| ∂μ := by |
by_cases hm : m ≤ m0
swap
· simp_rw [condexp_of_not_le hm, Pi.zero_apply, abs_zero, integral_zero]
positivity
by_cases hfint : Integrable f μ
swap
· simp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul,
mul_zero]
positivity
rw [integral_eq_lintegra... | [
" SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᶠ[ae μ] μ[f|m]",
" ∀ (s : Set α),\n MeasurableSet s → μ s < ⊤ → IntegrableOn (SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) s μ",
" ∀ (s : Set α),\n MeasurableSet s →\n μ s < ⊤ →\n ∫ (x : α) in s, SignedMeasure... | [
" SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᶠ[ae μ] μ[f|m]",
" ∀ (s : Set α),\n MeasurableSet s → μ s < ⊤ → IntegrableOn (SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) s μ",
" ∀ (s : Set α),\n MeasurableSet s →\n μ s < ⊤ →\n ∫ (x : α) in s, SignedMeasure... |
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 | 52 | 54 | theorem not_separable_zero [Nontrivial R] : ¬Separable (0 : R[X]) := by |
rintro ⟨x, y, h⟩
simp only [derivative_zero, mul_zero, add_zero, zero_ne_one] at h
| [
" ¬Separable 0",
" False"
] | [] |
import Mathlib.Combinatorics.SimpleGraph.Finite
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Matrix.Basic
#align_import combinatorics.simple_graph.inc_matrix from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496"
open Finset Matrix SimpleGraph Sym2
open Matrix
namespace SimpleGraph... | Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean | 92 | 93 | theorem incMatrix_of_not_mem_incidenceSet (h : e ∉ G.incidenceSet a) : G.incMatrix R a e = 0 := by |
rw [incMatrix_apply, Set.indicator_of_not_mem h]
| [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... | [
" incMatrix R G a e = if e ∈ G.incidenceSet a then 1 else 0",
" (if e ∈ G.incidenceSet a then 1 e else 0) = if e ∈ G.incidenceSet a then 1 else 0",
" incMatrix R G a e * incMatrix R G b e = (G.incidenceSet a ∩ G.incidenceSet b).indicator 1 e",
" incMatrix R G a e * incMatrix R G b e = 0",
" e ∉ G.incidenceS... |
import Mathlib.Control.Monad.Basic
import Mathlib.Data.Fintype.Basic
import Mathlib.Data.List.ProdSigma
#align_import data.fin_enum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
universe u v
open Finset
class FinEnum (α : Sort*) where
card : ℕ
equiv : α ≃ Fin card
[... | Mathlib/Data/FinEnum.lean | 132 | 163 | theorem Finset.mem_enum [DecidableEq α] (s : Finset α) (xs : List α) :
s ∈ Finset.enum xs ↔ ∀ x ∈ s, x ∈ xs := by |
induction' xs with xs_hd generalizing s <;> simp [*, Finset.enum]
· simp [Finset.eq_empty_iff_forall_not_mem]
· constructor
· rintro ⟨a, h, h'⟩ x hx
cases' h' with _ h' a b
· right
apply h
subst a
exact hx
· simp only [h', mem_union, mem_singleton] at hx ⊢
ca... | [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup",
" x ∈ toList α",
" ∃ a, equiv.symm a = x",
" equiv.symm (equiv x... | [
" List.indexOf x xs < xs.length",
" x ∈ xs",
" xs.get ((fun x => ⟨List.indexOf x xs, ⋯⟩) x) = x",
" (fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i) = i",
" ↑((fun x => ⟨List.indexOf x xs, ⋯⟩) (xs.get i)) = ↑i",
" ∀ (x : α), x ∈ xs.dedup",
" x ∈ toList α",
" ∃ a, equiv.symm a = x",
" equiv.symm (equiv x... |
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Tactic.NthRewrite
#align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
namespace Nat
theorem gcd_greatest {a b d : ℕ} (hda : d ∣ a) (hdb : d ∣ b) (hd ... | Mathlib/Data/Nat/GCD/Basic.lean | 89 | 90 | theorem gcd_self_add_right (m n : ℕ) : gcd m (m + n) = gcd m n := by |
rw [add_comm, gcd_add_self_right]
| [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... | [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n",
" m.gcd (k * m + n) = m.gcd n",
" m.gcd (m * k + n) = m.gcd n",
" (m + k * n).gcd n = m.gcd n",
" (m + n * k).gcd n = m.gcd n",
" (k * n + m).gcd n = m.gcd n",
" (n * k + m).gcd n = m.gcd n",
" m.gcd (n + m) = m.gcd (n + 1 * m)",
" (m... |
import Mathlib.Order.Interval.Finset.Nat
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
assert_not_exists MonoidWithZero
open Finset Fin Function
namespace Fin
variable (n : ℕ)
instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) :=
Orde... | Mathlib/Order/Interval/Finset/Fin.lean | 84 | 85 | theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico ↑a ↑b := by |
simp [Ico_eq_finset_subtype, Finset.fin, Finset.map_map]
| [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b"
] | [
" map valEmbedding (Icc a b) = Icc ↑a ↑b"
] |
import Mathlib.Probability.ProbabilityMassFunction.Basic
#align_import probability.probability_mass_function.monad from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d"
noncomputable section
variable {α β γ : Type*}
open scoped Classical
open NNReal ENNReal
open MeasureTheory
namespac... | Mathlib/Probability/ProbabilityMassFunction/Monad.lean | 170 | 182 | theorem toOuterMeasure_bind_apply :
(p.bind f).toOuterMeasure s = ∑' a, p a * (f a).toOuterMeasure s :=
calc
(p.bind f).toOuterMeasure s = ∑' b, if b ∈ s then ∑' a, p a * f a b else 0 := by |
simp [toOuterMeasure_apply, Set.indicator_apply]
_ = ∑' (b) (a), p a * if b ∈ s then f a b else 0 := tsum_congr fun b => by split_ifs <;> simp
_ = ∑' (a) (b), p a * if b ∈ s then f a b else 0 :=
(tsum_comm' ENNReal.summable (fun _ => ENNReal.summable) fun _ => ENNReal.summable)
_ = ∑' a, p a * ... | [
" a' ∈ (pure a).support ↔ a' ∈ {a}",
" a' ∈ (pure a).support ↔ a' = a",
" ∑' (b : α) (a : β), p b * (f b) a = 1",
" b ∈ (p.bind f).support ↔ b ∈ ⋃ a ∈ p.support, (f a).support",
" b ∈ (p.bind f).support ↔ ∃ a ∈ p.support, b ∈ (f a).support",
" (pure a).bind f = f a",
" (if a' = a then (f a') b else 0) =... | [
" a' ∈ (pure a).support ↔ a' ∈ {a}",
" a' ∈ (pure a).support ↔ a' = a",
" ∑' (b : α) (a : β), p b * (f b) a = 1",
" b ∈ (p.bind f).support ↔ b ∈ ⋃ a ∈ p.support, (f a).support",
" b ∈ (p.bind f).support ↔ ∃ a ∈ p.support, b ∈ (f a).support",
" (pure a).bind f = f a",
" (if a' = a then (f a') b else 0) =... |
import Mathlib.Data.Set.Image
import Mathlib.Order.SuccPred.Relation
import Mathlib.Topology.Clopen
import Mathlib.Topology.Irreducible
#align_import topology.connected from "leanprover-community/mathlib"@"d101e93197bb5f6ea89bd7ba386b7f7dff1f3903"
open Set Function Topology TopologicalSpace Relation
open scoped C... | Mathlib/Topology/Connected/Basic.lean | 116 | 120 | theorem isPreconnected_of_forall_pair {s : Set α}
(H : ∀ x ∈ s, ∀ y ∈ s, ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t) :
IsPreconnected s := by |
rcases eq_empty_or_nonempty s with (rfl | ⟨x, hx⟩)
exacts [isPreconnected_empty, isPreconnected_of_forall x fun y => H x hx y]
| [
" IsPreconnected s",
" (s ∩ (u ∩ v)).Nonempty",
" x ∈ s",
" s ⊆ v ∪ u"
] | [
" IsPreconnected s",
" (s ∩ (u ∩ v)).Nonempty",
" x ∈ s",
" s ⊆ v ∪ u"
] |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {α : Type*}
namespace List
inductive Duplicate (x : α) : List α → Prop
| cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
| cons_duplicate {y : α} {l ... | Mathlib/Data/List/Duplicate.lean | 52 | 55 | theorem Duplicate.mem_cons_self (h : x ∈+ x :: l) : x ∈ l := by |
cases' h with _ h _ _ h
· exact h
· exact h.mem
| [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'"
] | [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'"
] |
import Mathlib.CategoryTheory.Limits.Shapes.Equalizers
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.Topology.Sheaves.SheafCondition.PairwiseIntersections
#align_import topology.sheaves.sheaf_condition.equalizer_products from "leanprover-community/mathlib"@"85d6221d32c37e68f05b2e42cde6cee658dae5... | Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean | 86 | 94 | theorem w : res F U ≫ leftRes F U = res F U ≫ rightRes F U := by |
dsimp [res, leftRes, rightRes]
-- Porting note: `ext` can't see `limit.hom_ext` applies here:
-- See https://github.com/leanprover-community/mathlib4/issues/5229
refine limit.hom_ext (fun _ => ?_)
simp only [limit.lift_π, limit.lift_π_assoc, Fan.mk_π_app, Category.assoc]
rw [← F.map_comp]
rw [← F.map_com... | [
" res F U ≫ limit.π (Discrete.functor fun i => F.obj { unop := U i }) { as := i } = F.map (leSupr U i).op",
" res F U ≫ leftRes F U = res F U ≫ rightRes F U",
" ((Pi.lift fun i => F.map (leSupr U i).op) ≫\n Pi.lift fun p => Pi.π (fun i => F.obj { unop := U i }) p.1 ≫ F.map ((U p.1).infLELeft (U p.2)).op) =... | [
" res F U ≫ limit.π (Discrete.functor fun i => F.obj { unop := U i }) { as := i } = F.map (leSupr U i).op"
] |
import Mathlib.Algebra.Group.Equiv.TypeTags
import Mathlib.GroupTheory.FreeAbelianGroup
import Mathlib.GroupTheory.FreeGroup.IsFreeGroup
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
#align_import group_theory.free_abelian_group_finsupp from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e600... | Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean | 63 | 68 | theorem Finsupp.toFreeAbelianGroup_comp_toFinsupp :
toFreeAbelianGroup.comp toFinsupp = AddMonoidHom.id (FreeAbelianGroup X) := by |
ext
rw [toFreeAbelianGroup, toFinsupp, AddMonoidHom.comp_apply, lift.of,
liftAddHom_apply_single, AddMonoidHom.flip_apply, smulAddHom_apply, one_smul,
AddMonoidHom.id_apply]
| [
" toFreeAbelianGroup.comp (singleAddHom x) = (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)",
" (toFreeAbelianGroup.comp (singleAddHom x)) 1 = ((smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)) 1",
" toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)",
" (((toFinsupp.comp toFreeAbelianGroup).comp (s... | [
" toFreeAbelianGroup.comp (singleAddHom x) = (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)",
" (toFreeAbelianGroup.comp (singleAddHom x)) 1 = ((smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)) 1",
" toFinsupp.comp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)",
" (((toFinsupp.comp toFreeAbelianGroup).comp (s... |
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.Algebra.Module.Torsion
#align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5"
noncomputable section
universe u v v' u₁' w w'
variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}... | Mathlib/LinearAlgebra/Dimension/Constructions.lean | 198 | 205 | theorem rank_matrix (m : Type v) (n : Type w) [Finite m] [Finite n] :
Module.rank R (Matrix m n R) =
Cardinal.lift.{max v w u, v} #m * Cardinal.lift.{max v w u, w} #n := by |
cases nonempty_fintype m
cases nonempty_fintype n
have h := (Matrix.stdBasis R m n).mk_eq_rank
rw [← lift_lift.{max v w u, max v w}, lift_inj] at h
simpa using h.symm
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... | [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)"
] |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
... | Mathlib/Algebra/Group/Support.lean | 88 | 90 | theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by |
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
| [
" mulSupport f = s ↔ (∀ x ∈ s, f x ≠ 1) ∧ ∀ x ∉ s, f x = 1",
" f x = g x",
" mulSupport (update f x y) = insert x (mulSupport f)",
" a ∈ mulSupport (update f x y) ↔ a ∈ insert x (mulSupport f)",
" a ∈ mulSupport (update f a y) ↔ a ∈ insert a (mulSupport f)"
] | [
" mulSupport f = s ↔ (∀ x ∈ s, f x ≠ 1) ∧ ∀ x ∉ s, f x = 1",
" f x = g x"
] |
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.AlgebraicGeometry.AffineScheme
#align_import algebraic_geometry.limits from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
suppress_compilation
set_option linter.uppercaseLean3 false
universe u
open CategoryTheory CategoryTheor... | Mathlib/AlgebraicGeometry/Limits.lean | 133 | 139 | theorem bot_isAffineOpen (X : Scheme) : IsAffineOpen (⊥ : Opens X.carrier) := by |
convert rangeIsAffineOpenOfOpenImmersion (initial.to X)
ext
-- Porting note: added this `erw` to turn LHS to `False`
erw [Set.mem_empty_iff_false]
rw [false_iff_iff]
exact fun x => isEmptyElim (show (⊥_ Scheme).carrier from x.choose)
| [
" Continuous fun x => PEmpty.elim x",
" f.val.base = g.val.base",
" f.val.base a = g.val.base a",
" (f.val.c ≫ whiskerRight (eqToHom ⋯) ∅.presheaf).app a = g.val.c.app a",
" IsEmpty PEmpty.{?u.8477 + 1}",
" IsOpenImmersion f",
" OpenEmbedding ⇑f.val.base",
" ∀ (x : ↑↑X.toPresheafedSpace), IsIso (Presh... | [
" Continuous fun x => PEmpty.elim x",
" f.val.base = g.val.base",
" f.val.base a = g.val.base a",
" (f.val.c ≫ whiskerRight (eqToHom ⋯) ∅.presheaf).app a = g.val.c.app a",
" IsEmpty PEmpty.{?u.8477 + 1}",
" IsOpenImmersion f",
" OpenEmbedding ⇑f.val.base",
" ∀ (x : ↑↑X.toPresheafedSpace), IsIso (Presh... |
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv
#align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open AffineMap AffineEquiv
section
variable (R : Type*) {V V' P P' : Type*} [Ring R] [Invertible (2 : R)] [AddCommGroup V]
[Modu... | Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean | 119 | 120 | theorem midpoint_vsub_right (p₁ p₂ : P) : midpoint R p₁ p₂ -ᵥ p₂ = (⅟ 2 : R) • (p₁ -ᵥ p₂) := by |
rw [midpoint_comm, midpoint_vsub_left]
| [
" (pointReflection R (midpoint R x y)) x = y",
" (pointReflection (midpoint R x y)) x = y",
" midpoint R x y = midpoint R y x",
" (pointReflection R (midpoint R x y)) y = x",
" (pointReflection (midpoint R x y)) y = x",
" midpoint R p₁ p₂ -ᵥ p₂ = ⅟2 • (p₁ -ᵥ p₂)"
] | [
" (pointReflection R (midpoint R x y)) x = y",
" (pointReflection (midpoint R x y)) x = y",
" midpoint R x y = midpoint R y x",
" (pointReflection R (midpoint R x y)) y = x",
" (pointReflection (midpoint R x y)) y = x"
] |
import Mathlib.CategoryTheory.Sites.Sheaf
#align_import category_theory.sites.plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace CategoryTheory.GrothendieckTopology
open CategoryTheory
open CategoryTheory.Limits
open Opposite
universe w v u
variable {C : Type u} [Ca... | Mathlib/CategoryTheory/Sites/Plus.lean | 81 | 86 | theorem diagramNatTrans_zero [Preadditive D] (X : C) (P Q : Cᵒᵖ ⥤ D) :
J.diagramNatTrans (0 : P ⟶ Q) X = 0 := by |
ext : 2
refine Multiequalizer.hom_ext _ _ _ (fun i => ?_)
dsimp
rw [zero_comp, Multiequalizer.lift_ι, comp_zero]
| [
" ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n... | [
" ((J.diagram P Y).map f ≫\n (fun S =>\n Multiequalizer.lift (((J.pullback f✝).op.obj S).unop.index P) ((J.diagram P Y).obj S)\n (fun I => Multiequalizer.ι (S.unop.index P) (Cover.Arrow.base I)) ⋯)\n T) ≫\n Multiequalizer.ι (((J.pullback f✝).op.obj T).unop.index P) I =\n... |
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 | 89 | 89 | theorem invFun_zero : invFun R A n 0 = 0 := by | simp [invFun]
| [
" ∀ (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.Polynomial.Div
import Mathlib.Logic.Function.Basic
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.LinearCombination
#align_import data.polynomial.partial_fractions from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866f... | Mathlib/Algebra/Polynomial/PartialFractions.lean | 60 | 79 | theorem div_eq_quo_add_rem_div_add_rem_div (f : R[X]) {g₁ g₂ : R[X]} (hg₁ : g₁.Monic)
(hg₂ : g₂.Monic) (hcoprime : IsCoprime g₁ g₂) :
∃ q r₁ r₂ : R[X],
r₁.degree < g₁.degree ∧
r₂.degree < g₂.degree ∧ (f : K) / (↑g₁ * ↑g₂) = ↑q + ↑r₁ / ↑g₁ + ↑r₂ / ↑g₂ := by |
rcases hcoprime with ⟨c, d, hcd⟩
refine
⟨f * d /ₘ g₁ + f * c /ₘ g₂, f * d %ₘ g₁, f * c %ₘ g₂, degree_modByMonic_lt _ hg₁,
degree_modByMonic_lt _ hg₂, ?_⟩
have hg₁' : (↑g₁ : K) ≠ 0 := by
norm_cast
exact hg₁.ne_zero
have hg₂' : (↑g₂ : K) ≠ 0 := by
norm_cast
exact hg₂.ne_zero
have hfc ... | [
" ∃ q r₁ r₂, r₁.degree < g₁.degree ∧ r₂.degree < g₂.degree ∧ ↑f / (↑g₁ * ↑g₂) = ↑q + ↑r₁ / ↑g₁ + ↑r₂ / ↑g₂",
" ↑f / (↑g₁ * ↑g₂) = ↑(f * d /ₘ g₁ + f * c /ₘ g₂) + ↑(f * d %ₘ g₁) / ↑g₁ + ↑(f * c %ₘ g₂) / ↑g₂",
" ↑g₁ ≠ 0",
" ¬g₁ = 0",
" ↑g₂ ≠ 0",
" ¬g₂ = 0",
" ↑f = (↑(f * d /ₘ g₁ + f * c /ₘ g₂) * ↑g₁ + ↑(f ... | [] |
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation
import Mathlib.LinearAlgebra.Dual
#align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2... | Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean | 130 | 134 | theorem contractLeft_ι_mul (a : M) (b : CliffordAlgebra Q) :
d⌋(ι Q a * b) = d a • b - ι Q a * (d⌋b) := by |
-- Porting note: Lean cannot figure out anymore the third argument
refine foldr'_ι_mul _ _ ?_ _ _ _
exact fun m x fx ↦ contractLeftAux_contractLeftAux Q d m x fx
| [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... | [
" ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx",
" d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx",
" ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) (d₁ + d₂)) x =\n ((fun d => foldr' Q (contractLeftAux Q d) ⋯ 0) d₁ + (fun d => foldr' Q (contractL... |
import Mathlib.Data.Matrix.Basic
variable {l m n o : Type*}
universe u v w
variable {R : Type*} {α : Type v} {β : Type w}
namespace Matrix
def col (w : m → α) : Matrix m Unit α :=
of fun x _ => w x
#align matrix.col Matrix.col
-- TODO: set as an equation lemma for `col`, see mathlib4#3024
@[simp]
theorem col... | Mathlib/Data/Matrix/RowCol.lean | 117 | 120 | theorem row_vecMul [Fintype m] [NonUnitalNonAssocSemiring α] (M : Matrix m n α) (v : m → α) :
Matrix.row (v ᵥ* M) = Matrix.row v * M := by |
ext
rfl
| [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... | [
" col (v + w) = col v + col w",
" col (v + w) i✝ j✝ = (col v + col w) i✝ j✝",
" col (x • v) = x • col v",
" col (x • v) i✝ j✝ = (x • col v) i✝ j✝",
" row (v + w) = row v + row w",
" row (v + w) i✝ j✝ = (row v + row w) i✝ j✝",
" row (x • v) = x • row v",
" row (x • v) i✝ j✝ = (x • row v) i✝ j✝",
" (c... |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Data.Int.LeastGreatest
#align_import data.int.conditionally_complete_order from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae"
open Int
noncomputable section
open scoped Classical
instance instConditionallyComplet... | Mathlib/Data/Int/ConditionallyCompleteOrder.lean | 99 | 101 | theorem csInf_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddBelow s) : sInf s ∈ s := by |
convert (leastOfBdd _ (Classical.choose_spec h2) h1).2.1
exact dif_pos ⟨h1, h2⟩
| [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... | [
" n ≤ sSup s",
" n ≤ ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯)",
" sSup s ≤ n",
" ↑((Classical.choose ⋯).greatestOfBdd ⋯ ⋯) ≤ n",
" sInf s ≤ n",
" ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯) ≤ n",
" n ≤ sInf s",
" n ≤ ↑((Classical.choose ⋯).leastOfBdd ⋯ ⋯)",
" sSup s = sSup ∅",
" sInf s = sInf ∅",
" ... |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Data.Setoid.Basic
import Mathlib.Dynamics.FixedPoints.Topology
import Mathlib.Topology.MetricSpace.Lipschitz
#align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open scoped Classi... | Mathlib/Topology/MetricSpace/Contracting.lean | 68 | 76 | theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞) :
edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - K) :=
suffices edist x y ≤ edist x (f x) + edist y (f y) + K * edist x y by
rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top),
mul_comm,... | rw [edist_comm y, add_right_comm]
_ ≤ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
| [
" 0 < 1 - ↑K",
" 1 - ↑K ≠ ⊤",
" ¬1 - ↑K = ⊤",
" edist x (f x) + edist (f x) (f y) + edist (f y) y = edist x (f x) + edist y (f y) + edist (f x) (f y)",
" edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)"
] | [
" 0 < 1 - ↑K",
" 1 - ↑K ≠ ⊤",
" ¬1 - ↑K = ⊤"
] |
import Mathlib.Order.Filter.Lift
import Mathlib.Topology.Separation
import Mathlib.Order.Interval.Set.Monotone
#align_import topology.filter from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514"
open Set Filter TopologicalSpace
open Filter Topology
variable {ι : Sort*} {α β X Y : Type*}... | Mathlib/Topology/Filter.lean | 55 | 56 | theorem isOpen_setOf_mem {s : Set α} : IsOpen { l : Filter α | s ∈ l } := by |
simpa only [Iic_principal] using isOpen_Iic_principal
| [
" IsOpen {l | s ∈ l}"
] | [] |
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.MeasureTheory.Measure.Hausdorff
#align_import topology.metric_space.hausdorff_dimension from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92"
open scoped MeasureTheory ENNReal NNReal Topology
open MeasureTheory MeasureTheory... | Mathlib/Topology/MetricSpace/HausdorffDimension.lean | 133 | 135 | theorem le_dimH_of_hausdorffMeasure_eq_top {s : Set X} {d : ℝ≥0} (h : μH[d] s = ∞) :
↑d ≤ dimH s := by |
rw [dimH_def]; exact le_iSup₂ (α := ℝ≥0∞) d h
| [
" ℝ≥0∞",
" dimH s = ⨆ d, ⨆ (_ : μH[↑d] s = ⊤), ↑d",
" μH[↑d] s = ⊤",
" ↑d ≤ dimH s",
" ↑d ≤ ⨆ d, ⨆ (_ : μH[↑d] s = ⊤), ↑d"
] | [
" ℝ≥0∞",
" dimH s = ⨆ d, ⨆ (_ : μH[↑d] s = ⊤), ↑d",
" μH[↑d] s = ⊤"
] |
import Mathlib.CategoryTheory.Category.Grpd
import Mathlib.CategoryTheory.Groupoid
import Mathlib.Topology.Category.TopCat.Basic
import Mathlib.Topology.Homotopy.Path
import Mathlib.Data.Set.Subsingleton
#align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473... | Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean | 210 | 211 | theorem transAssocReparamAux_one : transAssocReparamAux 1 = 1 := by |
set_option tactic.skipAssignedInstances false in norm_num [transAssocReparamAux]
| [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... | [
" Continuous reflTransSymmAux",
" Continuous fun x => ↑x.2",
" Continuous fun x => 1 / 2",
" Continuous fun x => ↑x.1 * 2 * ↑x.2",
" Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)",
" ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)",
" ref... |
import Mathlib.CategoryTheory.EqToHom
import Mathlib.CategoryTheory.Quotient
import Mathlib.Combinatorics.Quiver.Path
#align_import category_theory.path_category from "leanprover-community/mathlib"@"c6dd521ebdce53bb372c527569dd7c25de53a08b"
universe v₁ v₂ u₁ u₂
namespace CategoryTheory
section
def Paths (V : ... | Mathlib/CategoryTheory/PathCategory.lean | 103 | 119 | theorem lift_unique {C} [Category C] (φ : V ⥤q C) (Φ : Paths V ⥤ C)
(hΦ : of ⋙q Φ.toPrefunctor = φ) : Φ = lift φ := by |
subst_vars
fapply Functor.ext
· rintro X
rfl
· rintro X Y f
dsimp [lift]
induction' f with _ _ p f' ih
· simp only [Category.comp_id]
apply Functor.map_id
· simp only [Category.comp_id, Category.id_comp] at ih ⊢
-- Porting note: Had to do substitute `p.cons f'` and `f'.toPath` b... | [
" { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec... | [
" { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec... |
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.FreeAlgebra
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"03... | Mathlib/LinearAlgebra/FreeAlgebra.lean | 44 | 47 | theorem rank_eq [CommRing R] [Nontrivial R] :
Module.rank R (FreeAlgebra R X) = Cardinal.lift.{u} (Cardinal.mk (List X)) := by |
rw [← (Basis.mk_eq_rank'.{_,_,_,u} (basisFreeMonoid R X)).trans (Cardinal.lift_id _),
Cardinal.lift_umax'.{v,u}, FreeMonoid]
| [
" Module.rank R (FreeAlgebra R X) = Cardinal.lift.{u, v} (Cardinal.mk (List X))"
] | [] |
import Mathlib.Topology.MetricSpace.HausdorffDistance
#align_import topology.metric_space.pi_nat from "leanprover-community/mathlib"@"49b7f94aab3a3bdca1f9f34c5d818afb253b3993"
noncomputable section
open scoped Classical
open Topology Filter
open TopologicalSpace Set Metric Filter Function
attribute [local simp... | Mathlib/Topology/MetricSpace/PiNat.lean | 80 | 85 | theorem apply_eq_of_lt_firstDiff {x y : ∀ n, E n} {n : ℕ} (hn : n < firstDiff x y) : x n = y n := by |
rw [firstDiff_def] at hn
split_ifs at hn with h
· convert Nat.find_min (ne_iff.1 h) hn
simp
· exact (not_lt_zero' hn).elim
| [
" x (firstDiff x y) ≠ y (firstDiff x y)",
" x (Nat.find ⋯) ≠ y (Nat.find ⋯)",
" x n = y n",
" x n = y n ↔ ¬x n ≠ y n"
] | [
" x (firstDiff x y) ≠ y (firstDiff x y)",
" x (Nat.find ⋯) ≠ y (Nat.find ⋯)"
] |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f"
namespace PowerS... | Mathlib/RingTheory/PowerSeries/WellKnown.lean | 212 | 214 | theorem map_sin : map f (sin A) = sin A' := by |
ext
simp [sin, apply_ite f]
| [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)",
" (coeff A (bit1 n)) (cos A) = 0",
" (map f) (exp A) = exp... | [
" (constantCoeff A) (exp A) = 1",
" (algebraMap ℚ A) (1 / ↑0!) = 1",
" (coeff A (bit0 n)) (sin A) = 0",
" (coeff A (bit1 n)) (sin A) = (-1) ^ n * (coeff A (bit1 n)) (exp A)",
" (coeff A (bit0 n)) (cos A) = (-1) ^ n * (coeff A (bit0 n)) (exp A)",
" (coeff A (bit1 n)) (cos A) = 0",
" (map f) (exp A) = exp... |
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 | 126 | 129 | theorem HasDerivAt.smul_const (hc : HasDerivAt c c' x) (f : F) :
HasDerivAt (fun y => c y • f) (c' • f) x := by |
rw [← hasDerivWithinAt_univ] at *
exact hc.smul_const f
| [
" HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x",
" HasDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x",
" HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) univ x",
" HasStrictDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x",
" HasStrictDerivAt (fun y => c y • f) (c' •... | [
" HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x",
" HasDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x",
" HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) univ x",
" HasStrictDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x",
" HasStrictDerivAt (fun y => c y • f) (c' •... |
import Mathlib.Analysis.Calculus.FDeriv.Bilinear
#align_import analysis.calculus.fderiv.mul from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
open scoped Classical
open Filter Asymptotics ContinuousLinearMap Set Metric Topology NNReal ENNReal
noncomputable section
section
variable ... | Mathlib/Analysis/Calculus/FDeriv/Mul.lean | 405 | 409 | theorem HasFDerivAt.mul (hc : HasFDerivAt c c' x) (hd : HasFDerivAt d d' x) :
HasFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x := by |
convert hc.mul' hd
ext z
apply mul_comm
| [
" HasStrictFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x",
" d x • c' = c'.smulRight (d x)",
" (d x • c') z = (c'.smulRight (d x)) z",
" HasFDerivWithinAt (fun y => c y * d y) (c x • d' + d x • c') s x",
" HasFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x"
] | [
" HasStrictFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x",
" d x • c' = c'.smulRight (d x)",
" (d x • c') z = (c'.smulRight (d x)) z",
" HasFDerivWithinAt (fun y => c y * d y) (c x • d' + d x • c') s x"
] |
import Mathlib.Data.Setoid.Partition
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.GroupTheory.GroupAction.Pointwise
import Mathlib.GroupTheory.GroupAction.SubMulAction
open scoped BigOperators Pointwise
namespace MulAction
section SMul
variable (G : Type*) {X : Type*} [SMul G X]
-- Change termin... | Mathlib/GroupTheory/GroupAction/Blocks.lean | 85 | 87 | theorem IsBlock.def {B : Set X} :
IsBlock G B ↔ ∀ g g' : G, g • B = g' • B ∨ Disjoint (g • B) (g' • B) := by |
apply Set.pairwiseDisjoint_range_iff
| [
" IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)"
] | [] |
import Mathlib.Analysis.InnerProductSpace.Projection
import Mathlib.Geometry.Euclidean.PerpBisector
import Mathlib.Algebra.QuadraticDiscriminant
#align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0"
noncomputable section
open scoped Classical
open ... | Mathlib/Geometry/Euclidean/Basic.lean | 93 | 104 | theorem dist_affineCombination {ι : Type*} {s : Finset ι} {w₁ w₂ : ι → ℝ} (p : ι → P)
(h₁ : ∑ i ∈ s, w₁ i = 1) (h₂ : ∑ i ∈ s, w₂ i = 1) : by
have a₁ := s.affineCombination ℝ p w₁
have a₂ := s.affineCombination ℝ p w₂
exact dist a₁ a₂ * dist a₁ a₂ = (-∑ i₁ ∈ s, ∑ i₂ ∈ s,
(w₁ - w₂) i₁ * (w₁ ... |
dsimp only
rw [dist_eq_norm_vsub V (s.affineCombination ℝ p w₁) (s.affineCombination ℝ p w₂), ←
@inner_self_eq_norm_mul_norm ℝ, Finset.affineCombination_vsub]
have h : (∑ i ∈ s, (w₁ - w₂) i) = 0 := by
simp_rw [Pi.sub_apply, Finset.sum_sub_distrib, h₁, h₂, sub_self]
exact inner_weightedVSub p h p h
| [
" dist p1 (midpoint ℝ p1 p2) = dist p2 (midpoint ℝ p1 p2)",
" ⟪(s₁.weightedVSub p₁) w₁, (s₂.weightedVSub p₂) w₂⟫_ℝ =\n (-∑ i₁ ∈ s₁, ∑ i₂ ∈ s₂, w₁ i₁ * w₂ i₂ * (dist (p₁ i₁) (p₂ i₂) * dist (p₁ i₁) (p₂ i₂))) / 2",
" (-∑ i₁ ∈ s₁,\n ∑ i₂ ∈ s₂,\n w₁ i₁ * w₂ i₂ *\n (‖p₁ i₁ -ᵥ Class... | [
" dist p1 (midpoint ℝ p1 p2) = dist p2 (midpoint ℝ p1 p2)",
" ⟪(s₁.weightedVSub p₁) w₁, (s₂.weightedVSub p₂) w₂⟫_ℝ =\n (-∑ i₁ ∈ s₁, ∑ i₂ ∈ s₂, w₁ i₁ * w₂ i₂ * (dist (p₁ i₁) (p₂ i₂) * dist (p₁ i₁) (p₂ i₂))) / 2",
" (-∑ i₁ ∈ s₁,\n ∑ i₂ ∈ s₂,\n w₁ i₁ * w₂ i₂ *\n (‖p₁ i₁ -ᵥ Class... |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Data.Real.Sqrt
import Mathlib.Tactic.Polyrith
#align_import algebra.star.chsh from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
universe u
--@[nolint has_nonempty_instance] Porting note(#5171): linter not ported yet
structure Is... | Mathlib/Algebra/Star/CHSH.lean | 121 | 138 | theorem CHSH_inequality_of_comm [OrderedCommRing R] [StarRing R] [StarOrderedRing R] [Algebra ℝ R]
[OrderedSMul ℝ R] (A₀ A₁ B₀ B₁ : R) (T : IsCHSHTuple A₀ A₁ B₀ B₁) :
A₀ * B₀ + A₀ * B₁ + A₁ * B₀ - A₁ * B₁ ≤ 2 := by |
let P := 2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁
have i₁ : 0 ≤ P := by
have idem : P * P = 4 * P := CHSH_id T.A₀_inv T.A₁_inv T.B₀_inv T.B₁_inv
have idem' : P = (1 / 4 : ℝ) • (P * P) := by
have h : 4 * P = (4 : ℝ) • P := by simp [Algebra.smul_def]
rw [idem, h, ← mul_smul]
norm_num
h... | [
" (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) =\n 4 * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁)",
" A₀ * B₀ + A₀ * B₁ + A₁ * B₀ - A₁ * B₁ ≤ 2",
" 0 ≤ P",
" P = (1 / 4) • (P * P)",
" 4 * P = 4 • P",
" P = (1 / 4 * 4) • P",
" star P = P",
" star (2 - A₀... | [
" (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) =\n 4 * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁)"
] |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
#align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b... | Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean | 236 | 254 | theorem isBoundedLinearMap_continuousMultilinearMap_comp_linear (g : G →L[𝕜] E) :
IsBoundedLinearMap 𝕜 fun f : ContinuousMultilinearMap 𝕜 (fun _ : ι => E) F =>
f.compContinuousLinearMap fun _ => g := by |
refine
IsLinearMap.with_bound
⟨fun f₁ f₂ => by ext; rfl,
fun c f => by ext; rfl⟩
(‖g‖ ^ Fintype.card ι) fun f => ?_
apply ContinuousMultilinearMap.opNorm_le_bound _ _ _
· apply_rules [mul_nonneg, pow_nonneg, norm_nonneg]
intro m
calc
‖f (g ∘ m)‖ ≤ ‖f‖ * ∏ i, ‖g (m i)‖ := f.le_opNo... | [
" (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2",
" ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝",
" (c • p).1.prod (c • p).2 = c • p.1.prod p.2",
" ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝",
" ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co... | [
" (p₁ + p₂).1.prod (p₁ + p₂).2 = p₁.1.prod p₁.2 + p₂.1.prod p₂.2",
" ((p₁ + p₂).1.prod (p₁ + p₂).2) x✝ = (p₁.1.prod p₁.2 + p₂.1.prod p₂.2) x✝",
" (c • p).1.prod (c • p).2 = c • p.1.prod p.2",
" ((c • p).1.prod (c • p).2) x✝ = (c • p.1.prod p.2) x✝",
" ∃ M, 0 < M ∧ ∀ (x : ContinuousMultilinearMap 𝕜 E F × Co... |
import Mathlib.RingTheory.WittVector.Truncated
import Mathlib.RingTheory.WittVector.Identities
import Mathlib.NumberTheory.Padics.RingHoms
#align_import ring_theory.witt_vector.compare from "leanprover-community/mathlib"@"168ad7fc5d8173ad38be9767a22d50b8ecf1cd00"
noncomputable section
variable {p : ℕ} [hp : Fact... | Mathlib/RingTheory/WittVector/Compare.lean | 107 | 112 | theorem commutes_symm' {m : ℕ} (hm : n ≤ m) (x : TruncatedWittVector p m (ZMod p)) :
(zmodEquivTrunc p n).symm (truncate hm x) =
ZMod.castHom (pow_dvd_pow p hm) _ ((zmodEquivTrunc p m).symm x) := by |
apply (zmodEquivTrunc p n).injective
rw [← commutes' _ _ hm]
simp
| [
" i = n",
" ↑p ^ i ≠ 0",
" ↑p ^ i = (WittVector.truncate n) (↑p ^ i)",
" ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0",
" ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0",
" ¬1 = 0",
" Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n",
" ?m.7413 ∣ p ^ n",
... | [
" i = n",
" ↑p ^ i ≠ 0",
" ↑p ^ i = (WittVector.truncate n) (↑p ^ i)",
" ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0",
" ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0",
" ¬1 = 0",
" Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n",
" ?m.7413 ∣ p ^ n",
... |
import Mathlib.Order.SuccPred.Basic
import Mathlib.Topology.Order.Basic
import Mathlib.Topology.Metrizable.Uniformity
#align_import topology.instances.discrete from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Order Set TopologicalSpace Filter
variable {α : Type*} [TopologicalSp... | Mathlib/Topology/Instances/Discrete.lean | 111 | 117 | theorem discreteTopology_iff_orderTopology_of_pred_succ [LinearOrder α] [PredOrder α]
[SuccOrder α] : DiscreteTopology α ↔ OrderTopology α := by |
refine ⟨fun h => ⟨?_⟩, fun h => ⟨?_⟩⟩
· rw [h.eq_bot]
exact LinearOrder.bot_topologicalSpace_eq_generateFrom
· rw [h.topology_eq_generate_intervals]
exact LinearOrder.bot_topologicalSpace_eq_generateFrom.symm
| [
" ∀ (a : α), (nhds a).IsCountablyGenerated",
" ∀ (a : α), (pure a).IsCountablyGenerated",
" instTopologicalSpaceSubtype = generateFrom {univ}",
" ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}",
" IsOpen {a}",
" {a} = Iio (succ a) ∩ Ioi (pred a)",
" {a} = Iic a ∩ Ici a",
" IsOpen (Iio (succ a) ∩ Io... | [
" ∀ (a : α), (nhds a).IsCountablyGenerated",
" ∀ (a : α), (pure a).IsCountablyGenerated",
" instTopologicalSpaceSubtype = generateFrom {univ}",
" ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}",
" IsOpen {a}",
" {a} = Iio (succ a) ∩ Ioi (pred a)",
" {a} = Iic a ∩ Ici a",
" IsOpen (Iio (succ a) ∩ Io... |
import Mathlib.AlgebraicTopology.FundamentalGroupoid.FundamentalGroup
import Mathlib.GroupTheory.EckmannHilton
import Mathlib.Logic.Equiv.TransferInstance
import Mathlib.Algebra.Group.Ext
#align_import topology.homotopy.homotopy_group from "leanprover-community/mathlib"@"4c3e1721c58ef9087bbc2c8c38b540f70eda2e53"
... | Mathlib/Topology/Homotopy/HomotopyGroup.lean | 74 | 78 | theorem insertAt_boundary (i : N) {t₀ : I} {t}
(H : (t₀ = 0 ∨ t₀ = 1) ∨ t ∈ boundary { j // j ≠ i }) : insertAt i ⟨t₀, t⟩ ∈ boundary N := by |
obtain H | ⟨j, H⟩ := H
· use i; rwa [funSplitAt_symm_apply, dif_pos rfl]
· use j; rwa [funSplitAt_symm_apply, dif_neg j.prop, Subtype.coe_eta]
| [
" (insertAt i) (t₀, t) ∈ boundary N",
" (insertAt i) (t₀, t) i = 0 ∨ (insertAt i) (t₀, t) i = 1",
" (insertAt i) (t₀, t) ↑j = 0 ∨ (insertAt i) (t₀, t) ↑j = 1"
] | [] |
import Mathlib.Algebra.Algebra.RestrictScalars
import Mathlib.Algebra.Algebra.Subalgebra.Basic
import Mathlib.LinearAlgebra.Quotient
import Mathlib.LinearAlgebra.StdBasis
import Mathlib.GroupTheory.Finiteness
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Nilpotent.Defs
#align_import ring_theory.finit... | Mathlib/RingTheory/Finiteness.lean | 82 | 134 | theorem exists_sub_one_mem_and_smul_eq_zero_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
[AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
∃ r : R, r - 1 ∈ I ∧ ∀ n ∈ N, r • n = (0 : M) := by |
rw [fg_def] at hn
rcases hn with ⟨s, hfs, hs⟩
have : ∃ r : R, r - 1 ∈ I ∧ N ≤ (I • span R s).comap (LinearMap.lsmul R M r) ∧ s ⊆ N := by
refine ⟨1, ?_, ?_, ?_⟩
· rw [sub_self]
exact I.zero_mem
· rw [hs]
intro n hn
rw [mem_comap]
change (1 : R) • n ∈ I • N
rw [one_smul]
... | [
" (∃ S, S.Finite ∧ span R S = N) → N.FG",
" (span R t').FG",
" (span R ↑t).FG",
" AddSubmonoid.closure ↑S = P.toAddSubmonoid",
" span ℕ ↑S = P",
" AddSubgroup.closure ↑S = P.toAddSubgroup",
" span ℤ ↑S = P",
" N.FG ↔ ∃ n s, span R (range s) = N",
" (∃ S, S.Finite ∧ span R S = N) ↔ ∃ n s, span R (ran... | [
" (∃ S, S.Finite ∧ span R S = N) → N.FG",
" (span R t').FG",
" (span R ↑t).FG",
" AddSubmonoid.closure ↑S = P.toAddSubmonoid",
" span ℕ ↑S = P",
" AddSubgroup.closure ↑S = P.toAddSubgroup",
" span ℤ ↑S = P",
" N.FG ↔ ∃ n s, span R (range s) = N",
" (∃ S, S.Finite ∧ span R S = N) ↔ ∃ n s, span R (ran... |
import Mathlib.MeasureTheory.Measure.ProbabilityMeasure
import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
import Mathlib.MeasureTheory.Integral.Layercake
import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction
#align_import measure_theory.measure.portmanteau from "leanprover-community/mathlib"@"fd5edc43dc4f... | Mathlib/MeasureTheory/Measure/Portmanteau.lean | 105 | 123 | theorem le_measure_compl_liminf_of_limsup_measure_le {ι : Type*} {L : Filter ι} {μ : Measure Ω}
{μs : ι → Measure Ω} [IsProbabilityMeasure μ] [∀ i, IsProbabilityMeasure (μs i)] {E : Set Ω}
(E_mble : MeasurableSet E) (h : (L.limsup fun i => μs i E) ≤ μ E) :
μ Eᶜ ≤ L.liminf fun i => μs i Eᶜ := by |
rcases L.eq_or_neBot with rfl | hne
· simp only [liminf_bot, le_top]
have meas_Ec : μ Eᶜ = 1 - μ E := by
simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne
have meas_i_Ec : ∀ i, μs i Eᶜ = 1 - μs i E := by
intro i
simpa only [measure_univ] using measure_compl E_mble (measur... | [
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) L",
" μ Eᶜ ≤ liminf (fun i => (μs i) Eᶜ) ⊥",
" μ Eᶜ = 1 - μ E",
" ∀ (i : ι), (μs i) Eᶜ = 1 - (μs i) E",
" (μs i) Eᶜ = 1 - (μs i) E",
" 1 - μ E ≤ liminf (fun i => 1 - (μs i) E) L",
" 1 - μ E ≤ liminf ((fun x => 1 - x) ∘ fun i => (μs i) E) L",
" 1 - μ E ≤ 1 - limsup ... | [] |
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 | 65 | 70 | theorem coe_splitLower : (splitLower I i x : Set (ι → ℝ)) = ↑I ∩ { y | y i ≤ x } := by |
rw [splitLower, coe_mk']
ext y
simp only [mem_univ_pi, mem_Ioc, mem_inter_iff, mem_coe, mem_setOf_eq, forall_and, ← Pi.le_def,
le_update_iff, le_min_iff, and_assoc, and_forall_ne (p := fun j => y j ≤ upper I j) i, mem_def]
rw [and_comm (a := 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.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Ideal
import Mathlib.RingTheory.Noetherian
#align_import ring_theory.localization.submodule from "leanprover-community/mathlib"@"1ebb20602a8caef435ce47f6373e1aa40851a177"
variable {R : Type*} [CommRing R] (M : Submonoid R) ... | Mathlib/RingTheory/Localization/Submodule.lean | 48 | 49 | theorem coeSubmodule_bot : coeSubmodule S (⊥ : Ideal R) = ⊥ := by |
rw [coeSubmodule, Submodule.map_bot]
| [
" coeSubmodule S ⊥ = ⊥"
] | [] |
import Mathlib.Init.Data.Prod
import Mathlib.Data.Seq.WSeq
#align_import data.seq.parallel from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
universe u v
namespace Computation
open Stream'
variable {α : Type u} {β : Type v}
def parallel.aux2 : List (Computation α) → Sum α (List (Com... | Mathlib/Data/Seq/Parallel.lean | 122 | 186 | theorem terminates_parallel {S : WSeq (Computation α)} {c} (h : c ∈ S) [T : Terminates c] :
Terminates (parallel S) := by |
suffices
∀ (n) (l : List (Computation α)) (S c),
c ∈ l ∨ some (some c) = Seq.get? S n → Terminates c → Terminates (corec parallel.aux1 (l, S))
from
let ⟨n, h⟩ := h
this n [] S c (Or.inr h) T
intro n; induction' n with n IH <;> intro l S c o T
· cases' o with a a
· exact terminates_paral... | [
" ∀ {l : List (Computation α)} {S : WSeq (Computation α)} {c : Computation α},\n c ∈ l → c.Terminates → (corec parallel.aux1 (l, S)).Terminates",
" ∀ (l : List (Computation α)) (S : WSeq (Computation α)),\n (∃ a, parallel.aux2 l = Sum.inl a) → (corec parallel.aux1 (l, S)).Terminates",
" (corec parallel.au... | [
" ∀ {l : List (Computation α)} {S : WSeq (Computation α)} {c : Computation α},\n c ∈ l → c.Terminates → (corec parallel.aux1 (l, S)).Terminates",
" ∀ (l : List (Computation α)) (S : WSeq (Computation α)),\n (∃ a, parallel.aux2 l = Sum.inl a) → (corec parallel.aux1 (l, S)).Terminates",
" (corec parallel.au... |
import Mathlib.Algebra.BigOperators.NatAntidiagonal
import Mathlib.Algebra.GeomSum
import Mathlib.Data.Fintype.BigOperators
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.Tactic.FieldSimp
#align_import number_theory.bernoulli from "leanprover-community/mat... | Mathlib/NumberTheory/Bernoulli.lean | 104 | 106 | theorem bernoulli'_zero : bernoulli' 0 = 1 := by |
rw [bernoulli'_def]
norm_num
| [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k",
" ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1",
" ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0",
" ↑(n.choose x) / (↑n - ↑... | [
" bernoulli' n = 1 - ∑ k ∈ range n, ↑(n.choose k) / (↑n - ↑k + 1) * bernoulli' k",
" ∑ k ∈ range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1",
" ∑ x ∈ range n, (↑(n.choose x) / (↑n - ↑x + 1) * bernoulli' x - ↑(n.choose (n - x)) / (↑n - ↑x + 1) * bernoulli' x) = 0",
" ↑(n.choose x) / (↑n - ↑... |
import Mathlib.Order.Interval.Set.Monotone
import Mathlib.Probability.Process.HittingTime
import Mathlib.Probability.Martingale.Basic
import Mathlib.Tactic.AdaptationNote
#align_import probability.martingale.upcrossing from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open Topological... | Mathlib/Probability/Martingale/Upcrossing.lean | 201 | 203 | theorem upperCrossingTime_le_lowerCrossingTime :
upperCrossingTime a b f N n ω ≤ lowerCrossingTime a b f N n ω := by |
simp only [lowerCrossingTime, le_hitting upperCrossingTime_le ω]
| [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... | [
" upperCrossingTime a b f N (n + 1) ω =\n hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N n ω) N ω) N ω",
" upperCrossingTime a b f N (n + 1) ω = hitting f (Set.Ici b) (lowerCrossingTime a b f N n ω) N ω",
" hitting f (Set.Ici b) (lowerCrossingTimeAux a f (upperCrossingTime a b f N... |
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.function.ae_measurable_sequence from "leanprover-community/mathlib"@"d003c55042c3cd08aefd1ae9a42ef89441cdaaf3"
open MeasureTheory
open scoped Classical
variable {ι : Sort*} {α β γ... | Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean | 81 | 86 | theorem fun_prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
p x fun n => f n x := by |
have h_eq : (fun n => f n x) = fun n => aeSeq hf p n x :=
funext fun n => (aeSeq_eq_fun_of_mem_aeSeqSet hf hx n).symm
rw [h_eq]
exact prop_of_mem_aeSeqSet hf hx
| [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... | [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... |
import Mathlib.Order.ConditionallyCompleteLattice.Basic
import Mathlib.Order.RelIso.Basic
#align_import order.ord_continuous from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u v w x
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Sort x}
open Function OrderDual Set
... | Mathlib/Order/OrdContinuous.lean | 98 | 99 | theorem le_iff (hf : LeftOrdContinuous f) (h : Injective f) {x y} : f x ≤ f y ↔ x ≤ y := by |
simp only [← sup_eq_right, ← hf.map_sup, h.eq_iff]
| [
" IsLUB (f '' {x, y}) (f x ⊔ f y)",
" f x ≤ f y ↔ x ≤ y"
] | [
" IsLUB (f '' {x, y}) (f x ⊔ f y)"
] |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 48 | 54 | theorem Even.strictConvexOn_pow {n : ℕ} (hn : Even n) (h : n ≠ 0) :
StrictConvexOn ℝ Set.univ fun x : ℝ => x ^ n := by |
apply StrictMono.strictConvexOn_univ_of_deriv (continuous_pow n)
rw [deriv_pow']
replace h := Nat.pos_of_ne_zero h
exact StrictMono.const_mul (Odd.strictMono_pow <| Nat.Even.sub_odd h hn <| Nat.odd_iff.2 rfl)
(Nat.cast_pos.2 h)
| [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)"
] | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n"
] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Nat
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.RingTheory.Fintype
import Mathlib.Tactic.IntervalCases
#align_import number_the... | Mathlib/NumberTheory/LucasLehmer.lean | 93 | 95 | theorem succ_mersenne (k : ℕ) : mersenne k + 1 = 2 ^ k := by |
rw [mersenne, tsub_add_cancel_of_le]
exact one_le_pow_of_one_le (by norm_num) k
| [
" 2 ^ m < 2 ^ n",
" 1 < 2",
" mersenne k + 1 = 2 ^ k",
" 1 ≤ 2 ^ k",
" 1 ≤ 2"
] | [
" 2 ^ m < 2 ^ n",
" 1 < 2"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Data.Tree.Basic
import Mathlib.Logic.Basic
import Mathlib.Tactic.NormNum.Core
import Mathlib.Util.SynthesizeUsing
import Mathlib.Util.Qq
open Lean Parser Tactic Mathlib Meta NormNum Qq
initialize registerTraceClass `CancelDen... | Mathlib/Tactic/CancelDenoms/Core.lean | 45 | 47 | theorem div_subst {α} [Field α] {n1 n2 k e1 e2 t1 : α}
(h1 : n1 * e1 = t1) (h2 : n2 / e2 = 1) (h3 : n1 * n2 = k) : k * (e1 / e2) = t1 := by |
rw [← h3, mul_assoc, mul_div_left_comm, h2, ← mul_assoc, h1, mul_comm, one_mul]
| [
" k * (e1 * e2) = t1 * t2",
" k * (e1 / e2) = t1"
] | [
" k * (e1 * e2) = t1 * t2"
] |
import Mathlib.Data.Real.Basic
#align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Real
noncomputable def sign (r : ℝ) : ℝ :=
if r < 0 then -1 else if 0 < r then 1 else 0
#align real.sign Real.sign
theorem sign_of_neg {r : ℝ} (hr : r < 0) : si... | Mathlib/Data/Real/Sign.lean | 39 | 39 | theorem sign_of_pos {r : ℝ} (hr : 0 < r) : sign r = 1 := by | rw [sign, if_pos hr, if_neg hr.not_lt]
| [
" r.sign = -1",
" r.sign = 1"
] | [
" r.sign = -1"
] |
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Multiset
variable {α : Type*} [CancelCommMonoidWithZero α] [NormalizedG... | Mathlib/Algebra/GCDMonoid/Multiset.lean | 185 | 190 | theorem gcd_map_mul (a : α) (s : Multiset α) : (s.map (a * ·)).gcd = normalize a * s.gcd := by |
refine s.induction_on ?_ fun b s ih ↦ ?_
· simp_rw [map_zero, gcd_zero, mul_zero]
· simp_rw [map_cons, gcd_cons, ← gcd_mul_left]
rw [ih]
apply ((normalize_associated a).mul_right _).gcd_eq_right
| [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... | [
" (s₁ + s₂).gcd = fold GCDMonoid.gcd (GCDMonoid.gcd 0 0) (s₁ + s₂)",
" a ∣ gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
" ∀ (a_1 : α) (s : Multiset α), (a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b) → (a ∣ (a_1 ::ₘ s).gcd ↔ ∀ b ∈ a_1 ::ₘ s, a ∣ b)",
" normalize (gcd 0) = gcd 0",
" normalize (a ::ₘ s).gcd = (a ::ₘ s).gcd",
" s.gcd = 0 ↔ ∀ x ∈ ... |
import Mathlib.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 | 462 | 465 | theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) :
HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by |
rw [← hasDerivWithinAt_univ] at *
exact hc.clm_comp hd
| [
" HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x",
" HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (... | [
" HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x",
" HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x"
] |
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Tactic.LinearCombination
#align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946"
namespace Polynomial.Chebyshev
set_option linter.uppercaseLean3 false -- `T` `U` `X`
open Polynomial
v... | Mathlib/RingTheory/Polynomial/Chebyshev.lean | 99 | 100 | theorem T_eq (n : ℤ) : T R n = 2 * X * T R (n - 1) - T R (n - 2) := by |
linear_combination (norm := ring_nf) T_add_two R (n - 2)
| [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... | [
" motive (Int.negSucc n)",
" T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))",
" T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0",
" T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))... |
import Mathlib.Algebra.Order.Ring.Nat
#align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b"
namespace Nat
def dist (n m : ℕ) :=
n - m + (m - n)
#align nat.dist Nat.dist
-- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr... | Mathlib/Data/Nat/Dist.lean | 103 | 104 | theorem dist_mul_left (k n m : ℕ) : dist (k * n) (k * m) = k * dist n m := by |
rw [mul_comm k n, mul_comm k m, dist_mul_right, mul_comm]
| [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m ≤ n + n.dist m",
" m ≤ n.dist m + n",
" n ≤ n.dist m + m",
" n ≤ m.dist n + m",
" n ≤ m + n.dist m",
" n ≤ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... | [
" n.dist m = m.dist n",
" n.dist n = 0",
" n.dist m = 0",
" n.dist m = m - n",
" n.dist m = n - m",
" m.dist n = n - m",
" m ≤ n + n.dist m",
" m ≤ n.dist m + n",
" n ≤ n.dist m + m",
" n ≤ m.dist n + m",
" n ≤ m + n.dist m",
" n ≤ m + m.dist n",
" n + k - (m + k) + (m + k - (n + k)) = n - m... |
import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure
import Mathlib.RingTheory.IntegralDomain
#align_import field_theory.primitive_element from "leanprover-community/mathlib"@"df76f43357840485b9d04ed5dee5ab115d420e87"
noncomputable section
open scoped Classical Polynomial
open FiniteDimensional Polynomial In... | Mathlib/FieldTheory/PrimitiveElement.lean | 86 | 96 | theorem primitive_element_inf_aux_exists_c (f g : F[X]) :
∃ c : F, ∀ α' ∈ (f.map ϕ).roots, ∀ β' ∈ (g.map ϕ).roots, -(α' - α) / (β' - β) ≠ ϕ c := by |
let sf := (f.map ϕ).roots
let sg := (g.map ϕ).roots
let s := (sf.bind fun α' => sg.map fun β' => -(α' - α) / (β' - β)).toFinset
let s' := s.preimage ϕ fun x _ y _ h => ϕ.injective h
obtain ⟨c, hc⟩ := Infinite.exists_not_mem_finset s'
simp_rw [s', s, Finset.mem_preimage, Multiset.mem_toFinset, Multiset.mem_... | [
" ∃ c, ∀ α' ∈ (Polynomial.map ϕ f).roots, ∀ β' ∈ (Polynomial.map ϕ g).roots, -(α' - α) / (β' - β) ≠ ϕ c"
] | [] |
import Batteries.Tactic.Init
import Batteries.Tactic.Alias
import Batteries.Tactic.Lint.Misc
instance {f : α → β} [DecidablePred p] : DecidablePred (p ∘ f) :=
inferInstanceAs <| DecidablePred fun x => p (f x)
@[deprecated] alias proofIrrel := proof_irrel
theorem Function.id_def : @id α = fun x => x := rfl
al... | .lake/packages/batteries/Batteries/Logic.lean | 42 | 43 | theorem congrArg₂ (f : α → β → γ) {x x' : α} {y y' : β}
(hx : x = x') (hy : y = y') : f x y = f x' y' := by | subst hx hy; rfl
| [
" h ▸ y = y",
" ⋯ ▸ y = y",
" f x y = f x' y'",
" f x y = f x y"
] | [
" h ▸ y = y",
" ⋯ ▸ y = y"
] |
import Mathlib.CategoryTheory.EqToHom
import Mathlib.CategoryTheory.Quotient
import Mathlib.Combinatorics.Quiver.Path
#align_import category_theory.path_category from "leanprover-community/mathlib"@"c6dd521ebdce53bb372c527569dd7c25de53a08b"
universe v₁ v₂ u₁ u₂
namespace CategoryTheory
section
def Paths (V : ... | Mathlib/CategoryTheory/PathCategory.lean | 87 | 90 | theorem lift_toPath {C} [Category C] (φ : V ⥤q C) {X Y : V} (f : X ⟶ Y) :
(lift φ).map f.toPath = φ.map f := by |
dsimp [Quiver.Hom.toPath, lift]
simp
| [
" { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec... | [
" { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map\n (f ≫ g) =\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec (𝟙 (φ.obj X)) (fun {b c} x f ihp => ihp ≫ φ.map f) f }.map f ≫\n { obj := φ.obj, map := fun {X Y} f => Quiver.Path.rec... |
import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.Adjugate
#align_import linear_algebra.matrix.nondegenerate from "leanprover-community/mathlib"@"2a32c70c78096758af93e997b978a5d461007b4f"
namespace Matrix
variable {m R A : Type*} [Fintype m... | Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean | 50 | 63 | theorem nondegenerate_of_det_ne_zero [DecidableEq m] {M : Matrix m m A} (hM : M.det ≠ 0) :
Nondegenerate M := by |
intro v hv
ext i
specialize hv (M.cramer (Pi.single i 1))
refine (mul_eq_zero.mp ?_).resolve_right hM
convert hv
simp only [mulVec_cramer M (Pi.single i 1), dotProduct, Pi.smul_apply, smul_eq_mul]
rw [Finset.sum_eq_single i, Pi.single_eq_same, mul_one]
· intro j _ hj
simp [hj]
· intros
have :... | [
" M.Nondegenerate",
" v = 0",
" v i = 0 i",
" v i * M.det = 0",
" v i * M.det = v ⬝ᵥ M *ᵥ M.cramer (Pi.single i 1)",
" v i * M.det = ∑ x : m, v x * (M.det * Pi.single i 1 x)",
" ∀ b ∈ Finset.univ, b ≠ i → v b * (M.det * Pi.single i 1 b) = 0",
" v j * (M.det * Pi.single i 1 j) = 0",
" i ∉ Finset.univ... | [] |
import Mathlib.Logic.Encodable.Lattice
import Mathlib.MeasureTheory.MeasurableSpace.Defs
#align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
open MeasurableSpace Set
open scoped Classical
open MeasureTheory
def IsPiSystem {α} (C : Set (Set α)) :... | Mathlib/MeasureTheory/PiSystem.lean | 79 | 82 | theorem IsPiSystem.singleton {α} (S : Set α) : IsPiSystem ({S} : Set (Set α)) := by |
intro s h_s t h_t _
rw [Set.mem_singleton_iff.1 h_s, Set.mem_singleton_iff.1 h_t, Set.inter_self,
Set.mem_singleton_iff]
| [
" IsPiSystem {S}",
" s ∩ t ∈ {S}"
] | [] |
import Mathlib.MeasureTheory.MeasurableSpace.Defs
open Set Function
open scoped MeasureTheory
namespace MeasurableSpace
variable {α : Type*}
def invariants [m : MeasurableSpace α] (f : α → α) : MeasurableSpace α :=
{ m ⊓ ⟨fun s ↦ f ⁻¹' s = s, by simp, by simp, fun f hf ↦ by simp [hf]⟩ with
MeasurableSet' :... | Mathlib/MeasureTheory/MeasurableSpace/Invariants.lean | 58 | 60 | theorem measurable_invariants_dom {f : α → α} {g : α → β} :
Measurable[invariants f] g ↔ Measurable g ∧ ∀ s, MeasurableSet s → (g ∘ f) ⁻¹' s = g ⁻¹' s := by |
simp only [Measurable, ← forall_and]; rfl
| [
" (fun s => f ⁻¹' s = s) ∅",
" ∀ (s : Set α), (fun s => f ⁻¹' s = s) s → (fun s => f ⁻¹' s = s) sᶜ",
" (fun s => f✝ ⁻¹' s = s) (⋃ i, f i)",
" f ∘ g ⁻¹' s = s",
" invariants f ≤ invariants f^[n]",
" invariants f ≤ invariants f^[0]",
" invariants f ≤ invariants f^[n + 1]",
" Measurable g ↔ Measurable g ... | [
" (fun s => f ⁻¹' s = s) ∅",
" ∀ (s : Set α), (fun s => f ⁻¹' s = s) s → (fun s => f ⁻¹' s = s) sᶜ",
" (fun s => f✝ ⁻¹' s = s) (⋃ i, f i)",
" f ∘ g ⁻¹' s = s",
" invariants f ≤ invariants f^[n]",
" invariants f ≤ invariants f^[0]",
" invariants f ≤ invariants f^[n + 1]"
] |
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Localization.NormTrace
#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
open scoped NumberField
open Finset NumberField Algebra FiniteDimensional
namespace RingOfIn... | Mathlib/NumberTheory/NumberField/Norm.lean | 104 | 106 | theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimensional F L]
[IsScalarTower K F L] (x : 𝓞 L) : norm K (norm F x) = norm K x := by |
rw [RingOfIntegers.ext_iff, coe_norm, coe_norm, coe_norm, Algebra.norm_norm]
| [
" (norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ finrank K L",
" IsUnit ((norm K) x) ↔ IsUnit x",
" IsUnit x",
" IsUnit (⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x)",
" ⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x = (algebraMap (𝓞 K) (𝓞 L)) ((norm K) x)",
" ↑(⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * ... | [
" (norm K) ((algebraMap (𝓞 K) (𝓞 L)) x) = x ^ finrank K L",
" IsUnit ((norm K) x) ↔ IsUnit x",
" IsUnit x",
" IsUnit (⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x)",
" ⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * x = (algebraMap (𝓞 K) (𝓞 L)) ((norm K) x)",
" ↑(⟨∏ σ ∈ univ \\ {AlgEquiv.refl}, σ ↑x, ⋯⟩ * ... |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.Matrix.AbsoluteValue
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.ClassGroup
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
import Mathlib.Ri... | Mathlib/NumberTheory/ClassNumber/Finite.lean | 91 | 114 | theorem norm_lt {T : Type*} [LinearOrderedRing T] (a : S) {y : T}
(hy : ∀ k, (abv (bS.repr a k) : T) < y) :
(abv (Algebra.norm R a) : T) < normBound abv bS * y ^ Fintype.card ι := by |
obtain ⟨i⟩ := bS.index_nonempty
have him : (Finset.univ.image fun k => abv (bS.repr a k)).Nonempty :=
⟨_, Finset.mem_image.mpr ⟨i, Finset.mem_univ _, rfl⟩⟩
set y' : ℤ := Finset.max' _ him with y'_def
have hy' : ∀ k, abv (bS.repr a k) ≤ y' := by
intro k
exact @Finset.le_max' ℤ _ _ _ (Finset.mem_imag... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... | [
" 0 < normBound abv bS",
" ∃ i j k, (Algebra.leftMulMatrix bS) (bS i) j k ≠ 0",
" False",
" bS i = 0",
" (Algebra.leftMulMatrix bS) (bS i) = 0",
" (Algebra.leftMulMatrix bS) (bS i) j k = 0 j k",
" 0 <\n ↑(Fintype.card ι).factorial *\n (↑(Fintype.card ι) *\n (Finset.image (fun ijk => abv... |
import Mathlib.Topology.Algebra.InfiniteSum.Group
import Mathlib.Logic.Encodable.Lattice
noncomputable section
open Filter Finset Function Encodable
open scoped Topology
variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M}
variable {G : Type*} [CommGroup G] {g g' : G}
-- don't declare [Topologic... | Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean | 273 | 285 | theorem cauchySeq_finset_iff_nat_tprod_vanishing {f : ℕ → G} :
(CauchySeq fun s : Finset ℕ ↦ ∏ n ∈ s, f n) ↔
∀ e ∈ 𝓝 (1 : G), ∃ N : ℕ, ∀ t ⊆ {n | N ≤ n}, (∏' n : t, f n) ∈ e := by |
refine cauchySeq_finset_iff_tprod_vanishing.trans ⟨fun vanish e he ↦ ?_, fun vanish e he ↦ ?_⟩
· obtain ⟨s, hs⟩ := vanish e he
refine ⟨if h : s.Nonempty then s.max' h + 1 else 0,
fun t ht ↦ hs _ <| Set.disjoint_left.mpr ?_⟩
split_ifs at ht with h
· exact fun m hmt hms ↦ (s.le_max' _ hms).not_lt (... | [
" (CauchySeq fun s => ∏ n ∈ s, f n) ↔ ∀ e ∈ 𝓝 1, ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∃ N, ∀ t ⊆ {n | N ≤ n}, ∏' (n : ↑t), f ↑n ∈ e",
" ∀ ⦃a : ℕ⦄, a ∈ t → a ∉ ↑s",
" ∃ s, ∀ (t : Set ℕ), Disjoint t ↑s → ∏' (b : ↑t), f ↑b ∈ e"
] | [] |
import Mathlib.Control.Functor.Multivariate
import Mathlib.Data.PFunctor.Univariate.Basic
#align_import data.pfunctor.multivariate.basic from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d"
universe u v
open MvFunctor
@[pp_with_univ]
structure MvPFunctor (n : ℕ) where
A : Type u
... | Mathlib/Data/PFunctor/Multivariate/Basic.lean | 142 | 144 | theorem comp.get_map (f : α ⟹ β) (x : comp P Q α) :
comp.get (f <$$> x) = (fun i (x : Q i α) => f <$$> x) <$$> comp.get x := by |
rfl
| [
" get (f <$$> x) = (fun i x => f <$$> x) <$$> get x"
] | [] |
import Mathlib.Algebra.Algebra.Subalgebra.Unitization
import Mathlib.Analysis.RCLike.Basic
import Mathlib.Topology.Algebra.StarSubalgebra
import Mathlib.Topology.ContinuousFunction.ContinuousMapZero
import Mathlib.Topology.ContinuousFunction.Weierstrass
#align_import topology.continuous_function.stone_weierstrass fro... | Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean | 69 | 77 | theorem polynomial_comp_attachBound (A : Subalgebra ℝ C(X, ℝ)) (f : A) (g : ℝ[X]) :
(g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (f : C(X, ℝ)).attachBound =
Polynomial.aeval f g := by |
ext
simp only [ContinuousMap.coe_comp, Function.comp_apply, ContinuousMap.attachBound_apply_coe,
Polynomial.toContinuousMapOn_apply, Polynomial.aeval_subalgebra_coe,
Polynomial.aeval_continuousMap_apply, Polynomial.toContinuousMap_apply]
-- This used to be `rw`, but we need `erw` after leanprover/lean4#2... | [
" (g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound = ↑((Polynomial.aeval f) g)",
" ((g.toContinuousMapOn (Set.Icc (-‖f‖) ‖f‖)).comp (↑f).attachBound) a✝ = ↑((Polynomial.aeval f) g) a✝",
" Polynomial.eval (↑((↑f).attachBound a✝)) g = Polynomial.eval (↑f a✝) g"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.