Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.Analysis.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 | 78 | 82 | theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0 := by |
suffices ∀ x : H, x ∈ (univ : Set H).innerDualCone → x = 0 by
apply SetLike.coe_injective
exact eq_singleton_iff_unique_mem.mpr ⟨fun x _ => (inner_zero_right _).ge, this⟩
exact fun x hx => by simpa [← real_inner_self_nonpos] using hx (-x) (mem_univ _)
| [
" 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, c • y⟫_ℝ",
" 0 ≤ c * ⟪x, y⟫_ℝ",
" 0 ≤ ⟪x, u + v⟫_ℝ",
" 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ"
] |
import Mathlib.Analysis.Analytic.Composition
#align_import analysis.analytic.inverse from "leanprover-community/mathlib"@"284fdd2962e67d2932fa3a79ce19fcf92d38e228"
open scoped Classical Topology
open Finset Filter
namespace FormalMultilinearSeries
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} ... | Mathlib/Analysis/Analytic/Inverse.lean | 68 | 69 | theorem leftInv_coeff_zero (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) :
p.leftInv i 0 = 0 := by | rw [leftInv]
| [
" p.leftInv i 0 = 0"
] | [] |
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset
import Mathlib.Data.Finite.Card
import Mathlib.GroupTheory.Finiteness
import Mathlib.GroupTheory.GroupAction.Quotient
#align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Subgroup
open Ca... | Mathlib/GroupTheory/Index.lean | 62 | 76 | theorem index_comap_of_surjective {G' : Type*} [Group G'] {f : G' →* G}
(hf : Function.Surjective f) : (H.comap f).index = H.index := by |
letI := QuotientGroup.leftRel H
letI := QuotientGroup.leftRel (H.comap f)
have key : ∀ x y : G', Setoid.r x y ↔ Setoid.r (f x) (f y) := by
simp only [QuotientGroup.leftRel_apply]
exact fun x y => iff_of_eq (congr_arg (· ∈ H) (by rw [f.map_mul, f.map_inv]))
refine Cardinal.toNat_congr (Equiv.ofBijective... | [
" (comap f H).index = H.index",
" ∀ (x y : G'), Setoid.r x y ↔ Setoid.r (f x) (f y)",
" ∀ (x y : G'), x⁻¹ * y ∈ comap f H ↔ (f x)⁻¹ * f y ∈ H",
" f (x⁻¹ * y) = (f x)⁻¹ * f y",
" Function.Injective (Quotient.map' ⇑f ⋯)",
" ∀ ⦃a₂ : G' ⧸ comap f H⦄, Quotient.map' ⇑f ⋯ (Quotient.mk'' x) = Quotient.map' ⇑f ⋯ a... | [] |
import Mathlib.Algebra.ContinuedFractions.Computation.Basic
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
open Generali... | Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean | 105 | 109 | theorem stream_succ_of_int (a : ℤ) (n : ℕ) : IntFractPair.stream (a : K) (n + 1) = none := by |
induction' n with n ih
· refine IntFractPair.stream_eq_none_of_fr_eq_zero (IntFractPair.stream_zero (a : K)) ?_
simp only [IntFractPair.of, Int.fract_intCast]
· exact IntFractPair.succ_nth_stream_eq_none_iff.mpr (Or.inl ih)
| [
" IntFractPair.stream v (n + 1) = none",
" IntFractPair.stream v (n + 1) = none ↔\n IntFractPair.stream v n = none ∨ ∃ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0",
" ((IntFractPair.stream v n).bind fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n IntFractPai... | [
" IntFractPair.stream v (n + 1) = none",
" IntFractPair.stream v (n + 1) = none ↔\n IntFractPair.stream v n = none ∨ ∃ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0",
" ((IntFractPair.stream v n).bind fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n IntFractPai... |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X ⟶ B) (g ... | Mathlib/Topology/Category/LightProfinite/Limits.lean | 123 | 126 | theorem pullback_fst_eq :
LightProfinite.pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst := by |
dsimp [pullbackIsoPullback]
simp only [Limits.limit.conePointUniqueUpToIso_hom_comp, pullback.cone_pt, pullback.cone_π]
| [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... | [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... |
import Mathlib.Algebra.Order.Monoid.Canonical.Defs
import Mathlib.Data.List.Infix
import Mathlib.Data.List.MinMax
import Mathlib.Data.List.EditDistance.Defs
set_option autoImplicit true
variable {C : Levenshtein.Cost α β δ} [CanonicallyLinearOrderedAddCommMonoid δ]
theorem suffixLevenshtein_minimum_le_levenshtein... | Mathlib/Data/List/EditDistance/Bounds.lean | 58 | 73 | theorem le_suffixLevenshtein_cons_minimum (xs : List α) (y ys) :
(suffixLevenshtein C xs ys).1.minimum ≤ (suffixLevenshtein C xs (y :: ys)).1.minimum := by |
apply List.le_minimum_of_forall_le
simp only [suffixLevenshtein_eq_tails_map]
simp only [List.mem_map, List.mem_tails, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]
intro a suff
refine (?_ : _ ≤ _).trans (suffixLevenshtein_minimum_le_levenshtein_cons _ _ _)
simp only [suffixLevenshtein_eq_tails_m... | [
" (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))",
" (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))",
" levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys",
" 0 ≤ C.insert y",
" (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :... | [
" (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))",
" (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))",
" levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys",
" 0 ≤ C.insert y",
" (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :... |
import Mathlib.Data.Fin.VecNotation
import Mathlib.Logic.Embedding.Set
#align_import logic.equiv.fin from "leanprover-community/mathlib"@"bd835ef554f37ef9b804f0903089211f89cb370b"
assert_not_exists MonoidWithZero
universe u
variable {m n : ℕ}
def finZeroEquiv : Fin 0 ≃ Empty :=
Equiv.equivEmpty _
#align fin_... | Mathlib/Logic/Equiv/Fin.lean | 56 | 60 | theorem Fin.preimage_apply_01_prod {α : Fin 2 → Type u} (s : Set (α 0)) (t : Set (α 1)) :
(fun f : ∀ i, α i => (f 0, f 1)) ⁻¹' s ×ˢ t =
Set.pi Set.univ (Fin.cons s <| Fin.cons t finZeroElim) := by |
ext f
simp [Fin.forall_fin_two]
| [
" (fun b => Bool.casesOn b 0 1) (![false, true] 0) = 0 ∧ (fun b => Bool.casesOn b 0 1) (![false, true] 1) = 1",
" ![false, true] ((fun b => Bool.casesOn b 0 1) false) = false ∧\n ![false, true] ((fun b => Bool.casesOn b 0 1) true) = true",
" (fun f => (f 0, f 1)) ⁻¹' s ×ˢ t = Set.univ.pi (cons s (cons t finZ... | [
" (fun b => Bool.casesOn b 0 1) (![false, true] 0) = 0 ∧ (fun b => Bool.casesOn b 0 1) (![false, true] 1) = 1",
" ![false, true] ((fun b => Bool.casesOn b 0 1) false) = false ∧\n ![false, true] ((fun b => Bool.casesOn b 0 1) true) = true"
] |
import Mathlib.CategoryTheory.Monoidal.Category
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.PEmpty
#align_import category_theory.monoidal.of_chosen_finite_products.basic from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4"
universe v u
names... | Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean | 249 | 254 | theorem tensor_comp {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁)
(g₂ : Y₂ ⟶ Z₂) : tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂ := by |
apply IsLimit.hom_ext (ℬ _ _).isLimit;
rintro ⟨⟨⟩⟩ <;>
· dsimp [tensorHom]
simp
| [
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂)",
" ∀ (j : Discrete WalkingPair),\n tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app j = 𝟙 (tensorObj ℬ X₁ X₂) ≫ (ℬ X₁ X₂).cone.π.app j",
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app { as := WalkingPair.left } =\n 𝟙 (tensorObj ℬ X₁ X₂) ≫ (... | [
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂)",
" ∀ (j : Discrete WalkingPair),\n tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app j = 𝟙 (tensorObj ℬ X₁ X₂) ≫ (ℬ X₁ X₂).cone.π.app j",
" tensorHom ℬ (𝟙 X₁) (𝟙 X₂) ≫ (ℬ X₁ X₂).cone.π.app { as := WalkingPair.left } =\n 𝟙 (tensorObj ℬ X₁ X₂) ≫ (... |
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.NormedSpace.Completion
import Mathlib.Analysis.NormedSpace.Extr
import Mathlib.Topology.Order.ExtrClosure
#align_import analysis.complex.abs_max from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpa... | Mathlib/Analysis/Complex/AbsMax.lean | 181 | 196 | theorem norm_eqOn_closedBall_of_isMaxOn {f : E → F} {z : E} {r : ℝ}
(hd : DiffContOnCl ℂ f (ball z r)) (hz : IsMaxOn (norm ∘ f) (ball z r) z) :
EqOn (norm ∘ f) (const E ‖f z‖) (closedBall z r) := by |
intro w hw
rw [mem_closedBall, dist_comm] at hw
rcases eq_or_ne z w with (rfl | hne); · rfl
set e := (lineMap z w : ℂ → E)
have hde : Differentiable ℂ e := (differentiable_id.smul_const (w - z)).add_const z
suffices ‖(f ∘ e) (1 : ℂ)‖ = ‖(f ∘ e) (0 : ℂ)‖ by simpa [e]
have hr : dist (1 : ℂ) 0 = 1 := by sim... | [
" ‖f w‖ = ‖f z‖",
" ¬(norm ∘ f) w < (norm ∘ f) z",
" False",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)",
" ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r... | [
" ‖f w‖ = ‖f z‖",
" ¬(norm ∘ f) w < (norm ∘ f) z",
" False",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ = 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * ‖f z‖",
" ‖∮ (ζ : ℂ) in C(z, r), (ζ - z)⁻¹ • f ζ‖ < 2 * π * r * (‖f z‖ / r)",
" ContinuousOn (fun ζ => (ζ - z)⁻¹ • f ζ) (sphere z r... |
import Mathlib.Order.CompleteLattice
import Mathlib.Order.Atoms
def Order.radical (α : Type*) [Preorder α] [OrderTop α] [InfSet α] : α :=
⨅ a ∈ {H | IsCoatom H}, a
variable {α : Type*} [CompleteLattice α]
lemma Order.radical_le_coatom {a : α} (h : IsCoatom a) : radical α ≤ a := biInf_le _ h
variable {β : Typ... | Mathlib/Order/Radical.lean | 38 | 48 | theorem Order.radical_nongenerating [IsCoatomic α] {a : α} (h : a ⊔ radical α = ⊤) : a = ⊤ := by |
-- Since the lattice is coatomic, either `a` is already the top element,
-- or there is a coatom above it.
obtain (rfl | w) := eq_top_or_exists_le_coatom a
· -- In the first case, we're done, this was already the goal.
rfl
· obtain ⟨m, c, le⟩ := w
have q : a ⊔ radical α ≤ m := sup_le le (radical_le_c... | [
" f (Order.radical α) = Order.radical β",
" f (⨅ a ∈ {H | IsCoatom H}, a) = ⨅ a ∈ {H | IsCoatom H}, a",
" ⨅ i ∈ {H | IsCoatom H}, f i = ⨅ a ∈ {H | IsCoatom H}, a",
" α ≃ β",
" ∀ (x : α), ⨅ (_ : f.toEquiv x ∈ {H | IsCoatom H}), f.toEquiv x = ⨅ (_ : x ∈ {H | IsCoatom H}), f x",
" ⨅ (_ : f.toEquiv x✝ ∈ {H | ... | [
" f (Order.radical α) = Order.radical β",
" f (⨅ a ∈ {H | IsCoatom H}, a) = ⨅ a ∈ {H | IsCoatom H}, a",
" ⨅ i ∈ {H | IsCoatom H}, f i = ⨅ a ∈ {H | IsCoatom H}, a",
" α ≃ β",
" ∀ (x : α), ⨅ (_ : f.toEquiv x ∈ {H | IsCoatom H}), f.toEquiv x = ⨅ (_ : x ∈ {H | IsCoatom H}), f x",
" ⨅ (_ : f.toEquiv x✝ ∈ {H | ... |
import Mathlib.Algebra.CharP.ExpChar
import Mathlib.GroupTheory.OrderOfElement
#align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450"
variable {R ι : Type*}
namespace CharTwo
section Semiring
variable [Semiring R] [CharP R 2]
| Mathlib/Algebra/CharP/Two.lean | 29 | 29 | theorem two_eq_zero : (2 : R) = 0 := by | rw [← Nat.cast_two, CharP.cast_eq_zero]
| [
" 2 = 0"
] | [] |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Polynomial.Degree.Lemmas
#align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448"
noncomputable section
open Polynomial
open Polynomial Finset
namespace Polynomial
variable {R : Type*}... | Mathlib/Algebra/Polynomial/EraseLead.lean | 95 | 98 | theorem lt_natDegree_of_mem_eraseLead_support {a : ℕ} (h : a ∈ (eraseLead f).support) :
a < f.natDegree := by |
rw [eraseLead_support, mem_erase] at h
exact (le_natDegree_of_mem_supp a h.2).lt_of_ne h.1
| [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... | [
" f.eraseLead.support = f.support.erase f.natDegree",
" f.eraseLead.coeff i = if i = f.natDegree then 0 else f.coeff i",
" f.eraseLead.coeff f.natDegree = 0",
" f.eraseLead.coeff i = f.coeff i",
" eraseLead 0 = 0",
" f.eraseLead + C f.leadingCoeff * X ^ f.natDegree = f",
" f - C f.leadingCoeff * X ^ f.n... |
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.LinearAlgebra.Span
#align_import algebra.algebra.tower from "leanprover-community/mathlib"@"71150516f28d9826c7341f8815b31f7d8770c212"
open Pointwise
universe u v w u₁ v₁
variable (R : Type u) (S : Type v) (A : Type w) (B : Type u₁) (M : Type v₁)
namespace IsS... | Mathlib/Algebra/Algebra/Tower.lean | 162 | 164 | theorem _root_.AlgHom.map_algebraMap (f : A →ₐ[S] B) (r : R) :
f (algebraMap R A r) = algebraMap R B r := by |
rw [algebraMap_apply R S A r, f.commutes, ← algebraMap_apply R S B]
| [
" (x • y) • z = x • y • z",
" (algebraMap R A) x = ((algebraMap S A).comp (algebraMap R S)) x",
" (algebraMap R A) x = (algebraMap S A) ((algebraMap R S) x)",
" A",
" (algebraMap S A) r = (algebraMap S A) r",
" f ((algebraMap R A) r) = (algebraMap R B) r"
] | [
" (x • y) • z = x • y • z",
" (algebraMap R A) x = ((algebraMap S A).comp (algebraMap R S)) x",
" (algebraMap R A) x = (algebraMap S A) ((algebraMap R S) x)",
" A",
" (algebraMap S A) r = (algebraMap S A) r"
] |
import Mathlib.Algebra.Order.Module.OrderedSMul
import Mathlib.Algebra.Order.Module.Pointwise
import Mathlib.Data.Real.Archimedean
#align_import data.real.pointwise from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a"
open Set
open Pointwise
variable {ι : Sort*} {α : Type*} [LinearOrde... | Mathlib/Data/Real/Pointwise.lean | 91 | 100 | theorem Real.sSup_smul_of_nonpos (ha : a ≤ 0) (s : Set ℝ) : sSup (a • s) = a • sInf s := by |
obtain rfl | hs := s.eq_empty_or_nonempty
· rw [smul_set_empty, Real.sSup_empty, Real.sInf_empty, smul_zero]
obtain rfl | ha' := ha.eq_or_lt
· rw [zero_smul_set hs, zero_smul]
exact csSup_singleton 0
by_cases h : BddBelow s
· exact ((OrderIso.smulRightDual ℝ ha').map_csInf' hs h).symm
· rw [Real.sSup... | [
" sInf (a • s) = a • sSup s",
" sInf (a • ∅) = a • sSup ∅",
" sInf (0 • s) = 0 • sSup s",
" sInf 0 = 0",
" sSup (a • s) = a • sInf s",
" sSup (a • ∅) = a • sInf ∅",
" sSup (0 • s) = 0 • sInf s",
" sSup 0 = 0"
] | [
" sInf (a • s) = a • sSup s",
" sInf (a • ∅) = a • sSup ∅",
" sInf (0 • s) = 0 • sSup s",
" sInf 0 = 0"
] |
import Mathlib.ModelTheory.Satisfiability
#align_import model_theory.types from "leanprover-community/mathlib"@"98bd247d933fb581ff37244a5998bd33d81dd46d"
set_option linter.uppercaseLean3 false
universe u v w w'
open Cardinal Set
open scoped Classical
open Cardinal FirstOrder
namespace FirstOrder
namespace La... | Mathlib/ModelTheory/Types.lean | 98 | 106 | theorem not_mem_iff (p : T.CompleteType α) (φ : L[[α]].Sentence) : φ.not ∈ p ↔ ¬φ ∈ p :=
⟨fun hf ht => by
have h : ¬IsSatisfiable ({φ, φ.not} : L[[α]].Theory) := by |
rintro ⟨@⟨_, _, h, _⟩⟩
simp only [model_iff, mem_insert_iff, mem_singleton_iff, forall_eq_or_imp, forall_eq] at h
exact h.2 h.1
refine h (p.isMaximal.1.mono ?_)
rw [insert_subset_iff, singleton_subset_iff]
exact ⟨ht, hf⟩, (p.mem_or_not_mem φ).resolve_left⟩
| [
" p = q",
" { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ } = q",
" { toTheory := toTheory✝¹, subset' := subset'✝¹, isMaximal' := isMaximal'✝¹ } =\n { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ }",
" False",
" ¬{φ, Formula.not φ}.IsSatisfiable",
" {φ... | [
" p = q",
" { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ } = q",
" { toTheory := toTheory✝¹, subset' := subset'✝¹, isMaximal' := isMaximal'✝¹ } =\n { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ }"
] |
import Mathlib.Probability.Kernel.Disintegration.Unique
import Mathlib.Probability.Notation
#align_import probability.kernel.cond_distrib from "leanprover-community/mathlib"@"00abe0695d8767201e6d008afa22393978bb324d"
open MeasureTheory Set Filter TopologicalSpace
open scoped ENNReal MeasureTheory ProbabilityTheo... | Mathlib/Probability/Kernel/CondDistrib.lean | 198 | 206 | theorem set_lintegral_preimage_condDistrib (hX : Measurable X) (hY : AEMeasurable Y μ)
(hs : MeasurableSet s) (ht : MeasurableSet t) :
∫⁻ a in X ⁻¹' t, condDistrib Y X μ (X a) s ∂μ = μ (X ⁻¹' t ∩ Y ⁻¹' s) := by |
-- Porting note: need to massage the LHS integrand into the form accepted by `lintegral_comp`
-- (`rw` does not see that the two forms are defeq)
conv_lhs => arg 2; change (fun a => ((condDistrib Y X μ) a) s) ∘ X
rw [lintegral_comp (kernel.measurable_coe _ hs) hX, condDistrib, ← Measure.restrict_map hX ht, ←
... | [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... | [
" IsMarkovKernel (condDistrib Y X μ)",
" IsMarkovKernel (Measure.map (fun a => (X a, Y a)) μ).condKernel",
" ((condDistrib Y X μ) x) s = ((Measure.map X μ) {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({x} ×ˢ s)",
" ((Measure.map (fun a => (X a, Y a)) μ).fst {x})⁻¹ * (Measure.map (fun a => (X a, Y a)) μ) ({... |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
... | Mathlib/Analysis/Convex/Gauge.lean | 95 | 99 | theorem gauge_zero : gauge s 0 = 0 := by |
rw [gauge_def']
by_cases h : (0 : E) ∈ s
· simp only [smul_zero, sep_true, h, csInf_Ioi]
· simp only [smul_zero, sep_false, h, Real.sInf_empty]
| [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0"
] | [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s"
] |
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 | 106 | 108 | theorem const.get_map (f : α ⟹ β) (x : const n A α) : const.get (f <$$> x) = const.get x := by |
cases x
rfl
| [
" get (f <$$> x) = get x",
" get (f <$$> ⟨fst✝, snd✝⟩) = get ⟨fst✝, snd✝⟩"
] | [] |
import Mathlib.Algebra.Order.AbsoluteValue
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
import Mathlib.Algebra.Ring.Pi
import Mathlib.GroupTheory.GroupAction.Pi
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.Init.Align
import Mathlib.Tactic.GCongr
import Mathlib.Tactic... | Mathlib/Algebra/Order/CauSeq/Basic.lean | 102 | 107 | theorem cauchy₂ (hf : IsCauSeq abv f) {ε : α} (ε0 : 0 < ε) :
∃ i, ∀ j ≥ i, ∀ k ≥ i, abv (f j - f k) < ε := by |
refine (hf _ (half_pos ε0)).imp fun i hi j ij k ik => ?_
rw [← add_halves ε]
refine lt_of_le_of_lt (abv_sub_le abv _ _ _) (add_lt_add (hi _ ij) ?_)
rw [abv_sub abv]; exact hi _ ik
| [
" abv (a₁ + a₂ - (b₁ + b₂)) < ε",
" ∃ δ > 0,\n ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M",
" ∃ δ > 0, ∀ {a b : β},... | [
" abv (a₁ + a₂ - (b₁ + b₂)) < ε",
" ∃ δ > 0,\n ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M",
" ∃ δ > 0, ∀ {a b : β},... |
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero
#align_import category_theory.limits.shapes.kernels from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d"
noncomputable section
universe v v₂ u u' u₂
open CategoryTheory
open CategoryTheory.Limits.WalkingParallelPair
namespace... | Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean | 91 | 92 | theorem KernelFork.app_one (s : KernelFork f) : s.π.app one = 0 := by |
simp [Fork.app_one_eq_ι_comp_right]
| [
" Fork.ι s ≫ f = 0",
" s.π.app one = 0"
] | [
" Fork.ι s ≫ f = 0"
] |
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 | 134 | 144 | theorem sum_incMatrix_apply_of_mem_edgeSet [Fintype α] :
e ∈ G.edgeSet → ∑ a, G.incMatrix R a e = 2 := by |
classical
refine e.ind ?_
intro a b h
rw [mem_edgeSet] at h
rw [← Nat.cast_two, ← card_pair h.ne]
simp only [incMatrix_apply', sum_boole, mk'_mem_incidenceSet_iff, h, true_and_iff]
congr 2
ext e
simp only [mem_filter, mem_univ, true_and_iff, mem_insert, mem_singleton]
| [
" 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",
" ∑ e : Sym2 α, incMatrix R G a e = ↑(G.degree a)",
" (incMatrix R G * (incMatrix R G)ᵀ) a a = ↑(G.degree a)",
" (incMatrix R G * (incMatrix R G)ᵀ) a a = ∑ e : ... | [
" 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",
" ∑ e : Sym2 α, incMatrix R G a e = ↑(G.degree a)",
" (incMatrix R G * (incMatrix R G)ᵀ) a a = ↑(G.degree a)",
" (incMatrix R G * (incMatrix R G)ᵀ) a a = ∑ e : ... |
import Mathlib.Algebra.Homology.QuasiIso
#align_import category_theory.preadditive.projective_resolution from "leanprover-community/mathlib"@"324a7502510e835cdbd3de1519b6c66b51fb2467"
universe v u
namespace CategoryTheory
open Category Limits ChainComplex HomologicalComplex
variable {C : Type u} [Category.{v} ... | Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean | 102 | 104 | theorem complex_d_succ_comp (n : ℕ) :
P.complex.d n (n + 1) ≫ P.complex.d (n + 1) (n + 2) = 0 := by |
simp
| [
" ExactAt P.complex (n + 1)",
" QuasiIsoAt P.π (n + 1)",
" (ComplexShape.down ℕ).prev (n + 1) = n + 2",
" n + 1 + 1 = n + 2",
" (ComplexShape.down ℕ).next (n + 1) = n",
" n + 1 ≠ 0",
" P.complex.d 1 0 ≫ P.π.f 0 = 0",
" P.complex.d n (n + 1) ≫ P.complex.d (n + 1) (n + 2) = 0"
] | [
" ExactAt P.complex (n + 1)",
" QuasiIsoAt P.π (n + 1)",
" (ComplexShape.down ℕ).prev (n + 1) = n + 2",
" n + 1 + 1 = n + 2",
" (ComplexShape.down ℕ).next (n + 1) = n",
" n + 1 ≠ 0",
" P.complex.d 1 0 ≫ P.π.f 0 = 0"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Algebra.Ring.Pi
import Mathlib.GroupTheory.GroupAction.Pi
#align_import algebra.big_operators.pi from "leanprover-community/mathlib"@"fa2309577c7009ea243cffdf990cd6c84f0ad497"
@[to_additive (attr := simp)]
theorem Finset.prod_apply {α : Type*} {β : α... | Mathlib/Algebra/BigOperators/Pi.lean | 69 | 72 | theorem pi_eq_sum_univ {ι : Type*} [Fintype ι] [DecidableEq ι] {R : Type*} [Semiring R]
(x : ι → R) : x = ∑ i, (x i) • fun j => if i = j then (1 : R) else 0 := by |
ext
simp
| [
" ∀ ⦃a : γ⦄ {s : Finset γ},\n a ∉ s →\n (∏ x ∈ s, f x, ∏ x ∈ s, g x) = ∏ x ∈ s, (f x, g x) →\n (∏ x ∈ insert a s, f x, ∏ x ∈ insert a s, g x) = ∏ x ∈ insert a s, (f x, g x)",
" x = ∑ i : ι, x i • fun j => if i = j then 1 else 0",
" x x✝ = (∑ i : ι, x i • fun j => if i = j then 1 else 0) x✝"
] | [
" ∀ ⦃a : γ⦄ {s : Finset γ},\n a ∉ s →\n (∏ x ∈ s, f x, ∏ x ∈ s, g x) = ∏ x ∈ s, (f x, g x) →\n (∏ x ∈ insert a s, f x, ∏ x ∈ insert a s, g x) = ∏ x ∈ insert a s, (f x, g x)"
] |
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 | 73 | 78 | theorem even_mul_odd {f : ℕ → M} (he : HasProd (fun k ↦ f (2 * k)) m)
(ho : HasProd (fun k ↦ f (2 * k + 1)) m') : HasProd f (m * m') := by |
have := mul_right_injective₀ (two_ne_zero' ℕ)
replace ho := ((add_left_injective 1).comp this).hasProd_range_iff.2 ho
refine (this.hasProd_range_iff.2 he).mul_isCompl ?_ ho
simpa [(· ∘ ·)] using Nat.isCompl_even_odd
| [
" HasProd f ((∏ i ∈ range k, f i) * m)",
" HasProd (f ∘ Subtype.val) m",
" HasProd f (f 0 * m)",
" HasProd f (m * m')",
" IsCompl (Set.range fun x => 2 * x) (Set.range ((fun x => x + 1) ∘ fun x => 2 * x))"
] | [
" HasProd f ((∏ i ∈ range k, f i) * m)",
" HasProd (f ∘ Subtype.val) m",
" HasProd f (f 0 * m)"
] |
import Mathlib.Analysis.Calculus.BumpFunction.Basic
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open F... | Mathlib/Analysis/Calculus/BumpFunction/Normed.lean | 89 | 90 | theorem hasCompactSupport_normed : HasCompactSupport (f.normed μ) := by |
simp only [HasCompactSupport, f.tsupport_normed_eq (μ := μ), isCompact_closedBall]
| [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... | [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... |
import Mathlib.Data.List.Sublists
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
namespace Multiset
open List
variable {α : Type*}
-- Porting note (#11215): TODO: Write a more efficient version
def powerset... | Mathlib/Data/Multiset/Powerset.lean | 60 | 70 | theorem powerset_aux'_perm {l₁ l₂ : List α} (p : l₁ ~ l₂) : powersetAux' l₁ ~ powersetAux' l₂ := by |
induction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ _ _ IH₁ IH₂
· simp
· simp only [powersetAux'_cons]
exact IH.append (IH.map _)
· simp only [powersetAux'_cons, map_append, List.map_map, append_assoc]
apply Perm.append_left
rw [← append_assoc, ← append_assoc,
(by funext s; simp [cons_swap] : cons ... | [
" ∀ (a : List α), ⟦a⟧ ∈ powersetAux l ↔ ⟦a⟧ ≤ ↑l",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList ∘ List.cons a) l.sublists' = List.map (cons a ∘ ofList) l.sublists'",
" ... | [
" ∀ (a : List α), ⟦a⟧ ∈ powersetAux l ↔ ⟦a⟧ ≤ ↑l",
" powersetAux l ~ powersetAux' l",
" List.map ofList l.sublists ~ powersetAux' l",
" powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)",
" List.map (ofList ∘ List.cons a) l.sublists' = List.map (cons a ∘ ofList) l.sublists'"
] |
import Mathlib.RingTheory.WittVector.Basic
import Mathlib.RingTheory.WittVector.IsPoly
#align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
namespace WittVector
open MvPolynomial
variable {p : ℕ} {R S : Type*} [hp : Fact p.Prime] [Comm... | Mathlib/RingTheory/WittVector/Verschiebung.lean | 58 | 61 | theorem ghostComponent_zero_verschiebungFun (x : 𝕎 R) :
ghostComponent 0 (verschiebungFun x) = 0 := by |
rw [ghostComponent_apply, aeval_wittPolynomial, Finset.range_one, Finset.sum_singleton,
verschiebungFun_coeff_zero, pow_zero, pow_zero, pow_one, one_mul]
| [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0",
" (ghostComponent 0) x.verschiebungFun = 0"
] | [
" x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)",
" x.verschiebungFun.coeff 0 = 0"
] |
import Mathlib.Algebra.GroupWithZero.Units.Basic
import Mathlib.Algebra.Group.Semiconj.Units
import Mathlib.Init.Classical
#align_import algebra.group_with_zero.semiconj from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
assert_not_exists DenselyOrdered
variable {α M₀ G₀ M₀' G₀' F F' :... | Mathlib/Algebra/GroupWithZero/Semiconj.lean | 24 | 25 | theorem zero_right [MulZeroClass G₀] (a : G₀) : SemiconjBy a 0 0 := by |
simp only [SemiconjBy, mul_zero, zero_mul]
| [
" SemiconjBy a 0 0"
] | [] |
import Mathlib.Data.Finset.Option
import Mathlib.Data.PFun
import Mathlib.Data.Part
#align_import data.finset.pimage from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable {α β : Type*}
namespace Part
def toFinset (o : Part α) [Decidable o.Dom] : Finset α :=
o.toOption.toFins... | Mathlib/Data/Finset/PImage.lean | 39 | 40 | theorem toFinset_none [Decidable (none : Part α).Dom] : none.toFinset = (∅ : Finset α) := by |
simp [toFinset]
| [
" x ∈ o.toFinset ↔ x ∈ o",
" none.toFinset = ∅"
] | [
" x ∈ o.toFinset ↔ x ∈ o"
] |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Zip
import Mathlib.Data.Nat.Defs
import Mathlib.Data.List.Infix
#align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u
variable {α : Type u}
open Nat Function
namespace List
theorem rotate... | Mathlib/Data/List/Rotate.lean | 119 | 121 | theorem rotate_cons_succ (l : List α) (a : α) (n : ℕ) :
(a :: l : List α).rotate (n + 1) = (l ++ [a]).rotate n := by |
rw [rotate_eq_rotate', rotate_eq_rotate', rotate'_cons_succ]
| [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... | [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... |
import Mathlib.Algebra.GroupWithZero.Hom
import Mathlib.Algebra.GroupWithZero.Units.Basic
import Mathlib.Algebra.Ring.Defs
import Mathlib.Data.Nat.Lattice
#align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
universe u v
open Function Set
variable {R ... | Mathlib/RingTheory/Nilpotent/Defs.lean | 81 | 85 | theorem IsNilpotent.map [MonoidWithZero R] [MonoidWithZero S] {r : R} {F : Type*}
[FunLike F R S] [MonoidWithZeroHomClass F R S] (hr : IsNilpotent r) (f : F) :
IsNilpotent (f r) := by |
use hr.choose
rw [← map_pow, hr.choose_spec, map_zero]
| [
" IsNilpotent (x ^ n.succ)",
" (x ^ n.succ) ^ N = 0",
" IsNilpotent x",
" x ^ (m * n) = 0",
" IsNilpotent (x ^ n)",
" IsNilpotent (x ^ 0)",
" IsNilpotent (x ^ (n✝ + 1))",
" IsNilpotent (f r)",
" f r ^ Exists.choose hr = 0"
] | [
" IsNilpotent (x ^ n.succ)",
" (x ^ n.succ) ^ N = 0",
" IsNilpotent x",
" x ^ (m * n) = 0",
" IsNilpotent (x ^ n)",
" IsNilpotent (x ^ 0)",
" IsNilpotent (x ^ (n✝ + 1))"
] |
import Mathlib.Analysis.Calculus.FDeriv.Add
import Mathlib.Analysis.Calculus.FDeriv.Equiv
import Mathlib.Analysis.Calculus.FDeriv.Prod
import Mathlib.Analysis.Calculus.Monotone
import Mathlib.Data.Set.Function
import Mathlib.Algebra.Group.Basic
import Mathlib.Tactic.WLOG
#align_import analysis.bounded_variation from ... | Mathlib/Analysis/BoundedVariation.lean | 133 | 136 | theorem mono (f : α → E) {s t : Set α} (hst : t ⊆ s) : eVariationOn f t ≤ eVariationOn f s := by |
apply iSup_le _
rintro ⟨n, ⟨u, hu, ut⟩⟩
exact sum_le f n hu fun i => hst (ut i)
| [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }",
" eVariationOn f s = eVariationOn f' s",
" ⨆ p, ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ⨆ p, ∑ i ∈ Finset.range p.1, edist (f' (↑p.2 (i + 1))) (f' (↑p.2 i))",
" ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ... | [
" Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }",
" eVariationOn f s = eVariationOn f' s",
" ⨆ p, ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ⨆ p, ∑ i ∈ Finset.range p.1, edist (f' (↑p.2 (i + 1))) (f' (↑p.2 i))",
" ∑ i ∈ Finset.range p.1, edist (f (↑p.2 (i + 1))) (f (↑p.2 i)) =\n ... |
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 | 83 | 85 | theorem Equiv.pointReflection_midpoint_right (x y : P) :
(Equiv.pointReflection (midpoint R x y)) y = x := by |
rw [midpoint_comm, Equiv.pointReflection_midpoint_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"
] | [
" (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"
] |
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Data.Rat.Cast.Defs
#align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
variable {F ι α β : Type*}
namespace Rat
open Rat
section WithDivRing
variable [DivisionRing α]
@[simp, norm_cast]
th... | Mathlib/Data/Rat/Cast/CharZero.lean | 119 | 120 | theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by |
simp only [divInt_eq_div, cast_div, cast_intCast]
| [
" ↑{ num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = ↑{ num := n₂, den := d₂, den_nz := d₂0, reduced := c₂ } ↔\n { num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = { num := n₂, den := d₂, den_nz := d₂0, reduced := c₂ }",
" { num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = { num := n₂, den :... | [
" ↑{ num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = ↑{ num := n₂, den := d₂, den_nz := d₂0, reduced := c₂ } ↔\n { num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = { num := n₂, den := d₂, den_nz := d₂0, reduced := c₂ }",
" { num := n₁, den := d₁, den_nz := d₁0, reduced := c₁ } = { num := n₂, den :... |
import Mathlib.Order.CompleteLattice
import Mathlib.Order.GaloisConnection
import Mathlib.Data.Set.Lattice
import Mathlib.Tactic.AdaptationNote
#align_import data.rel from "leanprover-community/mathlib"@"706d88f2b8fdfeb0b22796433d7a6c1a010af9f2"
variable {α β γ : Type*}
def Rel (α β : Type*) :=
α → β → Prop --... | Mathlib/Data/Rel.lean | 119 | 122 | theorem comp_left_id (r : Rel α β) : @Eq α • r = r := by |
unfold comp
ext x
simp
| [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... | [
" r.inv.inv = r",
" r.inv.inv x y ↔ r x y",
" r.inv.codom = r.dom",
" x ∈ r.inv.codom ↔ x ∈ r.dom",
" r.inv.dom = r.codom",
" x ∈ r.inv.dom ↔ x ∈ r.codom",
" (r • s) • t = r • s • t",
" (fun x z => ∃ y, (∃ y_1, r x y_1 ∧ s y_1 y) ∧ t y z) = fun x z => ∃ y, r x y ∧ ∃ y_1, s y y_1 ∧ t y_1 z",
" (∃ y, ... |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Polynomial.Derivative
import Mathlib.Data.Nat.Factorial.DoubleFactorial
#align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74"
noncomputable section
open Polynomial
namespace P... | Mathlib/RingTheory/Polynomial/Hermite/Basic.lean | 55 | 56 | theorem hermite_succ (n : ℕ) : hermite (n + 1) = X * hermite n - derivative (hermite n) := by |
rw [hermite]
| [
" hermite (n + 1) = X * hermite n - derivative (hermite n)"
] | [] |
import Mathlib.Data.List.Nodup
import Mathlib.Data.List.Zip
import Mathlib.Data.Nat.Defs
import Mathlib.Data.List.Infix
#align_import data.list.rotate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u
variable {α : Type u}
open Nat Function
namespace List
theorem rotate... | Mathlib/Data/List/Rotate.lean | 93 | 100 | theorem rotate'_length_mul (l : List α) : ∀ n : ℕ, l.rotate' (l.length * n) = l
| 0 => by simp
| n + 1 =>
calc
l.rotate' (l.length * (n + 1)) =
(l.rotate' (l.length * n)).rotate' (l.rotate' (l.length * n)).length := by |
simp [-rotate'_length, Nat.mul_succ, rotate'_rotate']
_ = l := by rw [rotate'_length, rotate'_length_mul l n]
| [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... | [
" l.rotate (n % l.length) = l.rotate n",
" [].rotate n = []",
" l.rotate 0 = l",
" [].rotate' n = []",
" [].rotate' 0 = []",
" [].rotate' (n✝ + 1) = []",
" l.rotate' 0 = l",
" (head✝ :: tail✝).rotate' 0 = head✝ :: tail✝",
" (a :: l).rotate' n.succ = (l ++ [a]).rotate' n",
" ([].rotate' x✝).length ... |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.CPolynomial
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.FDeriv.Add
#align_import analysis.calculus.fderiv_analytic from "leanprover-community/mathlib"@"3bce8d800a6f2... | Mathlib/Analysis/Calculus/FDeriv/Analytic.lean | 469 | 474 | theorem iteratedFDeriv_zero_apply_diag : iteratedFDeriv 𝕜 0 f x = p 0 := by |
ext
convert (h.hasSum <| EMetric.mem_ball_self h.r_pos).tsum_eq.symm
· rw [iteratedFDeriv_zero_apply, add_zero]
· rw [tsum_eq_single 0 fun n hn ↦ by haveI := NeZero.mk hn; exact (p n).map_zero]
exact congr(p 0 $(Subsingleton.elim _ _))
| [
" iteratedFDeriv 𝕜 0 f x = p 0",
" (iteratedFDeriv 𝕜 0 f x) x✝ = (p 0) x✝",
" (iteratedFDeriv 𝕜 0 f x) x✝ = f (x + 0)",
" (p 0) x✝ = ∑' (b : ℕ), (p b) fun x => 0",
" ((p n) fun x => 0) = 0",
" (p 0) x✝ = (p 0) fun x => 0"
] | [] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Eval
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.Tactic.Abel
#align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778... | Mathlib/RingTheory/Polynomial/Pochhammer.lean | 331 | 339 | theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
(descPochhammer R (n + 1)).comp (X - 1) =
descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1) := by |
suffices (descPochhammer ℤ (n + 1)).comp (X - 1) =
descPochhammer ℤ (n + 1) - (n + 1) * (descPochhammer ℤ n).comp (X - 1)
by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this
nth_rw 2 [descPochhammer_succ_left]
rw [← sub_mul, descPochhammer_succ_right ℤ n, mul_comp, mul_comm, s... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... | [
" descPochhammer R 1 = X",
" descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)",
" (descPochhammer R n).Monic",
" (descPochhammer R 0).Monic",
" (descPochhammer R (n + 1)).Monic",
" map f (descPochhammer R n) = descPochhammer T n",
" map f (descPochhammer R 0) = descPochhammer T 0",
" m... |
import Mathlib.Geometry.Manifold.ChartedSpace
#align_import geometry.manifold.local_invariant_properties from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db"
noncomputable section
open scoped Classical
open Manifold Topology
open Set Filter TopologicalSpace
variable {H M H' M' X : Typ... | Mathlib/Geometry/Manifold/LocalInvariantProperties.lean | 121 | 136 | theorem left_invariance {s : Set H} {x : H} {f : H → H'} {e' : PartialHomeomorph H' H'}
(he' : e' ∈ G') (hfs : ContinuousWithinAt f s x) (hxe' : f x ∈ e'.source) :
P (e' ∘ f) s x ↔ P f s x := by |
have h2f := hfs.preimage_mem_nhdsWithin (e'.open_source.mem_nhds hxe')
have h3f :=
((e'.continuousAt hxe').comp_continuousWithinAt hfs).preimage_mem_nhdsWithin <|
e'.symm.open_source.mem_nhds <| e'.mapsTo hxe'
constructor
· intro h
rw [hG.is_local_nhds h3f] at h
have h2 := hG.left_invariance'... | [
" P f s x ↔ P f t x",
" P f s x ↔ P g s x",
" P f (s ∩ {x | f x = g x}) x ↔ P g (s ∩ {x | f x = g x}) x",
" P (↑e' ∘ f) s x ↔ P f s x",
" P (↑e' ∘ f) s x → P f s x",
" P f s x",
" ↑e'.symm ∘ ↑e' ∘ f =ᶠ[𝓝[s] x] f",
" P f s x → P (↑e' ∘ f) s x",
" P f (s ∩ f ⁻¹' e'.source) x → P (↑e' ∘ f) (s ∩ f ⁻¹' ... | [
" P f s x ↔ P f t x",
" P f s x ↔ P g s x",
" P f (s ∩ {x | f x = g x}) x ↔ P g (s ∩ {x | f x = g x}) x"
] |
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.Algebra.Module.ULift
#align_import ring_theory.is_tensor_product from "leanprover-community/mathlib"@"c4926d76bb9c5a4a62ed2f03d998081786132105"
universe u v₁ v₂ v₃ v₄
open TensorProduct
section IsTensorProduct
variable {R : Type*} [CommSemiring R]
va... | Mathlib/RingTheory/IsTensorProduct.lean | 60 | 65 | theorem TensorProduct.isTensorProduct : IsTensorProduct (TensorProduct.mk R M N) := by |
delta IsTensorProduct
convert_to Function.Bijective (LinearMap.id : M ⊗[R] N →ₗ[R] M ⊗[R] N) using 2
· apply TensorProduct.ext'
simp
· exact Function.bijective_id
| [
" IsTensorProduct (mk R M N)",
" Function.Bijective ⇑(lift (mk R M N))",
" lift (mk R M N) = LinearMap.id",
" ∀ (x : M) (y : N), (lift (mk R M N)) (x ⊗ₜ[R] y) = LinearMap.id (x ⊗ₜ[R] y)",
" Function.Bijective ⇑LinearMap.id"
] | [] |
import Mathlib.Logic.Nonempty
import Mathlib.Init.Set
import Mathlib.Logic.Basic
#align_import logic.function.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
open Function
universe u v w
namespace Function
section
variable {α β γ : Sort*} {f : α → β}
@[reducible, simp] de... | Mathlib/Logic/Function/Basic.lean | 89 | 91 | theorem Injective.beq_eq {α β : Type*} [BEq α] [LawfulBEq α] [BEq β] [LawfulBEq β] {f : α → β}
(I : Injective f) {a b : α} : (f a == f b) = (a == b) := by |
by_cases h : a == b <;> simp [h] <;> simpa [I.eq_iff] using h
| [
" HEq f f'",
" β = β'",
" β a = β' a",
" f = f'",
" f a = f' a",
" f x = g y ↔ f = g",
" f z = g z",
" f x = g y",
" (f a == f b) = (a == b)",
" f a = f b",
" ¬f a = f b"
] | [
" HEq f f'",
" β = β'",
" β a = β' a",
" f = f'",
" f a = f' a",
" f x = g y ↔ f = g",
" f z = g z",
" f x = g y"
] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Induction
#align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f"
set_option linter.uppercaseLean3 false
noncomputable section
open Finset AddMonoidAlgebra
open Polyn... | Mathlib/Algebra/Polynomial/Eval.lean | 153 | 161 | theorem eval₂_sum (p : T[X]) (g : ℕ → T → R[X]) (x : S) :
(p.sum g).eval₂ f x = p.sum fun n a => (g n a).eval₂ f x := by |
let T : R[X] →+ S :=
{ toFun := eval₂ f x
map_zero' := eval₂_zero _ _
map_add' := fun p q => eval₂_add _ _ }
have A : ∀ y, eval₂ f x y = T y := fun y => rfl
simp only [A]
rw [sum, map_sum, sum]
| [
" eval₂ f x p = p.sum fun e a => f a * x ^ e",
" f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ",
" eval₂ f s φ = eval₂ f s φ",
" eval₂ f 0 p = f (p.coeff 0)",
" eval₂ f x 0 = 0",
" eval₂ f x (C a) = f a",
" eval₂ f x X = x",
" eval₂ f x ((monomial n) r) = f r * x ^ n",
" eval₂ f x (X ^ n) = x ^ ... | [
" eval₂ f x p = p.sum fun e a => f a * x ^ e",
" f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ",
" eval₂ f s φ = eval₂ f s φ",
" eval₂ f 0 p = f (p.coeff 0)",
" eval₂ f x 0 = 0",
" eval₂ f x (C a) = f a",
" eval₂ f x X = x",
" eval₂ f x ((monomial n) r) = f r * x ^ n",
" eval₂ f x (X ^ n) = x ^ ... |
import Mathlib.Analysis.Fourier.Inversion
open Real Complex Set MeasureTheory
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E]
open scoped FourierTransform
private theorem rexp_neg_deriv_aux :
∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x :=
fun x _ ↦ mul_neg_one (rexp (-x)... | Mathlib/Analysis/MellinInversion.lean | 89 | 121 | theorem mellin_inversion (σ : ℝ) (f : ℝ → E) {x : ℝ} (hx : 0 < x) (hf : MellinConvergent f σ)
(hFf : VerticalIntegrable (mellin f) σ) (hfx : ContinuousAt f x) :
mellinInv σ (mellin f) x = f x := by |
let g := fun (u : ℝ) => Real.exp (-σ * u) • f (Real.exp (-u))
replace hf : Integrable g := by
rw [MellinConvergent, ← rexp_neg_image_aux, integrableOn_image_iff_integrableOn_abs_deriv_smul
MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] at hf
replace hf : Integrable fun (x : ℝ) ↦ cexp (-↑σ ... | [
" rexp ∘ Neg.neg '' univ = Ioi 0",
" rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f",
" ↑(rexp (-x)) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f",
" (↑(rexp (-x)) * cexp (-↑x) ^ (s - 1)) • f = cexp (-s * ↑x) • f",
" (cexp (-↑x) * cexp (-↑x) ^ (s - 1)) • f = cexp (-s * ↑x) • f",
"E : Type u_... | [
" rexp ∘ Neg.neg '' univ = Ioi 0",
" rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f",
" ↑(rexp (-x)) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f",
" (↑(rexp (-x)) * cexp (-↑x) ^ (s - 1)) • f = cexp (-s * ↑x) • f",
" (cexp (-↑x) * cexp (-↑x) ^ (s - 1)) • f = cexp (-s * ↑x) • f",
"E : Type u_... |
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 | 40 | 41 | theorem gcd_add_mul_left_right (m n k : ℕ) : gcd m (n + m * k) = gcd m n := by |
simp [gcd_rec m (n + m * k), gcd_rec m n]
| [
" m.gcd (n + k * m) = m.gcd n",
" m.gcd (n + m * k) = m.gcd n"
] | [
" m.gcd (n + k * m) = m.gcd n"
] |
import Mathlib.Data.Int.Range
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.MulChar.Basic
#align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace ZMod
section QuadCharModP
@[simps]
def χ₄ : MulChar (ZMod 4) ℤ... | Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean | 125 | 128 | theorem neg_one_pow_div_two_of_three_mod_four {n : ℕ} (hn : n % 4 = 3) :
(-1 : ℤ) ^ (n / 2) = -1 := by |
rw [← χ₄_eq_neg_one_pow (Nat.odd_of_mod_four_eq_three hn), ← natCast_mod, hn]
rfl
| [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... | [
" ∀ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := ⋯ }.toFun y",
" ∀ (a : ZMod 4), ¬IsUnit a → (↑{ toFun := ![0, 1, 0, -1], map_one' := ⋯, map_mul' := ⋯ }).toFun a = 0",
" χ₄.IsQua... |
import Mathlib.Logic.Encodable.Basic
import Mathlib.Logic.Pairwise
import Mathlib.Data.Set.Subsingleton
#align_import logic.encodable.lattice from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Set
namespace Encodable
variable {α : Type*} {β : Type*} [Encodable β]
| Mathlib/Logic/Encodable/Lattice.lean | 30 | 33 | theorem iSup_decode₂ [CompleteLattice α] (f : β → α) :
⨆ (i : ℕ) (b ∈ decode₂ β i), f b = (⨆ b, f b) := by |
rw [iSup_comm]
simp only [mem_decode₂, iSup_iSup_eq_right]
| [
" ⨆ i, ⨆ b ∈ decode₂ β i, f b = ⨆ b, f b",
" ⨆ j, ⨆ i, ⨆ (_ : j ∈ decode₂ β i), f j = ⨆ b, f b"
] | [] |
import Mathlib.Algebra.Polynomial.Degree.Definitions
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Tactic.ComputeDegree
#align_import data.polynomial.cancel_leads from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
namespace Polynomial
noncomputable section
open Polyn... | Mathlib/Algebra/Polynomial/CancelLeads.lean | 52 | 71 | theorem natDegree_cancelLeads_lt_of_natDegree_le_natDegree_of_comm
(comm : p.leadingCoeff * q.leadingCoeff = q.leadingCoeff * p.leadingCoeff)
(h : p.natDegree ≤ q.natDegree) (hq : 0 < q.natDegree) :
(p.cancelLeads q).natDegree < q.natDegree := by |
by_cases hp : p = 0
· convert hq
simp [hp, cancelLeads]
rw [cancelLeads, sub_eq_add_neg, tsub_eq_zero_iff_le.mpr h, pow_zero, mul_one]
by_cases h0 :
C p.leadingCoeff * q + -(C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p) = 0
· exact (le_of_eq (by simp only [h0, natDegree_zero])).trans_lt hq
... | [
" (p.cancelLeads q).natDegree < q.natDegree",
" (p.cancelLeads q).natDegree = 0",
" (C p.leadingCoeff * q + -(C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p)).natDegree < q.natDegree",
" (C p.leadingCoeff * q + -(C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p)).natDegree = 0",
" (C p.leading... | [] |
import Mathlib.CategoryTheory.Comma.Basic
#align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
namespace CategoryTheory
universe v u
-- morphism levels before object levels. See note [CategoryTheory universes].
variable {T : Type u} [Category.{v} T]
... | Mathlib/CategoryTheory/Comma/Arrow.lean | 86 | 88 | theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by |
cases f
rfl
| [
" mk f.hom = f",
" mk { left := left✝, right := right✝, hom := hom✝ }.hom = { left := left✝, right := right✝, hom := hom✝ }"
] | [] |
import Batteries.Control.ForInStep.Lemmas
import Batteries.Data.List.Basic
import Batteries.Tactic.Init
import Batteries.Tactic.Alias
namespace List
open Nat
@[simp] theorem mem_toArray {a : α} {l : List α} : a ∈ l.toArray ↔ a ∈ l := by
simp [Array.mem_def]
@[simp]
theorem drop_one : ∀ l : List α, drop 1 l =... | .lake/packages/batteries/Batteries/Data/List/Lemmas.lean | 28 | 29 | theorem zipWith_distrib_tail : (zipWith f l l').tail = zipWith f l.tail l'.tail := by |
rw [← drop_one]; simp [zipWith_distrib_drop]
| [
" a ∈ toArray l ↔ a ∈ l",
" (zipWith f l l').tail = zipWith f l.tail l'.tail",
" drop 1 (zipWith f l l') = zipWith f l.tail l'.tail"
] | [
" a ∈ toArray l ↔ a ∈ l"
] |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
import Mathlib.Data.Nat.Lattice
#align_import combinatorics.simple_graph.metric from "leanprover-community/mathlib"@"352ecfe114946c903338006dd3287cb5a9955ff2"
namespace SimpleGraph
variable {V : Type*} (G : SimpleGraph V)
noncomputable def dist (u v : V)... | Mathlib/Combinatorics/SimpleGraph/Metric.lean | 70 | 71 | theorem dist_eq_zero_iff_eq_or_not_reachable {u v : V} :
G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v := by | simp [dist, Nat.sInf_eq_zero, Reachable]
| [
" G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v"
] | [] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Coxeter.Basic
namespace CoxeterSystem
open List Matrix Function Classical
variable {B : Type*}
variable {W : Type*} [Group W]
variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W)
local prefix:100 "s" => cs.simple
local prefix:100 "π" => cs.wordProd
... | Mathlib/GroupTheory/Coxeter/Length.lean | 131 | 135 | theorem lengthParity_eq_ofAdd_length (w : W) :
cs.lengthParity w = Multiplicative.ofAdd (↑(ℓ w)) := by |
rcases cs.exists_reduced_word w with ⟨ω, hω, rfl⟩
rw [← hω, wordProd, map_list_prod, List.map_map, lengthParity_comp_simple, map_const',
prod_replicate, ← ofAdd_nsmul, nsmul_one]
| [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... | [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... |
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 | 85 | 89 | theorem sign_neg {r : ℝ} : sign (-r) = -sign r := by |
obtain hn | rfl | hp := lt_trichotomy r (0 : ℝ)
· rw [sign_of_neg hn, sign_of_pos (neg_pos.mpr hn), neg_neg]
· rw [sign_zero, neg_zero, sign_zero]
· rw [sign_of_pos hp, sign_of_neg (neg_lt_zero.mpr hp)]
| [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1",
" sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1",
" r.sign = 0 ↔ r = 0",
" r = 0",
" 0 = 0",
" (↑z).sign = ↑z.sign",
" (↑0).sign = ↑(Int.sign 0)",
" (-r).sign = -r.sign",
" (-0).sign = -sign 0"
] | [
" r.sign = -1",
" r.sign = 1",
" sign 0 = 0",
" 0 < 1",
" r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1",
" sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1",
" r.sign = 0 ↔ r = 0",
" r = 0",
" 0 = 0",
" (↑z).sign = ↑z.sign",
" (↑0).sign = ↑(Int.sign 0)"
] |
import Mathlib.SetTheory.Ordinal.Arithmetic
#align_import set_theory.ordinal.exponential from "leanprover-community/mathlib"@"b67044ba53af18680e1dd246861d9584e968495d"
noncomputable section
open Function Cardinal Set Equiv Order
open scoped Classical
open Cardinal Ordinal
universe u v w
namespace Ordinal
in... | Mathlib/SetTheory/Ordinal/Exponential.lean | 51 | 54 | theorem opow_zero (a : Ordinal) : a ^ (0 : Ordinal) = 1 := by |
by_cases h : a = 0
· simp only [opow_def, if_pos h, sub_zero]
· simp only [opow_def, if_neg h, limitRecOn_zero]
| [
" 0 ^ a = 1 - a",
" 0 ^ a = 0",
" a ^ 0 = 1"
] | [
" 0 ^ a = 1 - a",
" 0 ^ a = 0"
] |
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 | 63 | 64 | theorem gcd_mul_right_add_left (m n k : ℕ) : gcd (k * n + m) n = gcd m n := by |
rw [gcd_comm, gcd_mul_right_add_right, gcd_comm]
| [
" 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"
] | [
" 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"
] |
import Mathlib.Analysis.Convex.Topology
import Mathlib.Analysis.NormedSpace.Pointwise
import Mathlib.Analysis.Seminorm
import Mathlib.Analysis.LocallyConvex.Bounded
import Mathlib.Analysis.RCLike.Basic
#align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d"
... | Mathlib/Analysis/Convex/Gauge.lean | 129 | 131 | theorem gauge_neg (symmetric : ∀ x ∈ s, -x ∈ s) (x : E) : gauge s (-x) = gauge s x := by |
have : ∀ x, -x ∈ s ↔ x ∈ s := fun x => ⟨fun h => by simpa using symmetric _ h, symmetric x⟩
simp_rw [gauge_def', smul_neg, this]
| [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... | [
" gauge s x = sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}",
" 0 < r ∧ x ∈ r • s ↔ r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s",
" ∃ b, 0 < b ∧ b < a ∧ x ∈ b • s",
" gauge s 0 = 0",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • 0 ∈ s} = 0",
" gauge 0 = 0",
" gauge 0 x = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ 0} = 0 x",
" sInf {r | r ∈ Ioi 0 ∧ ... |
import Mathlib.RingTheory.Ideal.Maps
#align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301"
universe u v
variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S)
namespace Ideal
def prod : Ideal (R × S) where
... | Mathlib/RingTheory/Ideal/Prod.lean | 62 | 68 | theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by |
ext x
rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective]
exact
⟨by
rintro ⟨x, ⟨h, rfl⟩⟩
exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩
| [
" ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier",
" ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a... | [
" ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}",
" 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier",
" ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a... |
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Nat.Cast.Field
#align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829"
open Function Set
namespace Nat
variable {R : Type*} [AddMonoidWithOne R] [Char... | Mathlib/Algebra/CharZero/Lemmas.lean | 46 | 50 | theorem cast_div_charZero {k : Type*} [DivisionSemiring k] [CharZero k] {m n : ℕ} (n_dvd : n ∣ m) :
((m / n : ℕ) : k) = m / n := by |
rcases eq_or_ne n 0 with (rfl | hn)
· simp
· exact cast_div n_dvd (cast_ne_zero.2 hn)
| [
" ↑q ^ n = 1 ↔ q = 1",
" q ^ n = 1 ↔ q = 1",
" ↑(m / n) = ↑m / ↑n",
" ↑(m / 0) = ↑m / ↑0"
] | [
" ↑q ^ n = 1 ↔ q = 1",
" q ^ n = 1 ↔ q = 1"
] |
import Mathlib.Algebra.Category.Ring.Constructions
import Mathlib.Algebra.Category.Ring.Colimits
import Mathlib.CategoryTheory.Iso
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.IsTensorProduct
#align_import ring_theory.ring_hom_properties from "leanprover-community/mathlib"@"a7c017d75051... | Mathlib/RingTheory/RingHomProperties.lean | 65 | 91 | theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type u}
(R' S' : Type u) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
[Algebra S S'] (f : R →+* S) (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] :
P (Localization.awayMap f r) ↔ P (I... |
let e₁ : R' ≃+* Localization.Away r :=
(IsLocalization.algEquiv (Submonoid.powers r) _ _).toRingEquiv
let e₂ : Localization.Away (f r) ≃+* S' :=
(IsLocalization.algEquiv (Submonoid.powers (f r)) _ _).toRingEquiv
refine (hP.cancel_left_isIso e₁.toCommRingCatIso.hom (CommRingCat.ofHom _)).symm.trans ?_
r... | [
" P g",
" g = comp (f ≫ g) (asIso f).symm.commRingCatIsoToRingEquiv.toRingHom",
" P f",
" f = (asIso g).symm.commRingCatIsoToRingEquiv.toRingHom.comp (f ≫ g)",
" f = f ≫ g ≫ inv g",
" P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r)",
" P (e₁.toCommRingCatIso.hom ≫ CommRingCat.ofHom ... | [
" P g",
" g = comp (f ≫ g) (asIso f).symm.commRingCatIsoToRingEquiv.toRingHom",
" P f",
" f = (asIso g).symm.commRingCatIsoToRingEquiv.toRingHom.comp (f ≫ g)",
" f = f ≫ g ≫ inv g"
] |
import Mathlib.Data.Finset.Image
#align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
assert_not_exists MonoidWithZero
-- TODO: After a lot more work,
-- assert_not_exists OrderedCommMonoid
open Function Multiset Nat
variable {α β R : Type*}
namespace Fin... | Mathlib/Data/Finset/Card.lean | 143 | 146 | theorem card_insert_eq_ite : card (insert a s) = if a ∈ s then s.card else s.card + 1 := by |
by_cases h : a ∈ s
· rw [card_insert_of_mem h, if_pos h]
· rw [card_insert_of_not_mem h, if_neg h]
| [
" Monotone card",
" ({a} ∩ s).card ≤ 1",
" (insert a s).card = s.card + 1",
" (insert a s).card = s.card",
" (insert a s).card ≤ s.card + 1",
" s.card ≤ s.card + 1",
" (insert a s).card = if a ∈ s then s.card else s.card + 1"
] | [
" Monotone card",
" ({a} ∩ s).card ≤ 1",
" (insert a s).card = s.card + 1",
" (insert a s).card = s.card",
" (insert a s).card ≤ s.card + 1",
" s.card ≤ s.card + 1"
] |
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 | 88 | 89 | theorem firstDiff_comm (x y : ∀ n, E n) : firstDiff x y = firstDiff y x := by |
simp only [firstDiff_def, ne_comm]
| [
" 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",
" firstDiff x y = firstDiff y x"
] | [
" 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"
] |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.RingTheory.Localization.Basic
import Mathlib.SetTheory.Game.Birthday
import Mathlib.SetTheory.Surreal.Basic
#align_import set_theory.surreal.dyadic from "leanprover-community/mathlib"@"9... | Mathlib/SetTheory/Surreal/Dyadic.lean | 64 | 64 | theorem powHalf_moveLeft (n i) : (powHalf n).moveLeft i = 0 := by | cases n <;> cases i <;> rfl
| [
" (powHalf n).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf 0).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf n).moveLeft i = 0",
" (powHalf 0).moveLeft i = 0",
" (powHalf (n✝ + 1)).moveLeft i = 0",
" (powHalf 0).moveLeft PUnit.unit = 0",
" (powHalf (n✝ + 1)).mo... | [
" (powHalf n).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf 0).LeftMoves = PUnit.{u_1 + 1}",
" (powHalf (n✝ + 1)).LeftMoves = PUnit.{u_1 + 1}"
] |
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.List.AList
#align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf"
namespace AList
variable {α M : Type*} [Zero M]
open List
noncomputable def lookupFinsupp (l : AList fun _x : α => M) : α →₀ M where
... | Mathlib/Data/Finsupp/AList.lean | 82 | 86 | theorem lookupFinsupp_support [DecidableEq α] [DecidableEq M] (l : AList fun _x : α => M) :
l.lookupFinsupp.support = (l.1.filter fun x => Sigma.snd x ≠ 0).keys.toFinset := by |
convert rfl; congr
· apply Subsingleton.elim
· funext; congr
| [
" Finset α",
" a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0",
" (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0",
" (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0",
" (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝... | [
" Finset α",
" a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0",
" (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0",
" (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0",
" (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝... |
import Mathlib.Algebra.Algebra.Bilinear
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.Algebra.Algebra.Opposite
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Module.Opposites
import Mathlib.Algebra.Module.Submodule.Bilinear
import Mathlib.Algebra.Module.Submodule.Pointwise
import Mat... | Mathlib/Algebra/Algebra/Operations.lean | 88 | 90 | theorem le_one_toAddSubmonoid : 1 ≤ (1 : Submodule R A).toAddSubmonoid := by |
rintro x ⟨n, rfl⟩
exact ⟨n, map_natCast (algebraMap R A) n⟩
| [
" 1 ≤ toAddSubmonoid 1",
" (Nat.castAddMonoidHom A) n ∈ toAddSubmonoid 1"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.Deriv.Inv
#align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
universe u v w
open scoped Classical
open Topology Filter
open Filter Asymptotics Set
variable {𝕜 : Typ... | Mathlib/Analysis/Calculus/Deriv/ZPow.lean | 39 | 58 | theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by |
have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
lift m to ℕ using hm.le
simp only [zpow_natCast, Int.cast_natCast]
convert hasStrictDerivAt_pow m x using 2
rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast]
norm_cast at hm
rcases lt_trichotomy m 0 w... | [
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x",
" HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x",
" HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x",
" x ^ (↑m - 1) = x ^ (m - 1)",
" 1 ≤ m",
" x ^ (-m) ≠ 0",
" ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹",
... | [] |
import Mathlib.LinearAlgebra.Quotient
import Mathlib.RingTheory.Ideal.Operations
namespace Submodule
open Pointwise
variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M]
variable {N N₁ N₂ P P₁ P₂ : Submodule R M}
def colon (N P : Submodule R M) : Ideal R :=
annihilator (P.map N.mkQ)
#align ... | Mathlib/RingTheory/Ideal/Colon.lean | 40 | 42 | theorem colon_top {I : Ideal R} : I.colon ⊤ = I := by |
simp_rw [SetLike.ext_iff, mem_colon, smul_eq_mul]
exact fun x ↦ ⟨fun h ↦ mul_one x ▸ h 1 trivial, fun h _ _ ↦ I.mul_mem_right _ h⟩
| [
" colon I ⊤ = I",
" ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I"
] | [] |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b :... | Mathlib/Data/Nat/ModEq.lean | 99 | 100 | theorem modEq_iff_dvd' (h : a ≤ b) : a ≡ b [MOD n] ↔ n ∣ b - a := by |
rw [modEq_iff_dvd, ← Int.natCast_dvd_natCast, Int.ofNat_sub h]
| [
" a ≡ 0 [MOD n] ↔ n ∣ a",
" a ≡ b [MOD n] ↔ ↑n ∣ ↑b - ↑a",
" a ≡ b [MOD n] ↔ n ∣ b - a"
] | [
" a ≡ 0 [MOD n] ↔ n ∣ a",
" a ≡ b [MOD n] ↔ ↑n ∣ ↑b - ↑a"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.lifts from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0"
open Polynomial
noncomputable section
namespace Polynomial
universe u v w
section Semiring
variable {R : Type... | Mathlib/Algebra/Polynomial/Lifts.lean | 128 | 136 | theorem erase_mem_lifts {p : S[X]} (n : ℕ) (h : p ∈ lifts f) : p.erase n ∈ lifts f := by |
rw [lifts_iff_ringHom_rangeS, mem_map_rangeS] at h ⊢
intro k
by_cases hk : k = n
· use 0
simp only [hk, RingHom.map_zero, erase_same]
obtain ⟨i, hi⟩ := h k
use i
simp only [hi, hk, erase_ne, Ne, not_false_iff]
| [
" p ∈ lifts f ↔ ∃ q, map f q = p",
" p ∈ lifts f ↔ p ∈ Set.range (map f)",
" p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS",
" p ∈ lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f",
" (∀ (n : ℕ), p.coeff n ∈ f.rangeS) ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f",
" (mapRingHom f) (C r) = C (f r)",
" C s ∈ lifts f",
... | [
" p ∈ lifts f ↔ ∃ q, map f q = p",
" p ∈ lifts f ↔ p ∈ Set.range (map f)",
" p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS",
" p ∈ lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f",
" (∀ (n : ℕ), p.coeff n ∈ f.rangeS) ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f",
" (mapRingHom f) (C r) = C (f r)",
" C s ∈ lifts f",
... |
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.ToLin
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.Algebra.Star.Unitary
#align_import linear_algebra.unitary_group from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
universe u ... | Mathlib/LinearAlgebra/UnitaryGroup.lean | 71 | 73 | theorem mem_unitaryGroup_iff' : A ∈ Matrix.unitaryGroup n α ↔ star A * A = 1 := by |
refine ⟨And.left, fun hA => ⟨hA, ?_⟩⟩
rwa [mul_eq_one_comm] at hA
| [
" A ∈ unitaryGroup n α ↔ A * star A = 1",
" star A * A = 1",
" A ∈ unitaryGroup n α ↔ star A * A = 1",
" A * star A = 1"
] | [
" A ∈ unitaryGroup n α ↔ A * star A = 1",
" star A * A = 1"
] |
import Mathlib.Topology.Order
import Mathlib.Topology.Sets.Opens
import Mathlib.Topology.ContinuousFunction.Basic
#align_import topology.continuous_function.t0_sierpinski from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
noncomputable section
namespace TopologicalSpace
theorem eq_in... | Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean | 50 | 52 | theorem productOfMemOpens_inducing : Inducing (productOfMemOpens X) := by |
convert inducing_iInf_to_pi fun (u : Opens X) (x : X) => x ∈ u
apply eq_induced_by_maps_to_sierpinski
| [
" t = ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" t ≤ ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" ∀ (i : Opens X), t ≤ induced (fun x => x ∈ i) sierpinskiSpace",
" ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace ≤ t",
" IsOpen u",
" u ∈ ⋃ i, {s | IsOpen s}",
" ∃ i t_1, IsOpen t_1 ∧ (fun x => x... | [
" t = ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" t ≤ ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace",
" ∀ (i : Opens X), t ≤ induced (fun x => x ∈ i) sierpinskiSpace",
" ⨅ u, induced (fun x => x ∈ u) sierpinskiSpace ≤ t",
" IsOpen u",
" u ∈ ⋃ i, {s | IsOpen s}",
" ∃ i t_1, IsOpen t_1 ∧ (fun x => x... |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 123 | 125 | theorem Periodic.const_inv_smul [AddMonoid α] [Group γ] [DistribMulAction γ α] (h : Periodic f c)
(a : γ) : Periodic (fun x => f (a⁻¹ • x)) (a • c) := by |
simpa only [inv_inv] using h.const_smul a⁻¹
| [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... | [
" Periodic (g ∘ f) c",
" (f ∘ ⇑g) (x + g_inv c) = (f ∘ ⇑g) x",
" Periodic (f * g) c",
" Periodic (f / g) c",
" Periodic l.prod c",
" Periodic [].prod c",
" Periodic (g :: l).prod c",
" ∀ f_1 ∈ List.map f s.toList, Periodic f_1 c",
" Periodic (a • f) c",
" (fun x => f (a • x)) (x + a⁻¹ • c) = (fun ... |
import Mathlib.CategoryTheory.Sites.IsSheafFor
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.Tactic.ApplyFun
#align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe w v u
namespace CategoryTheory
open Opposite ... | Mathlib/CategoryTheory/Sites/EqualizerSheafCondition.lean | 156 | 174 | theorem equalizer_sheaf_condition :
Presieve.IsSheafFor P (S : Presieve X) ↔ Nonempty (IsLimit (Fork.ofι _ (w P S))) := by |
rw [Types.type_equalizer_iff_unique,
← Equiv.forall_congr_left (firstObjEqFamily P (S : Presieve X)).toEquiv.symm]
simp_rw [← compatible_iff]
simp only [inv_hom_id_apply, Iso.toEquiv_symm_fun]
apply forall₂_congr
intro x _
apply exists_unique_congr
intro t
rw [← Iso.toEquiv_symm_fun]
rw [Equiv.eq... | [
" z₁ = z₂",
" ∀ (j : Discrete ((Y : C) × { f // R f })),\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₁ =\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₂",
" limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) { as := ⟨Y, ⟨f, hf⟩⟩ } z₁ =\n limit.π (Discr... | [
" z₁ = z₂",
" ∀ (j : Discrete ((Y : C) × { f // R f })),\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₁ =\n limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) j z₂",
" limit.π (Discrete.functor fun f => P.obj { unop := f.fst }) { as := ⟨Y, ⟨f, hf⟩⟩ } z₁ =\n limit.π (Discr... |
import Mathlib.LinearAlgebra.Dimension.LinearMap
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
universe u u' v w
variable (R : Type u) (S : Type u') (M : Type v) (N ... | Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean | 70 | 71 | theorem FiniteDimensional.finrank_linearMap_self : finrank S (M →ₗ[R] S) = finrank R M := by |
rw [finrank_linearMap, finrank_self, mul_one]
| [
" Module.rank S (M →ₗ[R] N) = lift.{w, v} (Module.rank R M) * lift.{v, w} (Module.rank S N)",
" finrank S (M →ₗ[R] N) = finrank R M * finrank S N",
" Module.rank S (M →ₗ[R] S) = lift.{u', v} (Module.rank R M)",
" finrank S (M →ₗ[R] S) = finrank R M"
] | [
" Module.rank S (M →ₗ[R] N) = lift.{w, v} (Module.rank R M) * lift.{v, w} (Module.rank S N)",
" finrank S (M →ₗ[R] N) = finrank R M * finrank S N",
" Module.rank S (M →ₗ[R] S) = lift.{u', v} (Module.rank R M)"
] |
import Mathlib.Data.ZMod.Basic
import Mathlib.GroupTheory.Coxeter.Basic
namespace CoxeterSystem
open List Matrix Function Classical
variable {B : Type*}
variable {W : Type*} [Group W]
variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W)
local prefix:100 "s" => cs.simple
local prefix:100 "π" => cs.wordProd
... | Mathlib/GroupTheory/Coxeter/Length.lean | 107 | 109 | theorem length_mul_ge_length_sub_length (w₁ w₂ : W) :
ℓ w₁ - ℓ w₂ ≤ ℓ (w₁ * w₂) := by |
simpa [Nat.sub_le_of_le_add] using cs.length_mul_le (w₁ * w₂) w₂⁻¹
| [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... | [
" ∃ n ω, ω.length = n ∧ cs.wordProd ω = w",
" ∃ n ω_1, ω_1.length = n ∧ cs.wordProd ω_1 = cs.wordProd ω",
" ∃ ω, ω.length = cs.length w ∧ w = cs.wordProd ω",
" ω.length = ω.length ∧ cs.wordProd ω = cs.wordProd ω",
" cs.length w = 0 ↔ w = 1",
" cs.length w = 0 → w = 1",
" w = 1",
" cs.wordProd ω = 1",
... |
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Types.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.CategoryTheory.Linear.LinearFunctor
#align_import algebra.category.Module.adjunctions from "leanpr... | Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean | 89 | 109 | theorem μ_natural {X Y X' Y' : Type u} (f : X ⟶ Y) (g : X' ⟶ Y') :
((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom = (μ R X X').hom ≫ (free R).map (f ⊗ g) := by |
-- Porting note (#11041): broken ext
apply TensorProduct.ext
apply Finsupp.lhom_ext'
intro x
apply LinearMap.ext_ring
apply Finsupp.lhom_ext'
intro x'
apply LinearMap.ext_ring
apply Finsupp.ext
intro ⟨y, y'⟩
-- Porting note (#10934): used to be dsimp [μ]
change (finsuppTensorFinsupp' R Y Y')
... | [
" ∀ (X : Type u),\n { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X) =\n 𝟙 ({ obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)",
" { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X✝... | [
" ∀ (X : Type u),\n { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X) =\n 𝟙 ({ obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.obj X)",
" { obj := fun X => of R (X →₀ R), map := fun {X Y} f => Finsupp.lmapDomain R R f }.map (𝟙 X✝... |
import Mathlib.CategoryTheory.EffectiveEpi.RegularEpi
import Mathlib.CategoryTheory.EffectiveEpi.Comp
import Mathlib.Topology.Category.TopCat.Limits.Pullbacks
universe u
open CategoryTheory Limits
namespace TopCat
noncomputable
def effectiveEpiStructOfQuotientMap {B X : TopCat.{u}} (π : X ⟶ B) (hπ : QuotientMap ... | Mathlib/Topology/Category/TopCat/EffectiveEpi.lean | 53 | 75 | theorem effectiveEpi_iff_quotientMap {B X : TopCat.{u}} (π : X ⟶ B) :
EffectiveEpi π ↔ QuotientMap π := by |
/- The backward direction is given by `effectiveEpiStructOfQuotientMap` above. -/
refine ⟨fun _ ↦ ?_, fun hπ ↦ ⟨⟨effectiveEpiStructOfQuotientMap π hπ⟩⟩⟩
/- Since `TopCat` has pullbacks, `π` is in fact a `RegularEpi`. This means that it exhibits `B` as
a coequalizer of two maps into `X`. It suffices to prove ... | [
" { toFun := fun x => a, continuous_toFun := ⋯ } ≫ π = { toFun := fun x => b, continuous_toFun := ⋯ } ≫ π",
" ({ toFun := fun x => a, continuous_toFun := ⋯ } ≫ π) x✝ = ({ toFun := fun x => b, continuous_toFun := ⋯ } ≫ π) x✝",
" g = (fun {W} e h => hπ.lift e ⋯) e ⋯",
" g = hπ.liftEquiv ⟨e, ⋯⟩",
" hπ.liftEqui... | [
" { toFun := fun x => a, continuous_toFun := ⋯ } ≫ π = { toFun := fun x => b, continuous_toFun := ⋯ } ≫ π",
" ({ toFun := fun x => a, continuous_toFun := ⋯ } ≫ π) x✝ = ({ toFun := fun x => b, continuous_toFun := ⋯ } ≫ π) x✝",
" g = (fun {W} e h => hπ.lift e ⋯) e ⋯",
" g = hπ.liftEquiv ⟨e, ⋯⟩",
" hπ.liftEqui... |
import Mathlib.Data.Finset.Lattice
#align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
variable {α : Type*} [DecidableEq α] {𝒜 ℬ : Finset (Finset α)} {s : Finset α} {a : α}
open Finset
-- The namespace is here to distinguish fro... | Mathlib/Combinatorics/SetFamily/Compression/Down.lean | 251 | 254 | theorem erase_mem_compression (hs : s ∈ 𝒜) : s.erase a ∈ 𝓓 a 𝒜 := by |
simp_rw [mem_compression, erase_idem, and_self_iff]
refine (em _).imp_right fun h => ⟨h, ?_⟩
rwa [insert_erase (erase_ne_self.1 (ne_of_mem_of_not_mem hs h).symm)]
| [
" False",
" s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜",
" s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ (∃ a_1 ∈ 𝒜, a_1.erase a = s) ∧ s ∉ 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ insert a s ∈ 𝒜 ∧ s ∉ 𝒜",
" (∃ a_1 ∈ 𝒜, a_1.erase a = s) → insert a s ∈ 𝒜",
" insert a (t.erase a) ∈ 𝒜",
" s.erase a ∈ 𝓓 a 𝒜",... | [
" False",
" s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜",
" s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ (∃ a_1 ∈ 𝒜, a_1.erase a = s) ∧ s ∉ 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ insert a s ∈ 𝒜 ∧ s ∉ 𝒜",
" (∃ a_1 ∈ 𝒜, a_1.erase a = s) → insert a s ∈ 𝒜",
" insert a (t.erase a) ∈ 𝒜"
] |
import Mathlib.Topology.Separation
import Mathlib.Topology.NoetherianSpace
#align_import topology.quasi_separated from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8"
open TopologicalSpace
variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β}
def IsQuasiSeparate... | Mathlib/Topology/QuasiSeparated.lean | 64 | 86 | theorem IsQuasiSeparated.image_of_embedding {s : Set α} (H : IsQuasiSeparated s) (h : Embedding f) :
IsQuasiSeparated (f '' s) := by |
intro U V hU hU' hU'' hV hV' hV''
convert
(H (f ⁻¹' U) (f ⁻¹' V)
?_ (h.continuous.1 _ hU') ?_ ?_ (h.continuous.1 _ hV') ?_).image h.continuous
· symm
rw [← Set.preimage_inter, Set.image_preimage_eq_inter_range, Set.inter_eq_left]
exact Set.inter_subset_left.trans (hU.trans (Set.image_subset_ran... | [
" IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α",
" IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)",
" IsQuasiSeparated (f '' s)",
" IsCompact (U ∩ V)",
" U ∩ V = f '' (f ⁻¹' U ∩ f ⁻¹' V)",
" f '' (f ⁻¹' U ∩ f ⁻¹' V) = U ∩ V",
" U ∩ V... | [
" IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α",
" IsQuasiSeparated Set.univ ↔ ∀ (U V : Set α), IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)"
] |
import Mathlib.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 | 104 | 105 | theorem card_Icc : (Icc a b).card = b + 1 - a := by |
rw [← Nat.card_Icc, ← map_valEmbedding_Icc, card_map]
| [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b",
" (Icc a b).card = ↑b + 1 - ↑a"
] | [
" map valEmbedding (Icc a b) = Icc ↑a ↑b",
" map valEmbedding (Ico a b) = Ico ↑a ↑b",
" map valEmbedding (Ioc a b) = Ioc ↑a ↑b",
" map valEmbedding (Ioo a b) = Ioo ↑a ↑b"
] |
import Mathlib.FieldTheory.Finite.Basic
#align_import number_theory.wilson from "leanprover-community/mathlib"@"c471da714c044131b90c133701e51b877c246677"
open Finset Nat FiniteField ZMod
open scoped Nat
namespace Nat
variable {n : ℕ}
| Mathlib/NumberTheory/Wilson.lean | 89 | 97 | theorem prime_of_fac_equiv_neg_one (h : ((n - 1)! : ZMod n) = -1) (h1 : n ≠ 1) : Prime n := by |
rcases eq_or_ne n 0 with (rfl | h0)
· norm_num at h
replace h1 : 1 < n := n.two_le_iff.mpr ⟨h0, h1⟩
by_contra h2
obtain ⟨m, hm1, hm2 : 1 < m, hm3⟩ := exists_dvd_of_not_prime2 h1 h2
have hm : m ∣ (n - 1)! := Nat.dvd_factorial (pos_of_gt hm2) (le_pred_of_lt hm3)
refine hm2.ne' (Nat.dvd_one.mp ((Nat.dvd_add... | [
" n.Prime",
" Prime 0",
" False",
" n ∣ (n - 1)! + 1"
] | [] |
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.RingTheory.Finiteness
import Mathlib.Order.Basic
#align_import ring_theory.ideal.idempotent_fg from "leanprover-community/mathlib"@"25cf7631da8ddc2d5f957c388bf5e4b25a77d8dc"
namespace Ideal
theorem isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Id... | Mathlib/RingTheory/Ideal/IdempotentFG.lean | 38 | 47 | theorem isIdempotentElem_iff_eq_bot_or_top {R : Type*} [CommRing R] [IsDomain R] (I : Ideal R)
(h : I.FG) : IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤ := by |
constructor
· intro H
obtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H
simp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot]
apply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he)
rintro rfl
simp
· rintro (rfl | rfl) <;> simp [IsIdempotentElem]
| [
" IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" IsIdempotentElem I → ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" I ≤ I • I",
" I ≤ I * I",
" I ≤ Submodule.span R {r}",
" x ∈ Submodule.span R {r}",
" r * x ∈... | [
" IsIdempotentElem I ↔ ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" IsIdempotentElem I → ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" ∃ e, IsIdempotentElem e ∧ I = Submodule.span R {e}",
" I ≤ I • I",
" I ≤ I * I",
" I ≤ Submodule.span R {r}",
" x ∈ Submodule.span R {r}",
" r * x ∈... |
import Mathlib.Data.List.Infix
#align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2"
-- Make sure we don't import algebra
assert_not_exists Monoid
variable {α : Type*} (p : α → Bool) (l : List α) (n : ℕ)
namespace List
def rdrop : List α :=
l.take (l.leng... | Mathlib/Data/List/DropRight.lean | 125 | 128 | theorem rdropWhile_last_not (hl : l.rdropWhile p ≠ []) : ¬p ((rdropWhile p l).getLast hl) := by |
simp_rw [rdropWhile]
rw [getLast_reverse]
exact dropWhile_nthLe_zero_not _ _ _
| [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... | [
" [].rdrop n = []",
" l.rdrop 0 = l",
" l.rdrop n = (drop n l.reverse).reverse",
" take (l.length - n) l = (drop n l.reverse).reverse",
" take ([].length - n) [] = (drop n [].reverse).reverse",
" take ((xs ++ [x]).length - n) (xs ++ [x]) = (drop n (xs ++ [x]).reverse).reverse",
" take ((xs ++ [x]).lengt... |
import Mathlib.AlgebraicTopology.DoldKan.Projections
import Mathlib.CategoryTheory.Idempotents.FunctorCategories
import Mathlib.CategoryTheory.Idempotents.FunctorExtension
#align_import algebraic_topology.dold_kan.p_infty from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open Category... | Mathlib/AlgebraicTopology/DoldKan/PInfty.lean | 46 | 48 | theorem Q_is_eventually_constant {q n : ℕ} (hqn : n ≤ q) :
((Q (q + 1)).f n : X _[n] ⟶ _) = (Q q).f n := by |
simp only [Q, HomologicalComplex.sub_f_apply, P_is_eventually_constant hqn]
| [
" (P (q + 1)).f n = (P q).f n",
" (P (q + 1)).f 0 = (P q).f 0",
" (P (q + 1)).f (n + 1) = (P q).f (n + 1)",
" (P q).f (n + 1) ≫ (Hσ q).f (n + 1) = 0",
" (Q (q + 1)).f n = (Q q).f n"
] | [
" (P (q + 1)).f n = (P q).f n",
" (P (q + 1)).f 0 = (P q).f 0",
" (P (q + 1)).f (n + 1) = (P q).f (n + 1)",
" (P q).f (n + 1) ≫ (Hσ q).f (n + 1) = 0"
] |
import Mathlib.SetTheory.Cardinal.ENat
#align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
universe u v
open Function Set
namespace Cardinal
variable {α : Type u} {c d : Cardinal.{u}}
noncomputable def toNat : Cardinal →*₀ ℕ :=
ENat.toNat.com... | Mathlib/SetTheory/Cardinal/ToNat.lean | 47 | 49 | theorem cast_toNat_of_lt_aleph0 {c : Cardinal} (h : c < ℵ₀) : ↑(toNat c) = c := by |
lift c to ℕ using h
rw [toNat_natCast]
| [
" toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c",
" toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀",
" ↑(toNat c) = c",
" ↑(toNat ↑c) = ↑c"
] | [
" toNat c = 0 ↔ c = 0 ∨ ℵ₀ ≤ c",
" toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀"
] |
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.Subobject.MonoOver
#align_import category_theory.subterminal from "leanprover-community/mathlib"@"bb103f356534a9a7d3596a672097e375290a4c3a"
universe v₁ v₂ u₁ u₂
noncomput... | Mathlib/CategoryTheory/Subterminal.lean | 107 | 110 | theorem isSubterminal_of_isIso_diag [HasBinaryProduct A A] [IsIso (diag A)] : IsSubterminal A :=
fun Z f g => by
have : (Limits.prod.fst : A ⨯ A ⟶ _) = Limits.prod.snd := by | simp [← cancel_epi (diag A)]
rw [← prod.lift_fst f g, this, prod.lift_snd]
| [
" f = g",
" f ≫ hT.from A = g ≫ hT.from A",
" f ≫ terminal.from A = g ≫ terminal.from A",
" diag A ≫ prod.fst = 𝟙 A",
" prod.fst ≫ diag A = 𝟙 (A ⨯ A)",
" prod.fst = prod.snd"
] | [
" f = g",
" f ≫ hT.from A = g ≫ hT.from A",
" f ≫ terminal.from A = g ≫ terminal.from A",
" diag A ≫ prod.fst = 𝟙 A",
" prod.fst ≫ diag A = 𝟙 (A ⨯ A)"
] |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.LinearAlgebra.Vandermonde
import Mathlib.RingTheory.Polynomial.Pochhammer
namespace Nat
def superFactorial : ℕ → ℕ
| 0 => 1
| succ n => factorial n.succ * superFactoria... | Mathlib/Data/Nat/Factorial/SuperFactorial.lean | 75 | 86 | theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
(Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n := by |
induction' n with n hn
· simp [Matrix.det_vandermonde]
· rw [Nat.superFactorial, Matrix.det_vandermonde, Fin.prod_univ_succAbove _ 0]
push_cast
congr
· simp only [Fin.val_zero, Nat.cast_zero, sub_zero]
norm_cast
simp [Fin.prod_univ_eq_prod_range (fun i ↦ (↑i + 1)) (n + 1)]
· rw [Matri... | [
" ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1",
" ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf 0)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n + 1)",
" (∏ j ∈ Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j ∈ Ioi (F... | [
" ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1",
" ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1"
] |
import Batteries.Data.List.Basic
import Batteries.Data.List.Lemmas
open Nat
namespace List
section countP
variable (p q : α → Bool)
@[simp] theorem countP_nil : countP p [] = 0 := rfl
protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by
induction l generalizing n with
| nil... | .lake/packages/batteries/Batteries/Data/List/Count.lean | 47 | 58 | theorem length_eq_countP_add_countP (l) : length l = countP p l + countP (fun a => ¬p a) l := by |
induction l with
| nil => rfl
| cons x h ih =>
if h : p x then
rw [countP_cons_of_pos _ _ h, countP_cons_of_neg _ _ _, length, ih]
· rw [Nat.add_assoc, Nat.add_comm _ 1, Nat.add_assoc]
· simp only [h, not_true_eq_false, decide_False, not_false_eq_true]
else
rw [countP_cons_of_pos ... | [
" countP.go p l n = n + countP.go p l 0",
" countP.go p [] n = n + countP.go p [] 0",
" countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0",
" (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0",
" (bif ... | [
" countP.go p l n = n + countP.go p l 0",
" countP.go p [] n = n + countP.go p [] 0",
" countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0",
" (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0",
" (bif ... |
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Analysis.SpecialFunctions.ExpDeriv
import Mathlib.Tactic.AdaptationNote
#align_import analysis.special_functions.log.deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
ope... | Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean | 78 | 81 | theorem contDiffOn_log {n : ℕ∞} : ContDiffOn ℝ n log {0}ᶜ := by |
suffices ContDiffOn ℝ ⊤ log {0}ᶜ from this.of_le le_top
refine (contDiffOn_top_iff_deriv_of_isOpen isOpen_compl_singleton).2 ?_
simp [differentiableOn_log, contDiffOn_inv]
| [
" HasStrictDerivAt log x⁻¹ x",
" log = log ∘ Neg.neg",
" y.log = (log ∘ Neg.neg) y",
" x⁻¹ = (-x)⁻¹ * -1",
" deriv log x = x⁻¹",
" ContDiffOn ℝ n log {0}ᶜ",
" ContDiffOn ℝ ⊤ log {0}ᶜ",
" DifferentiableOn ℝ log {0}ᶜ ∧ ContDiffOn ℝ ⊤ (deriv log) {0}ᶜ"
] | [
" HasStrictDerivAt log x⁻¹ x",
" log = log ∘ Neg.neg",
" y.log = (log ∘ Neg.neg) y",
" x⁻¹ = (-x)⁻¹ * -1",
" deriv log x = x⁻¹"
] |
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 | 106 | 112 | theorem incMatrix_apply_eq_one_iff : G.incMatrix R a e = 1 ↔ e ∈ G.incidenceSet a := by |
-- Porting note: was `convert one_ne_zero.ite_eq_left_iff; infer_instance`
unfold incMatrix Set.indicator
simp only [Pi.one_apply]
apply Iff.intro <;> intro h
· split at h <;> simp_all only [zero_ne_one]
· simp_all only [ite_true]
| [
" 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.Analysis.SpecialFunctions.Exp
import Mathlib.Data.Nat.Factorization.Basic
import Mathlib.Analysis.NormedSpace.Real
#align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690"
open Set Filter Function
open Topology
noncomputable ... | Mathlib/Analysis/SpecialFunctions/Log/Basic.lean | 69 | 74 | theorem le_exp_log (x : ℝ) : x ≤ exp (log x) := by |
by_cases h_zero : x = 0
· rw [h_zero, log, dif_pos rfl, exp_zero]
exact zero_le_one
· rw [exp_log_eq_abs h_zero]
exact le_abs_self _
| [
" x.log = expOrderIso.symm ⟨x, hx⟩",
" expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩",
" |x| = x",
" rexp x.log = |x|",
" rexp x.log = x",
" rexp x.log = -x",
" |x| = -x",
" x ≤ rexp x.log",
" 0 ≤ 1",
" x ≤ |x|"
] | [
" x.log = expOrderIso.symm ⟨x, hx⟩",
" expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩",
" |x| = x",
" rexp x.log = |x|",
" rexp x.log = x",
" rexp x.log = -x",
" |x| = -x"
] |
import Mathlib.Data.Complex.Module
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Trace
#align_import ring_theory.complex from "leanprover-community/mathlib"@"9015c511549dc77a0f8d6eba021d8ac4bba20c82"
open Complex
theorem Algebra.leftMulMatrix_complex (z : ℂ) :
Algebra.leftMulMatrix Complex.basisOn... | Mathlib/RingTheory/Complex.lean | 37 | 40 | theorem Algebra.norm_complex_apply (z : ℂ) : Algebra.norm ℝ z = Complex.normSq z := by |
rw [Algebra.norm_eq_matrix_det Complex.basisOneI, Algebra.leftMulMatrix_complex,
Matrix.det_fin_two, normSq_apply]
simp
| [
" (leftMulMatrix basisOneI) z = Matrix.of ![![z.re, -z.im], ![z.im, z.re]]",
" (leftMulMatrix basisOneI) z i j = Matrix.of ![![z.re, -z.im], ![z.im, z.re]] i j",
" ![z.re * (![1, I] j).re - z.im * (![1, I] j).im, z.re * (![1, I] j).im + z.im * (![1, I] j).re] i =\n ![![z.re, -z.im], ![z.im, z.re]] i j",
" ... | [
" (leftMulMatrix basisOneI) z = Matrix.of ![![z.re, -z.im], ![z.im, z.re]]",
" (leftMulMatrix basisOneI) z i j = Matrix.of ![![z.re, -z.im], ![z.im, z.re]] i j",
" ![z.re * (![1, I] j).re - z.im * (![1, I] j).im, z.re * (![1, I] j).im + z.im * (![1, I] j).re] i =\n ![![z.re, -z.im], ![z.im, z.re]] i j",
" ... |
import Mathlib.RingTheory.FiniteType
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Localization.Integer
import Mathlib.RingTheory.Localization.Submodule
import Mathlib.RingTheory.Nilpotent.Lemmas
import Mathlib.RingTheory.RingHomProperties
im... | Mathlib/RingTheory/LocalProperties.lean | 153 | 163 | theorem RingHom.ofLocalizationSpan_iff_finite :
RingHom.OfLocalizationSpan @P ↔ RingHom.OfLocalizationFiniteSpan @P := by |
delta RingHom.OfLocalizationSpan RingHom.OfLocalizationFiniteSpan
apply forall₅_congr
-- TODO: Using `refine` here breaks `resetI`.
intros
constructor
· intro h s; exact h s
· intro h s hs hs'
obtain ⟨s', h₁, h₂⟩ := (Ideal.span_eq_top_iff_finite s).mp hs
exact h s' h₂ fun x => hs' ⟨_, h₁ x.prop⟩
| [
" OfLocalizationSpan P ↔ OfLocalizationFiniteSpan P",
" (∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Set R),\n Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap f ↑r)) → P f) ↔\n ∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Finset R)... | [] |
import Mathlib.Tactic.Qify
import Mathlib.Data.ZMod.Basic
import Mathlib.NumberTheory.DiophantineApproximation
import Mathlib.NumberTheory.Zsqrtd.Basic
#align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26"
namespace Pell
open Zsqrtd
theorem is_pell_s... | Mathlib/NumberTheory/Pell.lean | 218 | 222 | theorem x_ne_zero (h₀ : 0 ≤ d) (a : Solution₁ d) : a.x ≠ 0 := by |
intro hx
have h : 0 ≤ d * a.y ^ 2 := mul_nonneg h₀ (sq_nonneg _)
rw [a.prop_y, hx, sq, zero_mul, zero_sub] at h
exact not_le.mpr (neg_one_lt_zero : (-1 : ℤ) < 0) h
| [
" a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)",
" a.x ^ 2 = 1 + d * a.y ^ 2",
" a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2",
" d * a.y ^ 2 = a.x ^ 2 - 1",
" d * a.y ^ 2 = a.x ^ 2 - (a.x ^ 2 - d * a.y ^ 2)",
" (a * b).x = a.x * b.x + d * (a.y * b.y)",
" (a * b).x = a.x * b.x + d * a.y * b.y",
" ... | [
" a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)",
" a.x ^ 2 = 1 + d * a.y ^ 2",
" a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2",
" d * a.y ^ 2 = a.x ^ 2 - 1",
" d * a.y ^ 2 = a.x ^ 2 - (a.x ^ 2 - d * a.y ^ 2)",
" (a * b).x = a.x * b.x + d * (a.y * b.y)",
" (a * b).x = a.x * b.x + d * a.y * b.y",
" ... |
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 | 183 | 183 | theorem rank_finsupp_self' {ι : Type u} : Module.rank R (ι →₀ R) = #ι := by | simp
| [
" 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 (ι →₀ 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} #ι"
] |
import Mathlib.MeasureTheory.Group.GeometryOfNumbers
import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean | 63 | 68 | theorem convexBodyLT_mem {x : K} :
mixedEmbedding K x ∈ (convexBodyLT K f) ↔ ∀ w : InfinitePlace K, w x < f w := by |
simp_rw [mixedEmbedding, RingHom.prod_apply, Set.mem_prod, Set.mem_pi, Set.mem_univ,
forall_true_left, mem_ball_zero_iff, Pi.ringHom_apply, ← Complex.norm_real,
embedding_of_isReal_apply, Subtype.forall, ← forall₂_or_left, ← not_isReal_iff_isComplex, em,
forall_true_left, norm_embedding_eq]
| [
" (mixedEmbedding K) x ∈ convexBodyLT K f ↔ ∀ (w : InfinitePlace K), w x < ↑(f w)"
] | [] |
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Lie.OfAssociative
import Mathlib.Algebra.Lie.Submodule
import Mathlib.Algebra.Lie.Basic
#align_import algebra.lie.direct_sum from "leanprover-community/mathlib"@"c0cc689babd41c0e9d5f02429211ffbe2403472a"
universe u v w w₁
namespace DirectSum
open DF... | Mathlib/Algebra/Lie/DirectSum.lean | 130 | 136 | theorem lie_of_of_ne [DecidableEq ι] {i j : ι} (hij : i ≠ j) (x : L i) (y : L j) :
⁅of L i x, of L j y⁆ = 0 := by |
refine DFinsupp.ext fun k => ?_
rw [bracket_apply]
obtain rfl | hik := Decidable.eq_or_ne i k
· rw [of_eq_of_ne _ _ _ _ hij.symm, lie_zero, zero_apply]
· rw [of_eq_of_ne _ _ _ _ hik, zero_lie, zero_apply]
| [
" ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆",
" ⁅x + y, z⁆ x✝ = (⁅x, z⁆ + ⁅y, z⁆) x✝",
" ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆",
" ⁅x, y + z⁆ x✝ = (⁅x, y⁆ + ⁅x, z⁆) x✝",
" ⁅x, x⁆ = 0",
" ⁅x, x⁆ x✝ = 0 x✝",
" ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆",
" ⁅x, ⁅y, z⁆⁆ x✝ = (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆) x✝",
" ⁅x x✝, ⁅y x✝, z x✝... | [
" ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆",
" ⁅x + y, z⁆ x✝ = (⁅x, z⁆ + ⁅y, z⁆) x✝",
" ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆",
" ⁅x, y + z⁆ x✝ = (⁅x, y⁆ + ⁅x, z⁆) x✝",
" ⁅x, x⁆ = 0",
" ⁅x, x⁆ x✝ = 0 x✝",
" ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆",
" ⁅x, ⁅y, z⁆⁆ x✝ = (⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆) x✝",
" ⁅x x✝, ⁅y x✝, z x✝... |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Vector.Basic
import Mathlib.Data.PFun
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Basic
import Mathlib.Tactic.ApplyFun
#align_import computability.turing_machine from "leanprover-commu... | Mathlib/Computability/TuringMachine.lean | 106 | 113 | theorem BlankExtends.above_of_le {Γ} [Inhabited Γ] {l l₁ l₂ : List Γ} :
BlankExtends l₁ l → BlankExtends l₂ l → l₁.length ≤ l₂.length → BlankExtends l₁ l₂ := by |
rintro ⟨i, rfl⟩ ⟨j, e⟩ h; use i - j
refine List.append_cancel_right (e.symm.trans ?_)
rw [List.append_assoc, ← List.replicate_add, Nat.sub_add_cancel]
apply_fun List.length at e
simp only [List.length_append, List.length_replicate] at e
rwa [← Nat.add_le_add_iff_left, e, Nat.add_le_add_iff_right]
| [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default",
" BlankExtends l l₁ → ... | [
" l = l ++ List.replicate 0 default",
" BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃",
" BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)",
" l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default",
" BlankExtends l l₁ → ... |
import Mathlib.Analysis.Normed.Group.Hom
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Data.Set.Image
import Mathlib.MeasureTheory.Function.LpSeminorm.ChebyshevMarkov
import Mathlib.MeasureTheory.Function.LpSeminorm.CompareExp
import Mathlib.MeasureTheory.Function.LpSeminorm.TriangleInequality... | Mathlib/MeasureTheory/Function/LpSpace.lean | 131 | 132 | theorem toLp_eq_toLp_iff {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
hf.toLp f = hg.toLp g ↔ f =ᵐ[μ] g := by | simp [toLp]
| [
" snorm (↑(AEEqFun.mk f ⋯)) p μ < ⊤",
" f + g ∈ {f | snorm (↑f) p μ < ⊤}",
" 0 ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯ }.carrier",
" -f ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯, zero_mem' := ⋯ }.carrier",
" toLp f hf = toLp g hg",
" toLp f hf = toLp g hg ↔ f =ᶠ[ae μ] g"
] | [
" snorm (↑(AEEqFun.mk f ⋯)) p μ < ⊤",
" f + g ∈ {f | snorm (↑f) p μ < ⊤}",
" 0 ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯ }.carrier",
" -f ∈ { carrier := {f | snorm (↑f) p μ < ⊤}, add_mem' := ⋯, zero_mem' := ⋯ }.carrier",
" toLp f hf = toLp g hg"
] |
import Mathlib.Order.Bounds.Basic
import Mathlib.Order.Hom.Set
#align_import order.bounds.order_iso from "leanprover-community/mathlib"@"a59dad53320b73ef180174aae867addd707ef00e"
set_option autoImplicit true
open Set
namespace OrderIso
variable [Preorder α] [Preorder β] (f : α ≃o β)
theorem upperBounds_image {... | Mathlib/Order/Bounds/OrderIso.lean | 59 | 60 | theorem isLUB_preimage' {s : Set β} {x : β} : IsLUB (f ⁻¹' s) (f.symm x) ↔ IsLUB s x := by |
rw [isLUB_preimage, f.apply_symm_apply]
| [
" ∀ {x y : α}, f x ≤ f y ↔ x ≤ y",
" ∀ {x y : β}, f.symm x ≤ f.symm y ↔ x ≤ y",
" IsLUB (⇑f '' s) (f x) ↔ IsLUB s x",
" IsLUB (⇑f ⁻¹' s) x ↔ IsLUB s (f x)",
" IsLUB (⇑f ⁻¹' s) (f.symm x) ↔ IsLUB s x"
] | [
" ∀ {x y : α}, f x ≤ f y ↔ x ≤ y",
" ∀ {x y : β}, f.symm x ≤ f.symm y ↔ x ≤ y",
" IsLUB (⇑f '' s) (f x) ↔ IsLUB s x",
" IsLUB (⇑f ⁻¹' s) x ↔ IsLUB s (f x)"
] |
import Mathlib.CategoryTheory.NatTrans
import Mathlib.CategoryTheory.Iso
#align_import category_theory.functor.category from "leanprover-community/mathlib"@"63721b2c3eba6c325ecf8ae8cca27155a4f6306f"
namespace CategoryTheory
-- declare the `v`'s first; see note [CategoryTheory universes].
universe v₁ v₂ v₃ u₁ u₂ u... | Mathlib/CategoryTheory/Functor/Category.lean | 68 | 68 | theorem congr_app {α β : F ⟶ G} (h : α = β) (X : C) : α.app X = β.app X := by | rw [h]
| [
" α.app X = β.app X"
] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.