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 |
|---|---|---|---|---|---|---|
import Mathlib.Order.BooleanAlgebra
import Mathlib.Tactic.Common
#align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
variable {α : Type*}
namespace Coheyting
variable [CoheytingAlgebra α] {a b : α}
def boundary (a : α) : α :=
a ⊓ ¬a
#align cohe... | Mathlib/Order/Heyting/Boundary.lean | 105 | 117 | theorem boundary_le_boundary_sup_sup_boundary_inf_left : ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b) := by |
-- Porting note: the following simp generates the same term as mathlib3 if you remove
-- sup_inf_right from both. With sup_inf_right included, mathlib4 and mathlib3 generate
-- different terms
simp only [boundary, sup_inf_left, sup_inf_right, sup_right_idem, le_inf_iff, sup_assoc,
sup_comm _ a]
refine ⟨⟨... | [
" ∂ ⊤ = ⊥",
" ∂ (¬¬a) = ∂ (¬a)",
" ¬∂ a = ⊤",
" ∂ (a ⊓ b) = ∂ a ⊓ b ⊔ a ⊓ ∂ b",
" a ⊓ b ⊓ ¬(a ⊓ b) = a ⊓ ¬a ⊓ b ⊔ a ⊓ (b ⊓ ¬b)",
" ∂ (a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" a ⊓ ¬(a ⊔ b) ⊔ b ⊓ ¬(a ⊔ b) ≤ ∂ a ⊔ ∂ b",
" (a ∧ b ∨ ¬(a ∧ b)) ∧ ((a ∨ b) ∨ ¬(a ∨ b)) → a ∨ ¬a",
" a ∨ ¬a",
" ∂ a ≤ ∂ (a ⊔ b) ⊔ ∂ (a ⊓ b)",
... |
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic
#align_import number_theory.legendre_symbol.basic from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9"
open Nat
section Euler
section Legendre
open ZMod
variable (p : ℕ) [Fact p.Prime]
def legendreSym (a : ℤ) : ℤ :=
... | Mathlib/NumberTheory/LegendreSymbol/Basic.lean | 195 | 199 | theorem eq_one_iff' {a : ℕ} (ha0 : (a : ZMod p) ≠ 0) :
legendreSym p a = 1 ↔ IsSquare (a : ZMod p) := by |
rw [eq_one_iff]
· norm_cast
· exact mod_cast ha0
| [
" ↑(legendreSym p a) = ↑a ^ (p / 2)",
" ↑0 = 0",
" ↑(legendreSym 2 a) = ↑a ^ (2 / 2)",
" ↑1 = ↑a ^ (2 / 2)",
" ¬↑a = 0 → ↑1 = ↑a ^ (2 / 2)",
" ¬↑a = 0 → 1 = ↑a ^ 1",
" ¬b = 0 → 1 = b ^ 1",
" ¬⟨0, ⋯⟩ = 0 → 1 = ⟨0, ⋯⟩ ^ 1",
" ¬⟨1, ⋯⟩ = 0 → 1 = ⟨1, ⋯⟩ ^ 1",
" p = Fintype.card (ZMod p)",
" legendreS... |
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Order.Interval.Set.IsoIoo
import Mathlib.Topology.Order.MonotoneContinuity
import Mathlib.Topology.UrysohnsBounded
#align_import topology.tietze_extension from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
variable {X Y : T... | Mathlib/Topology/TietzeExtension.lean | 169 | 213 | theorem tietze_extension_step (f : X →ᵇ ℝ) (e : C(X, Y)) (he : ClosedEmbedding e) :
∃ g : Y →ᵇ ℝ, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (g.compContinuous e) f ≤ 2 / 3 * ‖f‖ := by |
have h3 : (0 : ℝ) < 3 := by norm_num1
have h23 : 0 < (2 / 3 : ℝ) := by norm_num1
-- In the trivial case `f = 0`, we take `g = 0`
rcases eq_or_ne f 0 with (rfl | hf)
· use 0
simp
replace hf : 0 < ‖f‖ := norm_pos_iff.2 hf
/- Otherwise, the closed sets `e '' (f ⁻¹' (Iic (-‖f‖ / 3)))` and `e '' (f ⁻¹' (I... | [
" ∃ g, ‖g‖ ≤ ‖f‖ / 3 ∧ dist (g.compContinuous e) f ≤ 2 / 3 * ‖f‖",
" 0 < 3",
" 0 < 2 / 3",
" ∃ g, ‖g‖ ≤ ‖0‖ / 3 ∧ dist (g.compContinuous e) 0 ≤ 2 / 3 * ‖0‖",
" ‖0‖ ≤ ‖0‖ / 3 ∧ dist (compContinuous 0 e) 0 ≤ 2 / 3 * ‖0‖",
" Disjoint (⇑e '' (⇑f ⁻¹' Iic (-‖f‖ / 3))) (⇑e '' (⇑f ⁻¹' Ici (‖f‖ / 3)))",
" Disjoi... |
import Mathlib.Algebra.MvPolynomial.Variables
#align_import data.mv_polynomial.supported from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4"
universe u v w
namespace MvPolynomial
variable {σ τ : Type*} {R : Type u} {S : Type v} {r : R} {e : ℕ} {n m : σ}
section CommSemiring
variable... | Mathlib/Algebra/MvPolynomial/Supported.lean | 75 | 83 | theorem mem_supported : p ∈ supported R s ↔ ↑p.vars ⊆ s := by |
classical
rw [supported_eq_range_rename, AlgHom.mem_range]
constructor
· rintro ⟨p, rfl⟩
refine _root_.trans (Finset.coe_subset.2 (vars_rename _ _)) ?_
simp
· intro hs
exact exists_rename_eq_of_vars_subset_range p ((↑) : s → σ) Subtype.val_injective (by simpa)
| [
" supported R s = (rename Subtype.val).range",
" (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range",
" (supportedEquivMvPolynomial s).symm (C x) = (algebraMap R ↥(supported R s)) x",
" ↑((supportedEquivMvPolynomial s).symm (C x)) = ↑((algebraMap R ↥(supported R s)) x)",
" ↑((supportedEquivMvPoly... |
import Mathlib.Analysis.Calculus.LineDeriv.Measurable
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.Analysis.BoundedVariation
import Mathlib.MeasureTheory.Group.Integral
import Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff
import Mathlib.... | Mathlib/Analysis/Calculus/Rademacher.lean | 63 | 77 | theorem ae_lineDifferentiableAt (hf : LipschitzWith C f) (v : E) :
∀ᵐ p ∂μ, LineDifferentiableAt ℝ f p v := by |
let L : ℝ →L[ℝ] E := ContinuousLinearMap.smulRight (1 : ℝ →L[ℝ] ℝ) v
suffices A : ∀ p, ∀ᵐ (t : ℝ) ∂volume, LineDifferentiableAt ℝ f (p + t • v) v from
ae_mem_of_ae_add_linearMap_mem L.toLinearMap volume μ
(measurableSet_lineDifferentiableAt hf.continuous) A
intro p
have : ∀ᵐ (s : ℝ), DifferentiableAt... | [
" ∀ᵐ (p : E) ∂μ, LineDifferentiableAt ℝ f p v",
" ∀ (p : E), ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v",
" ∀ᵐ (t : ℝ), LineDifferentiableAt ℝ f (p + t • v) v",
" LineDifferentiableAt ℝ f (p + s • v) v",
" DifferentiableAt ℝ (fun t => f (p + t • v)) (s + 0)",
" DifferentiableAt ℝ (fun t => f (p + ... |
import Mathlib.Analysis.MeanInequalities
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity
import Mathlib.Data.Set.Image
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import analysis.normed_space.lp_space from "leanprover-community/mathlib"@"de83b43717abe3... | Mathlib/Analysis/NormedSpace/lpSpace.lean | 160 | 167 | theorem neg {f : ∀ i, E i} (hf : Memℓp f p) : Memℓp (-f) p := by |
rcases p.trichotomy with (rfl | rfl | hp)
· apply memℓp_zero
simp [hf.finite_dsupport]
· apply memℓp_infty
simpa using hf.bddAbove
· apply memℓp_gen
simpa using hf.summable hp
| [
" Memℓp f 0 ↔ {i | f i ≠ 0}.Finite",
" (if 0 = 0 then {i | ¬f i = 0}.Finite\n else if 0 = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ 0) ↔\n {i | ¬f i = 0}.Finite",
" Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)",
" (if ⊤ = 0 then {i | ¬f i = 0}.Finite\n else if ⊤ = ⊤... |
import Mathlib.Algebra.Group.Units
import Mathlib.Algebra.GroupWithZero.Basic
import Mathlib.Logic.Equiv.Defs
import Mathlib.Tactic.Contrapose
import Mathlib.Tactic.Nontriviality
import Mathlib.Tactic.Spread
import Mathlib.Util.AssertExists
#align_import algebra.group_with_zero.units.basic from "leanprover-community/... | Mathlib/Algebra/GroupWithZero/Units/Basic.lean | 98 | 99 | theorem inverse_unit (u : M₀ˣ) : inverse (u : M₀) = (u⁻¹ : M₀ˣ) := by |
rw [inverse, dif_pos u.isUnit, IsUnit.unit_of_val_units]
| [
" 0 = 1",
" inverse ↑u = ↑u⁻¹"
] |
import Mathlib.NumberTheory.BernoulliPolynomials
import Mathlib.MeasureTheory.Integral.IntervalIntegral
import Mathlib.Analysis.Calculus.Deriv.Polynomial
import Mathlib.Analysis.Fourier.AddCircle
import Mathlib.Analysis.PSeries
#align_import number_theory.zeta_values from "leanprover-community/mathlib"@"f0c8bf9245297... | Mathlib/NumberTheory/ZetaValues.lean | 53 | 56 | theorem bernoulliFun_endpoints_eq_of_ne_one {k : ℕ} (hk : k ≠ 1) :
bernoulliFun k 1 = bernoulliFun k 0 := by |
rw [bernoulliFun_eval_zero, bernoulliFun, Polynomial.eval_one_map, Polynomial.bernoulli_eval_one,
bernoulli_eq_bernoulli'_of_ne_one hk, eq_ratCast]
| [
" bernoulliFun k 0 = ↑(bernoulli k)",
" bernoulliFun k 1 = bernoulliFun k 0"
] |
import Mathlib.Analysis.Complex.Basic
import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle
#align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
open Set
noncomputable section
namespace Complex
theorem isHomeomorphicTrivialFiber... | Mathlib/Analysis/Complex/ReImTopology.lean | 124 | 125 | theorem closure_setOf_lt_re (a : ℝ) : closure { z : ℂ | a < z.re } = { z | a ≤ z.re } := by |
simpa only [closure_Ioi] using closure_preimage_re (Ioi a)
| [
" interior {z | z.re ≤ a} = {z | z.re < a}",
" interior {z | z.im ≤ a} = {z | z.im < a}",
" interior {z | a ≤ z.re} = {z | a < z.re}",
" interior {z | a ≤ z.im} = {z | a < z.im}",
" closure {z | z.re < a} = {z | z.re ≤ a}",
" closure {z | z.im < a} = {z | z.im ≤ a}",
" closure {z | a < z.re} = {z | a ≤ ... |
import Mathlib.CategoryTheory.Opposites
#align_import category_theory.eq_to_hom from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
universe v₁ v₂ v₃ u₁ u₂ u₃
-- morphism levels before object levels. See note [CategoryTheory universes].
namespace CategoryTheory
open Opposite
variable ... | Mathlib/CategoryTheory/EqToHom.lean | 77 | 80 | theorem eqToHom_naturality {f g : β → C} (z : ∀ b, f b ⟶ g b) {j j' : β} (w : j = j') :
z j ≫ eqToHom (by simp [w]) = eqToHom (by simp [w]) ≫ z j' := by |
cases w
simp
| [
" X ⟶ Y",
" Y ⟶ Y",
" eqToHom p ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom q = eqToHom ⋯",
" eqToHom ⋯ ≫ eqToHom ⋯ = eqToHom ⋯",
" f = (f ≫ eqToHom p) ≫ eqToHom ⋯",
" f ≫ eqToHom p = g",
" g = eqToHom ⋯ ≫ eqToHom p ≫ g",
" eqToHom p ≫ eqToHom ⋯ ≫ f = f",
" g j = g j'",
" f j = f j'",
" z ... |
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.SimpleGraph.AdjMatrix
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Set.Finite
#align_import combinatorics.simple_graph.strongly_regular from "leanprover-community/mathlib"@"2b35fc7bea4640cb75e477e83f32fbd5389208... | Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean | 144 | 156 | theorem IsSRGWith.card_commonNeighbors_eq_of_adj_compl (h : G.IsSRGWith n k ℓ μ) {v w : V}
(ha : Gᶜ.Adj v w) : Fintype.card (Gᶜ.commonNeighbors v w) = n - (2 * k - μ) - 2 := by |
simp only [← Set.toFinset_card, commonNeighbors, Set.toFinset_inter, neighborSet_compl,
Set.toFinset_diff, Set.toFinset_singleton, Set.toFinset_compl, ← neighborFinset_def]
simp_rw [compl_neighborFinset_sdiff_inter_eq]
have hne : v ≠ w := ne_of_adj _ ha
rw [compl_adj] at ha
rw [card_sdiff, ← insert_eq, c... | [
" (fun v w => ¬⊥.Adj v w → Fintype.card ↑(⊥.commonNeighbors v w) = 0) v w",
" filter (fun x => x ∈ ⊥.commonNeighbors v w) univ = ∅",
" a✝ ∈ filter (fun x => x ∈ ⊥.commonNeighbors v w) univ ↔ a✝ ∈ ∅",
" Fintype.card ↑(⊤.commonNeighbors v w) = Fintype.card V - 2",
" v ≠ w",
" (G.neighborFinset v ∪ G.neighbo... |
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
import Mathlib.RingTheory.RootsOfUnity.Minpoly
#align_import ring_theory.polynomial.cyclotomic.roots from "leanprover-community/mathlib"@"7fdeecc0d03cd40f7a165e6cf00a4d2286db599f"
namespace Polynomial
variable {R : Type*} [CommRing R] {n : ℕ}
theorem isRoot_... | Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean | 99 | 104 | theorem isRoot_cyclotomic_iff [NeZero (n : R)] {μ : R} :
IsRoot (cyclotomic n R) μ ↔ IsPrimitiveRoot μ n := by |
have hf : Function.Injective _ := IsFractionRing.injective R (FractionRing R)
haveI : NeZero (n : FractionRing R) := NeZero.nat_of_injective hf
rw [← isRoot_map_iff hf, ← IsPrimitiveRoot.map_iff_of_injective hf, map_cyclotomic, ←
isRoot_cyclotomic_iff']
| [
" ζ ^ n = 1",
" ζ ^ 0 = 1",
" 1 = 1 + eval ζ (∏ i ∈ n.divisors, cyclotomic i R)",
" eval ζ (∏ i ∈ n.divisors, cyclotomic i R) = 0",
" cyclotomic i R ∣ ∏ i ∈ n.divisors, cyclotomic i R",
" ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ",
" (cyclotomic n R).IsRoot μ",
" μ ∈ primitiveRoots n R",... |
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.measure.ae_disjoint from "leanprover-community/mathlib"@"bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e"
open Set Function
namespace MeasureTheory
variable {ι α : Type*} {m : MeasurableSpace α} (μ : Measure α)
def AEDisjoint (s t : Se... | Mathlib/MeasureTheory/Measure/AEDisjoint.lean | 106 | 107 | theorem union_left_iff : AEDisjoint μ (s ∪ t) u ↔ AEDisjoint μ s u ∧ AEDisjoint μ t u := by |
simp [union_eq_iUnion, and_comm]
| [
" ∃ t, (∀ (i : ι), MeasurableSet (t i)) ∧ (∀ (i : ι), μ (t i) = 0) ∧ Pairwise (Disjoint on fun i => s i \\ t i)",
" μ ((fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i) = 0",
" μ (⋃ i_1 ∈ {i}ᶜ, s i ∩ s i_1) = 0",
" Pairwise (Disjoint on fun i => s i \\ (fun i => toMeasurable μ (s i ∩ ⋃ j ∈ {i}ᶜ, s j)) i)",... |
import Mathlib.Order.Interval.Set.UnorderedInterval
import Mathlib.Algebra.Order.Interval.Set.Monoid
import Mathlib.Data.Set.Pointwise.Basic
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
#align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c... | Mathlib/Data/Set/Pointwise/Interval.lean | 110 | 113 | theorem Ici_mul_Ioi_subset' (a b : α) : Ici a * Ioi b ⊆ Ioi (a * b) := by |
haveI := covariantClass_le_of_lt
rintro x ⟨y, hya, z, hzb, rfl⟩
exact mul_lt_mul_of_le_of_lt hya hzb
| [
" Icc a b * Ico c d ⊆ Ico (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)",
" Ico a b * Icc c d ⊆ Ico (a * c) (b * d)",
" Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)",
" (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)",
" Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)",
" Iic a * Iio b ⊆ Iio ... |
import Batteries.Data.List.Count
import Batteries.Data.Fin.Lemmas
open Nat Function
namespace List
theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : ∀ {a'}, a' ∈ l → R a a' :=
(pairwise_cons.1 p).1 _
theorem Pairwise.of_cons (p : (a :: l).Pairwise R) : Pairwise R l :=
(pairwise_cons.1 p).2
theorem... | .lake/packages/batteries/Batteries/Data/List/Pairwise.lean | 48 | 55 | theorem Pairwise.imp_of_mem {S : α → α → Prop}
(H : ∀ {a b}, a ∈ l → b ∈ l → R a b → S a b) (p : Pairwise R l) : Pairwise S l := by |
induction p with
| nil => constructor
| @cons a l r _ ih =>
constructor
· exact fun x h => H (mem_cons_self ..) (mem_cons_of_mem _ h) <| r x h
· exact ih fun m m' => H (mem_cons_of_mem _ m) (mem_cons_of_mem _ m')
| [
" Pairwise S l",
" Pairwise S []",
" Pairwise S (a :: l)",
" ∀ (a' : α), a' ∈ l → S a a'"
] |
import Mathlib.Algebra.Polynomial.Expand
import Mathlib.Algebra.Polynomial.Laurent
import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.RingTheory.Polynomial.Nilpotent
#align_import linear_algebra.matrix.charpoly.coeff from "leanprover-community/mathlib"@"9745b... | Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean | 49 | 51 | theorem charmatrix_apply_natDegree [Nontrivial R] (i j : n) :
(charmatrix M i j).natDegree = ite (i = j) 1 0 := by |
by_cases h : i = j <;> simp [h, ← degree_eq_iff_natDegree_eq_of_pos (Nat.succ_pos 0)]
| [
" (M.charmatrix i j).natDegree = if i = j then 1 else 0"
] |
import Mathlib.Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
theorem te... | Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean | 85 | 88 | theorem convergents_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.convergents m = g.convergents n := by |
simp only [convergents, denominators_stable_of_terminated n_le_m terminated_at_n,
numerators_stable_of_terminated n_le_m terminated_at_n]
| [
" g.continuantsAux (n + 2) = g.continuantsAux (n + 1)",
" g.continuantsAux m = g.continuantsAux (n + 1)",
" g.continuantsAux (k + 1) = g.continuantsAux (n + 1)",
" g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)",
" g.TerminatedAt (n + k)",
" convergents'Aux s (n + 1) = convergents'Aux s n",
... |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422"
namespace Matrix
universe u u' v
variable {l : ... | Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean | 394 | 401 | theorem mulVec_surjective_iff_exists_right_inverse [Finite m] [Fintype n] {A : Matrix m n R} :
Function.Surjective A.mulVec ↔ ∃ B : Matrix n m R, A * B = 1 := by |
cases nonempty_fintype m
refine ⟨fun h ↦ ?_, fun ⟨B, hBA⟩ y ↦ ⟨B *ᵥ y, by simp [hBA]⟩⟩
choose cols hcols using (h <| Pi.single · 1)
refine ⟨(Matrix.of cols)ᵀ, Matrix.ext fun i j ↦ ?_⟩
rw [one_eq_pi_single, Pi.single_comm, ← hcols j]
rfl
| [
" (Function.Surjective fun v => v ᵥ* A) ↔ ∃ B, B * A = 1",
" (fun v => v ᵥ* A) (y ᵥ* B) = y",
" ∃ B, B * A = 1",
" (of rows * A) i j = 1 i j",
" (of rows i ᵥ* A) j = (fun v => v ᵥ* A) (rows i) j",
" Function.Surjective A.mulVec ↔ ∃ B, A * B = 1",
" A *ᵥ B *ᵥ y = y",
" ∃ B, A * B = 1",
" (A * (of col... |
import Mathlib.ModelTheory.ElementarySubstructures
#align_import model_theory.skolem from "leanprover-community/mathlib"@"3d7987cda72abc473c7cdbbb075170e9ac620042"
universe u v w w'
namespace FirstOrder
namespace Language
open Structure Cardinal
open Cardinal
variable (L : Language.{u, v}) {M : Type w} [None... | Mathlib/ModelTheory/Skolem.lean | 86 | 95 | theorem skolem₁_reduct_isElementary (S : (L.sum L.skolem₁).Substructure M) :
(LHom.sumInl.substructureReduct S).IsElementary := by |
apply (LHom.sumInl.substructureReduct S).isElementary_of_exists
intro n φ x a h
let φ' : (L.sum L.skolem₁).Functions n := LHom.sumInr.onFunction φ
exact
⟨⟨funMap φ' ((↑) ∘ x), S.fun_mem (LHom.sumInr.onFunction φ) ((↑) ∘ x) (by
exact fun i => (x i).2)⟩,
by exact Classical.epsilon_spec (p := fun ... | [
" #((n : ℕ) × (L.sum L.skolem₁).Functions n) = #((n : ℕ) × L.BoundedFormula Empty (n + 1))",
" ((sum fun i => lift.{max u v, u} #(L.Functions i)) +\n sum fun i => lift.{u, max u v} #(L.BoundedFormula Empty (i + 1))) =\n sum fun i => #(L.BoundedFormula Empty (i + 1))",
"L : Language\nM : Type w\ninst✝¹ :... |
import Mathlib.RingTheory.PowerSeries.Trunc
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.Derivation.Basic
namespace PowerSeries
open Polynomial Derivation Nat
section CommutativeSemiring
variable {R} [CommSemiring R]
noncomputable def derivativeFun (f : R⟦X⟧) : R⟦X⟧ := mk fun n ↦ coef... | Mathlib/RingTheory/PowerSeries/Derivative.lean | 55 | 58 | theorem derivativeFun_C (r : R) : derivativeFun (C R r) = 0 := by |
ext n
-- Note that `map_zero` didn't get picked up, apparently due to a missing `FunLike.coe`
rw [coeff_derivativeFun, coeff_succ_C, zero_mul, (coeff R n).map_zero]
| [
" (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)",
" (↑f).derivativeFun = ↑(derivative f)",
" (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)",
" (f + g).derivativeFun = f.derivativeFun + g.derivativeFun",
" (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g.... |
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.FieldTheory.Finite.Trace
import Mathlib.Algebra.Group.AddChar
import Mathlib.Data.ZMod.Units
import Mathlib.Analysis.Complex.Polynomial
#align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2... | Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean | 76 | 83 | theorem to_mulShift_inj_of_isPrimitive {ψ : AddChar R R'} (hψ : IsPrimitive ψ) :
Function.Injective ψ.mulShift := by |
intro a b h
apply_fun fun x => x * mulShift ψ (-b) at h
simp only [mulShift_mul, mulShift_zero, add_right_neg] at h
have h₂ := hψ (a + -b)
rw [h, isNontrivial_iff_ne_trivial, ← sub_eq_add_neg, sub_ne_zero] at h₂
exact not_not.mp fun h => h₂ h rfl
| [
" ⋯.unit ∈ rootsOfUnity (ringChar R).toPNat' R'",
" (f.compAddChar φ).IsPrimitive",
" ((f.compAddChar φ).mulShift a).IsNontrivial",
" ∃ a_1, f (φ (a * a_1)) ≠ 1",
" Function.Injective ψ.mulShift",
" a = b"
] |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 37 | 50 | theorem isConj_of_support_equiv
(f : { x // x ∈ (σ.support : Set α) } ≃ { x // x ∈ (τ.support : Set α) })
(hf : ∀ (x : α) (hx : x ∈ (σ.support : Set α)),
(f ⟨σ x, apply_mem_support.2 hx⟩ : α) = τ ↑(f ⟨x, hx⟩)) :
IsConj σ τ := by |
refine isConj_iff.2 ⟨Equiv.extendSubtype f, ?_⟩
rw [mul_inv_eq_iff_eq_mul]
ext x
simp only [Perm.mul_apply]
by_cases hx : x ∈ σ.support
· rw [Equiv.extendSubtype_apply_of_mem, Equiv.extendSubtype_apply_of_mem]
· exact hf x (Finset.mem_coe.2 hx)
· rwa [Classical.not_not.1 ((not_congr mem_support).1 (E... | [
" -1 ≠ 1",
" IsConj σ τ",
" f.extendSubtype * σ * f.extendSubtype⁻¹ = τ",
" f.extendSubtype * σ = τ * f.extendSubtype",
" (f.extendSubtype * σ) x = (τ * f.extendSubtype) x",
" f.extendSubtype (σ x) = τ (f.extendSubtype x)",
" ↑(f ⟨σ x, ?pos.hx✝⟩) = τ ↑(f ⟨x, ?pos.hx✝⟩)"
] |
import Mathlib.Data.Set.Lattice
#align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u v w
variable {ι : Sort u} {α : Type v} {β : Type w}
open Set
open OrderDual (toDual)
namespace Set
section Preorder
variable [Preorder α] {a b c... | Mathlib/Order/Interval/Set/Disjoint.lean | 87 | 88 | theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by |
simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ]
| [
" Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b",
" ⋃ b, Icc a b = Ici a"
] |
import Mathlib.CategoryTheory.Limits.Types
import Mathlib.CategoryTheory.Limits.Shapes.Products
import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts
import Mathlib.CategoryTheory.Limits.Shapes.Terminal
import Mathlib.CategoryTheory.ConcreteCategory.Basic
import Mathlib.Tactic.CategoryTheory.Elementwise
import Ma... | Mathlib/CategoryTheory/Limits/Shapes/Types.lean | 66 | 69 | theorem pi_lift_π_apply' {β : Type v} (f : β → Type v) {P : Type v}
(s : ∀ b, P ⟶ f b) (b : β) (x : P) :
(Pi.π f b : (piObj f) → f b) (@Pi.lift β _ _ f _ P s x) = s b x := by |
simp
| [
" Pi.π f b (Pi.lift s x) = s b x"
] |
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 | 94 | 97 | theorem le_levenshtein_append (xs : List α) (ys₁ ys₂) :
∃ xs', xs' <:+ xs ∧ levenshtein C xs' ys₂ ≤ levenshtein C xs (ys₁ ++ ys₂) := by |
simpa [suffixLevenshtein_eq_tails_map, List.minimum_le_coe_iff] using
suffixLevenshtein_minimum_le_levenshtein_append (δ := δ) xs ys₁ ys₂
| [
" (↑(suffixLevenshtein C xs ys)).minimum ≤ ↑(levenshtein C xs (y :: ys))",
" (↑(suffixLevenshtein C [] ys)).minimum ≤ ↑(levenshtein C [] (y :: ys))",
" levenshtein C [] ys ≤ C.insert y + levenshtein C [] ys",
" 0 ≤ C.insert y",
" (↑(suffixLevenshtein C (x :: xs) ys)).minimum ≤ ↑(levenshtein C (x :: xs) (y :... |
import Mathlib.Data.Set.Lattice
#align_import data.set.accumulate from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
variable {α β γ : Type*} {s : α → Set β} {t : α → Set γ}
namespace Set
def Accumulate [LE α] (s : α → Set β) (x : α) : Set β :=
⋃ y ≤ x, s y
#align set.accumulate S... | Mathlib/Data/Set/Accumulate.lean | 50 | 53 | theorem biUnion_accumulate [Preorder α] (x : α) : ⋃ y ≤ x, Accumulate s y = ⋃ y ≤ x, s y := by |
apply Subset.antisymm
· exact iUnion₂_subset fun y hy => monotone_accumulate hy
· exact iUnion₂_mono fun y _ => subset_accumulate
| [
" z ∈ Accumulate s x ↔ ∃ y ≤ x, z ∈ s y",
" ⋃ y, ⋃ (_ : y ≤ x), Accumulate s y = ⋃ y, ⋃ (_ : y ≤ x), s y",
" ⋃ y, ⋃ (_ : y ≤ x), Accumulate s y ⊆ ⋃ y, ⋃ (_ : y ≤ x), s y",
" ⋃ y, ⋃ (_ : y ≤ x), s y ⊆ ⋃ y, ⋃ (_ : y ≤ x), Accumulate s y"
] |
import Mathlib.Algebra.Module.Zlattice.Basic
import Mathlib.NumberTheory.NumberField.Embeddings
import Mathlib.NumberTheory.NumberField.FractionalIdeal
#align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30"
variable (K : Type*) [F... | Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean | 264 | 267 | theorem normAtPlace_neg (w : InfinitePlace K) (x : E K) :
normAtPlace w (- x) = normAtPlace w x := by |
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
split_ifs <;> simp
| [
" Nontrivial (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))",
" finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = finrank ℚ K",
" Function.Injective ⇑(mixedEmbedding K)",
" (fun x => if hw : w.IsReal then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, ⋯⟩‖) 0 = 0",
" { toFun := fun x => if hw : w.IsRea... |
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.Polynomial.BigOperators
import Mathlib.Algebra.Polynomial.Lifts
import Mathlib.Algebra.Polynomial.Splits
import Mathlib.RingTheory.RootsOfUnity.Complex
import Mathlib.NumberTheory.ArithmeticFunction
import Mathlib.RingTheory.RootsOfUnity.Basic
import Mathlib.FieldTh... | Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean | 78 | 80 | theorem cyclotomic'_one (R : Type*) [CommRing R] [IsDomain R] : cyclotomic' 1 R = X - 1 := by |
simp only [cyclotomic', Finset.prod_singleton, RingHom.map_one,
IsPrimitiveRoot.primitiveRoots_one]
| [
" cyclotomic' 0 R = 1",
" cyclotomic' 1 R = X - 1"
] |
import Batteries.Control.ForInStep.Basic
@[simp] theorem ForInStep.bind_done [Monad m] (a : α) (f : α → m (ForInStep α)) :
(ForInStep.done a).bind (m := m) f = pure (.done a) := rfl
@[simp] theorem ForInStep.bind_yield [Monad m] (a : α) (f : α → m (ForInStep α)) :
(ForInStep.yield a).bind (m := m) f = f a :... | .lake/packages/batteries/Batteries/Control/ForInStep/Lemmas.lean | 40 | 42 | theorem ForInStep.bindList_cons' [Monad m] [LawfulMonad m]
(f : α → β → m (ForInStep β)) (s : ForInStep β) (a l) :
s.bindList f (a::l) = s.bind (f a) >>= (·.bindList f l) := by | simp
| [
" bindList f l (done a) = pure (done a)",
" bindList f [] (done a) = pure (done a)",
" bindList f (head✝ :: tail✝) (done a) = pure (done a)",
" (s.bind fun a => bindList f l (yield a)) = bindList f l s",
" ((done a✝).bind fun a => bindList f l (yield a)) = bindList f l (done a✝)",
" ((yield a✝).bind fun a... |
import Mathlib.Init.Core
import Mathlib.LinearAlgebra.AffineSpace.Basis
import Mathlib.LinearAlgebra.FiniteDimensional
#align_import linear_algebra.affine_space.finite_dimensional from "leanprover-community/mathlib"@"67e606eaea14c7854bdc556bd53d98aefdf76ec0"
noncomputable section
open Affine
section DivisionRin... | Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean | 747 | 775 | theorem finrank_vectorSpan_insert_le (s : AffineSubspace k P) (p : P) :
finrank k (vectorSpan k (insert p (s : Set P))) ≤ finrank k s.direction + 1 := by |
by_cases hf : FiniteDimensional k s.direction; swap
· have hf' : ¬FiniteDimensional k (vectorSpan k (insert p (s : Set P))) := by
intro h
have h' : s.direction ≤ vectorSpan k (insert p (s : Set P)) := by
conv_lhs => rw [← affineSpan_coe s, direction_affineSpan]
exact vectorSpan_mono k (... | [
" finrank k ↥(vectorSpan k (insert p ↑s)) ≤ finrank k ↥s.direction + 1",
" ¬FiniteDimensional k ↥(vectorSpan k (insert p ↑s))",
" False",
" s.direction ≤ vectorSpan k (insert p ↑s)",
"k : Type u_1\nV : Type u_2\nP : Type u_3\ninst✝³ : DivisionRing k\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : Aff... |
import Mathlib.Algebra.GroupWithZero.Indicator
import Mathlib.Algebra.Module.Basic
import Mathlib.Topology.Separation
#align_import topology.support from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46"
open Function Set Filter Topology
variable {X α α' β γ δ M E R : Type*}
section One
... | Mathlib/Topology/Support.lean | 63 | 64 | theorem mulTSupport_eq_empty_iff {f : X → α} : mulTSupport f = ∅ ↔ f = 1 := by |
rw [mulTSupport, closure_empty_iff, mulSupport_eq_empty_iff]
| [
" mulTSupport f = ∅ ↔ f = 1"
] |
import Mathlib.Data.DFinsupp.Order
#align_import data.dfinsupp.multiset from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d"
open Function
variable {α : Type*} {β : α → Type*}
namespace Multiset
variable [DecidableEq α] {s t : Multiset α}
def toDFinsupp : Multiset α →+ Π₀ _ : α, ℕ wh... | Mathlib/Data/DFinsupp/Multiset.lean | 75 | 76 | theorem toDFinsupp_singleton (a : α) : toDFinsupp {a} = DFinsupp.single a 1 := by |
rw [← replicate_one, toDFinsupp_replicate]
| [
" toDFinsupp (replicate n a) = DFinsupp.single a n",
" (toDFinsupp (replicate n a)) i = (DFinsupp.single a n) i",
" count i (replicate n a) = (DFinsupp.single a n) i",
" toDFinsupp {a} = DFinsupp.single a 1"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Reverse
import Mathlib.Algebra.Polynomial.Inductions
import Mathlib.RingTheory.Localization.Basic
#align_import data.polynomial.laurent from "leanprover-community/mathlib"@"831c494092374cfe9f50591ed0ac81a25efc5b86"
open Polynomial Func... | Mathlib/Algebra/Polynomial/Laurent.lean | 191 | 191 | theorem T_sub (m n : ℤ) : (T (m - n) : R[T;T⁻¹]) = T m * T (-n) := by | rw [← T_add, sub_eq_add_neg]
| [
" (C t) n = if n = 0 then t else 0",
" (if 0 = n then t else 0) = if n = 0 then t else 0",
" T (m + n) = T m * T n",
" T (m - n) = T m * T (-n)"
] |
import Mathlib.Order.RelClasses
import Mathlib.Order.Interval.Set.Basic
#align_import order.bounded from "leanprover-community/mathlib"@"aba57d4d3dae35460225919dcd82fe91355162f9"
namespace Set
variable {α : Type*} {r : α → α → Prop} {s t : Set α}
theorem Bounded.mono (hst : s ⊆ t) (hs : Bounded r t) : Bounde... | Mathlib/Order/Bounded.lean | 54 | 55 | theorem unbounded_lt_iff [LinearOrder α] : Unbounded (· < ·) s ↔ ∀ a, ∃ b ∈ s, a ≤ b := by |
simp only [Unbounded, not_lt]
| [
" Unbounded (fun x x_1 => x ≤ x_1) s ↔ ∀ (a : α), ∃ b ∈ s, a < b",
" Unbounded (fun x x_1 => x < x_1) s ↔ ∀ (a : α), ∃ b ∈ s, a ≤ b"
] |
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 | 359 | 364 | theorem rank_tensorProduct :
Module.rank S (M ⊗[S] M') =
Cardinal.lift.{v'} (Module.rank S M) * Cardinal.lift.{v} (Module.rank S M') := by |
obtain ⟨⟨_, bM⟩⟩ := Module.Free.exists_basis (R := S) (M := M)
obtain ⟨⟨_, bN⟩⟩ := Module.Free.exists_basis (R := S) (M := M')
rw [← bM.mk_eq_rank'', ← bN.mk_eq_rank'', ← (bM.tensorProduct bN).mk_eq_rank'', Cardinal.mk_prod]
| [
" Module.rank R (ι →₀ M) = lift.{v, w} #ι * lift.{w, v} (Module.rank R M)",
" Module.rank R (ι →₀ M) = #ι * Module.rank R M",
" Module.rank R (ι →₀ R) = lift.{u, w} #ι",
" Module.rank R (ι →₀ R) = #ι",
" Module.rank R (⨁ (i : ι), M i) = sum fun i => Module.rank R (M i)",
" Module.rank R (Matrix m n R) = l... |
import Mathlib.Analysis.NormedSpace.AddTorsorBases
#align_import analysis.convex.intrinsic from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open AffineSubspace Set
open scoped Pointwise
variable {𝕜 V W Q P : Type*}
section AddTorsor
variable (𝕜) [Ring 𝕜] [AddCommGroup V] [Modu... | Mathlib/Analysis/Convex/Intrinsic.lean | 120 | 120 | theorem intrinsicClosure_empty : intrinsicClosure 𝕜 (∅ : Set P) = ∅ := by | simp [intrinsicClosure]
| [
" intrinsicInterior 𝕜 ∅ = ∅",
" intrinsicFrontier 𝕜 ∅ = ∅",
" intrinsicClosure 𝕜 ∅ = ∅"
] |
import Mathlib.RingTheory.PowerSeries.Trunc
import Mathlib.RingTheory.PowerSeries.Inverse
import Mathlib.RingTheory.Derivation.Basic
namespace PowerSeries
open Polynomial Derivation Nat
section CommutativeSemiring
variable {R} [CommSemiring R]
noncomputable def derivativeFun (f : R⟦X⟧) : R⟦X⟧ := mk fun n ↦ coef... | Mathlib/RingTheory/PowerSeries/Derivative.lean | 49 | 53 | theorem derivativeFun_add (f g : R⟦X⟧) :
derivativeFun (f + g) = derivativeFun f + derivativeFun g := by |
ext
rw [coeff_derivativeFun, map_add, map_add, coeff_derivativeFun,
coeff_derivativeFun, add_mul]
| [
" (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)",
" (↑f).derivativeFun = ↑(derivative f)",
" (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)",
" (f + g).derivativeFun = f.derivativeFun + g.derivativeFun",
" (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g.... |
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic
import Mathlib.Analysis.SpecialFunctions.PolarCoord
import Mathlib.Analysis.Convex.Complex
#align_import analysis.special_functions.gaussian from "leanprover-community/mathlib"@"7982767093ae38cba236487f9c9dd9cd99f63c16"
noncomputable section
open Real Set Measu... | Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean | 63 | 89 | theorem integrableOn_rpow_mul_exp_neg_rpow {p s : ℝ} (hs : -1 < s) (hp : 1 ≤ p) :
IntegrableOn (fun x : ℝ => x ^ s * exp (- x ^ p)) (Ioi 0) := by |
obtain hp | hp := le_iff_lt_or_eq.mp hp
· have h_exp : ∀ x, ContinuousAt (fun x => exp (- x)) x := fun x => continuousAt_neg.rexp
rw [← Ioc_union_Ioi_eq_Ioi zero_le_one, integrableOn_union]
constructor
· rw [← integrableOn_Icc_iff_integrableOn_Ioc]
refine IntegrableOn.mul_continuousOn ?_ ?_ isCom... | [
" (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)",
" Tendsto (fun x => -x - -b * x ^ p) atTop atTop",
" (fun x => x * (b * x ^ (p - 1) + -1)) =ᶠ[atTop] fun x => -x - -b * x ^ p",
" x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p",
" x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p",
" b * x ^ p + -x =... |
import Mathlib.Algebra.CharP.Defs
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.PowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Polynomial
open Finset (antidiagonal mem_anti... | Mathlib/RingTheory/PowerSeries/Order.lean | 80 | 84 | theorem coeff_order (h : (order φ).Dom) : coeff R (φ.order.get h) φ ≠ 0 := by |
classical
simp only [order, order_finite_iff_ne_zero.mp h, not_false_iff, dif_neg, PartENat.get_natCast']
generalize_proofs h
exact Nat.find_spec h
| [
" (∃ n, (coeff R n) φ ≠ 0) ↔ φ ≠ 0",
" (¬∃ n, (coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0",
" (∀ (n : ℕ), (coeff R n) φ = 0) ↔ φ = 0",
" φ.order.Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom ↔ φ ≠ 0",
" (if h : φ = 0 then ⊤ else ↑(Nat.find ⋯)).Dom → φ ≠ 0",
" ⊤.Dom → φ ≠ 0",
" (↑(Nat.find ⋯)).Dom → φ ≠... |
import Mathlib.NumberTheory.Padics.PadicNumbers
import Mathlib.RingTheory.DiscreteValuationRing.Basic
#align_import number_theory.padics.padic_integers from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open Padic Metric LocalRing
noncomputable section
open scoped Classical
def Pad... | Mathlib/NumberTheory/Padics/PadicIntegers.lean | 145 | 145 | theorem coe_eq_zero (z : ℤ_[p]) : (z : ℚ_[p]) = 0 ↔ z = 0 := by | rw [← coe_zero, Subtype.coe_inj]
| [
" 1 ∈ { carrier := {x | ‖x‖ ≤ 1}, mul_mem' := ⋯ }.carrier",
" 0 ∈ { carrier := {x | ‖x‖ ≤ 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" Add ↥(subring p)",
" Mul ↥(subring p)",
" Neg ↥(subring p)",
" Sub ↥(subring p)",
" Zero ↥(subring p)",
" ‖1‖ ≤ 1",
" ↑z = 0 ↔ z = 0"
] |
import Mathlib.CategoryTheory.Preadditive.InjectiveResolution
import Mathlib.Algebra.Homology.HomotopyCategory
import Mathlib.Data.Set.Subsingleton
import Mathlib.Tactic.AdaptationNote
#align_import category_theory.abelian.injective_resolution from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde619510... | Mathlib/CategoryTheory/Abelian/InjectiveResolution.lean | 102 | 105 | theorem desc_commutes {Y Z : C} (f : Z ⟶ Y) (I : InjectiveResolution Y)
(J : InjectiveResolution Z) : J.ι ≫ desc f I J = (CochainComplex.single₀ C).map f ≫ I.ι := by |
ext
simp [desc, descFOne, descFZero]
| [
" (ShortComplex.mk (J.ι.f 0) (J.cocomplex.d 0 1) ⋯).f ≫ descFZero f I J ≫ I.cocomplex.d 0 1 = 0",
" J.ι.f 0 ≫ descFZero f I J ≫ I.cocomplex.d 0 1 = 0",
" J.cocomplex.d 0 1 ≫ descFOne f I J = descFZero f I J ≫ I.cocomplex.d 0 1",
" (ShortComplex.mk (J.cocomplex.d n (n + 1)) (J.cocomplex.d (n + 1) (n + 2)) ⋯).f... |
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 | 161 | 163 | theorem Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).fin n := by |
ext
simp
| [
" 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",
" (Ico a b).card = ↑b - ↑a",
" (Ioc a b).card = ↑b - ↑a",
" (Ioo a b).card = ↑b - ↑a - 1",
" (u... |
import Mathlib.Order.Filter.AtTopBot
import Mathlib.Order.Filter.Subsingleton
open Set
variable {α β γ δ : Type*} {l : Filter α} {f : α → β}
namespace Filter
def EventuallyConst (f : α → β) (l : Filter α) : Prop := (map f l).Subsingleton
theorem HasBasis.eventuallyConst_iff {ι : Sort*} {p : ι → Prop} {s : ι → S... | Mathlib/Order/Filter/EventuallyConst.lean | 57 | 59 | theorem eventuallyConst_pred' {p : α → Prop} :
EventuallyConst p l ↔ (p =ᶠ[l] fun _ ↦ False) ∨ (p =ᶠ[l] fun _ ↦ True) := by |
simp only [eventuallyConst_iff_exists_eventuallyEq, Prop.exists_iff]
| [
" (∃ i, p i ∧ (f '' s i).Subsingleton) ↔ ∃ i, p i ∧ ∀ x ∈ s i, ∀ y ∈ s i, f x = f y",
" EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True"
] |
import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine
import Mathlib.Geometry.Euclidean.Sphere.Basic
#align_import geometry.euclidean.sphere.power from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
open Real
open EuclideanGeometry RealInnerProductSpace Real
variable {V : Type*} [... | Mathlib/Geometry/Euclidean/Sphere/Power.lean | 40 | 64 | theorem mul_norm_eq_abs_sub_sq_norm {x y z : V} (h₁ : ∃ k : ℝ, k ≠ 1 ∧ x + y = k • (x - y))
(h₂ : ‖z - y‖ = ‖z + y‖) : ‖x - y‖ * ‖x + y‖ = |‖z + y‖ ^ 2 - ‖z - x‖ ^ 2| := by |
obtain ⟨k, hk_ne_one, hk⟩ := h₁
let r := (k - 1)⁻¹ * (k + 1)
have hxy : x = r • y := by
rw [← smul_smul, eq_inv_smul_iff₀ (sub_ne_zero.mpr hk_ne_one), ← sub_eq_zero]
calc
(k - 1) • x - (k + 1) • y = k • x - x - (k • y + y) := by
simp_rw [sub_smul, add_smul, one_smul]
_ = k • x - k • y... | [
" ‖x - y‖ * ‖x + y‖ = |‖z + y‖ ^ 2 - ‖z - x‖ ^ 2|",
" x = r • y",
" (k - 1) • x - (k + 1) • y = 0",
" (k - 1) • x - (k + 1) • y = k • x - x - (k • y + y)",
" k • x - x - (k • y + y) = k • x - k • y - (x + y)",
" k • x - k • y - (x + y) = k • (x - y) - (x + y)",
" ⟪z, y⟫_ℝ = 0",
" ⟪z, x⟫_ℝ = 0",
" ‖x... |
import Mathlib.Logic.Function.Iterate
import Mathlib.Topology.EMetricSpace.Basic
import Mathlib.Tactic.GCongr
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
va... | Mathlib/Topology/EMetricSpace/Lipschitz.lean | 86 | 88 | theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by |
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
| [
" LipschitzOnWith K f univ ↔ LipschitzWith K f",
" LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f)"
] |
import Mathlib.Init.Data.Nat.Lemmas
import Mathlib.Data.Int.Cast.Defs
import Mathlib.Algebra.Group.Basic
#align_import data.int.cast.basic from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025"
universe u
open Nat
namespace Int
variable {R : Type u} [AddGroupWithOne R]
@[simp, norm_cas... | Mathlib/Data/Int/Cast/Basic.lean | 79 | 80 | theorem cast_one : ((1 : ℤ) : R) = 1 := by |
erw [cast_natCast, Nat.cast_one]
| [
" ↑(OfNat.ofNat n) = OfNat.ofNat n",
" ↑1 = 1"
] |
import Mathlib.Analysis.SpecialFunctions.Integrals
#align_import data.real.pi.wallis from "leanprover-community/mathlib"@"980755c33b9168bc82f774f665eaa27878140fac"
open scoped Real Topology Nat
open Filter Finset intervalIntegral
namespace Real
namespace Wallis
set_option linter.uppercaseLean3 false
noncomp... | Mathlib/Data/Real/Pi/Wallis.lean | 55 | 59 | theorem W_pos (k : ℕ) : 0 < W k := by |
induction' k with k hk
· unfold W; simp
· rw [W_succ]
refine mul_pos hk (mul_pos (div_pos ?_ ?_) (div_pos ?_ ?_)) <;> positivity
| [
" 0 < W k",
" 0 < W 0",
" 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))",
" 0 < W (k + 1)",
" 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))",
" 0 < 2 * ↑k + 2",
" 0 < 2 * ↑k + 1",
" 0 < 2 * ↑k + 3"
] |
import Mathlib.Algebra.MonoidAlgebra.Degree
import Mathlib.Algebra.Polynomial.Coeff
import Mathlib.Algebra.Polynomial.Monomial
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Nat.WithBot
import Mathlib.Data.Nat.Cast.WithTop
import Mathlib.Data.Nat.SuccPred
#align_import data.polynomial.degree.definitions... | Mathlib/Algebra/Polynomial/Degree/Definitions.lean | 157 | 159 | theorem natDegree_eq_of_degree_eq_some {p : R[X]} {n : ℕ} (h : degree p = n) : natDegree p = n := by |
-- Porting note: `Nat.cast_withBot` is required.
rw [natDegree, h, Nat.cast_withBot, WithBot.unbot'_coe]
| [
" Decidable p.Monic",
" Decidable (p.leadingCoeff = 1)",
" p.degree = ⊥",
" p.natDegree = 0",
" p.degree = ↑p.natDegree",
" Option.some n = ↑(WithBot.unbot' 0 (Option.some n))",
" AddMonoidAlgebra.supDegree id p.toFinsupp = p.natDegree",
" AddMonoidAlgebra.supDegree id (toFinsupp 0) = natDegree 0",
... |
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 | 53 | 62 | theorem Real.sSup_smul_of_nonneg (ha : 0 ≤ a) (s : Set ℝ) : sSup (a • s) = a • sSup s := by |
obtain rfl | hs := s.eq_empty_or_nonempty
· rw [smul_set_empty, Real.sSup_empty, smul_zero]
obtain rfl | ha' := ha.eq_or_lt
· rw [zero_smul_set hs, zero_smul]
exact csSup_singleton 0
by_cases h : BddAbove s
· exact ((OrderIso.smulRight ha').map_csSup' hs h).symm
· rw [Real.sSup_of_not_bddAbove (mt (b... | [
" sInf (a • s) = a • sInf s",
" sInf (a • ∅) = a • sInf ∅",
" sInf (0 • s) = 0 • sInf s",
" sInf 0 = 0",
" sSup (a • s) = a • sSup s",
" sSup (a • ∅) = a • sSup ∅",
" sSup (0 • s) = 0 • sSup s",
" sSup 0 = 0"
] |
import Mathlib.Data.Matrix.Invertible
import Mathlib.LinearAlgebra.Matrix.NonsingularInverse
import Mathlib.LinearAlgebra.Matrix.PosDef
#align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af"
variable {l m n α : Type*}
namespace Matrix
... | Mathlib/LinearAlgebra/Matrix/SchurComplement.lean | 107 | 111 | theorem invOf_fromBlocks_zero₁₂_eq (A : Matrix m m α) (C : Matrix n m α) (D : Matrix n n α)
[Invertible A] [Invertible D] [Invertible (fromBlocks A 0 C D)] :
⅟ (fromBlocks A 0 C D) = fromBlocks (⅟ A) 0 (-(⅟ D * C * ⅟ A)) (⅟ D) := by |
letI := fromBlocksZero₁₂Invertible A C D
convert (rfl : ⅟ (fromBlocks A 0 C D) = _)
| [
" A.fromBlocks B C D = fromBlocks 1 0 (C * ⅟A) 1 * A.fromBlocks 0 0 (D - C * ⅟A * B) * fromBlocks 1 (⅟A * B) 0 1",
" (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * ⅟D) 0 1 * (A - B * ⅟D * C).fromBlocks 0 0 D... |
import Mathlib.Topology.Algebra.Group.Basic
import Mathlib.Logic.Function.Iterate
#align_import dynamics.flow from "leanprover-community/mathlib"@"717c073262cd9d59b1a1dcda7e8ab570c5b63370"
open Set Function Filter
section Invariant
variable {τ : Type*} {α : Type*}
def IsInvariant (ϕ : τ → α → α) (s : Set α) ... | Mathlib/Dynamics/Flow.lean | 49 | 50 | theorem isInvariant_iff_image : IsInvariant ϕ s ↔ ∀ t, ϕ t '' s ⊆ s := by |
simp_rw [IsInvariant, mapsTo']
| [
" IsInvariant ϕ s ↔ ∀ (t : τ), ϕ t '' s ⊆ s"
] |
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import algebra.gcd_monoid.multiset from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
namespace Multiset
variable {α : Type*} [CancelCommMonoidWithZero α] [NormalizedG... | Mathlib/Algebra/GCDMonoid/Multiset.lean | 116 | 118 | theorem lcm_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).lcm = GCDMonoid.lcm a s.lcm := by |
rw [← lcm_dedup, dedup_ext.2, lcm_dedup, lcm_cons]
simp
| [
" (s₁ + s₂).lcm = fold GCDMonoid.lcm (GCDMonoid.lcm 1 1) (s₁ + s₂)",
" lcm 0 ∣ a ↔ ∀ b ∈ 0, b ∣ a",
" ∀ (a_1 : α) (s : Multiset α), (s.lcm ∣ a ↔ ∀ b ∈ s, b ∣ a) → ((a_1 ::ₘ s).lcm ∣ a ↔ ∀ b ∈ a_1 ::ₘ s, b ∣ a)",
" normalize (lcm 0) = lcm 0",
" normalize (a ::ₘ s).lcm = (a ::ₘ s).lcm",
" s.lcm = 0 ↔ 0 ∈ s"... |
import Mathlib.Logic.Encodable.Lattice
import Mathlib.MeasureTheory.MeasurableSpace.Defs
#align_import measure_theory.pi_system from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90"
open MeasurableSpace Set
open scoped Classical
open MeasureTheory
def IsPiSystem {α} (C : Set (Set α)) :... | Mathlib/MeasureTheory/PiSystem.lean | 95 | 102 | theorem IsPiSystem.insert_univ {α} {S : Set (Set α)} (h_pi : IsPiSystem S) :
IsPiSystem (insert Set.univ S) := by |
intro s hs t ht hst
cases' hs with hs hs
· cases' ht with ht ht <;> simp [hs, ht]
· cases' ht with ht ht
· simp [hs, ht]
· exact Set.mem_insert_of_mem _ (h_pi s hs t ht hst)
| [
" IsPiSystem {S}",
" s ∩ t ∈ {S}",
" IsPiSystem (insert ∅ S)",
" s ∩ t ∈ insert ∅ S",
" IsPiSystem (insert univ S)",
" s ∩ t ∈ insert univ S"
] |
import Mathlib.Analysis.Complex.Polynomial
import Mathlib.NumberTheory.NumberField.Norm
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.RingTheory.Norm
import Mathlib.Topology.Instances.Complex
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import number_theory.number_field.embeddings from "leanprov... | Mathlib/NumberTheory/NumberField/Embeddings.lean | 54 | 55 | theorem card : Fintype.card (K →+* A) = finrank ℚ K := by |
rw [Fintype.ofEquiv_card RingHom.equivRatAlgHom.symm, AlgHom.card]
| [
" Fintype.card (K →+* A) = finrank ℚ K"
] |
import Mathlib.Init.Core
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.FieldTheory.Galois
#align_import number_theory.cyclotomic.basic from "leanprover-community/mathlib"@"4b05d3f4f0601dca8abf99c4ec99187682ed0bba"
open Polynomial Algebra FiniteD... | Mathlib/NumberTheory/Cyclotomic/Basic.lean | 120 | 126 | theorem singleton_zero_of_bot_eq_top (h : (⊥ : Subalgebra A B) = ⊤) :
IsCyclotomicExtension ∅ A B := by |
-- Porting note: Lean3 is able to infer `A`.
refine (iff_adjoin_eq_top _ A _).2
⟨fun s hs => by simp at hs, _root_.eq_top_iff.2 fun x hx => ?_⟩
rw [← h] at hx
simpa using hx
| [
" IsCyclotomicExtension {n} A B ↔ (∃ r, IsPrimitiveRoot r ↑n) ∧ ∀ (x : B), x ∈ adjoin A {b | b ^ ↑n = 1}",
" ⊥ = ⊤",
" x ∈ ⊥",
" IsCyclotomicExtension ∅ A B",
" ∃ r, IsPrimitiveRoot r ↑s",
" x ∈ adjoin A {b | ∃ n ∈ ∅, b ^ ↑n = 1}"
] |
import Mathlib.Data.Option.Basic
import Mathlib.Data.Set.Basic
#align_import data.pequiv from "leanprover-community/mathlib"@"7c3269ca3fa4c0c19e4d127cd7151edbdbf99ed4"
universe u v w x
structure PEquiv (α : Type u) (β : Type v) where
toFun : α → Option β
invFun : β → Option α
inv : ∀ (a : α) (b :... | Mathlib/Data/PEquiv.lean | 174 | 175 | theorem trans_refl (f : α ≃. β) : f.trans (PEquiv.refl β) = f := by |
ext; dsimp [PEquiv.trans]; simp
| [
" Injective toFun",
" { toFun := f₁, invFun := f₂, inv := hf } = { toFun := f₁, invFun := g₂, inv := hg }",
" x ∈ f₂ y ↔ x ∈ g₂ y",
" a ∈ (fun a => (g.symm a).bind ⇑f.symm) b ↔ b ∈ (fun a => (f a).bind ⇑g) a",
" f.symm.symm = f",
" { toFun := toFun✝, invFun := invFun✝, inv := inv✝ }.symm.symm = { toFun :=... |
import Mathlib.Algebra.Regular.Basic
import Mathlib.GroupTheory.GroupAction.Hom
#align_import algebra.regular.smul from "leanprover-community/mathlib"@"550b58538991c8977703fdeb7c9d51a5aa27df11"
variable {R S : Type*} (M : Type*) {a b : R} {s : S}
def IsSMulRegular [SMul R M] (c : R) :=
Function.Injective ((c ... | Mathlib/Algebra/Regular/SMul.lean | 240 | 242 | theorem isSMulRegular_of_group [MulAction G R] (g : G) : IsSMulRegular R g := by |
intro x y h
convert congr_arg (g⁻¹ • ·) h using 1 <;> simp [← smul_assoc]
| [
" IsSMulRegular R g",
" x = y",
" x = g⁻¹ • (fun x => g • x) x",
" y = g⁻¹ • (fun x => g • x) y"
] |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
theorem Int.Prime.dvd_mul {m n : ℤ} {p : ℕ} (hp : Nat.Prime p) (h : (p ... | Mathlib/RingTheory/Int/Basic.lean | 139 | 141 | theorem span_natAbs (a : ℤ) : Ideal.span ({(a.natAbs : ℤ)} : Set ℤ) = Ideal.span {a} := by |
rw [Ideal.span_singleton_eq_span_singleton]
exact (associated_natAbs _).symm
| [
" p ∣ m.natAbs ∨ p ∣ n.natAbs",
" ↑p ∣ m ∨ ↑p ∣ n",
" p ∣ n.natAbs",
" ↑p ∣ n",
" p = 2 ∨ p ∣ m.natAbs",
" p = 2",
" p ∣ m.natAbs",
" ∃ p, Prime p ∧ p ∣ n",
" Ideal.span {↑a.natAbs} = Ideal.span {a}",
" Associated (↑a.natAbs) a"
] |
import Mathlib.FieldTheory.Fixed
import Mathlib.FieldTheory.NormalClosure
import Mathlib.FieldTheory.PrimitiveElement
import Mathlib.GroupTheory.GroupAction.FixingSubgroup
#align_import field_theory.galois from "leanprover-community/mathlib"@"9fb8964792b4237dac6200193a0d533f1b3f7423"
open scoped Polynomial Interm... | Mathlib/FieldTheory/Galois.lean | 103 | 125 | theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
Fintype.card (E ≃ₐ[F] E) = finrank F E := by |
cases' Field.exists_primitive_element F E with α hα
let iso : F⟮α⟯ ≃ₐ[F] E :=
{ toFun := fun e => e.val
invFun := fun e => ⟨e, by rw [hα]; exact IntermediateField.mem_top⟩
left_inv := fun _ => by ext; rfl
right_inv := fun _ => rfl
map_mul' := fun _ _ => rfl
map_add' := fun _ _ => ... | [
" Fintype.card (↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯) = finrank F ↥F⟮α⟯",
" Fintype.card (↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯) = (minpoly F α).natDegree",
" Fintype.card (↥F⟮α⟯ ≃ₐ[F] ↥F⟮α⟯) = Fintype.card (↥F⟮α⟯ →ₐ[F] ↥F⟮α⟯)",
" Fintype.card (E ≃ₐ[F] E) = finrank F E",
" e ∈ F⟮α⟯",
" e ∈ ⊤",
" (fun e => ⟨e, ⋯⟩) ((fun e => ↑e) x✝) = x✝",
... |
import Mathlib.Data.Nat.Choose.Dvd
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand
#align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf1682e59106d6c942434a32"
universe u ... | Mathlib/RingTheory/Polynomial/Eisenstein/IsIntegral.lean | 77 | 117 | theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (n : ℕ) :
((cyclotomic (p ^ (n + 1)) ℤ).comp (X + 1)).IsEisensteinAt 𝓟 := by |
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_
(Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (mod_cast hp.out.ne_zero)).2 <|
Nat.prime_iff_prime_int.1 hp.out) ?_ ?_
· rw [show (X + 1 : ℤ[X]) = X + C 1 by simp]
refine (cyclotomic.monic _ ℤ).comp (monic_X_add_C 1) fun h => ?_
rw [natDe... | [
" ((cyclotomic p ℤ).comp (X + 1)).IsEisensteinAt (Submodule.span ℤ {↑p})",
" ((cyclotomic p ℤ).comp (X + 1)).Monic",
" X + 1 = X + C 1",
" ((cyclotomic p ℤ).comp (X + C 1)).Monic",
" False",
" ((cyclotomic p ℤ).comp (X + 1)).coeff i ∈ Submodule.span ℤ {↑p}",
" ∑ x ∈ range p, (lcoeff ℤ i) (↑(p.choose (x ... |
import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace
#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
noncomputable section
open Set TopologicalSpace
open scoped Manifold Topology
variable {𝕜 B F : Type*} [Topolog... | Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean | 74 | 82 | theorem source_trans_partialHomeomorph (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] ... |
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
| [
" (partialHomeomorph φ hU hφ h2φ ≫ₕ partialHomeomorph φ' hU' hφ' h2φ').source = (U ∩ U') ×ˢ univ",
" ({ toFun := fun x => (x.1, (φ x.1) x.2), invFun := fun x => (x.1, (φ x.1).symm x.2), source := U ×ˢ univ,\n target := U ×ˢ univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯, open_s... |
import Mathlib.GroupTheory.Solvable
import Mathlib.FieldTheory.PolynomialGaloisGroup
import Mathlib.RingTheory.RootsOfUnity.Basic
#align_import field_theory.abel_ruffini from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a"
noncomputable section
open scoped Classical Polynomial Intermedi... | Mathlib/FieldTheory/AbelRuffini.lean | 45 | 45 | theorem gal_C_isSolvable (x : F) : IsSolvable (C x).Gal := by | infer_instance
| [
" IsSolvable (Gal 0)",
" IsSolvable (Gal 1)",
" IsSolvable (C x).Gal"
] |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Topology.Compactness.Paracompact
import Mathlib.Topology.Metrizable.Urysohn
#align_import geometry.manifold.metrizable from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
open TopologicalSpace
| Mathlib/Geometry/Manifold/Metrizable.lean | 24 | 31 | theorem ManifoldWithCorners.metrizableSpace {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[FiniteDimensional ℝ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H)
(M : Type*) [TopologicalSpace M] [ChartedSpace H M] [SigmaCompactSpace M] [T2Space M] :
MetrizableSpace M := by |
haveI := I.locallyCompactSpace; haveI := ChartedSpace.locallyCompactSpace H M
haveI := I.secondCountableTopology
haveI := ChartedSpace.secondCountable_of_sigma_compact H M
exact metrizableSpace_of_t3_second_countable M
| [
" MetrizableSpace M"
] |
import Mathlib.Algebra.GCDMonoid.Multiset
import Mathlib.Combinatorics.Enumerative.Partition
import Mathlib.Data.List.Rotate
import Mathlib.GroupTheory.Perm.Cycle.Factors
import Mathlib.GroupTheory.Perm.Closure
import Mathlib.Algebra.GCDMonoid.Nat
import Mathlib.Tactic.NormNum.GCD
#align_import group_theory.perm.cycl... | Mathlib/GroupTheory/Perm/Cycle/Type.lean | 122 | 126 | theorem Disjoint.cycleType {σ τ : Perm α} (h : Disjoint σ τ) :
(σ * τ).cycleType = σ.cycleType + τ.cycleType := by |
rw [cycleType_def, cycleType_def, cycleType_def, h.cycleFactorsFinset_mul_eq_union, ←
Multiset.map_add, Finset.union_val, Multiset.add_eq_union_iff_disjoint.mpr _]
exact Finset.disjoint_val.2 h.disjoint_cycleFactorsFinset
| [
" σ.cycleType = Multiset.map (Finset.card ∘ support) s.val",
" Multiset.map (Finset.card ∘ support) σ.cycleFactorsFinset.val = Multiset.map (Finset.card ∘ support) s.val",
" σ.cycleFactorsFinset = s",
" (∀ f ∈ s, f.IsCycle) ∧ ∃ (h : (↑s).Pairwise Disjoint), s.noncommProd id ⋯ = σ",
" σ.cycleType = ↑(List.ma... |
import Mathlib.Topology.EMetricSpace.Paracompact
import Mathlib.Topology.Instances.ENNReal
import Mathlib.Analysis.Convex.PartitionOfUnity
#align_import topology.metric_space.partition_of_unity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open Topology ENNReal NNReal Filter Set Fu... | Mathlib/Topology/MetricSpace/PartitionOfUnity.lean | 100 | 106 | theorem exists_continuous_nnreal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
(hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) :
∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i := by |
rcases exists_continuous_real_forall_closedBall_subset hK hU hKU hfin with ⟨δ, hδ₀, hδ⟩
lift δ to C(X, ℝ≥0) using fun x => (hδ₀ x).le
refine ⟨δ, hδ₀, fun i x hi => ?_⟩
simpa only [← ENNReal.ofReal_coe_nnreal] using hδ i x hi
| [
" ∀ᶠ (p : ℝ≥0∞ × X) in 𝓝 0 ×ˢ 𝓝 x, ∀ (i : ι), p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i",
" {x_1 |\n x_1 ∈ Prod.snd ⁻¹' ⋂ i, ⋂ (_ : x ∉ K i), (K i)ᶜ →\n x_1 ∈\n {x_2 |\n x_2 ∈ {x_3 | (fun x_4 => ∀ i ∈ {b | x ∈ K b}, closedBall x_4.2 x_4.1 ⊆ U i) x_3} →\n x_2 ∈ {x | (fun p... |
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 | 139 | 139 | theorem rdropWhile_eq_nil_iff : rdropWhile p l = [] ↔ ∀ x ∈ l, p x := by | simp [rdropWhile]
| [
" [].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.Topology.Separation
#align_import topology.sober from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
open Set
variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
section genericPoint
def IsGenericPoint (x : α) (S : Set α) : Prop :=
closure ({x} : Set α)... | Mathlib/Topology/Sober.lean | 92 | 93 | theorem disjoint_iff (h : IsGenericPoint x S) (hU : IsOpen U) : Disjoint S U ↔ x ∉ U := by |
rw [h.mem_open_set_iff hU, ← not_disjoint_iff_nonempty_inter, Classical.not_not]
| [
" IsGenericPoint x S ↔ ∀ (y : α), x ⤳ y ↔ y ∈ S",
" Disjoint S U ↔ x ∉ U"
] |
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Order.BigOperators.Group.List
import Mathlib.Data.Set.Pointwise.SMul
import Mathlib.Order.WellFoundedSet
#align_import group_theory.submonoid.pointwise from "leanprover-community/mathlib"@"2bbc7e3884ba234309d2a43b19144105a753292e"
open Set P... | Mathlib/Algebra/Group/Submonoid/Pointwise.lean | 98 | 107 | theorem pow_smul_mem_closure_smul {N : Type*} [CommMonoid N] [MulAction M N] [IsScalarTower M N N]
(r : M) (s : Set N) {x : N} (hx : x ∈ closure s) : ∃ n : ℕ, r ^ n • x ∈ closure (r • s) := by |
refine @closure_induction N _ s (fun x : N => ∃ n : ℕ, r ^ n • x ∈ closure (r • s)) _ hx ?_ ?_ ?_
· intro x hx
exact ⟨1, subset_closure ⟨_, hx, by rw [pow_one]⟩⟩
· exact ⟨0, by simpa using one_mem _⟩
· rintro x y ⟨nx, hx⟩ ⟨ny, hy⟩
use ny + nx
rw [pow_add, mul_smul, ← smul_mul_assoc, mul_comm, ← smu... | [
" ↑s * ↑s = ↑s",
" x ∈ ↑s * ↑s ↔ x ∈ ↑s",
" x ∈ ↑s * ↑s → x ∈ ↑s",
" (fun x x_1 => x * x_1) a b ∈ ↑s",
" closure ↑H ⊔ closure ↑K ≤ H ⊔ K",
" ∃ n, r ^ n • x ∈ closure (r • s)",
" ∀ x ∈ s, (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) x",
" (fun x => r • x) x = r ^ 1 • x",
" (fun x => ∃ n, r ^ n • x ∈ c... |
import Mathlib.Algebra.Ring.Prod
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.Tactic.FinCases
#align_import data.zmod.basic from "leanprover-community/mathlib"@"74ad1c88c77e799d2fea62801d1dbbd698cff1b7"
assert_not_exists Submodule
open Function
namespace ZMod
instance charZero : CharZero (ZMod 0) :=... | Mathlib/Data/ZMod/Basic.lean | 176 | 180 | theorem cast_zero : (cast (0 : ZMod n) : R) = 0 := by |
delta ZMod.cast
cases n
· exact Int.cast_zero
· simp
| [
" a.val < n",
" a.val < 0",
" a.val < n✝ + 1",
" (↑a).val = a % n",
" (↑a).val = a % 0",
" (↑a).val = a",
" (↑a).val = a % (n✝ + 1)",
" IsUnit n ↔ n.val = 1",
" IsUnit n ↔ Int.natAbs n = 1",
" n = 1",
" ∀ (x : ℕ), ↑x = 0 ↔ n ∣ x",
" ↑k = 0 ↔ n ∣ k",
" ↑k = 0 ↔ 0 ∣ k",
" ↑k = 0 ↔ n + 1 ∣ k"... |
import Mathlib.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 | 58 | 61 | theorem eval₂_at_zero : p.eval₂ f 0 = f (coeff p 0) := by |
simp (config := { contextual := true }) only [eval₂_eq_sum, zero_pow_eq, mul_ite, mul_zero,
mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff,
RingHom.map_zero, imp_true_iff, eq_self_iff_true]
| [
" 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)"
] |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.Lifts
import Mathlib.GroupTheory.MonoidLocalization
import Mathlib.RingTheory.Algebraic
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Localization.FractionRing
import M... | Mathlib/RingTheory/Localization/Integral.lean | 185 | 201 | theorem RingHom.isIntegralElem_localization_at_leadingCoeff {R S : Type*} [CommRing R] [CommRing S]
(f : R →+* S) (x : S) (p : R[X]) (hf : p.eval₂ f x = 0) (M : Submonoid R)
(hM : p.leadingCoeff ∈ M) {Rₘ Sₘ : Type*} [CommRing Rₘ] [CommRing Sₘ] [Algebra R Rₘ]
[IsLocalization M Rₘ] [Algebra S Sₘ] [IsLocalizat... |
by_cases triv : (1 : Rₘ) = 0
· exact ⟨0, ⟨_root_.trans leadingCoeff_zero triv.symm, eval₂_zero _ _⟩⟩
haveI : Nontrivial Rₘ := nontrivial_of_ne 1 0 triv
obtain ⟨b, hb⟩ := isUnit_iff_exists_inv.mp (map_units Rₘ ⟨p.leadingCoeff, hM⟩)
refine ⟨p.map (algebraMap R Rₘ) * C b, ⟨?_, ?_⟩⟩
· refine monic_mul_C_of_lea... | [
" (map Sₘ f ⋯).IsIntegralElem ((algebraMap S Sₘ) x)",
" (Polynomial.map (algebraMap R Rₘ) p * C b).Monic",
" (Polynomial.map (algebraMap R Rₘ) p).leadingCoeff * b = 1",
" (algebraMap R Rₘ) p.leadingCoeff ≠ 0",
" eval₂ (map Sₘ f ⋯) ((algebraMap S Sₘ) x) (Polynomial.map (algebraMap R Rₘ) p * C b) = 0",
" ev... |
import Mathlib.Probability.Notation
import Mathlib.Probability.Density
import Mathlib.Probability.ConditionalProbability
import Mathlib.Probability.ProbabilityMassFunction.Constructions
open scoped Classical MeasureTheory NNReal ENNReal
-- TODO: We can't `open ProbabilityTheory` without opening the `ProbabilityThe... | Mathlib/Probability/Distributions/Uniform.lean | 105 | 111 | theorem hasPDF {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)
(hu : IsUniform X s ℙ μ) : HasPDF X ℙ μ := by |
let t := toMeasurable μ s
apply hasPDF_of_map_eq_withDensity (hu.aemeasurable hns hnt) (t.indicator ((μ t)⁻¹ • 1)) <|
(measurable_one.aemeasurable.const_smul (μ t)⁻¹).indicator (measurableSet_toMeasurable μ s)
rw [hu, withDensity_indicator (measurableSet_toMeasurable μ s), withDensity_smul _ measurable_one,
... | [
" AEMeasurable X ℙ",
" False",
" 0 = 1",
" 0 Set.univ = 1",
" Measure.map X ℙ ≪ μ",
" ProbabilityTheory.cond μ s ≪ μ",
" ℙ (X ⁻¹' A) = μ (s ∩ A) / μ s",
" ℙ Set.univ = 1",
" IsUniform X (toMeasurable μ s) ℙ μ ↔ IsUniform X s ℙ μ",
" Measure.map X ℙ = ProbabilityTheory.cond μ (toMeasurable μ s) ↔ M... |
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.RingTheory.IntegralClosure
import Mathlib.RingTheory.Polynomial.IntegralNormalization
#align_import ring_theory.algebraic from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
universe u v w
open scoped Classical
open Polynomi... | Mathlib/RingTheory/Algebraic.lean | 128 | 131 | theorem isAlgebraic_rat (R : Type u) {A : Type v} [DivisionRing A] [Field R] [Algebra R A] (n : ℚ) :
IsAlgebraic R (n : A) := by |
rw [← map_ratCast (algebraMap R A)]
exact isAlgebraic_algebraMap (Rat.cast n)
| [
" S.IsAlgebraic ↔ Algebra.IsAlgebraic R ↥S",
" (∀ x ∈ S, _root_.IsAlgebraic R x) ↔ Algebra.IsAlgebraic R ↥S",
" (∀ (x : ↥S), _root_.IsAlgebraic R ↑x) ↔ ∀ (x : ↥S), _root_.IsAlgebraic R x",
" (aeval ↑x) p = 0 ↔ (aeval x) p = 0",
"R : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R... |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Data.Complex.Exponential
import Mathlib.Data.Complex.Module
import Mathlib.RingTheory.Polynomial.Chebyshev
#align_import analysis.special_functions.trigonometric.chebyshev from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
set_... | Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean | 92 | 105 | theorem U_complex_cos (n : ℤ) : (U ℂ n).eval (cos θ) * sin θ = sin ((n + 1) * θ) := by |
induction n using Polynomial.Chebyshev.induct with
| zero => simp
| one => simp [one_add_one_eq_two, sin_two_mul]; ring
| add_two n ih1 ih2 =>
simp only [U_add_two, add_sub_cancel_right, eval_sub, eval_mul, eval_X, eval_ofNat, sub_mul,
mul_assoc, ih1, ih2, sub_eq_iff_eq_add, sin_add_sin]
push_cas... | [
" (aeval x) (T R n) = eval x (T A n)",
" (aeval x) (U R n) = eval x (U A n)",
" (algebraMap R A) (eval x (T R n)) = eval ((algebraMap R A) x) (T A n)",
" (algebraMap R A) (eval x (U R n)) = eval ((algebraMap R A) x) (U A n)",
" eval θ.cos (T ℂ n) = (↑n * θ).cos",
" eval θ.cos (T ℂ 0) = (↑0 * θ).cos",
" ... |
import Mathlib.Algebra.CharP.Two
import Mathlib.Algebra.CharP.Reduced
import Mathlib.Algebra.NeZero
import Mathlib.Algebra.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.NumberTheory.Divisors
import Mathlib.RingTheory.IntegralDomain
import Mathlib.Tactic.Zify
#align_import rin... | Mathlib/RingTheory/RootsOfUnity/Basic.lean | 335 | 342 | theorem mk_of_lt (ζ : M) (hk : 0 < k) (h1 : ζ ^ k = 1) (h : ∀ l : ℕ, 0 < l → l < k → ζ ^ l ≠ 1) :
IsPrimitiveRoot ζ k := by |
refine ⟨h1, fun l hl => ?_⟩
suffices k.gcd l = k by exact this ▸ k.gcd_dvd_right l
rw [eq_iff_le_not_lt]
refine ⟨Nat.le_of_dvd hk (k.gcd_dvd_left l), ?_⟩
intro h'; apply h _ (Nat.gcd_pos_of_pos_left _ hk) h'
exact pow_gcd_eq_one _ h1 hl
| [
" a✝ * b✝ ∈ {ζ | ζ ^ ↑k = 1}",
" x✝¹⁻¹ ∈ { carrier := {ζ | ζ ^ ↑k = 1}, mul_mem' := ⋯, one_mem' := ⋯ }.carrier",
" ζ ∈ rootsOfUnity k M ↔ ↑ζ ^ ↑k = 1",
" ζ ^ ↑k = 1 ↔ ↑ζ ^ ↑k = 1",
" rootsOfUnity 1 M = ⊥",
" x✝ ∈ rootsOfUnity 1 M ↔ x✝ ∈ ⊥",
" rootsOfUnity k M ≤ rootsOfUnity l M",
" rootsOfUnity k M ≤ ... |
import Mathlib.Init.Control.Combinators
import Mathlib.Init.Function
import Mathlib.Tactic.CasesM
import Mathlib.Tactic.Attr.Core
#align_import control.basic from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
universe u v w
variable {α β γ : Type u}
section Applicative
variable {F : ... | Mathlib/Control/Basic.lean | 68 | 70 | theorem map_seq (f : β → γ) (x : F (α → β)) (y : F α) :
f <$> (x <*> y) = (f ∘ ·) <$> x <*> y := by |
simp only [← pure_seq]; simp [seq_assoc]
| [
" (Seq.seq x fun x => f <$> y) = Seq.seq ((fun x => x ∘ f) <$> x) fun x => y",
" (Seq.seq x fun x => Seq.seq (pure f) fun x => y) = Seq.seq (Seq.seq (pure fun x => x ∘ f) fun x_1 => x) fun x => y",
" (Seq.seq ((fun x x_1 => x (f x_1)) <$> x) fun x => y) =\n Seq.seq (Seq.seq (pure fun x x_1 => x (f x_1)) fun ... |
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.RingTheory.DedekindDomain.Ideal
#align_import ring_theory.class_group from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950"
variable {R K L : Type*} [CommRing R]
variable [Field K] [Field L] [DecidableEq L]
variable [Algebra R K] [Is... | Mathlib/RingTheory/ClassGroup.lean | 119 | 123 | theorem ClassGroup.mk_eq_mk {I J : (FractionalIdeal R⁰ <| FractionRing R)ˣ} :
ClassGroup.mk I = ClassGroup.mk J ↔
∃ x : (FractionRing R)ˣ, I * toPrincipalIdeal R (FractionRing R) x = J := by |
erw [QuotientGroup.mk'_eq_mk', canonicalEquiv_self, Units.map_id, Set.exists_range_iff]
rfl
| [
" spanSingleton R⁰ ↑x * spanSingleton R⁰ (↑x)⁻¹ = 1",
" spanSingleton R⁰ (↑x)⁻¹ * spanSingleton R⁰ ↑x = 1",
" ↑((fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, val_inv := ⋯, inv_val := ⋯ }) 1) = ↑1",
" ↑({ toFun := fun x => { val := spanSingleton R⁰ ↑x, inv := spanSingleton R⁰ (↑x)⁻¹, ... |
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Function Multiset
variable {ι : Type*}
namespace Finset
section SigmaLift
variable {α β γ : ι → Type*} [DecidableEq ι]
def sigm... | Mathlib/Data/Finset/Sigma.lean | 198 | 201 | theorem sigmaLift_nonempty :
(sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h ▸ a.2) b.2).Nonempty := by |
simp_rw [nonempty_iff_ne_empty, sigmaLift]
split_ifs with h <;> simp [h]
| [
" x ∈ sigmaLift f a b ↔ ∃ (ha : a.fst = x.fst) (hb : b.fst = x.fst), x.snd ∈ f (ha ▸ a.snd) (hb ▸ b.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨j, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.fst) (hb : ⟨j, b⟩.fst = x.fst), x.snd ∈ f (ha ▸ ⟨i, a⟩.snd) (hb ▸ ⟨j, b⟩.snd)",
" x ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔\n ∃ (ha : ⟨i, a⟩.fst = x.f... |
import Mathlib.LinearAlgebra.Matrix.Adjugate
import Mathlib.RingTheory.PolynomialAlgebra
#align_import linear_algebra.matrix.charpoly.basic from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
universe u v w
namespace Matrix
open Finset Matrix Polynomial
variable... | Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean | 55 | 57 | theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i) := by |
simp only [charmatrix, RingHom.mapMatrix_apply, sub_apply, scalar_apply, map_apply,
diagonal_apply_eq]
| [
" M.charmatrix i i = X - C (M i i)"
] |
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Analysis.Convex.Hull
import Mathlib.LinearAlgebra.AffineSpace.Basis
#align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
open Set Function
open scoped Classical
open Pointwise
... | Mathlib/Analysis/Convex/Combination.lean | 82 | 84 | theorem Finset.centerMass_eq_of_sum_1 (hw : ∑ i ∈ t, w i = 1) :
t.centerMass w z = ∑ i ∈ t, w i • z i := by |
simp only [Finset.centerMass, hw, inv_one, one_smul]
| [
" ∅.centerMass w z = 0",
" {i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j",
" (insert i t).centerMass w z =\n (w i / (w i + ∑ j ∈ t, w j)) • z i + ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z",
" (w i / (w i + ∑ i ∈ t, w i)) • z i + (w i + ∑ i ∈ t, w i)⁻¹ • ∑ i ... |
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 | 87 | 92 | theorem succ_nth_stream_eq_some_iff {ifp_succ_n : IntFractPair K} :
IntFractPair.stream v (n + 1) = some ifp_succ_n ↔
∃ ifp_n : IntFractPair K,
IntFractPair.stream v n = some ifp_n ∧
ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n := by |
simp [IntFractPair.stream, ite_eq_iff, Option.bind_eq_some]
| [
" 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.Algebra.Order.Field.Basic
import Mathlib.Combinatorics.SimpleGraph.Basic
import Mathlib.Data.Rat.Cast.Order
import Mathlib.Order.Partition.Finpartition
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
#align_import combinatorics.simp... | Mathlib/Combinatorics/SimpleGraph/Density.lean | 136 | 137 | theorem edgeDensity_nonneg (s : Finset α) (t : Finset β) : 0 ≤ edgeDensity r s t := by |
apply div_nonneg <;> exact mod_cast Nat.zero_le _
| [
" x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2",
" interedges r ∅ t = ∅",
" x ∈ interedges r s₂ t₂ → x ∈ interedges r s₁ t₁",
" x.1 ∈ s₂ ∧ x.2 ∈ t₂ ∧ r x.1 x.2 → x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2",
" (interedges r s t).card + (interedges (fun x y => ¬r x y) s t).card = s.card * t.card",
" Disjoint (... |
import Mathlib.Data.Vector.Basic
#align_import data.vector.mem from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
namespace Vector
variable {α β : Type*} {n : ℕ} (a a' : α)
@[simp]
theorem get_mem (i : Fin n) (v : Vector α n) : v.get i ∈ v.toList := by
rw [get_eq_get]
exact List.... | Mathlib/Data/Vector/Mem.lean | 52 | 54 | theorem mem_succ_iff (v : Vector α (n + 1)) : a ∈ v.toList ↔ a = v.head ∨ a ∈ v.tail.toList := by |
obtain ⟨a', v', h⟩ := exists_eq_cons v
simp_rw [h, Vector.mem_cons_iff, Vector.head_cons, Vector.tail_cons]
| [
" v.get i ∈ v.toList",
" v.toList.get (Fin.cast ⋯ i) ∈ v.toList",
" a ∈ v.toList ↔ ∃ i, v.get i = a",
" (∃ i, ∃ (h : i < v.toList.length), v.toList.get ⟨i, h⟩ = a) ↔ ∃ i, ∃ (h : i < n), v.toList.get (Fin.cast ⋯ ⟨i, h⟩) = a",
" i < n",
" i < v.toList.length",
" a ∉ nil.toList",
" a ∉ toList ⟨[], ⋯⟩",
... |
import Mathlib.NumberTheory.DirichletCharacter.Bounds
import Mathlib.NumberTheory.EulerProduct.Basic
import Mathlib.NumberTheory.LSeries.Basic
import Mathlib.NumberTheory.LSeries.RiemannZeta
open Complex
variable {s : ℂ}
noncomputable
def riemannZetaSummandHom (hs : s ≠ 0) : ℕ →*₀ ℂ where
toFun n := (n : ℂ) ^ ... | Mathlib/NumberTheory/EulerProduct/DirichletLSeries.lean | 129 | 133 | theorem dirichletLSeries_eulerProduct {N : ℕ} (χ : DirichletCharacter ℂ N) (hs : 1 < s.re) :
Tendsto (fun n : ℕ ↦ ∏ p ∈ primesBelow n, (1 - χ p * (p : ℂ) ^ (-s))⁻¹) atTop
(𝓝 (L ↗χ s)) := by |
rw [← tsum_dirichletSummand χ hs]
apply eulerProduct_completely_multiplicative <| summable_dirichletSummand χ hs
| [
" (fun n => ↑n ^ (-s)) 0 = 0",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun 1 = 1",
" { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun (m * n) =\n { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun m * { toFun := fun n => ↑n ^ (-s), map_zero' := ⋯ }.toFun n",
" (fun n_1 => χ ↑n_1 * ↑n_1 ... |
import Mathlib.CategoryTheory.Preadditive.Basic
#align_import category_theory.preadditive.functor_category from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb5bffd3"
namespace CategoryTheory
open CategoryTheory.Limits Preadditive
variable {C D : Type*} [Category C] [Category D] [Preadditive D... | Mathlib/CategoryTheory/Preadditive/FunctorCategory.lean | 127 | 129 | theorem app_sum {ι : Type*} (s : Finset ι) (X : C) (α : ι → (F ⟶ G)) :
(∑ i ∈ s, α i).app X = ∑ i ∈ s, (α i).app X := by |
simp only [← appHom_apply, map_sum]
| [
" ∀ (a b c : F ⟶ G), a + b + c = a + (b + c)",
" a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)",
" (a✝ + b✝ + c✝).app x✝ = (a✝ + (b✝ + c✝)).app x✝",
" ∀ (a : F ⟶ G), 0 + a = a",
" 0 + a✝ = a✝",
" (0 + a✝).app x✝ = a✝.app x✝",
" ∀ (a : F ⟶ G), a + 0 = a",
" a✝ + 0 = a✝",
" (a✝ + 0).app x✝ = a✝.app x✝",
" ∀ (a b : ... |
import Mathlib.CategoryTheory.Comma.StructuredArrow
import Mathlib.CategoryTheory.IsConnected
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Terminal
import Mathlib.CategoryTheory.Limits.Shapes.Types
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Limits.Yoneda
import Mathlib.Category... | Mathlib/CategoryTheory/Limits/Final.lean | 386 | 404 | theorem zigzag_of_eqvGen_quot_rel {F : C ⥤ D} {d : D} {f₁ f₂ : ΣX, d ⟶ F.obj X}
(t : EqvGen (Types.Quot.Rel.{v, v} (F ⋙ coyoneda.obj (op d))) f₁ f₂) :
Zigzag (StructuredArrow.mk f₁.2) (StructuredArrow.mk f₂.2) := by |
induction t with
| rel x y r =>
obtain ⟨f, w⟩ := r
fconstructor
swap
· fconstructor
left; fconstructor
exact StructuredArrow.homMk f
| refl => fconstructor
| symm x y _ ih =>
apply zigzag_symmetric
exact ih
| trans x y z _ _ ih₁ ih₂ =>
apply Relation.ReflTransGen.trans
... | [
" u.hom ≫ R.map ((adj.homEquiv c f.right).symm f.hom) = f.hom",
" u.hom ≫ R.map ((adj.homEquiv c g.right).symm g.hom) = g.hom",
" L.map ((adj.homEquiv f.left d) f.hom) ≫ u.hom = f.hom",
" L.map ((adj.homEquiv g.left d) g.hom) ≫ u.hom = g.hom",
" Zigzag (StructuredArrow.mk f₁.snd) (StructuredArrow.mk f₂.snd)... |
import Mathlib.Analysis.InnerProductSpace.Dual
#align_import analysis.inner_product_space.lax_milgram from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5"
noncomputable section
open RCLike LinearMap ContinuousLinearMap InnerProductSpace
open LinearMap (ker range)
open RealInnerProduct... | Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean | 74 | 77 | theorem ker_eq_bot (coercive : IsCoercive B) : ker B♯ = ⊥ := by |
rw [LinearMapClass.ker_eq_bot]
rcases coercive.antilipschitz with ⟨_, _, antilipschitz⟩
exact antilipschitz.injective
| [
" ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖",
" C * ‖v‖ * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖ * ‖v‖",
" v = 0",
" ∃ C, 0 < C ∧ AntilipschitzWith C ⇑(continuousLinear... |
import Mathlib.Data.PFunctor.Univariate.Basic
#align_import data.pfunctor.univariate.M from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1"
universe u v w
open Nat Function
open List
variable (F : PFunctor.{u})
-- Porting note: the ♯ tactic is never used
-- local prefix:0 "♯" => cast... | Mathlib/Data/PFunctor/Univariate/M.lean | 152 | 174 | theorem head_succ' (n m : ℕ) (x : ∀ n, CofixA F n) (Hconsistent : AllAgree x) :
head' (x (succ n)) = head' (x (succ m)) := by |
suffices ∀ n, head' (x (succ n)) = head' (x 1) by simp [this]
clear m n
intro n
cases' h₀ : x (succ n) with _ i₀ f₀
cases' h₁ : x 1 with _ i₁ f₁
dsimp only [head']
induction' n with n n_ih
· rw [h₁] at h₀
cases h₀
trivial
· have H := Hconsistent (succ n)
cases' h₂ : x (succ n) with _ i₂ f... | [
" x = CofixA.intro (head' x) (children' x)",
" CofixA.intro a✝¹ a✝ = CofixA.intro (head' (CofixA.intro a✝¹ a✝)) (children' (CofixA.intro a✝¹ a✝))",
" Agree x y",
" Agree (children' x i) (children' y j)",
" Agree (children' (CofixA.intro a✝ x✝) i) (children' (CofixA.intro a✝ x'✝) j)",
" Agree (children' (C... |
import Mathlib.Order.Ideal
#align_import order.pfilter from "leanprover-community/mathlib"@"740acc0e6f9adf4423f92a485d0456fc271482da"
open OrderDual
namespace Order
structure PFilter (P : Type*) [Preorder P] where
dual : Ideal Pᵒᵈ
#align order.pfilter Order.PFilter
variable {P : Type*}
def IsPFilter [Preor... | Mathlib/Order/PFilter.lean | 120 | 120 | theorem principal_le_principal_iff {p q : P} : principal q ≤ principal p ↔ p ≤ q := by | simp
| [
" principal q ≤ principal p ↔ p ≤ q"
] |
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.List.Join
#align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b"
universe u
variable {α : Type u}
open Nat
namespace List
#noalign list.length_of_fn_aux
@[simp]
theorem length_ofFn_go {n} (f : Fin n ... | Mathlib/Data/List/OfFn.lean | 139 | 141 | theorem last_ofFn {n : ℕ} (f : Fin n → α) (h : ofFn f ≠ [])
(hn : n - 1 < n := Nat.pred_lt <| ofFn_eq_nil_iff.not.mp h) :
getLast (ofFn f) h = f ⟨n - 1, hn⟩ := by | simp [getLast_eq_get]
| [
" (ofFn.go f i j h).length = i",
" (ofFn.go f 0 j h).length = 0",
" (ofFn.go f (n✝ + 1) j h).length = n✝ + 1",
" (ofFn f).length = n",
" j + k < n",
" (ofFn.go f i j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨k, hk⟩ = f ⟨j + k, ⋯⟩",
" (ofFn.go f (i + 1) j h).get ⟨0, hk⟩ = f ⟨j + 0,... |
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.Diagonal
#align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7"
open Matrix
namespace Matrix
open FiniteDimensional
variable {l m n ... | Mathlib/Data/Matrix/Rank.lean | 49 | 51 | theorem rank_one [StrongRankCondition R] [DecidableEq n] :
rank (1 : Matrix n n R) = Fintype.card n := by |
rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi]
| [
" rank 1 = Fintype.card n"
] |
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 | 29 | 30 | theorem zero_left [MulZeroClass G₀] (x y : G₀) : SemiconjBy 0 x y := by |
simp only [SemiconjBy, mul_zero, zero_mul]
| [
" SemiconjBy a 0 0",
" SemiconjBy 0 x y"
] |
import Mathlib.Topology.Sets.Opens
#align_import topology.local_at_target from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open TopologicalSpace Set Filter
open Topology Filter
variable {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {f : α → β}
variable {s : Set β} {ι : Ty... | Mathlib/Topology/LocalAtTarget.lean | 111 | 113 | theorem isClosed_iff_coe_preimage_of_iSup_eq_top (s : Set β) :
IsClosed s ↔ ∀ i, IsClosed ((↑) ⁻¹' s : Set (U i)) := by |
simpa using isOpen_iff_coe_preimage_of_iSup_eq_top hU sᶜ
| [
" Inducing (s.restrictPreimage f)",
" ∀ (x : ↑(f ⁻¹' s)), 𝓝 x = comap Subtype.val (comap f (𝓝 (f ↑x)))",
" 𝓝 a = comap Subtype.val (comap f (𝓝 (f ↑a)))",
" IsClosedMap (s.restrictPreimage f)",
" IsClosed t → IsClosed (s.restrictPreimage f '' t)",
" ∀ (u : Set α), IsClosed u → Subtype.val ⁻¹' u = t → ∃... |
import Mathlib.Analysis.NormedSpace.Multilinear.Basic
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul
#align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b... | Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean | 155 | 156 | theorem sub (hf : IsBoundedLinearMap 𝕜 f) (hg : IsBoundedLinearMap 𝕜 g) :
IsBoundedLinearMap 𝕜 fun e => f e - g e := by | simpa [sub_eq_add_neg] using add hf (neg hg)
| [
" ∀ (x : E), ‖0 x‖ ≤ 0 * ‖x‖",
" ∀ (x : E), ‖LinearMap.id x‖ ≤ 1 * ‖x‖",
" IsBoundedLinearMap 𝕜 fun x => x.1",
" ‖(LinearMap.fst 𝕜 E F) x‖ ≤ 1 * ‖x‖",
" ‖(LinearMap.fst 𝕜 E F) x‖ ≤ ‖x‖",
" IsBoundedLinearMap 𝕜 fun x => x.2",
" ‖(LinearMap.snd 𝕜 E F) x‖ ≤ 1 * ‖x‖",
" ‖(LinearMap.snd 𝕜 E F) x‖ ≤ ‖... |
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Data.Nat.GCD.BigOperators
import Mathlib.Data.Nat.PrimeFin
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
... | Mathlib/Data/Nat/Factorization/Basic.lean | 99 | 102 | theorem factorization_prod_pow_eq_self {n : ℕ} (hn : n ≠ 0) : n.factorization.prod (· ^ ·) = n := by |
rw [factorization_eq_factors_multiset n]
simp only [← prod_toMultiset, factorization, Multiset.prod_coe, Multiset.toFinsupp_toMultiset]
exact prod_factors hn
| [
" ∀ (a : ℕ), a ∈ n.primeFactors ↔ (fun p => if p.Prime then padicValNat p n else 0) a ≠ 0",
" ∀ (a : ℕ), a.Prime → (a ∣ n ∧ ¬n = 0 ↔ ¬a = 1 ∧ ¬n = 0 ∧ a ∣ n)",
" n.factorization p = padicValNat p n",
" count p n.factors = n.factorization p",
" count p (factors 0) = (factorization 0) p",
" 0 = n.factorizat... |
import Mathlib.AlgebraicTopology.DoldKan.FunctorN
#align_import algebraic_topology.dold_kan.normalized from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504"
open CategoryTheory CategoryTheory.Category CategoryTheory.Limits
CategoryTheory.Subobject CategoryTheory.Idempotents DoldKan
non... | Mathlib/AlgebraicTopology/DoldKan/Normalized.lean | 91 | 92 | theorem PInfty_comp_PInftyToNormalizedMooreComplex (X : SimplicialObject A) :
PInfty ≫ PInftyToNormalizedMooreComplex X = PInftyToNormalizedMooreComplex X := by | aesop_cat
| [
" (AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1) ≫ X.δ j.succ = 0",
" (Finset.univ.inf fun k => kernelSubobject (X.δ k.succ)).arrow ≫ X.δ j.succ = 0",
" j ∈ Finset.univ",
" (NormalizedMooreComplex.objX X n).Factors (PInfty.f n)",
" (NormalizedMooreComplex.objX X 0).Factors (PInfty.f 0)",
" (No... |
import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms
import Mathlib.CategoryTheory.Limits.Shapes.Kernels
import Mathlib.CategoryTheory.Abelian.Basic
import Mathlib.CategoryTheory.Subobject.Lattice
import Mathlib.Order.Atoms
#align_import category_theory.simple from "leanprover-community/mathlib"@"4ed0bcaef698011... | Mathlib/CategoryTheory/Simple.lean | 61 | 77 | theorem Simple.of_iso {X Y : C} [Simple Y] (i : X ≅ Y) : Simple X :=
{ mono_isIso_iff_nonzero := fun f m => by
haveI : Mono (f ≫ i.hom) := mono_comp _ _
constructor
· intro h w
have j : IsIso (f ≫ i.hom) := by | infer_instance
rw [Simple.mono_isIso_iff_nonzero] at j
subst w
simp at j
· intro h
have j : IsIso (f ≫ i.hom) := by
apply isIso_of_mono_of_nonzero
intro w
apply h
simpa using (cancel_mono i.inv).2 w
rw [← Category.comp_id f, ← i.hom_... | [
" IsIso f ↔ f ≠ 0",
" IsIso f → f ≠ 0",
" False",
" IsIso (f ≫ i.hom)",
" f ≠ 0 → IsIso f",
" IsIso f",
" f ≫ i.hom ≠ 0",
" f = 0",
" IsIso ((f ≫ i.hom) ≫ i.inv)"
] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.NumberTheory.Padics.PadicVal
import Mathlib.RingTheory.Ideal.Quotient
#align_import number_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open I... | Mathlib/NumberTheory/Multiplicity.lean | 46 | 48 | theorem dvd_geom_sum₂_iff_of_dvd_sub' {x y p : R} (h : p ∣ x - y) :
(p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) ↔ p ∣ n * x ^ (n - 1) := by |
rw [geom_sum₂_comm, dvd_geom_sum₂_iff_of_dvd_sub]; simpa using h.neg_right
| [
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1)",
" p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1)",
" p ∣ y - x"
] |
import Mathlib.Algebra.GeomSum
import Mathlib.Algebra.Order.Archimedean
import Mathlib.Algebra.Order.CauSeq.Basic
#align_import data.real.cau_seq from "leanprover-community/mathlib"@"9116dd6709f303dcf781632e15fdef382b0fc579"
open Finset IsAbsoluteValue
namespace IsCauSeq
variable {α β : Type*} [LinearOrderedField... | Mathlib/Algebra/Order/CauSeq/BigOperators.lean | 57 | 141 | theorem _root_.cauchy_product (ha : IsCauSeq abs fun m ↦ ∑ n ∈ range m, abv (f n))
(hb : IsCauSeq abv fun m ↦ ∑ n ∈ range m, g n) (ε : α) (ε0 : 0 < ε) :
∃ i : ℕ, ∀ j ≥ i,
abv ((∑ k ∈ range j, f k) * ∑ k ∈ range j, g k -
∑ n ∈ range j, ∑ m ∈ range (n + 1), f m * g (n - m)) < ε := by |
let ⟨P, hP⟩ := ha.bounded
let ⟨Q, hQ⟩ := hb.bounded
have hP0 : 0 < P := lt_of_le_of_lt (abs_nonneg _) (hP 0)
have hPε0 : 0 < ε / (2 * P) := div_pos ε0 (mul_pos (show (2 : α) > 0 by norm_num) hP0)
let ⟨N, hN⟩ := hb.cauchy₂ hPε0
have hQε0 : 0 < ε / (4 * Q) :=
div_pos ε0 (mul_pos (show (0 : α) < 4 by norm... | [
" (IsCauSeq abs fun n => ∑ i ∈ range n, a i) → IsCauSeq abv fun n => ∑ i ∈ range n, f i",
" ∃ i, ∀ j ≥ i, abv ((fun n => ∑ i ∈ range n, f i) j - (fun n => ∑ i ∈ range n, f i) i) < ε",
" 0 < 2",
" ∀ j ≥ max n i, abv ((fun n => ∑ i ∈ range n, f i) j - (fun n => ∑ i ∈ range n, f i) (max n i)) < ε",
" abv ((fun... |
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 | 110 | 115 | theorem eval₂_smul (g : R →+* S) (p : R[X]) (x : S) {s : R} :
eval₂ g x (s • p) = g s * eval₂ g x p := by |
have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _
have B : (s • p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A
rw [eval₂_eq_sum, eval₂_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;>
simp [mul_sum, mul_assoc]
| [
" 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 ^ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.