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
221
import Mathlib.RingTheory.Jacobson import Mathlib.FieldTheory.IsAlgClosed.Basic import Mathlib.FieldTheory.MvPolynomial import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic #align_import ring_theory.nullstellensatz from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" open Ideal noncompu...
Mathlib/RingTheory/Nullstellensatz.lean
131
140
theorem radical_le_vanishingIdeal_zeroLocus (I : Ideal (MvPolynomial σ k)) : I.radical ≤ vanishingIdeal (zeroLocus I) := by
intro p hp x hx rw [← mem_vanishingIdeal_singleton_iff] rw [radical_eq_sInf] at hp refine (mem_sInf.mp hp) ⟨le_trans (le_vanishingIdeal_zeroLocus I) (vanishingIdeal_anti_mono fun y hy => hy.symm ▸ hx), IsMaximal.isPrime' _⟩
[ " (eval x) (p + q) = 0", " (eval x) (p • q) = 0", " (vanishingIdeal {x}).IsMaximal", " Function.Bijective ⇑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x) ⋯)", " (Ideal.Quotient.lift (vanishingIdeal {x}) (eval x) ⋯) ((Ideal.Quotient.mk (vanishingIdeal {x})) (C z)) = z", " p = 0", " (Ideal.Quotient.mk...
[ " (eval x) (p + q) = 0", " (eval x) (p • q) = 0", " (vanishingIdeal {x}).IsMaximal", " Function.Bijective ⇑(Ideal.Quotient.lift (vanishingIdeal {x}) (eval x) ⋯)", " (Ideal.Quotient.lift (vanishingIdeal {x}) (eval x) ⋯) ((Ideal.Quotient.mk (vanishingIdeal {x})) (C z)) = z", " p = 0", " (Ideal.Quotient.mk...
import Mathlib.Algebra.Polynomial.Roots import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import analysis.special_functions.polynomials from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Finset Asymptotic...
Mathlib/Analysis/SpecialFunctions/Polynomials.lean
91
97
theorem abs_isBoundedUnder_iff : (IsBoundedUnder (· ≤ ·) atTop fun x => |eval x P|) ↔ P.degree ≤ 0 := by
refine ⟨fun h => ?_, fun h => ⟨|P.coeff 0|, eventually_map.mpr (eventually_of_forall (forall_imp (fun _ => le_of_eq) fun x => congr_arg abs <| _root_.trans (congr_arg (eval x) (eq_C_of_degree_le_zero h)) eval_C))⟩⟩ contrapose! h exact not_isBoundedUnder_of_tendsto_atTop (abs_tendsto_atTop P h)
[ " (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree", " (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree", " Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff", "...
[ " (fun x => eval x P) ~[atTop] fun x => P.leadingCoeff * x ^ P.natDegree", " (fun x => ∑ i ∈ range P.natDegree, P.coeff i * x ^ i + P.coeff P.natDegree * x ^ P.natDegree) ~[atTop] fun x =>\n P.leadingCoeff * x ^ P.natDegree", " Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff", "...
import Mathlib.MeasureTheory.Measure.AEMeasurable #align_import measure_theory.group.arithmetic from "leanprover-community/mathlib"@"a75898643b2d774cced9ae7c0b28c21663b99666" open MeasureTheory open scoped Pointwise universe u v variable {α : Type*} class MeasurableAdd (M : Type*) [MeasurableSpace M] [Add M]...
Mathlib/MeasureTheory/Group/Arithmetic.lean
188
189
theorem measurable_div_const' {G : Type*} [DivInvMonoid G] [MeasurableSpace G] [MeasurableMul G] (g : G) : Measurable fun h => h / g := by
simp_rw [div_eq_mul_inv, measurable_mul_const]
[ " Measurable fun h => h / g" ]
[ " Measurable fun h => h / g" ]
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
44
45
theorem countP_cons (a : α) (l) : countP p (a :: l) = countP p l + if p a then 1 else 0 := by
by_cases h : p a <;> simp [h]
[ " 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.Data.Nat.Bits import Mathlib.Order.Lattice #align_import data.nat.size from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" namespace Nat section set_option linter.deprecated false theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n := shiftLeft_eq _ #align nat....
Mathlib/Data/Nat/Size.lean
55
61
theorem size_bit {b n} (h : bit b n ≠ 0) : size (bit b n) = succ (size n) := by
rw [size] conv => lhs rw [binaryRec] simp [h] rw [div2_bit]
[ " shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0", " shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)", " bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)", " 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)", " 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)", " shiftLeft' b m n ≠ 0", ...
[ " shiftLeft' true m 0 + 1 = (m + 1) * 2 ^ 0", " shiftLeft' true m (k + 1) + 1 = (m + 1) * 2 ^ (k + 1)", " bit1 (shiftLeft' true m k) + 1 = (m + 1) * (2 ^ k * 2)", " 2 * shiftLeft' true m k + 1 + 1 = (m + 1) * (2 ^ k * 2)", " 2 * (shiftLeft' true m k + 1) = (m + 1) * (2 ^ k * 2)", " shiftLeft' b m n ≠ 0", ...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Fin.VecNotation import Mathlib.Logic.Equiv.Fin #align_import data.fin.tuple.nat_antidiagonal from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" namespace List.Nat def antidiagona...
Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean
79
92
theorem mem_antidiagonalTuple {n : ℕ} {k : ℕ} {x : Fin k → ℕ} : x ∈ antidiagonalTuple k n ↔ ∑ i, x i = n := by
induction x using Fin.consInduction generalizing n with | h0 => cases n · decide · simp [eq_comm] | h x₀ x ih => simp_rw [Fin.sum_cons] rw [antidiagonalTuple] -- Porting note: simp_rw doesn't use the equation lemma properly simp_rw [List.mem_bind, List.mem_map, List.Nat.mem_antidia...
[ " x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n", " Fin.elim0 ∈ antidiagonalTuple 0 n ↔ ∑ i : Fin 0, i.elim0 = n", " Fin.elim0 ∈ antidiagonalTuple 0 0 ↔ ∑ i : Fin 0, i.elim0 = 0", " Fin.elim0 ∈ antidiagonalTuple 0 (n✝ + 1) ↔ ∑ i : Fin 0, i.elim0 = n✝ + 1", " Fin.cons x₀ x ∈ antidiagonalTuple (n✝ + 1) n ↔...
[ " x ∈ antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n" ]
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
89
91
theorem eval₂_add : (p + q).eval₂ f x = p.eval₂ f x + q.eval₂ f x := by
simp only [eval₂_eq_sum] apply sum_add_index <;> simp [add_mul]
[ " 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.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.fold from "leanprover-community/mathlib"@"446eb51ce0a90f8385f260d2b52e760e2004246b" universe u1 u2 u3 variable {R M N : Type*} variable [CommRing R] [AddCommGroup M] [AddCommGroup N] variable [Module R M] [Modu...
Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean
140
157
theorem right_induction {P : CliffordAlgebra Q → Prop} (algebraMap : ∀ r : R, P (algebraMap _ _ r)) (add : ∀ x y, P x → P y → P (x + y)) (mul_ι : ∀ m x, P x → P (x * ι Q m)) : ∀ x, P x := by
/- It would be neat if we could prove this via `foldr` like how we prove `CliffordAlgebra.induction`, but going via the grading seems easier. -/ intro x have : x ∈ ⊤ := Submodule.mem_top (R := R) rw [← iSup_ι_range_eq_top] at this induction this using Submodule.iSup_induction' with | mem i x hx => ...
[ " ∀ (x : CliffordAlgebra Q), P x", " P x", " P ((_root_.algebraMap R (CliffordAlgebra Q)) r)", " P (_x + _y)", " P (x * m)", " P (x * (ι Q) m)", " P 0" ]
[ " ∀ (x : CliffordAlgebra Q), P x" ]
import Mathlib.Combinatorics.SimpleGraph.DegreeSum import Mathlib.Combinatorics.SimpleGraph.Subgraph #align_import combinatorics.simple_graph.matching from "leanprover-community/mathlib"@"138448ae98f529ef34eeb61114191975ee2ca508" universe u namespace SimpleGraph variable {V : Type u} {G : SimpleGraph V} (M : Su...
Mathlib/Combinatorics/SimpleGraph/Matching.lean
101
111
theorem IsMatching.even_card {M : Subgraph G} [Fintype M.verts] (h : M.IsMatching) : Even M.verts.toFinset.card := by
classical rw [isMatching_iff_forall_degree] at h use M.coe.edgeFinset.card rw [← two_mul, ← M.coe.sum_degrees_eq_twice_card_edges] -- Porting note: `SimpleGraph.Subgraph.coe_degree` does not trigger because it uses -- instance arguments instead of implicit arguments for the first `Fintype` argument. -- U...
[ " h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩", " s(v, Exists.choose ⋯) = s(v, w)", " Exists.choose ⋯ = w", " Function.Surjective h.toEdge", " ∃ a, h.toEdge a = ⟨e, he⟩", " ∃ a, h.toEdge a = ⟨s(x, y), he⟩", " h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩", " M.support = M.verts", " v ∈ M.support", " M.IsMatching ↔ ∀ ...
[ " h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩", " s(v, Exists.choose ⋯) = s(v, w)", " Exists.choose ⋯ = w", " Function.Surjective h.toEdge", " ∃ a, h.toEdge a = ⟨e, he⟩", " ∃ a, h.toEdge a = ⟨s(x, y), he⟩", " h.toEdge ⟨v, hv⟩ = h.toEdge ⟨w, hw⟩", " M.support = M.verts", " v ∈ M.support", " M.IsMatching ↔ ∀ ...
import Mathlib.Algebra.Group.ConjFinite import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.GroupAction.Quotient import Mathlib.GroupTheory.Index import Mathlib.GroupTheory.SpecificGroups.Dihedral import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Line...
Mathlib/GroupTheory/CommutingProbability.lean
86
93
theorem commProb_eq_one_iff [h : Nonempty M] : commProb M = 1 ↔ Commutative ((· * ·) : M → M → M) := by
haveI := Fintype.ofFinite M rw [commProb, ← Set.coe_setOf, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card] rw [div_eq_one_iff_eq, ← Nat.cast_pow, Nat.cast_inj, sq, ← card_prod, set_fintype_card_eq_univ_iff, Set.eq_univ_iff_forall] · exact ⟨fun h x y ↦ h (x, y), fun h x ↦ h x.1 x.2⟩ · exact pow_ne_zer...
[ " commProb (M × M') = commProb M * commProb M'", " ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ...
[ " commProb (M × M') = commProb M * commProb M'", " ↑(Nat.card { p // (p.1 * p.2).1 = (p.2 * p.1).1 ∧ (p.1 * p.2).2 = (p.2 * p.1).2 }) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ^ 2) =\n ↑(Nat.card ({ p // p.1 * p.2 = p.2 * p.1 } × { p // p.1 * p.2 = p.2 * p.1 })) /\n (↑(Nat.card M) ^ 2 * ↑(Nat.card M') ...
import Mathlib.Data.Matrix.Basic variable {l m n o : Type*} universe u v w variable {R : Type*} {α : Type v} {β : Type w} namespace Matrix def col (w : m → α) : Matrix m Unit α := of fun x _ => w x #align matrix.col Matrix.col -- TODO: set as an equation lemma for `col`, see mathlib4#3024 @[simp] theorem col...
Mathlib/Data/Matrix/RowCol.lean
82
84
theorem row_add [Add α] (v w : m → α) : row (v + w) = row v + row w := by
ext rfl
[ " col (v + w) = col v + col w", " col (v + w) i✝ j✝ = (col v + col w) i✝ j✝", " col (x • v) = x • col v", " col (x • v) i✝ j✝ = (x • col v) i✝ j✝", " row (v + w) = row v + row w", " row (v + w) i✝ j✝ = (row v + row w) i✝ j✝" ]
[ " col (v + w) = col v + col w", " col (v + w) i✝ j✝ = (col v + col w) i✝ j✝", " col (x • v) = x • col v", " col (x • v) i✝ j✝ = (x • col v) i✝ j✝", " row (v + w) = row v + row w" ]
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ι : Type*} {G : ι → Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [∀ i, Mo...
Mathlib/GroupTheory/PushoutI.lean
163
165
theorem ofCoprodI_of (i : ι) (g : G i) : (ofCoprodI (CoprodI.of g) : PushoutI φ) = of i g := by
simp [ofCoprodI]
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
import Mathlib.RepresentationTheory.Basic import Mathlib.RepresentationTheory.FdRep #align_import representation_theory.invariants from "leanprover-community/mathlib"@"55b3f8206b8596db8bb1804d8a92814a0b6670c9" suppress_compilation open MonoidAlgebra open Representation namespace GroupAlgebra variable (k G : Ty...
Mathlib/RepresentationTheory/Invariants.lean
43
48
theorem mul_average_left (g : G) : ↑(Finsupp.single g 1) * average k G = average k G := by
simp only [mul_one, Finset.mul_sum, Algebra.mul_smul_comm, average, MonoidAlgebra.of_apply, Finset.sum_congr, MonoidAlgebra.single_mul_single] set f : G → MonoidAlgebra k G := fun x => Finsupp.single x 1 show ⅟ (Fintype.card G : k) • ∑ x : G, f (g * x) = ⅟ (Fintype.card G : k) • ∑ x : G, f x rw [Function.B...
[ " Finsupp.single g 1 * average k G = average k G", " ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • ∑ x : G, single x 1", " ⅟↑(Fintype.card G) • ∑ x : G, single (g * x) 1 = ⅟↑(Fintype.card G) • Finset.univ.sum f", " ⅟↑(Fintype.card G) • ∑ x : G, f (g * x) = ⅟↑(Fintype.card G) • ∑ x : G,...
[ " Finsupp.single g 1 * average k G = average k G" ]
import Mathlib.MeasureTheory.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic #align_import probability.density from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open scoped Classical MeasureTheory NNReal ENNRea...
Mathlib/Probability/Density.lean
142
145
theorem pdf_of_not_aemeasurable {_ : MeasurableSpace Ω} {ℙ : Measure Ω} {μ : Measure E} {X : Ω → E} (hX : ¬AEMeasurable X ℙ) : pdf X ℙ μ =ᵐ[μ] 0 := by
rw [pdf_def, map_of_not_aemeasurable hX] exact rnDeriv_zero μ
[ " pdf X ℙ μ =ᶠ[ae μ] 0", " rnDeriv 0 μ =ᶠ[ae μ] 0" ]
[ " pdf X ℙ μ =ᶠ[ae μ] 0" ]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv #align_import analysis.ODE.gronwall from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] open Metric Set Asymptotics Fil...
Mathlib/Analysis/ODE/Gronwall.lean
59
70
theorem hasDerivAt_gronwallBound (δ K ε x : ℝ) : HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x := by
by_cases hK : K = 0 · subst K simp only [gronwallBound_K0, zero_mul, zero_add] convert ((hasDerivAt_id x).const_mul ε).const_add δ rw [mul_one] · simp only [gronwallBound_of_K_ne_0 hK] convert (((hasDerivAt_id x).const_mul K).exp.const_mul δ).add ((((hasDerivAt_id x).const_mul K).exp.sub_co...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x" ]
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace α] [MeasurableSpace β] {s : Set α} noncomputable section namespace MeasureTheory.Measure def count : Measure α := sum dirac #align measure_theory.measure.count MeasureTheo...
Mathlib/MeasureTheory/Measure/Count.lean
68
69
theorem count_apply_finite [MeasurableSingletonClass α] (s : Set α) (hs : s.Finite) : count s = hs.toFinset.card := by
rw [← count_apply_finset, Finite.coe_toFinset]
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0", " ∑ i ∈ s, 1 = ↑s.card", " count s = ↑s_fin.toFinset.card", " MeasurableSet ↑s_fin.toFinset", " count s = ↑hs.toFinset.card" ]
[ " count s = ∑' (i : ↑s), 1", " count ∅ = 0", " ∑ i ∈ s, 1 = ↑s.card", " count s = ↑s_fin.toFinset.card", " MeasurableSet ↑s_fin.toFinset", " count s = ↑hs.toFinset.card" ]
import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Module.Projective import Mathlib.CategoryTheory.Preadditive.Projective import Mathlib.LinearAlgebra.FinsuppVectorSpace import Mathlib.Data.Finsupp.Basic #align_import algebra.category.Module.projective from "leanprover-community/mathlib"@"201a3f...
Mathlib/Algebra/Category/ModuleCat/Projective.lean
31
41
theorem IsProjective.iff_projective {R : Type u} [Ring R] {P : Type max u v} [AddCommGroup P] [Module R P] : Module.Projective R P ↔ Projective (ModuleCat.of R P) := by
refine ⟨fun h => ?_, fun h => ?_⟩ · letI : Module.Projective R (ModuleCat.of R P) := h exact ⟨fun E X epi => Module.projective_lifting_property _ _ ((ModuleCat.epi_iff_surjective _).mp epi)⟩ · refine Module.Projective.of_lifting_property.{u,v} ?_ intro E X mE mX sE sX f g s haveI : Epi (↟f) := ...
[ " Module.Projective R P ↔ Projective (of R P)", " Projective (of R P)", " Module.Projective R P", " ∀ {M : Type (max v u)} {N : Type (max u v)} [inst : AddCommGroup M] [inst_1 : AddCommGroup N] [inst_2 : Module R M]\n [inst_3 : Module R N] (f : M →ₗ[R] N) (g : P →ₗ[R] N), Function.Surjective ⇑f → ∃ h, f ∘ₗ...
[ " Module.Projective R P ↔ Projective (of R P)" ]
import Mathlib.AlgebraicGeometry.Morphisms.RingHomProperties import Mathlib.RingTheory.RingHom.FiniteType #align_import algebraic_geometry.morphisms.finite_type from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section open CategoryTheory CategoryTheory.Limits Opposite ...
Mathlib/AlgebraicGeometry/Morphisms/FiniteType.lean
44
47
theorem locallyOfFiniteType_eq : @LocallyOfFiniteType = affineLocally @RingHom.FiniteType := by
ext X Y f rw [locallyOfFiniteType_iff, affineLocally_iff_affineOpens_le] exact RingHom.finiteType_respectsIso
[ " @LocallyOfFiniteType = affineLocally @RingHom.FiniteType", " LocallyOfFiniteType f ↔ affineLocally (@RingHom.FiniteType) f", " RingHom.RespectsIso @RingHom.FiniteType" ]
[ " @LocallyOfFiniteType = affineLocally @RingHom.FiniteType" ]
import Mathlib.CategoryTheory.Sites.SheafOfTypes import Mathlib.Order.Closure #align_import category_theory.sites.closed from "leanprover-community/mathlib"@"4cfc30e317caad46858393f1a7a33f609296cc30" universe v u namespace CategoryTheory variable {C : Type u} [Category.{v} C] variable (J₁ J₂ : GrothendieckTopol...
Mathlib/CategoryTheory/Sites/Closed.lean
149
159
theorem close_eq_top_iff_mem {X : C} (S : Sieve X) : J₁.close S = ⊤ ↔ S ∈ J₁ X := by
constructor · intro h apply J₁.transitive (J₁.top_mem X) intro Y f hf change J₁.close S f rwa [h] · intro hS rw [eq_top_iff] intro Y f _ apply J₁.pullback_stable _ hS
[ " J₁.Covers S (g ≫ f)", " J₁.close (Sieve.pullback f S) = Sieve.pullback f (J₁.close S)", " J₁.close (Sieve.pullback f S) ≤ Sieve.pullback f (J₁.close S)", " J₁.IsClosed (Sieve.pullback f (J₁.close S))", " Sieve.pullback f (J₁.close S) ≤ J₁.close (Sieve.pullback f S)", " (J₁.close (Sieve.pullback f S)).ar...
[ " J₁.Covers S (g ≫ f)", " J₁.close (Sieve.pullback f S) = Sieve.pullback f (J₁.close S)", " J₁.close (Sieve.pullback f S) ≤ Sieve.pullback f (J₁.close S)", " J₁.IsClosed (Sieve.pullback f (J₁.close S))", " Sieve.pullback f (J₁.close S) ≤ J₁.close (Sieve.pullback f S)", " (J₁.close (Sieve.pullback f S)).ar...
import Mathlib.Geometry.Manifold.ContMDiff.Defs open Set Filter Function open scoped Topology Manifold variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] (I : Mode...
Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
252
253
theorem contMDiff_one [One M'] : ContMDiff I I' n (1 : M → M') := by
simp only [Pi.one_def, contMDiff_const]
[ " ContMDiff I I' n fun x => c", " ContMDiffAt I I' n (fun x => c) x", " ContDiffWithinAtProp I I' n (↑(chartAt H' c) ∘ (fun x => c) ∘ ↑(chartAt H x).symm) (↑(chartAt H x).symm ⁻¹' univ)\n (↑(chartAt H x) x)", " ContDiffWithinAt 𝕜 n (fun x => ↑I' (↑(chartAt H' c) c)) (↑I.symm ⁻¹' (↑(chartAt H x).symm ⁻¹' u...
[ " ContMDiff I I' n fun x => c", " ContMDiffAt I I' n (fun x => c) x", " ContDiffWithinAtProp I I' n (↑(chartAt H' c) ∘ (fun x => c) ∘ ↑(chartAt H x).symm) (↑(chartAt H x).symm ⁻¹' univ)\n (↑(chartAt H x) x)", " ContDiffWithinAt 𝕜 n (fun x => ↑I' (↑(chartAt H' c) c)) (↑I.symm ⁻¹' (↑(chartAt H x).symm ⁻¹' u...
import Mathlib.RingTheory.WittVector.Truncated import Mathlib.RingTheory.WittVector.Identities import Mathlib.NumberTheory.Padics.RingHoms #align_import ring_theory.witt_vector.compare from "leanprover-community/mathlib"@"168ad7fc5d8173ad38be9767a22d50b8ecf1cd00" noncomputable section variable {p : ℕ} [hp : Fact...
Mathlib/RingTheory/WittVector/Compare.lean
60
61
theorem card_zmod : Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n := by
rw [card, ZMod.card]
[ " i = n", " ↑p ^ i ≠ 0", " ↑p ^ i = (WittVector.truncate n) (↑p ^ i)", " ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0", " ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0", " ¬1 = 0", " Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n" ]
[ " i = n", " ↑p ^ i ≠ 0", " ↑p ^ i = (WittVector.truncate n) (↑p ^ i)", " ∃ x, ¬coeff x ((WittVector.truncate n) (↑p ^ i)) = coeff x 0", " ¬coeff ⟨i, hin⟩ ((WittVector.truncate n) (↑p ^ i)) = coeff ⟨i, hin⟩ 0", " ¬1 = 0", " Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n" ]
import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.LinearPMap import Mathlib.LinearAlgebra.Projection #align_import linear_algebra.basis from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" open Function Set Submodule set_option ...
Mathlib/LinearAlgebra/Basis/VectorSpace.lean
117
119
theorem ofVectorSpace_apply_self (x : ofVectorSpaceIndex K V) : ofVectorSpace K V x = x := by
unfold ofVectorSpace exact Basis.mk_apply _ _ _
[ " ↑⊤ ⊆ ↑(span K (range ((hs.extend ⋯).restrict id)))", " range ⇑(extend hs) = hs.extend ⋯", " (ofVectorSpace K V) x = ↑x", " (extend ⋯) x = ↑x" ]
[ " ↑⊤ ⊆ ↑(span K (range ((hs.extend ⋯).restrict id)))", " range ⇑(extend hs) = hs.extend ⋯", " (ofVectorSpace K V) x = ↑x" ]
import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation #align_import linear_algebra.clifford_algebra.fold from "leanprover-community/mathlib"@"446eb51ce0a90f8385f260d2b52e760e2004246b" universe u1 u2 u3 variable {R M N : Type*} variable [CommRing R] [AddCommGroup M] [AddCommGroup N] variable [Module R M] [Modu...
Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean
195
200
theorem foldr'Aux_foldr'Aux (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N) (hf : ∀ m x fx, f m (ι Q m * x, f m (x, fx)) = Q m • fx) (v : M) (x_fx) : foldr'Aux Q f v (foldr'Aux Q f v x_fx) = Q v • x_fx := by
cases' x_fx with x fx simp only [foldr'Aux_apply_apply] rw [← mul_assoc, ι_sq_scalar, ← Algebra.smul_def, hf, Prod.smul_mk]
[ " ∀ (x : CliffordAlgebra Q), P x", " P x", " P ((_root_.algebraMap R (CliffordAlgebra Q)) r)", " P (_x + _y)", " P (x * m)", " P (x * (ι Q) m)", " P 0", " ∀ (x : CliffordAlgebra Q), P (reverse x)", " P (reverse x)", " P (reverse ((_root_.algebraMap R (CliffordAlgebra Q)) r))", " P (reverse (x + ...
[ " ∀ (x : CliffordAlgebra Q), P x", " P x", " P ((_root_.algebraMap R (CliffordAlgebra Q)) r)", " P (_x + _y)", " P (x * m)", " P (x * (ι Q) m)", " P 0", " ∀ (x : CliffordAlgebra Q), P (reverse x)", " P (reverse x)", " P (reverse ((_root_.algebraMap R (CliffordAlgebra Q)) r))", " P (reverse (x + ...
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
157
158
theorem preimage_const_add_Ioc : (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a) := by
simp [← Ioi_inter_Iic]
[ " (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)" ]
[ " (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)" ]
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
89
92
theorem lookupFinsupp_eq_iff_of_ne_zero [DecidableEq α] {l : AList fun _x : α => M} {a : α} {x : M} (hx : x ≠ 0) : l.lookupFinsupp a = x ↔ x ∈ l.lookup a := by
rw [lookupFinsupp_apply] cases' lookup a l with m <;> simp [hx.symm]
[ " 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.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.LatticeIntervals import Mathlib.Order.Interval.Set.OrdConnected #align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open scoped Classical open Set variable {ι : ...
Mathlib/Order/CompleteLatticeIntervals.lean
97
99
theorem subset_sInf_of_within [Inhabited s] {t : Set s} (h' : t.Nonempty) (h'' : BddBelow t) (h : sInf ((↑) '' t : Set α) ∈ s) : sInf ((↑) '' t : Set α) = (@sInf s _ t : α) := by
simp [dif_pos, h, h', h'']
[ " sInf (Subtype.val '' t) = ↑(sInf t)" ]
[ " sInf (Subtype.val '' t) = ↑(sInf t)" ]
import Batteries.Data.HashMap.Basic import Batteries.Data.Array.Lemmas import Batteries.Data.Nat.Lemmas namespace Batteries.HashMap namespace Imp attribute [-simp] Bool.not_eq_true namespace Buckets @[ext] protected theorem ext : ∀ {b₁ b₂ : Buckets α β}, b₁.1.data = b₂.1.data → b₁ = b₂ | ⟨⟨_⟩, _⟩, ⟨⟨_⟩, _⟩, rfl ...
.lake/packages/batteries/Batteries/Data/HashMap/WF.lean
42
46
theorem WF.mk' [BEq α] [Hashable α] (h) : (Buckets.mk n h : Buckets α β).WF := by
refine ⟨fun _ h => ?_, fun i h => ?_⟩ · simp only [Buckets.mk, mkArray, List.mem_replicate, ne_eq] at h simp [h, List.Pairwise.nil] · simp [Buckets.mk, empty', mkArray, Array.getElem_eq_data_get, AssocList.All]
[ " ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " (self.update i d h).update i d' h' ...
[ " ∃ l₁ l₂, self.val.data = l₁ ++ self.val[i] :: l₂ ∧ l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " ∃ l₁ l₂,\n self.val.data = l₁ ++ self.val.data.get ⟨i.toNat, h⟩ :: l₂ ∧\n l₁.length = i.toNat ∧ (self.update i d h).val.data = l₁ ++ d :: l₂", " (self.update i d h).update i d' h' ...
import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.SpecialFunctions.Complex.LogDeriv import Mathlib.Analysis.Calculus.FDeriv.Extend import Mathlib.Analysis.Calculus.Deriv.Prod import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv #...
Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
31
42
theorem hasStrictFDerivAt_cpow {p : ℂ × ℂ} (hp : p.1 ∈ slitPlane) : HasStrictFDerivAt (fun x : ℂ × ℂ => x.1 ^ x.2) ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ + (p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℂ ℂ ℂ) p := by
have A : p.1 ≠ 0 := slitPlane_ne_zero hp have : (fun x : ℂ × ℂ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := ((isOpen_ne.preimage continuous_fst).eventually_mem A).mono fun p hp => cpow_def_of_ne_zero hp _ rw [cpow_sub _ _ A, cpow_one, mul_div_left_comm, mul_smul, mul_smul] refine HasStrictF...
[ " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ + (p.1 ^ p.2 * p.1.log) • ContinuousLinearMap.snd ℂ ℂ ℂ) p", " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n (p.1 ^ p.2 • (p.2 / p.1) • ContinuousLinearMap.fst ℂ ℂ ℂ + p.1 ^ p.2 • p.1.log • ContinuousLinearMap.snd...
[ " HasStrictFDerivAt (fun x => x.1 ^ x.2)\n ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ + (p.1 ^ p.2 * p.1.log) • ContinuousLinearMap.snd ℂ ℂ ℂ) p" ]
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v va...
Mathlib/FieldTheory/RatFunc/Defs.lean
158
159
theorem mk_zero (p : K[X]) : RatFunc.mk p 0 = ofFractionRing (0 : FractionRing K[X]) := by
rw [mk_eq_div', RingHom.map_zero, div_zero]
[ " { toFractionRing := x } = { toFractionRing := y }", " { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }", " P", " ∀ {a c : K[X]} {b d : ↥K[X]⁰},\n (Localization.r K[X]⁰) (a, b) (c, d) → (fun p q => f p ↑q) a b = (fun p q => f p ↑q) c d", " (fun p q => f p ↑q) p q = ...
[ " { toFractionRing := x } = { toFractionRing := y }", " { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }", " P", " ∀ {a c : K[X]} {b d : ↥K[X]⁰},\n (Localization.r K[X]⁰) (a, b) (c, d) → (fun p q => f p ↑q) a b = (fun p q => f p ↑q) c d", " (fun p q => f p ↑q) p q = ...
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
107
108
theorem card_insert_of_not_mem (h : a ∉ s) : (insert a s).card = s.card + 1 := by
rw [← cons_eq_insert _ _ h, card_cons]
[ " Monotone card", " ({a} ∩ s).card ≤ 1", " (insert a s).card = s.card + 1" ]
[ " Monotone card", " ({a} ∩ s).card ≤ 1", " (insert a s).card = s.card + 1" ]
import Mathlib.Algebra.Algebra.Operations import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Algebra.Ring.Subring.Pointwise import Mathlib.RingTheory.Adjoin.Basic #align_import algebra.algebra.subalgebra.pointwise from "leanprover-community/mathlib"@"b2c707cd190a58ea0565c86695a19e99ccecc215" namespace...
Mathlib/Algebra/Algebra/Subalgebra/Pointwise.lean
48
65
theorem mul_toSubmodule {R : Type*} {A : Type*} [CommSemiring R] [CommSemiring A] [Algebra R A] (S T : Subalgebra R A) : (Subalgebra.toSubmodule S) * (Subalgebra.toSubmodule T) = Subalgebra.toSubmodule (S ⊔ T) := by
refine le_antisymm (mul_toSubmodule_le _ _) ?_ rintro x (hx : x ∈ Algebra.adjoin R (S ∪ T : Set A)) refine Algebra.adjoin_induction hx (fun x hx => ?_) (fun r => ?_) (fun _ _ => Submodule.add_mem _) fun x y hx hy => ?_ · cases' hx with hxS hxT · rw [← mul_one x] exact Submodule.mul_mem_mul ...
[ " toSubmodule S * toSubmodule T ≤ toSubmodule (S ⊔ T)", " ∀ m ∈ toSubmodule S, ∀ n ∈ toSubmodule T, m * n ∈ toSubmodule (S ⊔ T)", " y * z ∈ toSubmodule (S ⊔ T)", " y * z ∈ S ⊔ T", " toSubmodule S * toSubmodule S = toSubmodule S", " toSubmodule S * toSubmodule S ≤ toSubmodule S", " toSubmodule (S ⊔ S) = ...
[ " toSubmodule S * toSubmodule T ≤ toSubmodule (S ⊔ T)", " ∀ m ∈ toSubmodule S, ∀ n ∈ toSubmodule T, m * n ∈ toSubmodule (S ⊔ T)", " y * z ∈ toSubmodule (S ⊔ T)", " y * z ∈ S ⊔ T", " toSubmodule S * toSubmodule S = toSubmodule S", " toSubmodule S * toSubmodule S ≤ toSubmodule S", " toSubmodule (S ⊔ S) = ...
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
71
76
theorem d_comp_d (C : HomologicalComplex V c) (i j k : ι) : C.d i j ≫ C.d j k = 0 := by
by_cases hij : c.Rel i j · by_cases hjk : c.Rel j k · exact C.d_comp_d' i j k hij hjk · rw [C.shape j k hjk, comp_zero] · rw [C.shape i j hij, zero_comp]
[ " C.d i j ≫ C.d j k = 0" ]
[ " C.d i j ≫ C.d j k = 0" ]
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
117
118
theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a := by
simp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ]
[ " Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b", " ⋃ b, Icc a b = Ici a", " ⋃ b, Ioc a b = Ioi a", " ⋃ a, Icc a b = Iic b", " ⋃ a, Ico a b = Iio b", " ⋃ b, Ico a b = Ici a" ]
[ " Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b", " ⋃ b, Icc a b = Ici a", " ⋃ b, Ioc a b = Ioi a", " ⋃ a, Icc a b = Iic b", " ⋃ a, Ico a b = Iio b", " ⋃ b, Ico a b = Ici a" ]
import Mathlib.Algebra.Field.Subfield import Mathlib.Topology.Algebra.Field import Mathlib.Topology.Algebra.UniformRing #align_import topology.algebra.uniform_field from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open uniformity Topology ...
Mathlib/Topology/Algebra/UniformField.lean
112
121
theorem coe_inv (x : K) : (x : hat K)⁻¹ = ((x⁻¹ : K) : hat K) := by
by_cases h : x = 0 · rw [h, inv_zero] dsimp [Inv.inv] norm_cast simp · conv_lhs => dsimp [Inv.inv] rw [if_neg] · exact hatInv_extends h · exact fun H => h (denseEmbedding_coe.inj H)
[ " ContinuousAt hatInv x", " ∀ᶠ (x : hat K) in 𝓝 x, ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)", " {0}ᶜ ⊆ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}", " y ∈ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}", " ...
[ " ContinuousAt hatInv x", " ∀ᶠ (x : hat K) in 𝓝 x, ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)", " {0}ᶜ ⊆ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}", " y ∈ {x | (fun x => ∃ c, Tendsto (fun x => ↑K x⁻¹) (Filter.comap (↑K) (𝓝 x)) (𝓝 c)) x}", " ...
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Algebra.Order.BigOperators.Ring.Finset #align_import data.nat.factorial.big_operators from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" open Finset Nat namespace Nat lemma monotone_factorial : Monotone factorial := fun _ _ => fa...
Mathlib/Data/Nat/Factorial/BigOperators.lean
34
38
theorem prod_factorial_dvd_factorial_sum : (∏ i ∈ s, (f i)!) ∣ (∑ i ∈ s, f i)! := by
induction' s using Finset.cons_induction_on with a s has ih · simp · rw [prod_cons, Finset.sum_cons] exact (mul_dvd_mul_left _ ih).trans (Nat.factorial_mul_factorial_dvd_factorial_add _ _)
[ " 0 < ∏ i ∈ s, (f i)!", " ∏ i ∈ s, (f i)! ∣ (∑ i ∈ s, f i)!", " ∏ i ∈ ∅, (f i)! ∣ (∑ i ∈ ∅, f i)!", " ∏ i ∈ cons a s has, (f i)! ∣ (∑ i ∈ cons a s has, f i)!", " (f a)! * ∏ x ∈ s, (f x)! ∣ (f a + ∑ x ∈ s, f x)!" ]
[ " 0 < ∏ i ∈ s, (f i)!", " ∏ i ∈ s, (f i)! ∣ (∑ i ∈ s, f i)!" ]
import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator import Mathlib.Init.Data.Quot import Mathlib.Tactic.Cases import Mathlib.Tactic.Use import Mathlib.Tactic.MkIffOfInductiveProp import Mathlib.Tactic.SimpRw #align_import logic.relation from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9a...
Mathlib/Logic/Relation.lean
167
172
theorem flip_comp : flip (r ∘r p) = flip p ∘r flip r := by
funext c a apply propext constructor · exact fun ⟨b, hab, hbc⟩ ↦ ⟨b, hbc, hab⟩ · exact fun ⟨b, hbc, hab⟩ ↦ ⟨b, hab, hbc⟩
[ " (fun x x_1 => x ↔ x_1) ∘r r = r", " (fun x x_1 => x ↔ x_1) = fun x x_1 => x = x_1", " (a ↔ b) = (a = b)", " (r ∘r fun x x_1 => x ↔ x_1) = r", " (r ∘r p) ∘r q = r ∘r p ∘r q", " ((r ∘r p) ∘r q) a d = (r ∘r p ∘r q) a d", " ((r ∘r p) ∘r q) a d ↔ (r ∘r p ∘r q) a d", " ((r ∘r p) ∘r q) a d → (r ∘r p ∘r q) ...
[ " (fun x x_1 => x ↔ x_1) ∘r r = r", " (fun x x_1 => x ↔ x_1) = fun x x_1 => x = x_1", " (a ↔ b) = (a = b)", " (r ∘r fun x x_1 => x ↔ x_1) = r", " (r ∘r p) ∘r q = r ∘r p ∘r q", " ((r ∘r p) ∘r q) a d = (r ∘r p ∘r q) a d", " ((r ∘r p) ∘r q) a d ↔ (r ∘r p ∘r q) a d", " ((r ∘r p) ∘r q) a d → (r ∘r p ∘r q) ...
import Mathlib.Algebra.Polynomial.Splits import Mathlib.RingTheory.MvPolynomial.Symmetric #align_import ring_theory.polynomial.vieta from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" open Polynomial namespace Multiset open Polynomial section Semiring variable {R : Type*} [CommSemi...
Mathlib/RingTheory/Polynomial/Vieta.lean
81
84
theorem _root_.Finset.prod_X_add_C_coeff {σ} (s : Finset σ) (r : σ → R) {k : ℕ} (h : k ≤ s.card) : (∏ i ∈ s, (X + C (r i))).coeff k = ∑ t ∈ s.powersetCard (s.card - k), ∏ i ∈ t, r i := by
rw [Finset.prod, prod_X_add_C_coeff' _ r h, Finset.esymm_map_val] rfl
[ " (map (fun r => X + C r) s).prod = ∑ j ∈ Finset.range (card s + 1), C (s.esymm j) * X ^ (card s - j)", " ∀ x ∈ range (card s + 1),\n (map ((fun p => (map (fun r => X) p.1).prod * (map (fun r => C r) p.2).prod) ∘ fun t => (s - t, t))\n (powersetCard x s)).sum =\n C (s.esymm x) * X ^ (card s - x)"...
[ " (map (fun r => X + C r) s).prod = ∑ j ∈ Finset.range (card s + 1), C (s.esymm j) * X ^ (card s - j)", " ∀ x ∈ range (card s + 1),\n (map ((fun p => (map (fun r => X) p.1).prod * (map (fun r => C r) p.2).prod) ∘ fun t => (s - t, t))\n (powersetCard x s)).sum =\n C (s.esymm x) * X ^ (card s - x)"...
import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Normalizer #align_import algebra.lie.cartan_subalgebra from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" universe u v w w₁ w₂ variable {R : Type u} {L : Type v} variable [CommRing R] [LieRing L] [LieAlgebra R L] (H : Lie...
Mathlib/Algebra/Lie/CartanSubalgebra.lean
114
118
theorem LieIdeal.normalizer_eq_top {R : Type u} {L : Type v} [CommRing R] [LieRing L] [LieAlgebra R L] (I : LieIdeal R L) : (I : LieSubalgebra R L).normalizer = ⊤ := by
ext x simpa only [LieSubalgebra.mem_normalizer_iff, LieSubalgebra.mem_top, iff_true_iff] using fun y hy => I.lie_mem hy
[ " (lieIdealSubalgebra R L I).normalizer = ⊤", " x ∈ (lieIdealSubalgebra R L I).normalizer ↔ x ∈ ⊤" ]
[ " (lieIdealSubalgebra R L I).normalizer = ⊤" ]
import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.LinearAlgebra.Basis #align_import analysis.normed_space.linear_isometry from "leanprover-community/mathlib"@"4601791ea62fea875b488dafc4e6dede19e8363f" open Function Set variable {R R₂ R₃ R₄ E E₂ E₃ E₄ F 𝓕 : Ty...
Mathlib/Analysis/NormedSpace/LinearIsometry.lean
170
172
theorem coe_injective : @Injective (E →ₛₗᵢ[σ₁₂] E₂) (E → E₂) (fun f => f) := by
rintro ⟨_⟩ ⟨_⟩ simp
[ " Injective fun f => ⇑f", " (fun f => ⇑f) { toLinearMap := toLinearMap✝¹, norm_map' := norm_map'✝¹ } =\n (fun f => ⇑f) { toLinearMap := toLinearMap✝, norm_map' := norm_map'✝ } →\n { toLinearMap := toLinearMap✝¹, norm_map' := norm_map'✝¹ } =\n { toLinearMap := toLinearMap✝, norm_map' := norm_map'✝ }" ...
[ " Injective fun f => ⇑f" ]
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.Finsupp.Order #align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Finset variable {α β ι : Type*} namespace Finsupp def toMultiset : (α →₀ ℕ) →+ Multiset α where toFun f := Finsupp.sum f...
Mathlib/Data/Finsupp/Multiset.lean
52
53
theorem toMultiset_single (a : α) (n : ℕ) : toMultiset (single a n) = n • {a} := by
rw [toMultiset_apply, sum_single_index]; apply zero_nsmul
[ " toMultiset (single a n) = n • {a}", " 0 • {a} = 0" ]
[ " toMultiset (single a n) = n • {a}" ]
import Mathlib.Topology.Algebra.Order.Compact import Mathlib.Topology.MetricSpace.PseudoMetric open Set Filter universe u v w variable {α : Type u} {β : Type v} {X ι : Type*} section ProperSpace open Metric class ProperSpace (α : Type u) [PseudoMetricSpace α] : Prop where isCompact_closedBall : ∀ x : α, ∀ r...
Mathlib/Topology/MetricSpace/ProperSpace.lean
149
154
theorem exists_lt_subset_ball (hs : IsClosed s) (h : s ⊆ ball x r) : ∃ r' < r, s ⊆ ball x r' := by
rcases le_or_lt r 0 with hr | hr · rw [ball_eq_empty.2 hr, subset_empty_iff] at h subst s exact (exists_lt r).imp fun r' hr' => ⟨hr', empty_subset _⟩ · exact (exists_pos_lt_subset_ball hr hs h).imp fun r' hr' => ⟨hr'.1.2, hr'.2⟩
[ " SecondCountableTopology α", " SigmaCompactSpace α", " ∃ x, f ≤ nhds x", " ∀ (x : α × β) (r : ℝ), IsCompact (closedBall x r)", " IsCompact (closedBall (x, y) r)", " IsCompact (closedBall x r ×ˢ closedBall y r)", " ProperSpace ((b : β) → π b)", " IsCompact (closedBall x r)", " IsCompact (univ.pi fun...
[ " SecondCountableTopology α", " SigmaCompactSpace α", " ∃ x, f ≤ nhds x", " ∀ (x : α × β) (r : ℝ), IsCompact (closedBall x r)", " IsCompact (closedBall (x, y) r)", " IsCompact (closedBall x r ×ˢ closedBall y r)", " ProperSpace ((b : β) → π b)", " IsCompact (closedBall x r)", " IsCompact (univ.pi fun...
import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8" open Function (update) open Relation namespa...
Mathlib/Computability/TMToPartrec.lean
149
152
theorem cons_eval (f fs) : (cons f fs).eval = fun v => do { let n ← Code.eval f v let ns ← Code.eval fs v pure (n.headI :: ns) } := by
simp [eval]
[ " zero'.eval = fun v => pure (0 :: v)", " succ.eval = fun v => pure [v.headI.succ]", " tail.eval = fun v => pure v.tail", " (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)" ]
[ " zero'.eval = fun v => pure (0 :: v)", " succ.eval = fun v => pure [v.headI.succ]", " tail.eval = fun v => pure v.tail", " (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)" ]
import Mathlib.Analysis.SpecialFunctions.ExpDeriv #align_import analysis.ODE.gronwall from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] open Metric Set Asymptotics Fil...
Mathlib/Analysis/ODE/Gronwall.lean
113
132
theorem le_gronwallBound_of_liminf_deriv_right_le {f f' : ℝ → ℝ} {δ K ε : ℝ} {a b : ℝ} (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, ∀ r, f' x < r → ∃ᶠ z in 𝓝[>] x, (z - x)⁻¹ * (f z - f x) < r) (ha : f a ≤ δ) (bound : ∀ x ∈ Ico a b, f' x ≤ K * f x + ε) : ∀ x ∈ Icc a b, f x ≤ gronwallBound δ K ε...
have H : ∀ x ∈ Icc a b, ∀ ε' ∈ Ioi ε, f x ≤ gronwallBound δ K ε' (x - a) := by intro x hx ε' hε' apply image_le_of_liminf_slope_right_lt_deriv_boundary hf hf' · rwa [sub_self, gronwallBound_x0] · exact fun x => hasDerivAt_gronwallBound_shift δ K ε' x a · intro x hx hfB rw [← hfB] appl...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
[ " HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x", " HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x", " HasDerivAt (fun x => δ + ε * x) ε x", " ε = ε * 1", " HasDerivAt (fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1))\n (K * (δ * rexp (K * x) + ε / K * (rex...
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable s...
Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
64
67
theorem measurableSet_integrable [SigmaFinite ν] ⦃f : α → β → E⦄ (hf : StronglyMeasurable (uncurry f)) : MeasurableSet {x | Integrable (f x) ν} := by
simp_rw [Integrable, hf.of_uncurry_left.aestronglyMeasurable, true_and_iff] exact measurableSet_lt (Measurable.lintegral_prod_right hf.ennnorm) measurable_const
[ " MeasurableSet {x | Integrable (f x) ν}", " MeasurableSet {x | HasFiniteIntegral (f x) ν}" ]
[ " MeasurableSet {x | Integrable (f x) ν}" ]
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.GroupTheory.MonoidLocalization import Mathlib.RingTheory.Ideal.Basic import Mathlib.GroupTheory.GroupAction.Ring #align_import ring_theory.localization.basic from "leanprover-community/mathlib"@"b69c9a770ecf37eb21...
Mathlib/RingTheory/Localization/Basic.lean
202
204
theorem sec_spec' (z : S) : algebraMap R S (IsLocalization.sec M z).1 = algebraMap R S (IsLocalization.sec M z).2 * z := by
rw [mul_comm, sec_spec]
[ " (algebraMap R S) x = (algebraMap R S) y", " (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y", " (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y", " ∃ c, ↑c * x = ↑c * y", " (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z" ]
[ " (algebraMap R S) x = (algebraMap R S) y", " (algebraMap R S) x = (algebraMap R S) y → ∃ c, ↑c * x = ↑c * y", " (∃ c, ↑c * x = ↑c * y) → ∃ c, ↑c * x = ↑c * y", " ∃ c, ↑c * x = ↑c * y", " (algebraMap R S) (sec M z).1 = (algebraMap R S) ↑(sec M z).2 * z" ]
import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.MulOpposite import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Finset.NoncommProd import Mathlib.Data.Int.Order.Lemmas #align_import group_theory.submonoid.membership fro...
Mathlib/Algebra/Group/Submonoid/Membership.lean
241
243
theorem mem_sup_right {S T : Submonoid M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T := by
rw [← SetLike.le_def] exact le_sup_right
[ " x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i", " x ∈ ⨆ i, S i → ∃ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i", " ∃ i, 1 ∈ S i", " ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i", " ∃ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s", " x ∈ ↑(sSup S)...
[ " x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i", " x ∈ ⨆ i, S i → ∃ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) → ∃ i, x ∈ S i", " ∃ i, 1 ∈ S i", " ∀ (x y : M), (∃ i, x ∈ S i) → (∃ i, y ∈ S i) → ∃ i, x * y ∈ S i", " ∃ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s", " x ∈ ↑(sSup S)...
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
104
105
theorem PInfty_f_idem (n : ℕ) : (PInfty.f n : X _[n] ⟶ _) ≫ PInfty.f n = PInfty.f n := by
simp only [PInfty_f, P_f_idem]
[ " (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", " (fun n => (P n).f n) (n + 1) ≫ AlternatingFaceMapComplex.objD X n =\n AlternatingFaceMapComplex.objD X n ≫ (fun 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", " (Q (q + 1)).f n = (Q q).f n", " (fun n => (P n).f n) (n + 1) ≫ AlternatingFaceMapComplex.objD X n =\n AlternatingFaceMapComplex.objD X n ≫ (fun n => (...
import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.Order.Hom.Order #align_import order.fixed_points from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6" universe u v w variable {α : Type u} {β : Type v} {γ : Type w} open Function (fixedPoints IsFixedPt) namespace OrderHom secti...
Mathlib/Order/FixedPoints.lean
100
107
theorem lfp_induction {p : α → Prop} (step : ∀ a, p a → a ≤ lfp f → p (f a)) (hSup : ∀ s, (∀ a ∈ s, p a) → p (sSup s)) : p (lfp f) := by
set s := { a | a ≤ lfp f ∧ p a } specialize hSup s fun a => And.right suffices sSup s = lfp f from this ▸ hSup have h : sSup s ≤ lfp f := sSup_le fun b => And.left have hmem : f (sSup s) ∈ s := ⟨f.map_le_lfp h, step _ hSup h⟩ exact h.antisymm (f.lfp_le <| le_sSup hmem)
[ " p (lfp f)", " sSup s = lfp f" ]
[ " p (lfp f)" ]
import Mathlib.Algebra.PUnitInstances import Mathlib.Tactic.Abel import Mathlib.Tactic.Ring import Mathlib.Order.Hom.Lattice #align_import algebra.ring.boolean_ring from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped symmDiff variable {α β γ : Type*} class BooleanRing (α) ...
Mathlib/Algebra/Ring/BooleanRing.lean
76
80
theorem neg_eq : -a = a := calc -a = -a + 0 := by
rw [add_zero] _ = -a + -a + a := by rw [← neg_add_self, add_assoc] _ = a := by rw [add_self, zero_add]
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0", " -a + 0 = -a + -a + a", " -a + -a + a = a" ]
[ " a + a = 0", " a + a = (a + a) * (a + a)", " (a + a) * (a + a) = a * a + a * a + (a * a + a * a)", " a * a + a * a + (a * a + a * a) = a + a + (a + a)", " -a = -a + 0" ]
import Mathlib.CategoryTheory.Sites.Spaces import Mathlib.Topology.Sheaves.Sheaf import Mathlib.CategoryTheory.Sites.DenseSubsite #align_import topology.sheaves.sheaf_condition.sites from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section set_option linter.uppercaseLe...
Mathlib/Topology/Sheaves/SheafCondition/Sites.lean
58
67
theorem iSup_eq_of_mem_grothendieck (hR : Sieve.generate R ∈ Opens.grothendieckTopology X U) : iSup (coveringOfPresieve U R) = U := by
apply le_antisymm · refine iSup_le ?_ intro f exact f.2.1.le intro x hxU rw [Opens.coe_iSup, Set.mem_iUnion] obtain ⟨V, iVU, ⟨W, iVW, iWU, hiWU, -⟩, hxV⟩ := hR x hxU exact ⟨⟨W, ⟨iWU, hiWU⟩⟩, iVW.le hxV⟩
[ " iSup (coveringOfPresieve U R) = U", " iSup (coveringOfPresieve U R) ≤ U", " ∀ (i : (V : Opens ↑X) × { f // R f }), coveringOfPresieve U R i ≤ U", " coveringOfPresieve U R f ≤ U", " U ≤ iSup (coveringOfPresieve U R)", " x ∈ ↑(iSup (coveringOfPresieve U R))", " ∃ i, x ∈ ↑(coveringOfPresieve U R i)" ]
[ " iSup (coveringOfPresieve U R) = U" ]
import Mathlib.Algebra.BigOperators.Group.Multiset import Mathlib.Data.Multiset.Dedup #align_import data.multiset.bind from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" assert_not_exists MonoidWithZero assert_not_exists MulAction universe v variable {α : Type*} {β : Type v} {γ δ : Ty...
Mathlib/Data/Multiset/Bind.lean
138
138
theorem bind_zero : s.bind (fun _ => 0 : α → Multiset β) = 0 := by
simp [bind, join, nsmul_zero]
[ " (↑(List.map ofList (l :: L))).join = ↑(l :: L).join", " a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s", " ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)", " card (join 0) = (map (⇑card) 0).sum", " ∀ (a : Multiset α) (s : Multise...
[ " (↑(List.map ofList (l :: L))).join = ↑(l :: L).join", " a ∈ join 0 ↔ ∃ s ∈ 0, a ∈ s", " ∀ (a_1 : Multiset α) (s : Multiset (Multiset α)),\n (a ∈ s.join ↔ ∃ s_1 ∈ s, a ∈ s_1) → (a ∈ (a_1 ::ₘ s).join ↔ ∃ s_1 ∈ a_1 ::ₘ s, a ∈ s_1)", " card (join 0) = (map (⇑card) 0).sum", " ∀ (a : Multiset α) (s : Multise...
import Mathlib.ModelTheory.Ultraproducts import Mathlib.ModelTheory.Bundled import Mathlib.ModelTheory.Skolem #align_import model_theory.satisfiability from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" set_option linter.uppercaseLean3 false universe u v w w' open Cardinal CategoryTh...
Mathlib/ModelTheory/Satisfiability.lean
93
98
theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) : (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable := by
classical refine ⟨isSatisfiable_of_isSatisfiable_onTheory φ, fun h' => ?_⟩ haveI : Inhabited h'.some := Classical.inhabited_of_nonempty' exact Model.isSatisfiable (h'.some.defaultExpansion h)
[ " (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable", " (φ.onTheory T).IsSatisfiable" ]
[ " (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable" ]
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Dynamics.BirkhoffSum.NormedSpace open Filter Finset Function Bornology open scoped Topology variable {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E]
Mathlib/Analysis/InnerProductSpace/MeanErgodic.lean
43
71
theorem LinearMap.tendsto_birkhoffAverage_of_ker_subset_closure [NormedSpace 𝕜 E] (f : E →ₗ[𝕜] E) (hf : LipschitzWith 1 f) (g : E →L[𝕜] LinearMap.eqLocus f 1) (hg_proj : ∀ x : LinearMap.eqLocus f 1, g x = x) (hg_ker : (LinearMap.ker g : Set E) ⊆ closure (LinearMap.range (f - 1))) (x : E) : Tendsto (b...
/- Any point can be represented as a sum of `y ∈ LinearMap.ker g` and a fixed point `z`. -/ obtain ⟨y, hy, z, hz, rfl⟩ : ∃ y, g y = 0 ∧ ∃ z, IsFixedPt f z ∧ x = y + z := ⟨x - g x, by simp [hg_proj], g x, (g x).2, by simp⟩ /- For a fixed point, the theorem is trivial, so it suffices to prove it for `y ∈ Lin...
[ " Tendsto (fun x_1 => birkhoffAverage 𝕜 (⇑f) _root_.id x_1 x) atTop (𝓝 ↑(g x))", " g (x - ↑(g x)) = 0", " x = x - ↑(g x) + ↑(g x)", " Tendsto (fun x => birkhoffAverage 𝕜 (⇑f) _root_.id x (y + z)) atTop (𝓝 ↑(g (y + z)))", " Tendsto (fun x => birkhoffAverage 𝕜 (⇑f) _root_.id x y) atTop (𝓝 0)", " (f - ...
[ " Tendsto (fun x_1 => birkhoffAverage 𝕜 (⇑f) _root_.id x_1 x) atTop (𝓝 ↑(g x))" ]
import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic import Mathlib.Topology.NoetherianSpace #align_import algebraic_geometry.prime_spectrum.noetherian from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v namespace PrimeSpectrum open Submodule variable (R : Type u) [CommR...
Mathlib/AlgebraicGeometry/PrimeSpectrum/Noetherian.lean
60
97
theorem exists_primeSpectrum_prod_le_and_ne_bot_of_domain (h_fA : ¬IsField A) {I : Ideal A} (h_nzI : I ≠ ⊥) : ∃ Z : Multiset (PrimeSpectrum A), Multiset.prod (Z.map asIdeal) ≤ I ∧ Multiset.prod (Z.map asIdeal) ≠ ⊥ := by
revert h_nzI -- Porting note: Need to specify `P` explicitly refine IsNoetherian.induction (P := fun I => I ≠ ⊥ → ∃ Z : Multiset (PrimeSpectrum A), Multiset.prod (Z.map asIdeal) ≤ I ∧ Multiset.prod (Z.map asIdeal) ≠ ⊥) (fun (M : Ideal A) hgt => ?_) I intro h_nzM have hA_nont : Nontrivial A := IsDom...
[ " ∃ Z, (Multiset.map asIdeal Z).prod ≤ I", " (fun I => ∃ Z, (Multiset.map asIdeal Z).prod ≤ I) M", " (Multiset.map asIdeal {{ asIdeal := M, IsPrime := h_prM }}).prod ≤ M", " (fun I => ∃ Z, (Multiset.map asIdeal Z).prod ≤ I) ⊤", " ∀ z ∉ M, M < M + span R {z}", " M < M + span R {z}", " z ∈ M", " z ∈ M +...
[ " ∃ Z, (Multiset.map asIdeal Z).prod ≤ I", " (fun I => ∃ Z, (Multiset.map asIdeal Z).prod ≤ I) M", " (Multiset.map asIdeal {{ asIdeal := M, IsPrime := h_prM }}).prod ≤ M", " (fun I => ∃ Z, (Multiset.map asIdeal Z).prod ≤ I) ⊤", " ∀ z ∉ M, M < M + span R {z}", " M < M + span R {z}", " z ∈ M", " z ∈ M +...
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
78
78
theorem rtake_zero : rtake l 0 = [] := by
simp [rtake]
[ " [].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.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section op...
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
49
59
theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + ‖x‖ ^ 2) ^ (-r / 2) ≤ (2 : ℝ) ^ (r / 2) * (1 + ‖x‖) ^ (-r) := calc ((1 : ℝ) + ‖x‖ ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + ‖x‖ ^ 2)) ^ r)⁻¹ := by
rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_left₀] <;> positivity _ ≤ (2 : ℝ) ^ (r / 2) * ((1 + ‖x‖) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + ‖x‖) ^ (-r) := by rw [rpow_neg]; positivity
[ " √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖", " 0 ≤ 1 + ‖x‖", " 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2", " 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)", " 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))", " (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)", " (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹", " √2 ^ r ≠ 0", " 0 ≤ √(1 + ‖x‖ ^ 2)", "...
[ " √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖", " 0 ≤ 1 + ‖x‖", " 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2", " 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)", " 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))", " (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)", " (1 + ‖x‖ ^ 2) ^ (-r / 2) = 2 ^ (r / 2) * ((√2 * √(1 + ‖x‖ ^ 2)) ^ r)⁻¹" ]
import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Data.Set.UnionLift #align_import algebra.algebra.subalgebra.basic from "leanprover-community/mathlib"@"b915e9392ecb2a861e1e766f0e1df6ac481188ca" namespace Subalgebra open Algebra variable {R A B : Type*} [CommSemiring R] [Semiring A] [Algebra R A] [...
Mathlib/Algebra/Algebra/Subalgebra/Directed.lean
96
99
theorem iSupLift_of_mem {i : ι} (x : T) (hx : (x : A) ∈ K i) : iSupLift K dir f hf T hT x = f i ⟨x, hx⟩ := by
dsimp [iSupLift, inclusion] rw [Set.iUnionLift_of_mem]
[ " (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩", " (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩", " ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩", " ↑T ⊆ ⋃ i, ↑(K i)", " Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1", " ∀ (i : ι), ↑1 = ↑1", "...
[ " (fun i x => (f i) x) i ⟨x, hxi⟩ = (fun i x => (f i) x) j ⟨x, hxj⟩", " (f i) ⟨x, hxi⟩ = (f j) ⟨x, hxj⟩", " ((f k).comp (inclusion hik)) ⟨x, hxi⟩ = ((f k).comp (inclusion hjk)) ⟨x, hxj⟩", " ↑T ⊆ ⋃ i, ↑(K i)", " Set.iUnionLift (fun i => ↑(K i)) (fun i x => (f i) x) ⋯ ↑T ⋯ 1 = 1", " ∀ (i : ι), ↑1 = ↑1", "...
import Mathlib.LinearAlgebra.Dual open Function Module variable (R M N : Type*) [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] structure PerfectPairing := toLin : M →ₗ[R] N →ₗ[R] R bijectiveLeft : Bijective toLin bijectiveRight : Bijective toLin.flip attribute [nolint docBlame] P...
Mathlib/LinearAlgebra/PerfectPairing.lean
91
94
theorem toDualLeft_of_toDualRight_symm (x : M) (f : Dual R M) : (p.toDualLeft x) (p.toDualRight.symm f) = f x := by
rw [@toDualLeft_apply] exact apply_apply_toDualRight_symm p x f
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }", " (p (p.toDual...
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }", " (p (p.toDual...
import Mathlib.RingTheory.WittVector.Identities #align_import ring_theory.witt_vector.domain from "leanprover-community/mathlib"@"b1d911acd60ab198808e853292106ee352b648ea" noncomputable section open scoped Classical namespace WittVector open Function variable {p : ℕ} {R : Type*} local notation "𝕎" => WittVe...
Mathlib/RingTheory/WittVector/Domain.lean
88
98
theorem verschiebung_nonzero {x : 𝕎 R} (hx : x ≠ 0) : ∃ n : ℕ, ∃ x' : 𝕎 R, x'.coeff 0 ≠ 0 ∧ x = verschiebung^[n] x' := by
have hex : ∃ k : ℕ, x.coeff k ≠ 0 := by by_contra! hall apply hx ext i simp only [hall, zero_coeff] let n := Nat.find hex use n, x.shift n refine ⟨Nat.find_spec hex, eq_iterate_verschiebung fun i hi => not_not.mp ?_⟩ exact Nat.find_min hex hi
[ " verschiebung (x.shift k.succ) = x.shift k", " (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0", " k + 0 < k + 1", " (verschiebung (x.shift k.succ)).coeff (n✝ + 1) = (x.shift k).coeff (n✝ + 1)", " x.coeff (k.succ + n✝) = x.coeff (k + (n✝ + 1))", " k.succ + n✝ = k + (n✝ + 1)", " x = (⇑vers...
[ " verschiebung (x.shift k.succ) = x.shift k", " (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0", " k + 0 < k + 1", " (verschiebung (x.shift k.succ)).coeff (n✝ + 1) = (x.shift k).coeff (n✝ + 1)", " x.coeff (k.succ + n✝) = x.coeff (k + (n✝ + 1))", " k.succ + n✝ = k + (n✝ + 1)", " x = (⇑vers...
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
112
115
theorem cylinder_eq_pi (x : ∀ n, E n) (n : ℕ) : cylinder x n = Set.pi (Finset.range n : Set ℕ) fun i : ℕ => {x i} := by
ext y simp [cylinder]
[ " 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", " min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z", " False", " x (firstDiff x z) = z (firstDiff x z)", " cylinder x n = (↑(Finset.range n)).pi...
[ " 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", " min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z", " False", " x (firstDiff x z) = z (firstDiff x z)", " cylinder x n = (↑(Finset.range n)).pi...
import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax #align_import algebra.order.group.min_max from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" section variable {α : Type*} [Group α] [LinearOrder α] [CovariantClass α α (· * ·) (· ≤ ·)] -- TODO...
Mathlib/Algebra/Order/Group/MinMax.lean
86
93
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
simp only [sub_le_iff_le_add, max_le_iff]; constructor · calc a = a - c + c := (sub_add_cancel a c).symm _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _) · calc b = b - d + d := (sub_add_cancel b d).symm _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_ri...
[ " max a 1 / max a⁻¹ 1 = a", " max a⁻¹ 1 = a⁻¹ * max a 1", " max a b - max c d ≤ max (a - c) (b - d)", " a ≤ max (a - c) (b - d) + max c d ∧ b ≤ max (a - c) (b - d) + max c d", " a ≤ max (a - c) (b - d) + max c d", " b ≤ max (a - c) (b - d) + max c d" ]
[ " max a 1 / max a⁻¹ 1 = a", " max a⁻¹ 1 = a⁻¹ * max a 1", " max a b - max c d ≤ max (a - c) (b - d)" ]
import Mathlib.Data.List.Forall2 #align_import data.list.zip from "leanprover-community/mathlib"@"134625f523e737f650a6ea7f0c82a6177e45e622" -- Make sure we don't import algebra assert_not_exists Monoid universe u open Nat namespace List variable {α : Type u} {β γ δ ε : Type*} #align list.zip_with_cons_cons Li...
Mathlib/Data/List/Zip.lean
63
64
theorem lt_length_left_of_zipWith {f : α → β → γ} {i : ℕ} {l : List α} {l' : List β} (h : i < (zipWith f l l').length) : i < l.length := by
rw [length_zipWith] at h; omega
[ " map Prod.swap (l₁.zip []) = [].zip l₁", " map Prod.swap [] = [].zip l₁", " map Prod.swap ((a :: l₁).zip (b :: l₂)) = (b :: l₂).zip (a :: l₁)", " Forall p (zipWith f [] []) ↔ Forall₂ (fun x y => p (f x y)) [] []", " Forall p (zipWith f (a :: l₁) (b :: l₂)) ↔ Forall₂ (fun x y => p (f x y)) (a :: l₁) (b :: l...
[ " map Prod.swap (l₁.zip []) = [].zip l₁", " map Prod.swap [] = [].zip l₁", " map Prod.swap ((a :: l₁).zip (b :: l₂)) = (b :: l₂).zip (a :: l₁)", " Forall p (zipWith f [] []) ↔ Forall₂ (fun x y => p (f x y)) [] []", " Forall p (zipWith f (a :: l₁) (b :: l₂)) ↔ Forall₂ (fun x y => p (f x y)) (a :: l₁) (b :: l...
import Mathlib.Algebra.Polynomial.UnitTrinomial import Mathlib.RingTheory.Polynomial.GaussLemma import Mathlib.Tactic.LinearCombination #align_import ring_theory.polynomial.selmer from "leanprover-community/mathlib"@"3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6" namespace Polynomial open scoped Polynomial variable ...
Mathlib/RingTheory/Polynomial/Selmer.lean
31
45
theorem X_pow_sub_X_sub_one_irreducible_aux (z : ℂ) : ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0) := by
rintro ⟨h1, h2⟩ replace h3 : z ^ 3 = 1 := by linear_combination (1 - z - z ^ 2 - z ^ n) * h1 + (z ^ n - 2) * h2 have key : z ^ n = 1 ∨ z ^ n = z ∨ z ^ n = z ^ 2 := by rw [← Nat.mod_add_div n 3, pow_add, pow_mul, h3, one_pow, mul_one] have : n % 3 < 3 := Nat.mod_lt n zero_lt_three interval_cases n...
[ " ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)", " False", " z ^ 3 = 1", " z ^ n = 1 ∨ z ^ n = z ∨ z ^ n = z ^ 2", " z ^ (n % 3) = 1 ∨ z ^ (n % 3) = z ∨ z ^ (n % 3) = z ^ 2", " z ^ 0 = 1 ∨ z ^ 0 = z ∨ z ^ 0 = z ^ 2", " z ^ 1 = 1 ∨ z ^ 1 = z ∨ z ^ 1 = z ^ 2", " z ^ 2 = 1 ∨ z ^ 2 = z ∨ z ^ 2 = z ^ 2", " z = 0...
[ " ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)" ]
import Mathlib.Algebra.Divisibility.Basic import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.euclidean_domain.defs from "leanprover-community/mathlib"@"ee7b9f9a9ac2a8d9f04ea39bbfe6b1a3be053b38" universe u class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R ...
Mathlib/Algebra/EuclideanDomain/Defs.lean
157
157
theorem mod_zero (a : R) : a % 0 = a := by
simpa only [zero_mul, zero_add] using div_add_mod a 0
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m", " b * (a / b) + a % b - b * (a / b) = a - b * (a / b)", " ¬a * b ≺ b", " ¬b * a ≺ b", " a % 0 = a" ]
[ " m % k + m / k * k = m", " m % k + k * (m / k) = m", " m / k * k + m % k = m", " k * (m / k) + m % k = m", " b * (a / b) + a % b - b * (a / b) = a - b * (a / b)", " ¬a * b ≺ b", " ¬b * a ≺ b", " a % 0 = a" ]
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" namespace MeasureTheory open Filter open scoped ENNReal variable {α E : Type*} {m m0 : MeasurableSpace α} {p : ℝ≥0∞} {q : ℝ} {μ :...
Mathlib/MeasureTheory/Function/LpSeminorm/Trim.lean
35
45
theorem limsup_trim (hm : m ≤ m0) {f : α → ℝ≥0∞} (hf : Measurable[m] f) : limsup f (ae (μ.trim hm)) = limsup f (ae μ) := by
simp_rw [limsup_eq] suffices h_set_eq : { a : ℝ≥0∞ | ∀ᵐ n ∂μ.trim hm, f n ≤ a } = { a : ℝ≥0∞ | ∀ᵐ n ∂μ, f n ≤ a } by rw [h_set_eq] ext1 a suffices h_meas_eq : μ { x | ¬f x ≤ a } = μ.trim hm { x | ¬f x ≤ a } by simp_rw [Set.mem_setOf_eq, ae_iff, h_meas_eq] refine (trim_measurableSet_eq hm ?_).symm r...
[ " snorm' f q (μ.trim hm) = snorm' f q μ", " (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ.trim hm) ^ (1 / q) = (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q)", " ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ.trim hm = ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ", " Measurable fun a => ↑‖f a‖₊ ^ q", " Measurable fun a => ‖f a‖₊", " StronglyMeasurable fun a => ‖f a‖₊"...
[ " snorm' f q (μ.trim hm) = snorm' f q μ", " (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ.trim hm) ^ (1 / q) = (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) ^ (1 / q)", " ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ.trim hm = ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ", " Measurable fun a => ↑‖f a‖₊ ^ q", " Measurable fun a => ‖f a‖₊", " StronglyMeasurable fun a => ‖f a‖₊"...
import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace #align_import linear_algebra.affine_space.restrict from "leanprover-community/mathlib"@"09258fb7f75d741b7eda9fa18d5c869e2135d9f1" variable {k V₁ P₁ V₂ P₂ : Type*} [Ring k] [AddCommGroup V₁] [AddCommGroup V₂] [Module k V₁] [Module k V₂] [AddTorsor V₁ P₁] [A...
Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
81
87
theorem AffineMap.restrict.surjective (φ : P₁ →ᵃ[k] P₂) {E : AffineSubspace k P₁} {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F] (h : E.map φ = F) : Function.Surjective (AffineMap.restrict φ (le_of_eq h)) := by
rintro ⟨x, hx : x ∈ F⟩ rw [← h, AffineSubspace.mem_map] at hx obtain ⟨y, hy, rfl⟩ := hx exact ⟨⟨y, hy⟩, rfl⟩
[ " Nonempty ↥(map φ E)", " ↥E →ᵃ[k] ↥F", " ↥E → ↥F", " ↥E.direction →ₗ[k] ↥F.direction", " E.direction ≤ Submodule.comap φ.linear F.direction", " (AffineSubspace.map φ E).direction ≤ F.direction", " ∀ (p : ↥E) (v : ↥E.direction), ⟨φ ↑(v +ᵥ p), ⋯⟩ = (φ.linear.restrict ⋯) v +ᵥ ⟨φ ↑p, ⋯⟩", " ⟨φ ↑(v +ᵥ p),...
[ " Nonempty ↥(map φ E)", " ↥E →ᵃ[k] ↥F", " ↥E → ↥F", " ↥E.direction →ₗ[k] ↥F.direction", " E.direction ≤ Submodule.comap φ.linear F.direction", " (AffineSubspace.map φ E).direction ≤ F.direction", " ∀ (p : ↥E) (v : ↥E.direction), ⟨φ ↑(v +ᵥ p), ⋯⟩ = (φ.linear.restrict ⋯) v +ᵥ ⟨φ ↑p, ⋯⟩", " ⟨φ ↑(v +ᵥ p),...
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
121
123
theorem finSuccEquiv'_below {i : Fin (n + 1)} {m : Fin n} (h : Fin.castSucc m < i) : (finSuccEquiv' i) (Fin.castSucc m) = m := by
rw [← Fin.succAbove_of_castSucc_lt _ _ h, finSuccEquiv'_succAbove]
[ " (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", " (fun f => (f 0, f 1)) ⁻¹' s ×ˢ t = Set.univ.pi (cons s (cons t finZ...
import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Data.List.Chain #align_import data.bool.count from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" namespace List @[simp] theorem count_not_add_count (l : List Bool) (b : Bool) : count (!b) l + count b l = length l := by -- Porting ...
Mathlib/Data/Bool/Count.lean
100
102
theorem two_mul_count_bool_of_even (hl : Chain' (· ≠ ·) l) (h2 : Even (length l)) (b : Bool) : 2 * count b l = length l := by
rw [← count_not_add_count l b, hl.count_not_eq_count h2, two_mul]
[ " count (!b) l + count b l = l.length", " countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l", " (fun x => x == b) = fun a => decide ¬(a == !b) = true", " (x == b) = decide ¬(x == !b) = true", " (false == b) = decide ¬(false == !b) = true", " (true == b) = decide ¬(true == !b) = tru...
[ " count (!b) l + count b l = l.length", " countP (fun x => x == b) l = countP (fun a => decide ¬(a == !b) = true) l", " (fun x => x == b) = fun a => decide ¬(a == !b) = true", " (x == b) = decide ¬(x == !b) = true", " (false == b) = decide ¬(false == !b) = true", " (true == b) = decide ¬(true == !b) = tru...
import Mathlib.Topology.Separation #align_import topology.shrinking_lemma from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Function open scoped Classical noncomputable section variable {ι X : Type*} [TopologicalSpace X] [NormalSpace X] namespace ShrinkingLemma -- the tr...
Mathlib/Topology/ShrinkingLemma.lean
118
121
theorem find_mem {c : Set (PartialRefinement u s)} (i : ι) (ne : c.Nonempty) : find c ne i ∈ c := by
rw [find] split_ifs with h exacts [h.choose_spec.1, ne.some_mem]
[ " find c ne i ∈ c", " (if hi : ∃ v ∈ c, i ∈ v.carrier then hi.choose else ne.some) ∈ c", " ne.some ∈ c" ]
[ " find c ne i ∈ c" ]
import Mathlib.Probability.Martingale.BorelCantelli import Mathlib.Probability.ConditionalExpectation import Mathlib.Probability.Independence.Basic #align_import probability.borel_cantelli from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open scoped MeasureTheory ProbabilityTheory EN...
Mathlib/Probability/BorelCantelli.lean
43
48
theorem iIndepFun.indep_comap_natural_of_lt (hf : ∀ i, StronglyMeasurable (f i)) (hfi : iIndepFun (fun _ => mβ) f μ) (hij : i < j) : Indep (MeasurableSpace.comap (f j) mβ) (Filtration.natural f hf i) μ := by
suffices Indep (⨆ k ∈ ({j} : Set ι), MeasurableSpace.comap (f k) mβ) (⨆ k ∈ {k | k ≤ i}, MeasurableSpace.comap (f k) mβ) μ by rwa [iSup_singleton] at this exact indep_iSup_of_disjoint (fun k => (hf k).measurable.comap_le) hfi (by simpa)
[ " Indep (MeasurableSpace.comap (f j) mβ) (↑(Filtration.natural f hf) i) μ", " Indep (⨆ k ∈ {j}, MeasurableSpace.comap (f k) mβ) (⨆ k ∈ {k | k ≤ i}, MeasurableSpace.comap (f k) mβ) μ", " Disjoint {j} {k | k ≤ i}" ]
[ " Indep (MeasurableSpace.comap (f j) mβ) (↑(Filtration.natural f hf) i) μ" ]
import Mathlib.Data.Multiset.Dedup #align_import data.multiset.finset_ops from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" namespace Multiset open List variable {α : Type*} [DecidableEq α] {s : Multiset α} def ndinsert (a : α) (s : Multiset α) : Multiset α := Quot.liftOn s (...
Mathlib/Data/Multiset/FinsetOps.lean
83
84
theorem dedup_cons {a : α} {s : Multiset α} : dedup (a ::ₘ s) = ndinsert a (dedup s) := by
by_cases h : a ∈ s <;> simp [h]
[ " card (ndinsert a s) = card s", " card (ndinsert a s) = card s + 1", " (a ::ₘ s).dedup = ndinsert a s.dedup" ]
[ " card (ndinsert a s) = card s", " card (ndinsert a s) = card s + 1", " (a ::ₘ s).dedup = ndinsert a s.dedup" ]
import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.group_with_zero.units.lemmas from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" assert_not_exis...
Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
64
68
theorem map_inv₀ : f a⁻¹ = (f a)⁻¹ := by
by_cases h : a = 0 · simp [h, map_zero f] · apply eq_inv_of_mul_eq_one_left rw [← map_mul, inv_mul_cancel h, map_one]
[ " f a⁻¹ = (f a)⁻¹", " f a⁻¹ * f a = 1" ]
[ " f a⁻¹ = (f a)⁻¹" ]
import Mathlib.RingTheory.RootsOfUnity.Basic universe u variable {L : Type u} [CommRing L] [IsDomain L] variable (n : ℕ+)
Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean
72
75
theorem rootsOfUnity.integer_power_of_ringEquiv (g : L ≃+* L) : ∃ m : ℤ, ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ m : Lˣ) := by
obtain ⟨m, hm⟩ := MonoidHom.map_cyclic ((g : L ≃* L).restrictRootsOfUnity n).toMonoidHom exact ⟨m, fun t ↦ Units.ext_iff.1 <| SetCoe.ext_iff.2 <| hm t⟩
[ " ∃ m, ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)" ]
[ " ∃ m, ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)" ]
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
105
112
theorem Finset.centerMass_segment (s : Finset ι) (w₁ w₂ : ι → R) (z : ι → E) (hw₁ : ∑ i ∈ s, w₁ i = 1) (hw₂ : ∑ i ∈ s, w₂ i = 1) (a b : R) (hab : a + b = 1) : a • s.centerMass w₁ z + b • s.centerMass w₂ z = s.centerMass (fun i => a * w₁ i + b * w₂ i) z := by
have hw : (∑ i ∈ s, (a * w₁ i + b * w₂ i)) = 1 := by simp only [← mul_sum, sum_add_distrib, mul_one, *] simp only [Finset.centerMass_eq_of_sum_1, Finset.centerMass_eq_of_sum_1 _ _ hw, smul_sum, sum_add_distrib, add_smul, mul_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 ...
[ " ∅.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.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
75
76
theorem left_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₁ ≠ p₂ := by
rw [← @vsub_ne_zero V]; exact o.left_ne_zero_of_oangle_ne_zero h
[ " ContinuousAt (fun y => ∡ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0", " ∡ p₁ p₁ p₂ = 0", " ∡ p₁ p₂ p₂ = 0", " p₁ ≠ p₂", " p₁ -ᵥ p₂ ≠ 0" ]
[ " ContinuousAt (fun y => ∡ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0", " ∡ p₁ p₁ p₂ = 0", " ∡ p₁ p₂ p₂ = 0", " p₁ ≠ p₂" ]
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
119
121
theorem innerDualCone_sUnion (S : Set (Set H)) : (⋃₀ S).innerDualCone = sInf (Set.innerDualCone '' S) := by
simp_rw [sInf_image, sUnion_eq_biUnion, innerDualCone_iUnion]
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ", " (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone", " (⋃ i, f i).inne...
[ " 0 ≤ ⟪x, c • y⟫_ℝ", " 0 ≤ c * ⟪x, y⟫_ℝ", " 0 ≤ ⟪x, u + v⟫_ℝ", " 0 ≤ ⟪x, u⟫_ℝ + ⟪x, v⟫_ℝ", " univ.innerDualCone = 0", " ↑univ.innerDualCone = ↑0", " ∀ x ∈ univ.innerDualCone, x = 0", " x = 0", " 0 ≤ ⟪x, 0⟫_ℝ", " (insert x s).innerDualCone = {x}.innerDualCone ⊓ s.innerDualCone", " (⋃ i, f i).inne...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum fro...
Mathlib/Algebra/GeomSum.lean
60
60
theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by
simp [geom_sum_succ']
[ " ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1", " ∑ i ∈ range 1, x ^ i = 1" ]
[ " ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1", " ∑ i ∈ range 1, x ^ i = 1" ]
import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Shapes.RegularMono import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms #align_import category_theory.limits.mono_coprod from "leanprover-community/mathli...
Mathlib/CategoryTheory/Limits/MonoCoprod.lean
78
87
theorem mono_inl_iff {A B : C} {c₁ c₂ : BinaryCofan A B} (hc₁ : IsColimit c₁) (hc₂ : IsColimit c₂) : Mono c₁.inl ↔ Mono c₂.inl := by
suffices ∀ (c₁ c₂ : BinaryCofan A B) (_ : IsColimit c₁) (_ : IsColimit c₂) (_ : Mono c₁.inl), Mono c₂.inl by exact ⟨fun h₁ => this _ _ hc₁ hc₂ h₁, fun h₂ => this _ _ hc₂ hc₁ h₂⟩ intro c₁ c₂ hc₁ hc₂ intro simpa only [IsColimit.comp_coconePointUniqueUpToIso_hom] using mono_comp c₁.inl (hc₁.coco...
[ " Mono c.inl", " Mono c.inr", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ T) (g : (pair A B).obj { as := WalkingPair.left } ⟶ T),\n (BinaryCofan.mk c.inr c.inl).inl ≫ (fun {T} f₁ f₂ => hc.desc (BinaryCofan.mk f₂ f₁)) f g = f", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ ...
[ " Mono c.inl", " Mono c.inr", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ T) (g : (pair A B).obj { as := WalkingPair.left } ⟶ T),\n (BinaryCofan.mk c.inr c.inl).inl ≫ (fun {T} f₁ f₂ => hc.desc (BinaryCofan.mk f₂ f₁)) f g = f", " ∀ {T : C} (f : (pair A B).obj { as := WalkingPair.right } ⟶ ...
import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Expand import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.ZMod.Basic #align_import ring_theory.witt_vector.witt_polynomial from "leanprover-c...
Mathlib/RingTheory/WittVector/WittPolynomial.lean
125
132
theorem constantCoeff_wittPolynomial [hp : Fact p.Prime] (n : ℕ) : constantCoeff (wittPolynomial p R n) = 0 := by
simp only [wittPolynomial, map_sum, constantCoeff_monomial] rw [sum_eq_zero] rintro i _ rw [if_neg] rw [Finsupp.single_eq_zero] exact ne_of_gt (pow_pos hp.1.pos _)
[ " wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
[ " wittPolynomial p R n = ∑ i ∈ range (n + 1), C (↑p ^ i) * X i ^ p ^ (n - i)", " ∀ x ∈ range (n + 1), (monomial (single x (p ^ (n - x)))) (↑p ^ x) = C (↑p ^ x) * X x ^ p ^ (n - x)", " (monomial (single i (p ^ (n - i)))) (↑p ^ i) = C (↑p ^ i) * X i ^ p ^ (n - i)", " X i ^ 0 = 1", " (map f) (W_ R n) = W_ S n"...
import Mathlib.Data.List.Range import Mathlib.Data.Multiset.Range #align_import data.multiset.nodup from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" namespace Multiset open Function List variable {α β γ : Type*} {r : α → α → Prop} {s t : Multiset α} {a : α} -- nodup def Nodup (s ...
Mathlib/Data/Multiset/Nodup.lean
96
100
theorem count_eq_of_nodup [DecidableEq α] {a : α} {s : Multiset α} (d : Nodup s) : count a s = if a ∈ s then 1 else 0 := by
split_ifs with h · exact count_eq_one_of_mem d h · exact count_eq_zero_of_not_mem h
[ " s = a ::ₘ a ::ₘ t", " Nodup (Quot.mk Setoid.r _l) ↔ ∀ (a : α), count a (Quot.mk Setoid.r _l) ≤ 1", " _l.Nodup ↔ ∀ (a : α), List.count a _l ≤ 1", " Nodup (Quot.mk Setoid.r _l) ↔ ∀ a ∈ Quot.mk Setoid.r _l, count a (Quot.mk Setoid.r _l) = 1", " count a s = if a ∈ s then 1 else 0", " count a s = 1", " cou...
[ " s = a ::ₘ a ::ₘ t", " Nodup (Quot.mk Setoid.r _l) ↔ ∀ (a : α), count a (Quot.mk Setoid.r _l) ≤ 1", " _l.Nodup ↔ ∀ (a : α), List.count a _l ≤ 1", " Nodup (Quot.mk Setoid.r _l) ↔ ∀ a ∈ Quot.mk Setoid.r _l, count a (Quot.mk Setoid.r _l) = 1", " count a s = if a ∈ s then 1 else 0" ]
import Mathlib.CategoryTheory.Monoidal.Free.Coherence import Mathlib.CategoryTheory.Monoidal.Discrete import Mathlib.CategoryTheory.Monoidal.NaturalTransformation import Mathlib.CategoryTheory.Monoidal.Opposite import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.CommSq #align_import category_...
Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
102
108
theorem braiding_tensor_right (X Y Z : C) : (β_ X (Y ⊗ Z)).hom = (α_ X Y Z).inv ≫ (β_ X Y).hom ▷ Z ≫ (α_ Y X Z).hom ≫ Y ◁ (β_ X Z).hom ≫ (α_ Y Z X).inv := by
apply (cancel_epi (α_ X Y Z).hom).1 apply (cancel_mono (α_ Y Z X).hom).1 simp [hexagon_forward]
[ " (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X...
[ " (β_ (X ⊗ Y) Z).hom = (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " (α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom =\n (α_ X Y Z).inv ≫ (α_ X Y Z).hom ≫ X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y ≫ (α_ Z X Y).hom", " ((α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom) ≫ (α_ Z X...
import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Monoid.WithTop #align_import algebra.order.group.with_top from "leanprover-community/mathlib"@"f178c0e25af359f6cbc72a96a243efd3b12423a3" namespace WithTop variable {α : Type*} namespace LinearOrderedAddCommGroup variable [LinearOrderedAddCommG...
Mathlib/Algebra/Order/Group/WithTop.lean
65
65
theorem sub_top {a : WithTop α} : a - ⊤ = ⊤ := by
cases a <;> rfl
[ " ⊤ - a = ⊤", " ⊤ - ⊤ = ⊤", " ⊤ - ↑a✝ = ⊤", " a - ⊤ = ⊤", " ↑a✝ - ⊤ = ⊤" ]
[ " ⊤ - a = ⊤", " ⊤ - ⊤ = ⊤", " ⊤ - ↑a✝ = ⊤", " a - ⊤ = ⊤" ]
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
61
67
theorem Finset.centerMass_insert (ha : i ∉ t) (hw : ∑ j ∈ t, w j ≠ 0) : (insert i t).centerMass w z = (w i / (w i + ∑ j ∈ t, w j)) • z i + ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z := by
simp only [centerMass, sum_insert ha, smul_add, (mul_smul _ _ _).symm, ← div_eq_inv_mul] congr 2 rw [div_mul_eq_mul_div, mul_inv_cancel hw, one_div]
[ " ∅.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 ...
[ " ∅.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" ]
import Mathlib.Topology.Separation import Mathlib.Topology.Bases #align_import topology.dense_embedding from "leanprover-community/mathlib"@"148aefbd371a25f1cff33c85f20c661ce3155def" noncomputable section open Set Filter open scoped Topology variable {α : Type*} {β : Type*} {γ : Type*} {δ : Type*} structure D...
Mathlib/Topology/DenseEmbedding.lean
75
78
theorem dense_image (di : DenseInducing i) {s : Set α} : Dense (i '' s) ↔ Dense s := by
refine ⟨fun H x => ?_, di.dense.dense_image di.continuous⟩ rw [di.toInducing.closure_eq_preimage_closure_image, H.closure_eq, preimage_univ] trivial
[ " closure (i '' s) ∈ 𝓝 (i a)", " U ⊆ closure (i '' s)", " Dense (i '' s) ↔ Dense s", " x ∈ closure s", " x ∈ univ" ]
[ " closure (i '' s) ∈ 𝓝 (i a)", " U ⊆ closure (i '' s)", " Dense (i '' s) ↔ Dense s" ]
import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.Data.Finset.Pointwise #align_import algebra.monoid_algebra.support from "leanprover-community/mathlib"@"16749fc4661828cba18cd0f4e3c5eb66a8e80598" open scoped Pointwise universe u₁ u₂ u₃ namespace MonoidAlgebra open Finset Finsupp variable {k : Type u₁} ...
Mathlib/Algebra/MonoidAlgebra/Support.lean
65
71
theorem support_mul_single [Mul G] [IsRightCancelMul G] (f : MonoidAlgebra k G) (r : k) (hr : ∀ y, y * r = 0 ↔ y = 0) (x : G) : (f * single x r).support = f.support.map (mulRightEmbedding x) := by
classical ext simp only [support_mul_single_eq_image f hr (IsRightRegular.all x), mem_image, mem_map, mulRightEmbedding_apply]
[ " (a * b).support ⊆ a.support * b.support", " (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support", " image₂ (fun x x_1 => x * x_1) {a} f.support ⊆ image (fun x => a * x) f.support", " image₂ (fun x x_1 => x * x_1) f.support {a} ⊆ image (fun x => x * a) f.support...
[ " (a * b).support ⊆ a.support * b.support", " (sum a fun a₁ b₁ => sum b fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)).support ⊆ a.support * b.support", " image₂ (fun x x_1 => x * x_1) {a} f.support ⊆ image (fun x => a * x) f.support", " image₂ (fun x x_1 => x * x_1) f.support {a} ⊆ image (fun x => x * a) f.support...
import Mathlib.Init.Logic import Mathlib.Init.Function import Mathlib.Init.Algebra.Classes import Batteries.Util.LibraryNote import Batteries.Tactic.Lint.Basic #align_import logic.basic from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" #align_import init.ite_simp from "leanprover-communit...
Mathlib/Logic/Basic.lean
601
602
theorem rec_heq_of_heq {C : α → Sort*} {x : C a} {y : β} (e : a = b) (h : HEq x y) : HEq (e ▸ x) y := by
subst e; exact h
[ " h ▸ z = cast ⋯ z", " ⋯ ▸ z = cast ⋯ z", " HEq (t ▸ p) p", " HEq (⋯ ▸ p) p", " HEq (e ▸ x) y", " HEq (⋯ ▸ x) y" ]
[ " h ▸ z = cast ⋯ z", " ⋯ ▸ z = cast ⋯ z", " HEq (t ▸ p) p", " HEq (⋯ ▸ p) p", " HEq (e ▸ x) y" ]
import Batteries.Classes.Order namespace Batteries.PairingHeapImp inductive Heap (α : Type u) where | nil : Heap α | node (a : α) (child sibling : Heap α) : Heap α deriving Repr def Heap.size : Heap α → Nat | .nil => 0 | .node _ c s => c.size + 1 + s.size def Heap.singleton (a : α) : Heap α := ....
.lake/packages/batteries/Batteries/Data/PairingHeap.lean
103
105
theorem Heap.noSibling_deleteMin {s : Heap α} (eq : s.deleteMin le = some (a, s')) : s'.NoSibling := by
cases s with cases eq | node a c => exact noSibling_combine _ _
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.UniversalEnveloping import Mathlib.GroupTheory.GroupAction.Ring #align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4" universe ...
Mathlib/Algebra/Lie/Free.lean
103
106
theorem Rel.smulOfTower {S : Type*} [Monoid S] [DistribMulAction S R] [IsScalarTower S R R] (t : S) (a b : lib R X) (h : Rel R X a b) : Rel R X (t • a) (t • b) := by
rw [← smul_one_smul R t a, ← smul_one_smul R t b] exact h.smul _
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)", " Rel R X (a - b) (a - c)", " Rel R X (a - c) (b - c)", " Rel R X (t • a) (t • b)", " Rel R X ((t • 1) • a) ((t • 1) • b)" ]
[ " Rel R X (a + b) (a + c)", " Rel R X (b + a) (c + a)", " Rel R X (-a) (-b)", " Rel R X (a - b) (a - c)", " Rel R X (a - c) (b - c)", " Rel R X (t • a) (t • b)" ]
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [Mu...
Mathlib/Algebra/Polynomial/Smeval.lean
65
67
theorem eval_eq_smeval : p.eval r = p.smeval r := by
rw [eval_eq_sum, smeval_eq_sum] rfl
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r • x ^ 0", " ((monomial n) r).smeval x = r • x ^ n", " eval r p = p.smeval r", " (p.sum fun e a => a * r ^ e) = p.sum (smul_pow r)" ]
[ " p.smeval x = p.sum (smul_pow x)", " (C r).smeval x = r • x ^ 0", " ((monomial n) r).smeval x = r • x ^ n", " eval r p = p.smeval r" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
95
101
theorem angle_add_eq_arctan_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0) : angle x (x + y) = Real.arctan (‖y‖ / ‖x‖) := by
rw [angle_add_eq_arcsin_of_inner_eq_zero h (Or.inl h0), Real.arctan_eq_arcsin, ← div_mul_eq_div_div, norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h] nth_rw 3 [← Real.sqrt_sq (norm_nonneg x)] rw_mod_cast [← Real.sqrt_mul (sq_nonneg _), div_pow, pow_two, pow_two, mul_add, mul_one, mul_div, mul_comm (‖x‖ * ‖x‖...
[ " ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2", " ⟪x, y⟫_ℝ = 0 ↔ angle x y = π / 2", " ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2", " angle x (x + y) = (‖x‖ / ‖x + y‖).arccos", " (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)).arccos = (‖x‖ / ‖x + y‖).arccos", " angle x (x + y) = (‖y‖ /...
[ " ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2", " ⟪x, y⟫_ℝ = 0 ↔ angle x y = π / 2", " ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2", " angle x (x + y) = (‖x‖ / ‖x + y‖).arccos", " (‖x‖ * ‖x‖ / (‖x‖ * ‖x + y‖)).arccos = (‖x‖ / ‖x + y‖).arccos", " angle x (x + y) = (‖y‖ /...
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
101
108
theorem wellFoundedOn_range : (range f).WellFoundedOn r ↔ WellFounded (r on f) := by
let f' : β → range f := fun c => ⟨f c, c, rfl⟩ refine ⟨fun h => (InvImage.wf f' h).mono fun c c' => id, fun h => ⟨?_⟩⟩ rintro ⟨_, c, rfl⟩ refine Acc.of_downward_closed f' ?_ _ ?_ · rintro _ ⟨_, c', rfl⟩ - exact ⟨c', rfl⟩ · exact h.apply _
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
47
51
theorem birthday_def (x : PGame) : birthday x = max (lsub.{u, u} fun i => birthday (x.moveLeft i)) (lsub.{u, u} fun i => birthday (x.moveRight i)) := by
cases x; rw [birthday]; rfl
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)" ]
import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic import Mathlib.Tactic.Ring #align_import data.fintype.perm from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" open Function open Nat universe u v variable {α β γ : Type*} open Finset Function List Equiv Equiv.Per...
Mathlib/Data/Fintype/Perm.lean
77
94
theorem mem_of_mem_permsOfList : -- Porting note: was `∀ {x}` but need to capture the `x` ∀ {l : List α} {f : Perm α}, f ∈ permsOfList l → (x :α ) → f x ≠ x → x ∈ l | [], f, h, heq_iff_eq => by have : f = 1 := by
simpa [permsOfList] using h rw [this]; simp | a :: l, f, h, x => (mem_append.1 h).elim (fun h hx => mem_cons_of_mem _ (mem_of_mem_permsOfList h x hx)) fun h hx => let ⟨y, hy, hy'⟩ := List.mem_bind.1 h let ⟨g, hg₁, hg₂⟩ := List.mem_map.1 hy' -- Porting note: Seems like the implicit var...
[ " (permsOfList (a :: l)).length = (a :: l).length !", " (permsOfList (a :: l)).length = (l.length + 1) * l.length !", " l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !", " f ∈ permsOfList l", " f ∈ permsOfList []", " f ∈ permsOfList (a :: l)", " x ≠ a", " False", " ∀ (x : α),...
[ " (permsOfList (a :: l)).length = (a :: l).length !", " (permsOfList (a :: l)).length = (l.length + 1) * l.length !", " l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !", " f ∈ permsOfList l", " f ∈ permsOfList []", " f ∈ permsOfList (a :: l)", " x ≠ a", " False", " ∀ (x : α),...
import Mathlib.Data.Nat.Cast.Basic import Mathlib.Algebra.CharZero.Defs import Mathlib.Algebra.Order.Group.Abs import Mathlib.Data.Nat.Cast.NeZero import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.cast.basic from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" variable {α β : T...
Mathlib/Data/Nat/Cast/Order.lean
88
88
theorem cast_pos' {n : ℕ} : (0 : α) < n ↔ 0 < n := by
cases n <;> simp [cast_add_one_pos]
[ " ↑n ≤ ↑(n + 1)", " ↑n ≤ ↑n + 1", " 0 < ↑n + 1", " 1 ≤ ↑n + 1", " 1 = ↑1", " ↑n + 1 = ↑(n + 1)", " 1 ≤ n + 1", " 0 < ↑n ↔ 0 < n", " 0 < ↑0 ↔ 0 < 0", " 0 < ↑(n✝ + 1) ↔ 0 < n✝ + 1" ]
[ " ↑n ≤ ↑(n + 1)", " ↑n ≤ ↑n + 1", " 0 < ↑n + 1", " 1 ≤ ↑n + 1", " 1 = ↑1", " ↑n + 1 = ↑(n + 1)", " 1 ≤ n + 1", " 0 < ↑n ↔ 0 < n" ]
import Mathlib.Topology.Separation import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.UniformSpace.Cauchy #align_import topology.uniform_space.uniform_convergence from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" noncomputable section open Topology Uniformity Filter S...
Mathlib/Topology/UniformSpace/UniformConvergence.lean
160
162
theorem tendstoUniformly_iff_tendsto {F : ι → α → β} {f : α → β} {p : Filter ι} : TendstoUniformly F f p ↔ Tendsto (fun q : ι × α => (f q.2, F q.1 q.2)) (p ×ˢ ⊤) (𝓤 β) := by
simp [tendstoUniformly_iff_tendstoUniformlyOnFilter, tendstoUniformlyOnFilter_iff_tendsto]
[ " TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)", " (∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ u) ↔\n ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ∈ u", " ∀ a ∈ 𝓤 β, (∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ a) ↔ ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ...
[ " TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)", " (∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ u) ↔\n ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ∈ u", " ∀ a ∈ 𝓤 β, (∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ a) ↔ ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ...
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.Dual #align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2...
Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
68
72
theorem contractLeftAux_contractLeftAux (v : M) (x : CliffordAlgebra Q) (fx : CliffordAlgebra Q) : contractLeftAux Q d v (ι Q v * x, contractLeftAux Q d v (x, fx)) = Q v • fx := by
simp only [contractLeftAux_apply_apply] rw [mul_sub, ← mul_assoc, ι_sq_scalar, ← Algebra.smul_def, ← sub_add, mul_smul_comm, sub_self, zero_add]
[ " ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx", " d v • ((ι Q) v * x) - (ι Q) v * (d v • x - (ι Q) v * fx) = Q v • fx" ]
[ " ((contractLeftAux Q d) v) ((ι Q) v * x, ((contractLeftAux Q d) v) (x, fx)) = Q v • fx" ]
import Mathlib.Topology.PartialHomeomorph import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Data.Real.Sqrt #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Set Metric Pointwise var...
Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
133
137
theorem ball_subset_univBall_target (c : P) (r : ℝ) : ball c r ⊆ (univBall c r).target := by
by_cases hr : 0 < r · rw [univBall_target c hr] · rw [univBall, dif_neg hr] exact subset_univ _
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
[ " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1", " 0 < 1 + ‖x‖ ^ 2", " ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2", " (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x", " (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y", " 0 < 1 - ‖y‖ ^ 2", " ContinuousOn\n ↑{ toFu...
import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Digits import Mathlib.Data.Nat.MaxPowDiv import Mathlib.Data.Nat.Multiplicity import Mathlib.Tactic.IntervalCases #align_import number_theory.padics.padic_val from "leanprover-community/mathlib"@"60fa54e778c9e85d930efae172435f42fb0d71f7" universe u ope...
Mathlib/NumberTheory/Padics/PadicVal.lean
119
124
theorem maxPowDiv_eq_multiplicity {p n : ℕ} (hp : 1 < p) (hn : 0 < n) : p.maxPowDiv n = multiplicity p n := by
apply multiplicity.unique <| pow_dvd p n intro h apply Nat.not_lt.mpr <| le_of_dvd hp hn h simp
[ " padicValNat p 0 = 0", " padicValNat p 1 = 0", " (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0", " (multiplicity p 1).get ⋯ = 0", " 0 = 0", " padicValNat p p = 1", " padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n", " ↑(p.maxPowDiv n) = multiplicity p n", " ¬p ^ (p.maxPowDiv n + 1) ∣...
[ " padicValNat p 0 = 0", " padicValNat p 1 = 0", " (if h : p ≠ 1 ∧ 0 < 1 then (multiplicity p 1).get ⋯ else 0) = 0", " (multiplicity p 1).get ⋯ = 0", " 0 = 0", " padicValNat p p = 1", " padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n", " ↑(p.maxPowDiv n) = multiplicity p n" ]
import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Commutator import Mathlib.GroupTheory.Finiteness #align_import group_theory.abelianization from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef" universe u v w -- Let G be a group. variable (G : Type u) [Group G] open Subgroup (...
Mathlib/GroupTheory/Abelianization.lean
49
50
theorem commutator_eq_closure : commutator G = Subgroup.closure (commutatorSet G) := by
simp [commutator, Subgroup.commutator_def, commutatorSet]
[ " commutator G = Subgroup.closure (commutatorSet G)" ]
[ " commutator G = Subgroup.closure (commutatorSet G)" ]
import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Data.Set.Lattice #align_import data.set.intervals.ord_connected_component from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open Interval Function OrderDual namespace Set variable {α : Type*} [LinearOrder α] {s t : Set α}...
Mathlib/Order/Interval/Set/OrdConnectedComponent.lean
63
64
theorem ordConnectedComponent_eq_empty : ordConnectedComponent s x = ∅ ↔ x ∉ s := by
rw [← not_nonempty_iff_eq_empty, nonempty_ordConnectedComponent]
[ " toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " x ∈ s.ordConnectedComponent x ↔ x ∈ s", " s.ordConnectedComponent x = ∅ ↔ x ∉ s" ]
[ " toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝", " x ∈ s.ordConnectedComponent x ↔ x ∈ s", " s.ordConnectedComponent x = ∅ ↔ x ∉ s" ]