Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
goals
listlengths
0
224
goals_before
listlengths
0
220
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.RingTheory.PowerBasis #align_import linear_algebra.matrix.charpoly.minpoly from "leanprover-community/mathlib"@"7ae139f966795f684fc689186f9ccbaedd31bf31" noncomputable section universe u v w open Polynomi...
Mathlib/LinearAlgebra/Matrix/Charpoly/Minpoly.lean
83
92
theorem charpoly_leftMulMatrix {S : Type*} [Ring S] [Algebra R S] (h : PowerBasis R S) : (leftMulMatrix h.basis h.gen).charpoly = minpoly R h.gen := by
cases subsingleton_or_nontrivial R; Β· apply Subsingleton.elim apply minpoly.unique' R h.gen (charpoly_monic _) Β· apply (injective_iff_map_eq_zero (G := S) (leftMulMatrix _)).mp (leftMulMatrix_injective h.basis) rw [← Polynomial.aeval_algHom_apply, aeval_self_charpoly] refine fun q hq => or_iff_not_im...
[ " ((leftMulMatrix h.basis) h.gen).charpoly = minpoly R h.gen", " (aeval h.gen) ((leftMulMatrix h.basis) h.gen).charpoly = 0", " (leftMulMatrix h.basis) ((aeval h.gen) ((leftMulMatrix h.basis) h.gen).charpoly) = 0", " βˆ€ (q : R[X]), q.degree < ((leftMulMatrix h.basis) h.gen).charpoly.degree β†’ q = 0 ∨ (aeval h.g...
[]
import Mathlib.Topology.Algebra.InfiniteSum.Basic import Mathlib.Topology.Algebra.UniformGroup noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section TopologicalGroup variable [CommGroup Ξ±] [TopologicalSpace Ξ±] [TopologicalGroup Ξ±] variable {f g : Ξ² β†’ Ξ±} {a a₁...
Mathlib/Topology/Algebra/InfiniteSum/Group.lean
30
31
theorem HasProd.inv (h : HasProd f a) : HasProd (fun b ↦ (f b)⁻¹) a⁻¹ := by
simpa only using h.map (MonoidHom.id α)⁻¹ continuous_inv
[ " HasProd (fun b => (f b)⁻¹) a⁻¹" ]
[]
import Mathlib.CategoryTheory.Sites.Sieves import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.Multiequalizer import Mathlib.CategoryTheory.Category.Preorder import Mathlib.Order.Copy import Mathlib.Data.Set.Subsingleton #align_import category_theory.sites.grothendieck fr...
Mathlib/CategoryTheory/Sites/Grothendieck.lean
191
193
theorem arrow_max (f : Y ⟢ X) (S : Sieve X) (hf : S f) : J.Covers S f := by
rw [Covers, (Sieve.pullback_eq_top_iff_mem f).1 hf] apply J.top_mem
[ " J₁ = Jβ‚‚", " { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = Jβ‚‚", " { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback...
[ " J₁ = Jβ‚‚", " { sieves := sieves✝, top_mem' := top_mem'✝, pullback_stable' := pullback_stable'✝, transitive' := transitive'✝ } = Jβ‚‚", " { sieves := sieves✝¹, top_mem' := top_mem'✝¹, pullback_stable' := pullback_stable'✝¹, transitive' := transitive'✝¹ } =\n { sieves := sieves✝, top_mem' := top_mem'✝, pullback...
import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Dimension.Constructions open Cardinal Submodule Set FiniteDimensional universe u v namespace Subalgebra variable {F E : Type*} [CommRing F] [StrongRankCondition F] [Ring E] [Algebra F E] {S : Subalgebra F E} theorem eq_bot_of_rank_le_o...
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
311
315
theorem bot_eq_top_iff_finrank_eq_one [Nontrivial E] [Module.Free F E] : (βŠ₯ : Subalgebra F E) = ⊀ ↔ finrank F E = 1 := by
haveI := Module.Free.of_equiv (Subalgebra.topEquiv (R := F) (A := E)).toLinearEquiv.symm rw [← finrank_top, ← subalgebra_top_finrank_eq_submodule_top_finrank, Subalgebra.finrank_eq_one_iff, eq_comm]
[ " S = βŠ₯", " x ∈ range ⇑(algebraMap F E)", " Module.rank F β†₯S ≀ 1", " Module.rank F β†₯S = 1 ↔ S = βŠ₯", " S = βŠ₯ β†’ Module.rank F β†₯S = 1", " Module.rank F β†₯βŠ₯ = 1", " Module.rank F β†₯βŠ₯ ≀ 1", " 1 ≀ Module.rank F β†₯βŠ₯", " False", " finrank F β†₯S = 1 ↔ S = βŠ₯", " finrank F β†₯S = 1 ↔ Module.rank F β†₯S = 1", " βŠ₯...
[ " S = βŠ₯", " x ∈ range ⇑(algebraMap F E)", " Module.rank F β†₯S ≀ 1", " Module.rank F β†₯S = 1 ↔ S = βŠ₯", " S = βŠ₯ β†’ Module.rank F β†₯S = 1", " Module.rank F β†₯βŠ₯ = 1", " Module.rank F β†₯βŠ₯ ≀ 1", " 1 ≀ Module.rank F β†₯βŠ₯", " False", " finrank F β†₯S = 1 ↔ S = βŠ₯", " finrank F β†₯S = 1 ↔ Module.rank F β†₯S = 1", " βŠ₯...
import Mathlib.Analysis.Normed.Group.Basic #align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" section HammingDistNorm open Finset Function variable {Ξ± ΞΉ : Type*} {Ξ² : ΞΉ β†’ Type*} [Fintype ΞΉ] [βˆ€ i, DecidableEq (Ξ² i)] variable {Ξ³ : ΞΉ β†’ Type*} [βˆ€ ...
Mathlib/InformationTheory/Hamming.lean
91
93
theorem eq_of_hammingDist_eq_zero {x y : βˆ€ i, Ξ² i} : hammingDist x y = 0 β†’ x = y := by
simp_rw [hammingDist, card_eq_zero, filter_eq_empty_iff, Classical.not_not, funext_iff, mem_univ, forall_true_left, imp_self]
[ " hammingDist x x = 0", " βˆ€ ⦃x_1 : ι⦄, x_1 ∈ univ β†’ Β¬x x_1 β‰  x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≀ hammingDist x y + hammingDist y z", " (filter (fun i => x i β‰  z i) univ).card ≀\n (filter (fun i => x i β‰  y i) univ).card + (filter (fun i => y i β‰  z i) univ).card", " filter (...
[ " hammingDist x x = 0", " βˆ€ ⦃x_1 : ι⦄, x_1 ∈ univ β†’ Β¬x x_1 β‰  x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≀ hammingDist x y + hammingDist y z", " (filter (fun i => x i β‰  z i) univ).card ≀\n (filter (fun i => x i β‰  y i) univ).card + (filter (fun i => y i β‰  z i) univ).card", " filter (...
import Mathlib.Data.List.Basic open Function open Nat hiding one_pos assert_not_exists Set.range namespace List universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} {l₁ lβ‚‚ : List Ξ±} section InsertNth variable {a : Ξ±} @[simp] theorem insertNth_zero (s : List Ξ±) (x : Ξ±) : insertNth 0 x s...
Mathlib/Data/List/InsertNth.lean
130
135
theorem length_insertNth_le_succ (l : List Ξ±) (x : Ξ±) (n : β„•) : (insertNth n x l).length ≀ l.length + 1 := by
rcases le_or_lt n l.length with hn | hn Β· rw [length_insertNth _ _ hn] Β· rw [insertNth_of_length_lt _ _ _ hn] exact (Nat.lt_succ_self _).le
[ " (insertNth n a l).eraseIdx n = l", " modifyNthTail (tail ∘ cons a) n l = l", " insertNth 0 a ((head✝ :: as).eraseIdx 0) = (insertNth (0 + 1) a (head✝ :: as)).eraseIdx 0", " 0 ≀ j β†’ j ≀ l.length β†’ insertNth (j + 1) b (insertNth 0 a l) = insertNth 0 a (insertNth j b l)", " i + 1 ≀ j + 1 β†’\n j + 1 ≀ [].le...
[ " (insertNth n a l).eraseIdx n = l", " modifyNthTail (tail ∘ cons a) n l = l", " insertNth 0 a ((head✝ :: as).eraseIdx 0) = (insertNth (0 + 1) a (head✝ :: as)).eraseIdx 0", " 0 ≀ j β†’ j ≀ l.length β†’ insertNth (j + 1) b (insertNth 0 a l) = insertNth 0 a (insertNth j b l)", " i + 1 ≀ j + 1 β†’\n j + 1 ≀ [].le...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Div #align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8" noncomputable ...
Mathlib/Algebra/Polynomial/RingDivision.lean
148
153
theorem degree_le_mul_left (p : R[X]) (hq : q β‰  0) : degree p ≀ degree (p * q) := by
classical exact if hp : p = 0 then by simp only [hp, zero_mul, le_refl] else by rw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq]; exact WithBot.coe_le_coe.2 (Nat.le_add_right _ _)
[ " a✝ = 0 ∨ b✝ = 0", " a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0", " a✝.leadingCoeff * b✝.leadingCoeff = 0", " (p * q).natDegree = p.natDegree + q.natDegree", " (p * q).trailingDegree = p.trailingDegree + q.trailingDegree", " ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail...
[ " a✝ = 0 ∨ b✝ = 0", " a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0", " a✝.leadingCoeff * b✝.leadingCoeff = 0", " (p * q).natDegree = p.natDegree + q.natDegree", " (p * q).trailingDegree = p.trailingDegree + q.trailingDegree", " ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail...
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
49
55
theorem continuousAt_oangle {x : P Γ— P Γ— P} (hx12 : x.1 β‰  x.2.1) (hx32 : x.2.2 β‰  x.2.1) : ContinuousAt (fun y : P Γ— P Γ— P => ∑ y.1 y.2.1 y.2.2) x := by
let f : P Γ— P Γ— P β†’ V Γ— V := fun y => (y.1 -α΅₯ y.2.1, y.2.2 -α΅₯ y.2.1) have hf1 : (f x).1 β‰  0 := by simp [hx12] have hf2 : (f x).2 β‰  0 := by simp [hx32] exact (o.continuousAt_oangle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt
[ " ContinuousAt (fun y => ∑ y.1 y.2.1 y.2.2) x", " (f x).1 β‰  0", " (f x).2 β‰  0" ]
[]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds #align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973" -- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals. open scoped Real namespace Real theorem ...
Mathlib/Data/Real/Pi/Bounds.lean
85
93
theorem sqrtTwoAddSeries_step_up (c d : β„•) {a b n : β„•} {z : ℝ} (hz : sqrtTwoAddSeries (c / d) n ≀ z) (hb : 0 < b) (hd : 0 < d) (h : (2 * b + a) * d ^ 2 ≀ c ^ 2 * b) : sqrtTwoAddSeries (a / b) (n + 1) ≀ z := by
refine le_trans ?_ hz; rw [sqrtTwoAddSeries_succ]; apply sqrtTwoAddSeries_monotone_left have hb' : 0 < (b : ℝ) := Nat.cast_pos.2 hb have hd' : 0 < (d : ℝ) := Nat.cast_pos.2 hd rw [sqrt_le_left (div_nonneg c.cast_nonneg d.cast_nonneg), div_pow, add_div_eq_mul_add_div _ _ (ne_of_gt hb'), div_le_div_iff hb' (...
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < Ο€", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο€", " 0 < 2 ^ (n + 2)", " (Ο€ / 2 ^ (n + 2)).sin < Ο€ / 2 ^ (n + 2)", " 0 < Ο€ / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 β‰  ...
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < Ο€", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο€", " 0 < 2 ^ (n + 2)", " (Ο€ / 2 ^ (n + 2)).sin < Ο€ / 2 ^ (n + 2)", " 0 < Ο€ / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 β‰  ...
import Mathlib.Geometry.Euclidean.Sphere.Basic import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional import Mathlib.Tactic.DeriveFintype #align_import geometry.euclidean.circumcenter from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" noncomputable section open scoped Classical o...
Mathlib/Geometry/Euclidean/Circumcenter.lean
76
81
theorem exists_dist_eq_iff_exists_dist_orthogonalProjection_eq {s : AffineSubspace ℝ P} [Nonempty s] [HasOrthogonalProjection s.direction] {ps : Set P} (hps : ps βŠ† s) (p : P) : (βˆƒ r, βˆ€ p1 ∈ ps, dist p1 p = r) ↔ βˆƒ r, βˆ€ p1 ∈ ps, dist p1 ↑(orthogonalProjection s p) = r := by
have h := dist_set_eq_iff_dist_orthogonalProjection_eq hps p simp_rw [Set.pairwise_eq_iff_exists_eq] at h exact h
[ " dist p1 p3 = dist p2 p3 ↔ dist p1 ↑((orthogonalProjection s) p3) = dist p2 ↑((orthogonalProjection s) p3)", " dist p1 ↑((orthogonalProjection s) p3) * dist p1 ↑((orthogonalProjection s) p3) +\n dist p3 ↑((orthogonalProjection s) p3) * dist p3 ↑((orthogonalProjection s) p3) =\n dist p2 ↑((orthogonalP...
[ " dist p1 p3 = dist p2 p3 ↔ dist p1 ↑((orthogonalProjection s) p3) = dist p2 ↑((orthogonalProjection s) p3)", " dist p1 ↑((orthogonalProjection s) p3) * dist p1 ↑((orthogonalProjection s) p3) +\n dist p3 ↑((orthogonalProjection s) p3) * dist p3 ↑((orthogonalProjection s) p3) =\n dist p2 ↑((orthogonalP...
import Mathlib.AlgebraicTopology.DoldKan.FunctorN import Mathlib.AlgebraicTopology.DoldKan.Decomposition import Mathlib.CategoryTheory.Idempotents.HomologicalComplex import Mathlib.CategoryTheory.Idempotents.KaroubiKaroubi #align_import algebraic_topology.dold_kan.n_reflects_iso from "leanprover-community/mathlib"@"3...
Mathlib/AlgebraicTopology/DoldKan/NReflectsIso.lean
68
92
theorem compatibility_Nβ‚‚_N₁_karoubi : Nβ‚‚ β‹™ (karoubiChainComplexEquivalence C β„•).functor = karoubiFunctorCategoryEmbedding SimplexCategoryα΅’α΅– C β‹™ N₁ β‹™ (karoubiChainComplexEquivalence (Karoubi C) β„•).functor β‹™ Functor.mapHomologicalComplex (KaroubiKaroubi.equivalence C).inverse _ := by
refine CategoryTheory.Functor.ext (fun P => ?_) fun P Q f => ?_ Β· refine HomologicalComplex.ext ?_ ?_ Β· ext n Β· rfl Β· dsimp simp only [karoubi_PInfty_f, comp_id, PInfty_f_naturality, id_comp, eqToHom_refl] Β· rintro _ n (rfl : n + 1 = _) ext have h := (AlternatingFaceMapCompl...
[ " βˆ€ [inst : IsIso (N₁.map f)], IsIso f", " IsIso f", " βˆ€ (n : β„•), IsIso (f.app { unop := [n] })", " IsIso (f.app { unop := [n] })", " IsIso (f.app { unop := [0] })", " f.app { unop := [0] } ≫ (inv (N₁.map f)).f.f 0 = πŸ™ (X _[0]) ∧\n (inv (N₁.map f)).f.f 0 ≫ f.app { unop := [0] } = πŸ™ (Y _[0])", " IsI...
[ " βˆ€ [inst : IsIso (N₁.map f)], IsIso f", " IsIso f", " βˆ€ (n : β„•), IsIso (f.app { unop := [n] })", " IsIso (f.app { unop := [n] })", " IsIso (f.app { unop := [0] })", " f.app { unop := [0] } ≫ (inv (N₁.map f)).f.f 0 = πŸ™ (X _[0]) ∧\n (inv (N₁.map f)).f.f 0 ≫ f.app { unop := [0] } = πŸ™ (Y _[0])", " IsI...
import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b" namespace Nat def dist (n m : β„•) := n - m + (m - n) #align nat.dist Nat.dist -- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr...
Mathlib/Data/Nat/Dist.lean
92
96
theorem dist.triangle_inequality (n m k : β„•) : dist n k ≀ dist n m + dist m k := by
have : dist n m + dist m k = n - m + (m - k) + (k - m + (m - n)) := by simp [dist, add_comm, add_left_comm, add_assoc] rw [this, dist] exact add_le_add tsub_le_tsub_add_tsub tsub_le_tsub_add_tsub
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≀ n + n.dist m", " m ≀ n.dist m + n", " n ≀ n.dist m + m", " n ≀ m.dist n + m", " n ≀ m + n.dist m", " n ≀ m + m.dist n", " n + k - (m + k) + (m + k - (n + k)) = n - m...
[ " n.dist m = m.dist n", " n.dist n = 0", " n.dist m = 0", " n.dist m = m - n", " n.dist m = n - m", " m.dist n = n - m", " m ≀ n + n.dist m", " m ≀ n.dist m + n", " n ≀ n.dist m + m", " n ≀ m.dist n + m", " n ≀ m + n.dist m", " n ≀ m + m.dist n", " n + k - (m + k) + (m + k - (n + k)) = n - m...
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : β„•) : List β„• := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
104
110
theorem inter_consecutive (n m l : β„•) : Ico n m ∩ Ico m l = [] := by
apply eq_nil_iff_forall_not_mem.2 intro a simp only [and_imp, not_and, not_lt, List.mem_inter_iff, List.Ico.mem] intro _ hβ‚‚ h₃ exfalso exact not_lt_of_ge h₃ hβ‚‚
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≀ l ∧ l < m", " n ≀ l ∧ l < n + (m - n) ↔ n...
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≀ l ∧ l < m", " n ≀ l ∧ l < n + (m - n) ↔ n...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Div #align_import data.polynomial.ring_division from "leanprover-community/mathlib"@"8efcf8022aac8e01df8d302dcebdbc25d6a886c8" noncomputable ...
Mathlib/Algebra/Polynomial/RingDivision.lean
190
195
theorem natDegree_sub_eq_of_prod_eq {p₁ pβ‚‚ q₁ qβ‚‚ : R[X]} (hp₁ : p₁ β‰  0) (hq₁ : q₁ β‰  0) (hpβ‚‚ : pβ‚‚ β‰  0) (hqβ‚‚ : qβ‚‚ β‰  0) (h_eq : p₁ * qβ‚‚ = pβ‚‚ * q₁) : (p₁.natDegree : β„€) - q₁.natDegree = (pβ‚‚.natDegree : β„€) - qβ‚‚.natDegree := by
rw [sub_eq_sub_iff_add_eq_add] norm_cast rw [← natDegree_mul hp₁ hqβ‚‚, ← natDegree_mul hpβ‚‚ hq₁, h_eq]
[ " a✝ = 0 ∨ b✝ = 0", " a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0", " a✝.leadingCoeff * b✝.leadingCoeff = 0", " (p * q).natDegree = p.natDegree + q.natDegree", " (p * q).trailingDegree = p.trailingDegree + q.trailingDegree", " ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail...
[ " a✝ = 0 ∨ b✝ = 0", " a✝.leadingCoeff = 0 ∨ b✝.leadingCoeff = 0", " a✝.leadingCoeff * b✝.leadingCoeff = 0", " (p * q).natDegree = p.natDegree + q.natDegree", " (p * q).trailingDegree = p.trailingDegree + q.trailingDegree", " ↑(p.natTrailingDegree + q.natTrailingDegree) = ↑p.natTrailingDegree + ↑q.natTrail...
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Pullbacks #align_import category_theory.limits.constructions.epi_mono from "leanprover-community/mathlib"@"f7baecbb54bd0f24f228576f97b1752fc3c9b318" ...
Mathlib/CategoryTheory/Limits/Constructions/EpiMono.lean
45
49
theorem reflects_mono_of_reflectsLimit {X Y : C} (f : X ⟢ Y) [ReflectsLimit (cospan f f) F] [Mono (F.map f)] : Mono f := by
have := PullbackCone.isLimitMkIdId (F.map f) simp_rw [← F.map_id] at this apply PullbackCone.mono_of_isLimitMkIdId _ (isLimitOfIsLimitPullbackConeMap F _ this)
[ " Mono (F.map f)", " Mono f" ]
[ " Mono (F.map f)" ]
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.Algebra.Module.Torsion #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v v' u₁' w w' variable {R S : Type u} {M : Type v} {M' : Type v'} {M₁ : Type v}...
Mathlib/LinearAlgebra/Dimension/Constructions.lean
188
193
theorem rank_directSum {ΞΉ : Type v} (M : ΞΉ β†’ Type w) [βˆ€ i : ΞΉ, AddCommGroup (M i)] [βˆ€ i : ΞΉ, Module R (M i)] [βˆ€ i : ΞΉ, Module.Free R (M i)] : Module.rank R (⨁ i, M i) = Cardinal.sum fun i => Module.rank R (M i) := by
let B i := chooseBasis R (M i) let b : Basis _ R (⨁ i, M i) := DFinsupp.basis fun i => B i simp [← b.mk_eq_rank'', fun i => (B i).mk_eq_rank'']
[ " Module.rank R (ΞΉ β†’β‚€ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)", " Module.rank R (ΞΉ β†’β‚€ M) = #ΞΉ * Module.rank R M", " Module.rank R (ΞΉ β†’β‚€ R) = lift.{u, w} #ΞΉ", " Module.rank R (ΞΉ β†’β‚€ R) = #ΞΉ", " Module.rank R (⨁ (i : ΞΉ), M i) = sum fun i => Module.rank R (M i)" ]
[ " Module.rank R (ΞΉ β†’β‚€ M) = lift.{v, w} #ΞΉ * lift.{w, v} (Module.rank R M)", " Module.rank R (ΞΉ β†’β‚€ M) = #ΞΉ * Module.rank R M", " Module.rank R (ΞΉ β†’β‚€ R) = lift.{u, w} #ΞΉ", " Module.rank R (ΞΉ β†’β‚€ R) = #ΞΉ" ]
import Mathlib.Analysis.Quaternion import Mathlib.Analysis.NormedSpace.Exponential import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series #align_import analysis.normed_space.quaternion_exponential from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Quaternion Nat open...
Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
117
118
theorem im_exp (q : ℍ[ℝ]) : (exp ℝ q).im = (exp ℝ q.re * (Real.sin β€–q.imβ€– / β€–q.imβ€–)) β€’ q.im := by
simp [exp_eq, smul_smul]
[ " ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * β€–qβ€– ^ (2 * n) / ↑(2 * n)!)", " (↑(2 * n)!)⁻¹ β€’ q ^ (2 * n) = ↑((-1) ^ n * β€–qβ€– ^ (2 * n) / ↑(2 * n)!)", " k⁻¹ β€’ q ^ (2 * n) = k⁻¹ β€’ (-↑(normSq q)) ^ n", " k⁻¹ β€’ (-↑(normSq q)) ^ n = k⁻¹ β€’ ↑((-1) ^ n * β€–qβ€– ^ (2 * n))", " (-↑(normSq q)) ^ n = ↑((-1) ^ n * β€–...
[ " ((expSeries ℝ ℍ (2 * n)) fun x => q) = ↑((-1) ^ n * β€–qβ€– ^ (2 * n) / ↑(2 * n)!)", " (↑(2 * n)!)⁻¹ β€’ q ^ (2 * n) = ↑((-1) ^ n * β€–qβ€– ^ (2 * n) / ↑(2 * n)!)", " k⁻¹ β€’ q ^ (2 * n) = k⁻¹ β€’ (-↑(normSq q)) ^ n", " k⁻¹ β€’ (-↑(normSq q)) ^ n = k⁻¹ β€’ ↑((-1) ^ n * β€–qβ€– ^ (2 * n))", " (-↑(normSq q)) ^ n = ↑((-1) ^ n * β€–...
import Mathlib.Data.Fin.Fin2 import Mathlib.Data.PFun import Mathlib.Data.Vector3 import Mathlib.NumberTheory.PellMatiyasevic #align_import number_theory.dioph from "leanprover-community/mathlib"@"a66d07e27d5b5b8ac1147cacfe353478e5c14002" open Fin2 Function Nat Sum local infixr:67 " ::β‚’ " => Option.elim' local ...
Mathlib/NumberTheory/Dioph.lean
89
90
theorem IsPoly.add {f g : (Ξ± β†’ β„•) β†’ β„€} (hf : IsPoly f) (hg : IsPoly g) : IsPoly (f + g) := by
rw [← sub_neg_eq_add]; exact hf.sub hg.neg
[ " IsPoly f β†’ IsPoly (-f)", " IsPoly f β†’ IsPoly (0 - f)", " IsPoly (f + g)", " IsPoly (f - -g)" ]
[ " IsPoly f β†’ IsPoly (-f)", " IsPoly f β†’ IsPoly (0 - f)" ]
import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts #align_import category_theory.limits.constructions.zero_objects from "leanprover-community/mathlib"@"52a270e2ea4e342c2587c106f8be904524214a4...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
58
60
theorem zeroProdIso_inv_snd (X : C) : (zeroProdIso X).inv ≫ prod.snd = πŸ™ X := by
dsimp [zeroProdIso, binaryFanZeroLeft] simp
[ " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ πŸ™ X = s.snd", " m = (fun s => s.snd) s", " (zeroProdIso X).inv ≫ prod.snd = πŸ™ X", " (limit.isoLimitCone { cone := BinaryFan.mk 0 (πŸ™ X), isLimit := binaryFanZeroLeftIsLimit X }).inv ≫ prod.snd = πŸ™ X" ]
[ " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ πŸ™ X = s.snd", " m = (fun s => s.snd) s" ]
import Mathlib.Data.Multiset.Nodup #align_import data.multiset.sum from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Sum namespace Multiset variable {Ξ± Ξ² : Type*} (s : Multiset Ξ±) (t : Multiset Ξ²) def disjSum : Multiset (Sum Ξ± Ξ²) := s.map inl + t.map inr #align multiset.dis...
Mathlib/Data/Multiset/Sum.lean
50
51
theorem mem_disjSum : x ∈ s.disjSum t ↔ (βˆƒ a, a ∈ s ∧ inl a = x) ∨ βˆƒ b, b ∈ t ∧ inr b = x := by
simp_rw [disjSum, mem_add, mem_map]
[ " card (s.disjSum t) = card s + card t", " x ∈ s.disjSum t ↔ (βˆƒ a ∈ s, inl a = x) ∨ βˆƒ b ∈ t, inr b = x" ]
[ " card (s.disjSum t) = card s + card t" ]
import Mathlib.Algebra.DirectSum.Finsupp import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.DirectSum.TensorProduct #align_import linear_algebra.direct_sum.finsupp from "leanprover-community/mathlib"@"9b9d125b7be0930f564a68f1d73ace10cf46064d" noncomputable section open DirectSum TensorProduct ope...
Mathlib/LinearAlgebra/DirectSum/Finsupp.lean
315
317
theorem finsuppTensorFinsuppRid_apply_apply (f : ΞΉ β†’β‚€ M) (g : ΞΊ β†’β‚€ R) (a : ΞΉ) (b : ΞΊ) : finsuppTensorFinsuppRid R M ΞΉ ΞΊ (f βŠ—β‚œ[R] g) (a, b) = g b β€’ f a := by
simp [finsuppTensorFinsuppRid]
[ " (finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (Finsupp.single i m βŠ—β‚œ[R] Finsupp.single k n) = Finsupp.single (i, k) (m βŠ—β‚œ[R] n)", " ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (f βŠ—β‚œ[R] g)) (i, k) = f i βŠ—β‚œ[R] g k", " ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (0 βŠ—β‚œ[R] g)) (i, k) = 0 i βŠ—β‚œ[R] g k", " βˆ€ (f g_1 : ΞΉ β†’β‚€ M),\n ((finsuppT...
[ " (finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (Finsupp.single i m βŠ—β‚œ[R] Finsupp.single k n) = Finsupp.single (i, k) (m βŠ—β‚œ[R] n)", " ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (f βŠ—β‚œ[R] g)) (i, k) = f i βŠ—β‚œ[R] g k", " ((finsuppTensorFinsupp R S M N ΞΉ ΞΊ) (0 βŠ—β‚œ[R] g)) (i, k) = 0 i βŠ—β‚œ[R] g k", " βˆ€ (f g_1 : ΞΉ β†’β‚€ M),\n ((finsuppT...
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
152
155
theorem aemeasurable_of_pdf_ne_zero {m : MeasurableSpace Ξ©} {β„™ : Measure Ξ©} {ΞΌ : Measure E} (X : Ξ© β†’ E) (h : Β¬pdf X β„™ ΞΌ =ᡐ[ΞΌ] 0) : AEMeasurable X β„™ := by
contrapose! h exact pdf_of_not_aemeasurable h
[ " pdf X β„™ ΞΌ =αΆ [ae ΞΌ] 0", " rnDeriv 0 ΞΌ =αΆ [ae ΞΌ] 0", " AEMeasurable X β„™" ]
[ " pdf X β„™ ΞΌ =αΆ [ae ΞΌ] 0", " rnDeriv 0 ΞΌ =αΆ [ae ΞΌ] 0" ]
import Mathlib.SetTheory.Ordinal.Arithmetic import Mathlib.SetTheory.Ordinal.Exponential #align_import set_theory.ordinal.fixed_point from "leanprover-community/mathlib"@"0dd4319a17376eda5763cd0a7e0d35bbaaa50e83" noncomputable section universe u v open Function Order namespace Ordinal section variable {ΞΉ ...
Mathlib/SetTheory/Ordinal/FixedPoint.lean
119
125
theorem nfpFamily_fp {i} (H : IsNormal (f i)) (a) : f i (nfpFamily.{u, v} f a) = nfpFamily.{u, v} f a := by
unfold nfpFamily rw [@IsNormal.sup.{u, v, v} _ H _ _ ⟨[]⟩] apply le_antisymm <;> refine Ordinal.sup_le fun l => ?_ · exact le_sup _ (i::l) · exact (H.self_le _).trans (le_sup _ _)
[ " (βˆƒ i, nfpFamily f a ≀ f i b) ↔ nfpFamily f a ≀ b", " (Β¬βˆƒ i, nfpFamily f a ≀ f i b) ↔ Β¬nfpFamily f a ≀ b", " (βˆ€ (i : ΞΉ), f i b < nfpFamily f a) ↔ b < nfpFamily f a", " List.foldr f a l ≀ b", " List.foldr f a [] ≀ b", " List.foldr f a (i :: l) ≀ b", " f i (nfpFamily f a) = nfpFamily f a", " f i (sup (...
[ " (βˆƒ i, nfpFamily f a ≀ f i b) ↔ nfpFamily f a ≀ b", " (Β¬βˆƒ i, nfpFamily f a ≀ f i b) ↔ Β¬nfpFamily f a ≀ b", " (βˆ€ (i : ΞΉ), f i b < nfpFamily f a) ↔ b < nfpFamily f a", " List.foldr f a l ≀ b", " List.foldr f a [] ≀ b", " List.foldr f a (i :: l) ≀ b" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds #align_import data.real.pi.bounds from "leanprover-community/mathlib"@"402f8982dddc1864bd703da2d6e2ee304a866973" -- Porting note: needed to add a lot of type ascriptions for lean to interpret numbers as reals. open scoped Real namespace Real theorem ...
Mathlib/Data/Real/Pi/Bounds.lean
77
82
theorem pi_lower_bound_start (n : β„•) {a} (h : sqrtTwoAddSeries ((0 : β„•) / (1 : β„•)) n ≀ (2 : ℝ) - (a / (2 : ℝ) ^ (n + 1)) ^ 2) : a < Ο€ := by
refine lt_of_le_of_lt ?_ (pi_gt_sqrtTwoAddSeries n); rw [mul_comm] refine (div_le_iff (pow_pos (by norm_num) _ : (0 : ℝ) < _)).mp (le_sqrt_of_sq_le ?_) rwa [le_sub_comm, show (0 : ℝ) = (0 : β„•) / (1 : β„•) by rw [Nat.cast_zero, zero_div]]
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < Ο€", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο€", " 0 < 2 ^ (n + 2)", " (Ο€ / 2 ^ (n + 2)).sin < Ο€ / 2 ^ (n + 2)", " 0 < Ο€ / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 β‰  ...
[ " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < Ο€", " √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2) < Ο€", " 0 < 2 ^ (n + 2)", " (Ο€ / 2 ^ (n + 2)).sin < Ο€ / 2 ^ (n + 2)", " 0 < Ο€ / 2 ^ (n + 2)", " 0 < 2", " 2 ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) = √(2 - sqrtTwoAddSeries 0 n) / 2 * 2 ^ (n + 2)", " 2 β‰  ...
import Mathlib.Algebra.Regular.Basic import Mathlib.LinearAlgebra.Matrix.MvPolynomial import Mathlib.LinearAlgebra.Matrix.Polynomial import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matr...
Mathlib/LinearAlgebra/Matrix/Adjugate.lean
102
103
theorem cramer_transpose_apply (i : n) : cramer Aα΅€ b i = (A.updateRow i b).det := by
rw [cramer_apply, updateColumn_transpose, det_transpose]
[ " IsLinearMap Ξ± A.cramerMap", " βˆ€ (x y : n β†’ Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y", " βˆ€ (c : Ξ±) (x : n β†’ Ξ±), A.cramerMap (c β€’ x) = c β€’ A.cramerMap x", " A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝", " A.cramerMap (c✝ β€’ x✝) = c✝ β€’ A.cramerMap x✝", " A.cramerMap (x✝ + y✝) i = ...
[ " IsLinearMap Ξ± A.cramerMap", " βˆ€ (x y : n β†’ Ξ±), A.cramerMap (x + y) = A.cramerMap x + A.cramerMap y", " βˆ€ (c : Ξ±) (x : n β†’ Ξ±), A.cramerMap (c β€’ x) = c β€’ A.cramerMap x", " A.cramerMap (x✝ + y✝) = A.cramerMap x✝ + A.cramerMap y✝", " A.cramerMap (c✝ β€’ x✝) = c✝ β€’ A.cramerMap x✝", " A.cramerMap (x✝ + y✝) i = ...
import Mathlib.NumberTheory.DirichletCharacter.Bounds import Mathlib.NumberTheory.EulerProduct.Basic import Mathlib.NumberTheory.LSeries.Basic import Mathlib.NumberTheory.LSeries.RiemannZeta open Complex variable {s : β„‚} noncomputable def riemannZetaSummandHom (hs : s β‰  0) : β„• β†’*β‚€ β„‚ where toFun n := (n : β„‚) ^ ...
Mathlib/NumberTheory/EulerProduct/DirichletLSeries.lean
91
94
theorem riemannZeta_eulerProduct_hasProd (hs : 1 < s.re) : HasProd (fun p : Primes ↦ (1 - (p : β„‚) ^ (-s))⁻¹) (riemannZeta s) := by
rw [← tsum_riemannZetaSummand hs] apply eulerProduct_completely_multiplicative_hasProd <| summable_riemannZetaSummand hs
[ " (fun n => ↑n ^ (-s)) 0 = 0", " { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun 1 = 1", " { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun (m * n) =\n { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun m * { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun n", " (fun n_1 => Ο‡ ↑n_1 * ↑n_1 ...
[ " (fun n => ↑n ^ (-s)) 0 = 0", " { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun 1 = 1", " { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun (m * n) =\n { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun m * { toFun := fun n => ↑n ^ (-s), map_zero' := β‹― }.toFun n", " (fun n_1 => Ο‡ ↑n_1 * ↑n_1 ...
import Mathlib.NumberTheory.Cyclotomic.Embeddings import Mathlib.NumberTheory.Cyclotomic.Rat import Mathlib.NumberTheory.NumberField.Units.DirichletTheorem open NumberField Units InfinitePlace nonZeroDivisors Polynomial namespace IsCyclotomicExtension.Rat.Three variable {K : Type*} [Field K] [NumberField K] [IsC...
Mathlib/NumberTheory/Cyclotomic/Three.lean
41
68
theorem Units.mem : u ∈ [1, -1, η, -η, η ^ 2, -η ^ 2] := by
have hrank : rank K = 0 := by dsimp only [rank] rw [card_eq_nrRealPlaces_add_nrComplexPlaces, nrRealPlaces_eq_zero (n := 3) K (by decide), zero_add, nrComplexPlaces_eq_totient_div_two (n := 3)] rfl obtain ⟨⟨x, e⟩, hxu, -⟩ := exist_unique_eq_mul_prod _ u replace hxu : u = x := by rw [← mul_o...
[ " 0 < ↑3", " u ∈ [1, -1, Ξ·, -Ξ·, Ξ· ^ 2, -Ξ· ^ 2]", " rank K = 0", " Fintype.card (InfinitePlace K) - 1 = 0", " 2 < 3", " (↑3).totient / 2 - 1 = 0", " u = ↑x", " ↑(x, e).1 * ∏ i : Fin (rank K), fundSystem K i ^ (x, e).2 i = ↑x * 1", " ∏ i : Fin (rank K), fundSystem K i ^ (x, e).2 i = 1", " ?m.21395 β†’...
[ " 0 < ↑3" ]
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Data.Countable.Basic import Mathlib.Data.Set.Image import Mathlib.Data.Set.Subsingleton import Mathlib.Data.Int.Cast.Lemmas import Mathlib.GroupTheory.Subgroup.Centralizer #align_import group_theory.subgroup.zpowers from "leanprover-community/mathlib"@"4be589...
Mathlib/Algebra/Group/Subgroup/ZPowers.lean
47
49
theorem zpowers_eq_closure (g : G) : zpowers g = closure {g} := by
ext exact mem_closure_singleton.symm
[ " zpowers g = closure {g}", " x✝ ∈ zpowers g ↔ x✝ ∈ closure {g}" ]
[]
import Mathlib.Algebra.Group.Support import Mathlib.Algebra.Order.Monoid.WithTop import Mathlib.Data.Nat.Cast.Field #align_import algebra.char_zero.lemmas from "leanprover-community/mathlib"@"acee671f47b8e7972a1eb6f4eed74b4b3abce829" open Function Set namespace Nat variable {R : Type*} [AddMonoidWithOne R] [Char...
Mathlib/Algebra/CharZero/Lemmas.lean
39
42
theorem cast_pow_eq_one {R : Type*} [Semiring R] [CharZero R] (q : β„•) (n : β„•) (hn : n β‰  0) : (q : R) ^ n = 1 ↔ q = 1 := by
rw [← cast_pow, cast_eq_one] exact pow_eq_one_iff hn
[ " ↑q ^ n = 1 ↔ q = 1", " q ^ n = 1 ↔ q = 1" ]
[]
import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : β„•} theorem te...
Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean
75
77
theorem numerators_stable_of_terminated (n_le_m : n ≀ m) (terminated_at_n : g.TerminatedAt n) : g.numerators m = g.numerators n := by
simp only [num_eq_conts_a, continuants_stable_of_terminated n_le_m terminated_at_n]
[ " g.continuantsAux (n + 2) = g.continuantsAux (n + 1)", " g.continuantsAux m = g.continuantsAux (n + 1)", " g.continuantsAux (k + 1) = g.continuantsAux (n + 1)", " g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)", " g.TerminatedAt (n + k)", " convergents'Aux s (n + 1) = convergents'Aux s n", ...
[ " g.continuantsAux (n + 2) = g.continuantsAux (n + 1)", " g.continuantsAux m = g.continuantsAux (n + 1)", " g.continuantsAux (k + 1) = g.continuantsAux (n + 1)", " g.continuantsAux (n + k + 1 + 1) = g.continuantsAux (n + 1)", " g.TerminatedAt (n + k)", " convergents'Aux s (n + 1) = convergents'Aux s n", ...
import Mathlib.Analysis.Calculus.FDeriv.Basic #align_import analysis.calculus.fderiv.restrict_scalars from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncom...
Mathlib/Analysis/Calculus/FDeriv/RestrictScalars.lean
92
95
theorem HasFDerivWithinAt.of_restrictScalars {g' : E β†’L[π•œ] F} (h : HasFDerivWithinAt f g' s x) (H : f'.restrictScalars π•œ = g') : HasFDerivWithinAt f f' s x := by
rw [← H] at h exact .of_isLittleO h.1
[ " HasFDerivWithinAt f f' s x" ]
[]
import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.NormedSpace.Connected import Mathlib.LinearAlgebra.AffineSpace.ContinuousAffineEquiv open Set variable {F : Type*} [AddCommGroup F] [Module ℝ F] [TopologicalSpace F] def AmpleSet (s : Set F) : Prop := βˆ€ x ∈ s, convexHull ℝ (connectedComponentIn s ...
Mathlib/Analysis/Convex/AmpleSet.lean
120
132
theorem of_one_lt_codim [TopologicalAddGroup F] [ContinuousSMul ℝ F] {E : Submodule ℝ F} (hcodim : 1 < Module.rank ℝ (F β§Έ E)) : AmpleSet (Eᢜ : Set F) := fun x hx ↦ by rw [E.connectedComponentIn_eq_self_of_one_lt_codim hcodim hx, eq_univ_iff_forall] intro y by_cases h : y ∈ E Β· obtain ⟨z, hz⟩ : βˆƒ z, z βˆ‰ ...
rw [← not_forall, ← Submodule.eq_top_iff'] rintro rfl simp [rank_zero_iff.2 inferInstance] at hcodim refine segment_subset_convexHull ?_ ?_ (mem_segment_sub_add y z) <;> simpa [sub_eq_add_neg, Submodule.add_mem_iff_right _ h] Β· exact subset_convexHull ℝ (Eᢜ : Set F) h
[ " AmpleSet univ", " (convexHull ℝ) (connectedComponentIn univ x) = univ", " AmpleSet (s βˆͺ t)", " (convexHull ℝ) (connectedComponentIn (s βˆͺ t) x) = univ", " (convexHull ℝ) (connectedComponentIn s x) βŠ† (convexHull ℝ) (connectedComponentIn (s βˆͺ t) x)", " (convexHull ℝ) (connectedComponentIn t x) βŠ† (convexHul...
[ " AmpleSet univ", " (convexHull ℝ) (connectedComponentIn univ x) = univ", " AmpleSet (s βˆͺ t)", " (convexHull ℝ) (connectedComponentIn (s βˆͺ t) x) = univ", " (convexHull ℝ) (connectedComponentIn s x) βŠ† (convexHull ℝ) (connectedComponentIn (s βˆͺ t) x)", " (convexHull ℝ) (connectedComponentIn t x) βŠ† (convexHul...
import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.CategoryTheory.Filtered.Basic #align_import topology.category.Top.limits.cofiltered from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseL...
Mathlib/Topology/Category/TopCat/Limits/Cofiltered.lean
43
122
theorem isTopologicalBasis_cofiltered_limit (T : βˆ€ j, Set (Set (F.obj j))) (hT : βˆ€ j, IsTopologicalBasis (T j)) (univ : βˆ€ i : J, Set.univ ∈ T i) (inter : βˆ€ (i) (U1 U2 : Set (F.obj i)), U1 ∈ T i β†’ U2 ∈ T i β†’ U1 ∩ U2 ∈ T i) (compat : βˆ€ (i j : J) (f : i ⟢ j) (V : Set (F.obj j)) (_hV : V ∈ T j), F.map f ⁻¹' V ∈...
classical -- The limit cone for `F` whose topology is defined as an infimum. let D := limitConeInfi F -- The isomorphism between the cone point of `C` and the cone point of `D`. let E : C.pt β‰… D.pt := hC.conePointUniqueUpToIso (limitConeInfiIsLimit _) have hE : Inducing E.hom := (TopCat.homeoOfIso E).induc...
[ " IsTopologicalBasis {U | βˆƒ j, βˆƒ V ∈ T j, U = ⇑(C.Ο€.app j) ⁻¹' V}", " {U | βˆƒ j, βˆƒ V ∈ T j, U = ⇑(C.Ο€.app j) ⁻¹' V} = Set.preimage ⇑E.hom '' {U | βˆƒ j, βˆƒ V ∈ T j, U = ⇑(D.Ο€.app j) ⁻¹' V}", " U0 ∈ {U | βˆƒ j, βˆƒ V ∈ T j, U = ⇑(C.Ο€.app j) ⁻¹' V} ↔\n U0 ∈ Set.preimage ⇑E.hom '' {U | βˆƒ j, βˆƒ V ∈ T j, U = ⇑(D.Ο€.app j) ...
[]
import Mathlib.Analysis.SpecialFunctions.Exponential #align_import analysis.special_functions.trigonometric.series from "leanprover-community/mathlib"@"ccf84e0d918668460a34aa19d02fe2e0e2286da0" open NormedSpace open scoped Nat section SinCos theorem Complex.hasSum_cos' (z : β„‚) : HasSum (fun n : β„• => (z *...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
68
71
theorem Complex.hasSum_cos (z : β„‚) : HasSum (fun n : β„• => (-1) ^ n * z ^ (2 * n) / ↑(2 * n)!) (Complex.cos z) := by
convert Complex.hasSum_cos' z using 1 simp_rw [mul_pow, pow_mul, Complex.I_sq, mul_comm]
[ " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos", " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp β„‚ (z * I) + NormedSpace.exp β„‚ (-z * I)) / 2)", " HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +...
[ " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) z.cos", " HasSum (fun n => (z * I) ^ (2 * n) / ↑(2 * n)!) ((NormedSpace.exp β„‚ (z * I) + NormedSpace.exp β„‚ (-z * I)) / 2)", " HasSum\n (fun c =>\n ((z * I) ^ (2 * (k, c).1 + ↑(k, c).2) / ↑(2 * (k, c).1 + ↑(k, c).2)! +\n (-z * I) ^ (2 * (k, c).1 +...
import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.GroupTheory.Congruence.Basic import Mathlib.GroupTheory.FreeGroup.IsFreeGroup import Mathlib.Data.List.Chain import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Data.Set.Pointwise.SMul #align_import group_theor...
Mathlib/GroupTheory/CoprodI.lean
203
207
theorem mrange_eq_iSup {N} [Monoid N] (f : βˆ€ i, M i β†’* N) : MonoidHom.mrange (lift f) = ⨆ i, MonoidHom.mrange (f i) := by
rw [lift, Equiv.coe_fn_mk, Con.lift_range, FreeMonoid.mrange_lift, range_sigma_eq_iUnion_range, Submonoid.closure_iUnion] simp only [MonoidHom.mclosure_range]
[ " Monoid (Monoid.CoprodI M)", " Monoid (conGen (Monoid.CoprodI.Rel M)).Quotient", " (f.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩) = (g.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩)", " (g.comp of) x = (g.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩)", " βˆ€ (x y : FreeMonoid ((i : ΞΉ) Γ— M i)), R...
[ " Monoid (Monoid.CoprodI M)", " Monoid (conGen (Monoid.CoprodI.Rel M)).Quotient", " (f.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩) = (g.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩)", " (g.comp of) x = (g.comp (conGen (Rel M)).mk') (FreeMonoid.of ⟨i, x⟩)", " βˆ€ (x y : FreeMonoid ((i : ΞΉ) Γ— M i)), R...
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic #align_import linear_algebra.exterior_algebra.of_alternating from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" variable {R M N N' : Type*} variable [CommRing R] [AddCommGroup M] [AddCo...
Mathlib/LinearAlgebra/ExteriorAlgebra/OfAlternating.lean
103
115
theorem liftAlternating_apply_ΞΉMulti {n : β„•} (f : βˆ€ i, M [β‹€^Fin i]β†’β‚—[R] N) (v : Fin n β†’ M) : liftAlternating (R := R) (M := M) (N := N) f (ΞΉMulti R n v) = f n v := by
rw [ΞΉMulti_apply] -- Porting note: `v` is generalized automatically so it was removed from the next line induction' n with n ih generalizing f Β· -- Porting note: Lean does not automatically synthesize the instance -- `[Subsingleton (Fin 0 β†’ M)]` which is needed for `Subsingleton.elim 0 v` on line 114. ...
[ " Module R (M [β‹€^ΞΉ]β†’β‚—[R] N)", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] ExteriorAlgebra R M β†’β‚—[R] N", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] N", " M [β‹€^Fin 0]β†’β‚—[R] N ≃ₗ[R] N", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] ExteriorAlgebra R M β†’β‚—[R] (i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N", " M β†’β‚—[R] ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R]...
[ " Module R (M [β‹€^ΞΉ]β†’β‚—[R] N)", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] ExteriorAlgebra R M β†’β‚—[R] N", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] N", " M [β‹€^Fin 0]β†’β‚—[R] N ≃ₗ[R] N", " ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N) β†’β‚—[R] ExteriorAlgebra R M β†’β‚—[R] (i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R] N", " M β†’β‚—[R] ((i : β„•) β†’ M [β‹€^Fin i]β†’β‚—[R]...
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : β„•) : List β„• := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
80
82
theorem map_sub (n m k : β„•) (h₁ : k ≀ n) : ((Ico n m).map fun x => x - k) = Ico (n - k) (m - k) := by
rw [Ico, Ico, Nat.sub_sub_sub_cancel_right h₁, map_sub_range' _ _ _ h₁]
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≀ l ∧ l < m", " n ≀ l ∧ l < n + (m - n) ↔ n...
[ " Ico 0 n = range n", " (Ico n m).length = m - n", " (range' n (m - n)).length = m - n", " Pairwise (fun x x_1 => x < x_1) (Ico n m)", " Pairwise (fun x x_1 => x < x_1) (range' n (m - n))", " (Ico n m).Nodup", " (range' n (m - n)).Nodup", " l ∈ Ico n m ↔ n ≀ l ∧ l < m", " n ≀ l ∧ l < n + (m - n) ↔ n...
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
139
140
theorem factorization_eq_zero_of_non_prime (n : β„•) {p : β„•} (hp : Β¬p.Prime) : n.factorization p = 0 := by
simp [factorization_eq_zero_iff, hp]
[ " βˆ€ (a : β„•), a ∈ n.primeFactors ↔ (fun p => if p.Prime then padicValNat p n else 0) a β‰  0", " βˆ€ (a : β„•), a.Prime β†’ (a ∣ n ∧ Β¬n = 0 ↔ Β¬a = 1 ∧ Β¬n = 0 ∧ a ∣ n)", " n.factorization p = padicValNat p n", " count p n.factors = n.factorization p", " count p (factors 0) = (factorization 0) p", " 0 = n.factorizat...
[ " βˆ€ (a : β„•), a ∈ n.primeFactors ↔ (fun p => if p.Prime then padicValNat p n else 0) a β‰  0", " βˆ€ (a : β„•), a.Prime β†’ (a ∣ n ∧ Β¬n = 0 ↔ Β¬a = 1 ∧ Β¬n = 0 ∧ a ∣ n)", " n.factorization p = padicValNat p n", " count p n.factors = n.factorization p", " count p (factors 0) = (factorization 0) p", " 0 = n.factorizat...
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055" noncomputable section open scoped Classical namespace CategoryTheory open Cat...
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
63
64
theorem add_tensor {W X Y Z : C} (f g : W ⟢ X) (h : Y ⟢ Z) : (f + g) βŠ— h = f βŠ— h + g βŠ— h := by
simp [tensorHom_def]
[ " f βŠ— 0 = 0", " 0 βŠ— f = 0", " f βŠ— (g + h) = f βŠ— g + f βŠ— h", " (f + g) βŠ— h = f βŠ— h + g βŠ— h" ]
[ " f βŠ— 0 = 0", " 0 βŠ— f = 0", " f βŠ— (g + h) = f βŠ— g + f βŠ— h" ]
import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" variable {Ξ± Ξ² : Type*} namespace Set section Einfsep open ENNReal open Function noncomputable def einfsep [EDist Ξ±] (s : Set Ξ±) : ℝβ‰₯0∞ := β¨… (x...
Mathlib/Topology/MetricSpace/Infsep.lean
50
52
theorem le_einfsep_iff {d} : d ≀ s.einfsep ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ d ≀ edist x y := by
simp_rw [einfsep, le_iInf_iff]
[ " d ≀ s.einfsep ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ d ≀ edist x y" ]
[]
import Mathlib.Geometry.Euclidean.Sphere.Basic #align_import geometry.euclidean.sphere.second_inter from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RealInnerProductSpace namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V]...
Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
62
63
theorem Sphere.secondInter_zero (s : Sphere P) (p : P) : s.secondInter p (0 : V) = p := by
simp [Sphere.secondInter]
[ " dist (s.secondInter p v) s.center = dist p s.center", " dist ((-2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ) β€’ v +α΅₯ p) s.center = dist p s.center", " -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ = 0 ∨ -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ = -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ", " s.secondInter p v ∈ s ↔ p ∈ s", " s.secon...
[ " dist (s.secondInter p v) s.center = dist p s.center", " dist ((-2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ) β€’ v +α΅₯ p) s.center = dist p s.center", " -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ = 0 ∨ -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ = -2 * βŸͺv, p -α΅₯ s.center⟫_ℝ / βŸͺv, v⟫_ℝ", " s.secondInter p v ∈ s ↔ p ∈ s" ]
import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected #align_import data.set.intervals.proj_Icc from "leanprover-community/mathlib"@"4e24c4bfcff371c71f7ba22050308aa17815626c" variable {α β : Type*} [LinearOrder α] open Function namespace Set def projIci (a x : α) : Ici a := ⟨max a x,...
Mathlib/Order/Interval/Set/ProjIcc.lean
105
106
theorem projIcc_eq_left (h : a < b) : projIcc a b h.le x = ⟨a, left_mem_Icc.mpr h.le⟩ ↔ x ≀ a := by
simp [projIcc, Subtype.ext_iff, h.not_le]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x", " projIcc a b β‹― x = ⟨a, β‹―βŸ© ↔ x ≀ a" ]
[ " projIcc a b h x = ⟨a, β‹―βŸ©", " projIcc a b h x = ⟨b, β‹―βŸ©", " projIci a x = ⟨a, β‹―βŸ© ↔ x ≀ a", " projIic b x = ⟨b, β‹―βŸ© ↔ b ≀ x" ]
import Mathlib.Data.Matrix.Basic #align_import data.matrix.block from "leanprover-community/mathlib"@"c060baa79af5ca092c54b8bf04f0f10592f59489" variable {l m n o p q : Type*} {m' n' p' : o β†’ Type*} variable {R : Type*} {S : Type*} {Ξ± : Type*} {Ξ² : Type*} open Matrix namespace Matrix theorem dotProduct_block [F...
Mathlib/Data/Matrix/Block.lean
97
100
theorem fromBlocks_toBlocks (M : Matrix (Sum n o) (Sum l m) Ξ±) : fromBlocks M.toBlocks₁₁ M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocksβ‚‚β‚‚ = M := by
ext i j rcases i with ⟨⟩ <;> rcases j with ⟨⟩ <;> rfl
[ " M.toBlocks₁₁.fromBlocks M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocksβ‚‚β‚‚ = M", " M.toBlocks₁₁.fromBlocks M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocksβ‚‚β‚‚ i j = M i j", " M.toBlocks₁₁.fromBlocks M.toBlocks₁₂ M.toBlocks₂₁ M.toBlocksβ‚‚β‚‚ (Sum.inl val✝) j = M (Sum.inl val✝) j", " M.toBlocks₁₁.fromBlocks M.toBlocks₁₂ M.toBlocks₂₁ M.t...
[]
import Mathlib.Data.Finset.Basic import Mathlib.Data.Set.Lattice #align_import data.set.constructions from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {Ξ± : Type*} (S : Set (Set Ξ±)) structure FiniteInter : Prop where univ_mem : Set.univ ∈ S inter_mem : βˆ€ ⦃s⦄, s ∈ ...
Mathlib/Data/Set/Constructions.lean
54
63
theorem finiteInter_mem (cond : FiniteInter S) (F : Finset (Set Ξ±)) : ↑F βŠ† S β†’ β‹‚β‚€ (↑F : Set (Set Ξ±)) ∈ S := by
classical refine Finset.induction_on F (fun _ => ?_) ?_ Β· simp [cond.univ_mem] Β· intro a s _ h1 h2 suffices a ∩ β‹‚β‚€ ↑s ∈ S by simpa exact cond.inter_mem (h2 (Finset.mem_insert_self a s)) (h1 fun x hx => h2 <| Finset.mem_insert_of_mem hx)
[ " ↑F βŠ† S β†’ β‹‚β‚€ ↑F ∈ S", " β‹‚β‚€ β†‘βˆ… ∈ S", " βˆ€ ⦃a : Set α⦄ {s : Finset (Set Ξ±)}, a βˆ‰ s β†’ (↑s βŠ† S β†’ β‹‚β‚€ ↑s ∈ S) β†’ ↑(insert a s) βŠ† S β†’ β‹‚β‚€ ↑(insert a s) ∈ S", " β‹‚β‚€ ↑(insert a s) ∈ S", " a ∩ β‹‚β‚€ ↑s ∈ S" ]
[]
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
146
146
theorem tail_eval : tail.eval = fun v => pure v.tail := 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" ]
[ " zero'.eval = fun v => pure (0 :: v)", " succ.eval = fun v => pure [v.headI.succ]" ]
import Mathlib.Data.Fintype.Basic import Mathlib.Data.Num.Lemmas import Mathlib.Data.Option.Basic import Mathlib.SetTheory.Cardinal.Basic #align_import computability.encoding from "leanprover-community/mathlib"@"b6395b3a5acd655b16385fa0cdbf1961d6c34b3e" universe u v open Cardinal namespace Computability struc...
Mathlib/Computability/Encoding.lean
152
155
theorem decode_encodeNat : βˆ€ n, decodeNat (encodeNat n) = n := by
intro n conv_rhs => rw [← Num.to_of_nat n] exact congr_arg ((↑) : Num β†’ β„•) (decode_encodeNum n)
[ " Function.Injective e.encode", " some x✝¹ = some x✝", " {blank, bit true, bit false, bra, ket, comma}.Nodup", " βˆ€ (x : Ξ“'), x ∈ { val := {blank, bit true, bit false, bra, ket, comma}, nodup := β‹― }", " x✝ ∈ { val := {blank, bit true, bit false, bra, ket, comma}, nodup := β‹― }", " blank ∈ { val := {blank, b...
[ " Function.Injective e.encode", " some x✝¹ = some x✝", " {blank, bit true, bit false, bra, ket, comma}.Nodup", " βˆ€ (x : Ξ“'), x ∈ { val := {blank, bit true, bit false, bra, ket, comma}, nodup := β‹― }", " x✝ ∈ { val := {blank, bit true, bit false, bra, ket, comma}, nodup := β‹― }", " blank ∈ { val := {blank, b...
import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" assert_not_exists MonoidWithZero assert_not_exists Finset.sum open Function OrderDual open FinsetInterval variable {ΞΉ Ξ± : T...
Mathlib/Order/Interval/Finset/Basic.lean
88
89
theorem Ioc_eq_empty_iff : Ioc a b = βˆ… ↔ Β¬a < b := by
rw [← coe_eq_empty, coe_Ioc, Set.Ioc_eq_empty_iff]
[ " (Icc a b).Nonempty ↔ a ≀ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = βˆ… ↔ Β¬a ≀ b", " Ico a b = βˆ… ↔ Β¬a < b", " Ioc a b = βˆ… ↔ Β¬a < b" ]
[ " (Icc a b).Nonempty ↔ a ≀ b", " (Ico a b).Nonempty ↔ a < b", " (Ioc a b).Nonempty ↔ a < b", " (Ioo a b).Nonempty ↔ a < b", " Icc a b = βˆ… ↔ Β¬a ≀ b", " Ico a b = βˆ… ↔ Β¬a < b" ]
import Mathlib.SetTheory.Cardinal.ENat #align_import set_theory.cardinal.basic from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" universe u v open Function Set namespace Cardinal variable {Ξ± : Type u} {c d : Cardinal.{u}} noncomputable def toNat : Cardinal β†’*β‚€ β„• := ENat.toNat.com...
Mathlib/SetTheory/Cardinal/ToNat.lean
126
126
theorem mk_toNat_of_infinite [h : Infinite Ξ±] : toNat #Ξ± = 0 := by
simp
[ " toNat c = 0 ↔ c = 0 ∨ β„΅β‚€ ≀ c", " toNat c β‰  0 ↔ c β‰  0 ∧ c < β„΅β‚€", " ↑(toNat c) = c", " ↑(toNat ↑c) = ↑c", " ↑(toNat c) = ↑(Classical.choose β‹―)", " toNat c = 0", " ↑(toNat c) = 0", " StrictMonoOn (⇑toNat) (Iio β„΅β‚€)", " βˆ€ (i i_1 : β„•), i < i_1 β†’ i < i_1", " toNat #Ξ± = 0" ]
[ " toNat c = 0 ↔ c = 0 ∨ β„΅β‚€ ≀ c", " toNat c β‰  0 ↔ c β‰  0 ∧ c < β„΅β‚€", " ↑(toNat c) = c", " ↑(toNat ↑c) = ↑c", " ↑(toNat c) = ↑(Classical.choose β‹―)", " toNat c = 0", " ↑(toNat c) = 0", " StrictMonoOn (⇑toNat) (Iio β„΅β‚€)", " βˆ€ (i i_1 : β„•), i < i_1 β†’ i < i_1" ]
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
95
98
theorem rel_join {r : Ξ± β†’ Ξ² β†’ Prop} {s t} (h : Rel (Rel r) s t) : Rel r s.join t.join := by
induction h with | zero => simp | cons hab hst ih => simpa using hab.add ih
[ " (↑(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.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
112
113
theorem wellFoundedOn_image {s : Set Ξ²} : (f '' s).WellFoundedOn r ↔ s.WellFoundedOn (r on f) := by
rw [image_eq_range]; exact wellFoundedOn_range
[ " 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.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts #align_import category_theory.limits.constructions.zero_objects from "leanprover-community/mathlib"@"52a270e2ea4e342c2587c106f8be904524214a4...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
89
91
theorem prodZeroIso_iso_inv_snd (X : C) : (prodZeroIso X).inv ≫ prod.fst = πŸ™ X := by
dsimp [prodZeroIso, binaryFanZeroRight] simp
[ " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ πŸ™ X = s.snd", " m = (fun s => s.snd) s", " (zeroProdIso X).inv ≫ prod.snd = πŸ™ X", " (limit.isoLimitCone { cone := BinaryFan.mk 0 (πŸ™ X), isLimit := binaryFanZeroLeftIsLimit X }).inv ≫ prod.snd = πŸ™ X", ...
[ " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ 0 = s.fst", " βˆ€ (s : BinaryFan 0 X), (fun s => s.snd) s ≫ πŸ™ X = s.snd", " m = (fun s => s.snd) s", " (zeroProdIso X).inv ≫ prod.snd = πŸ™ X", " (limit.isoLimitCone { cone := BinaryFan.mk 0 (πŸ™ X), isLimit := binaryFanZeroLeftIsLimit X }).inv ≫ prod.snd = πŸ™ X", ...
namespace Nat @[reducible] def Coprime (m n : Nat) : Prop := gcd m n = 1 instance (m n : Nat) : Decidable (Coprime m n) := inferInstanceAs (Decidable (_ = 1)) theorem coprime_iff_gcd_eq_one : Coprime m n ↔ gcd m n = 1 := .rfl theorem Coprime.gcd_eq_one : Coprime m n β†’ gcd m n = 1 := id theorem Coprime.symm ...
.lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
39
44
theorem Coprime.gcd_mul_left_cancel (m : Nat) (H : Coprime k n) : gcd (k * m) n = gcd m n := have H1 : Coprime (gcd (k * m) n) k := by
rw [Coprime, Nat.gcd_assoc, H.symm.gcd_eq_one, gcd_one_right] Nat.dvd_antisymm (dvd_gcd (H1.dvd_of_dvd_mul_left (gcd_dvd_left _ _)) (gcd_dvd_right _ _)) (gcd_dvd_gcd_mul_left _ _ _)
[ " k ∣ m", " k ∣ n * m", " ((k * m).gcd n).Coprime k" ]
[ " k ∣ m", " k ∣ n * m" ]
import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" noncomputable section open scoped Topology ENNReal MeasureTheory ProbabilityTheory op...
Mathlib/Probability/Kernel/IntegralCompProd.lean
78
82
theorem _root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left {Ξ΄ : Type*} [TopologicalSpace Ξ΄] {f : Ξ² Γ— Ξ³ β†’ Ξ΄} (hf : AEStronglyMeasurable f ((ΞΊ βŠ—β‚– Ξ·) a)) : βˆ€α΅ x βˆ‚ΞΊ a, AEStronglyMeasurable (fun y => f (x, y)) (Ξ· (a, x)) := by
filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with x hx using ⟨fun y => hf.mk f (x, y), hf.stronglyMeasurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
[ " HasFiniteIntegral (fun b => ((Ξ· (a, b)) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a)", " ∫⁻ (a_1 : Ξ²), ENNReal.ofReal ((Ξ· (a, a_1)) (Prod.mk a_1 ⁻¹' s)).toReal βˆ‚ΞΊ a < ⊀", " ∫⁻ (b : Ξ²), ENNReal.ofReal ((Ξ· (a, b)) (Prod.mk b ⁻¹' s)).toReal βˆ‚ΞΊ a ≀ ∫⁻ (b : Ξ²), (Ξ· (a, b)) (Prod.mk b ⁻¹' t) βˆ‚ΞΊ a", " βˆ€α΅ (a_1 : Ξ²) βˆ‚ΞΊ a, ENNRea...
[ " HasFiniteIntegral (fun b => ((Ξ· (a, b)) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a)", " ∫⁻ (a_1 : Ξ²), ENNReal.ofReal ((Ξ· (a, a_1)) (Prod.mk a_1 ⁻¹' s)).toReal βˆ‚ΞΊ a < ⊀", " ∫⁻ (b : Ξ²), ENNReal.ofReal ((Ξ· (a, b)) (Prod.mk b ⁻¹' s)).toReal βˆ‚ΞΊ a ≀ ∫⁻ (b : Ξ²), (Ξ· (a, b)) (Prod.mk b ⁻¹' t) βˆ‚ΞΊ a", " βˆ€α΅ (a_1 : Ξ²) βˆ‚ΞΊ a, ENNRea...
import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.Valuation.ExtendToLocalization import Mathlib.RingTheory.Valuation.ValuationSubring import Mathlib.Topology.Algebra.ValuedField import Mathlib.Algebra.Order.Group.TypeTags #align_import ring_theory.dedekind_domain.adic_valuation from "leanprover...
Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
108
110
theorem int_valuation_zero_le (x : nonZeroDivisors R) : 0 < v.intValuationDef x := by
rw [v.intValuationDef_if_neg (nonZeroDivisors.coe_ne_zero x)] exact WithZero.zero_lt_coe _
[ " v.intValuationDef x β‰  0", " ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) β‰  0", " 0 < v.intValuationDef ↑x", " 0 < ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {↑x})).factors)))" ]
[ " v.intValuationDef x β‰  0", " ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) β‰  0" ]
import Mathlib.Algebra.Squarefree.Basic import Mathlib.Data.ZMod.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.zmod from "leanprover-community/mathlib"@"00d163e35035c3577c1c79fa53b68de17781ffc1"
Mathlib/RingTheory/ZMod.lean
25
29
theorem ZMod.ker_intCastRingHom (n : β„•) : RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span ({(n : β„€)} : Set β„€) := by
ext rw [Ideal.mem_span_singleton, RingHom.mem_ker, Int.coe_castRingHom, ZMod.intCast_zmod_eq_zero_iff_dvd]
[ " RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {↑n}", " x✝ ∈ RingHom.ker (Int.castRingHom (ZMod n)) ↔ x✝ ∈ Ideal.span {↑n}" ]
[]
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.FieldTheory.Finite.Trace import Mathlib.Algebra.Group.AddChar import Mathlib.Data.ZMod.Units import Mathlib.Analysis.Complex.Polynomial #align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2...
Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
91
96
theorem IsNontrivial.isPrimitive {F : Type u} [Field F] {ψ : AddChar F R'} (hψ : IsNontrivial ψ) : IsPrimitive ψ := by
intro a ha cases' hψ with x h use a⁻¹ * x rwa [mulShift_apply, mul_inv_cancel_leftβ‚€ ha]
[ " β‹―.unit ∈ rootsOfUnity (ringChar R).toPNat' R'", " (f.compAddChar Ο†).IsPrimitive", " ((f.compAddChar Ο†).mulShift a).IsNontrivial", " βˆƒ a_1, f (Ο† (a * a_1)) β‰  1", " Function.Injective ψ.mulShift", " a = b", " ψ.IsPrimitive", " (ψ.mulShift a).IsNontrivial", " (ψ.mulShift a) (a⁻¹ * x) β‰  1" ]
[ " β‹―.unit ∈ rootsOfUnity (ringChar R).toPNat' R'", " (f.compAddChar Ο†).IsPrimitive", " ((f.compAddChar Ο†).mulShift a).IsNontrivial", " βˆƒ a_1, f (Ο† (a * a_1)) β‰  1", " Function.Injective ψ.mulShift", " a = b" ]
import Mathlib.Topology.Algebra.Algebra import Mathlib.Analysis.InnerProductSpace.Basic #align_import analysis.inner_product_space.of_norm from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb" open RCLike open scoped ComplexConjugate variable {π•œ : Type*} [RCLike π•œ] (E : Type*) [Normed...
Mathlib/Analysis/InnerProductSpace/OfNorm.lean
105
117
theorem innerProp_neg_one : innerProp' E ((-1 : β„€) : π•œ) := by
intro x y simp only [inner_, neg_mul_eq_neg_mul, one_mul, Int.cast_one, one_smul, RingHom.map_one, map_neg, Int.cast_neg, neg_smul, neg_one_mul] rw [neg_mul_comm] congr 1 have h₁ : β€–-x - yβ€– = β€–x + yβ€– := by rw [← neg_add', norm_neg] have hβ‚‚ : β€–-x + yβ€– = β€–x - yβ€– := by rw [← neg_sub, norm_neg, sub_eq_neg_...
[ " InnerProductSpaceable.innerProp' E ↑(-1)", " inner_ π•œ (↑(-1) β€’ x) y = (starRingEnd π•œ) ↑(-1) * inner_ π•œ x y", " 4⁻¹ *\n (π“š β€–-x + yβ€– * π“š β€–-x + yβ€– - π“š β€–-x - yβ€– * π“š β€–-x - yβ€– + I * π“š β€–I β€’ -x + yβ€– * π“š β€–I β€’ -x + yβ€– -\n I * π“š β€–I β€’ -x - yβ€– * π“š β€–I β€’ -x - yβ€–) =\n -4⁻¹ *\n (π“š β€–x + yβ€– * π“š ...
[]
import Mathlib.AlgebraicTopology.SplitSimplicialObject import Mathlib.AlgebraicTopology.DoldKan.Degeneracies import Mathlib.AlgebraicTopology.DoldKan.FunctorN #align_import algebraic_topology.dold_kan.split_simplicial_object from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open Categ...
Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean
47
49
theorem cofan_inj_Ο€Summand_eq_id [HasZeroMorphisms C] {Ξ” : SimplexCategoryα΅’α΅–} (A : IndexSet Ξ”) : (s.cofan Ξ”).inj A ≫ s.Ο€Summand A = πŸ™ _ := by
simp [Ο€Summand]
[ " s.N B.fst.unop.len ⟢ s.N A.fst.unop.len", " s.N B.fst.unop.len = s.N A.fst.unop.len", " s.N B.fst.unop.len = s.N B.fst.unop.len", " (s.cofan Ξ”).inj A ≫ s.Ο€Summand A = πŸ™ (summand s.N Ξ” A)" ]
[ " s.N B.fst.unop.len ⟢ s.N A.fst.unop.len", " s.N B.fst.unop.len = s.N A.fst.unop.len", " s.N B.fst.unop.len = s.N B.fst.unop.len" ]
import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.Complement open Monoid Coprod Multiplicative Subgroup Function def HNNExtension.con (G : Type*) [Group G] (A B : Subgroup G) (Ο† : A ≃* B) : Con (G βˆ— Multiplicative β„€) := conGen (fun x y => βˆƒ (a : A), x = inr (ofAdd 1) * inl (a : G) ∧ ...
Mathlib/GroupTheory/HNNExtension.lean
85
87
theorem of_mul_inv_t (a : A) : (of (a : G) : HNNExtension G A B Ο†) * t⁻¹ = t⁻¹ * of (Ο† a : G) := by
rw [equiv_eq_conj]; simp [mul_assoc]
[ " Group (HNNExtension G A B Ο†)", " Group (HNNExtension.con G A B Ο†).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(Ο† a)) (inr (ofAdd 1)) = inl ↑(Ο† a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(Ο†.symm b)", " of ↑b * t = of ↑(Ο† (Ο†.symm ...
[ " Group (HNNExtension G A B Ο†)", " Group (HNNExtension.con G A B Ο†).Quotient", " (fun x x_1 => x * x_1) (inr (ofAdd 1)) (inl ↑a) = inr (ofAdd 1) * inl ↑a ∧\n (fun x x_1 => x * x_1) (inl ↑(Ο† a)) (inr (ofAdd 1)) = inl ↑(Ο† a) * inr (ofAdd 1)", " of ↑b * t = t * of ↑(Ο†.symm b)", " of ↑b * t = of ↑(Ο† (Ο†.symm ...
import Mathlib.Data.Set.Prod #align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654" open Function namespace Set variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' ΞΆ ΞΆ' Ξ½ : Type*} {f f' : Ξ± β†’ Ξ² β†’ Ξ³} {g g' : Ξ± β†’ Ξ² β†’ Ξ³ β†’ Ξ΄} variable {s s' : Set Ξ±} {t t' : Set Ξ²} {u u' : Set Ξ³} {v...
Mathlib/Data/Set/NAry.lean
96
98
theorem image2_swap (s : Set Ξ±) (t : Set Ξ²) : image2 f s t = image2 (fun a b => f b a) t s := by
ext constructor <;> rintro ⟨a, ha, b, hb, rfl⟩ <;> exact ⟨b, hb, a, ha, rfl⟩
[ " f a b ∈ image2 f s t β†’ a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t", " image2 f s t βŠ† image2 f s' t'", " f a b ∈ image2 f s' t'", " image2 f s t βŠ† u ↔ βˆ€ a ∈ s, (fun b => f a b) '' t βŠ† u", " image2 f s t βŠ† u ↔ βˆ€ b ∈ t, (fun a => f a b) '' s βŠ† u", " x✝ ∈ (fun x => f x.1 x.2) '' s Γ—Λ’ t ↔ x✝ ∈ i...
[ " f a b ∈ image2 f s t β†’ a ∈ s ∧ b ∈ t", " a ∈ s ∧ b ∈ t", " a' ∈ s ∧ b' ∈ t", " image2 f s t βŠ† image2 f s' t'", " f a b ∈ image2 f s' t'", " image2 f s t βŠ† u ↔ βˆ€ a ∈ s, (fun b => f a b) '' t βŠ† u", " image2 f s t βŠ† u ↔ βˆ€ b ∈ t, (fun a => f a b) '' s βŠ† u", " x✝ ∈ (fun x => f x.1 x.2) '' s Γ—Λ’ t ↔ x✝ ∈ i...
import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.NAry import Mathlib.Order.Directed #align_import order.bounds.basic from "leanprover-community/mathlib"@"b1abe23ae96fef89ad30d9f4362c307f72a55010" open Function Set open OrderDual (toDual ofDual) universe u v w x variable {Ξ± : Type u} {Ξ² : Type v}...
Mathlib/Order/Bounds/Basic.lean
126
127
theorem not_bddAbove_iff' : Β¬BddAbove s ↔ βˆ€ x, βˆƒ y ∈ s, Β¬y ≀ x := by
simp [BddAbove, upperBounds, Set.Nonempty]
[ " Β¬BddAbove s ↔ βˆ€ (x : Ξ±), βˆƒ y ∈ s, Β¬y ≀ x" ]
[]
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.LinearAlgebra.Determinant variable {K n : Type*} [NormedField K] [Fintype n] [DecidableEq n] {A : Matrix n n K} theorem eigenvalue_mem_ball {ΞΌ : K} (hΞΌ : Module.End.HasEigenvalue (Matrix.toLin' A) ΞΌ) : βˆƒ k,...
Mathlib/LinearAlgebra/Matrix/Gershgorin.lean
69
72
theorem det_ne_zero_of_sum_col_lt_diag (h : βˆ€ k, βˆ‘ i ∈ Finset.univ.erase k, β€–A i kβ€– < β€–A k kβ€–) : A.det β‰  0 := by
rw [← Matrix.det_transpose] exact det_ne_zero_of_sum_row_lt_diag (by simp_rw [Matrix.transpose_apply]; exact h)
[ " βˆƒ k, ΞΌ ∈ Metric.closedBall (A k k) (βˆ‘ j ∈ Finset.univ.erase k, β€–A k jβ€–)", " False", " v i β‰  0", " v = 0", " v j = 0 j", " β€–v jβ€– ≀ 0", " β€–v iβ€– ≀ 0", " β€–v j * (v i)⁻¹‖ ≀ 1", " β€–v jβ€– ≀ β€–v iβ€–", " βˆƒ k, β€–A k k - ΞΌβ€– ≀ βˆ‘ j ∈ Finset.univ.erase k, β€–A k jβ€–", " β€–A i i - ΞΌβ€– ≀ βˆ‘ j ∈ Finset.univ.erase i, β€–A ...
[ " βˆƒ k, ΞΌ ∈ Metric.closedBall (A k k) (βˆ‘ j ∈ Finset.univ.erase k, β€–A k jβ€–)", " False", " v i β‰  0", " v = 0", " v j = 0 j", " β€–v jβ€– ≀ 0", " β€–v iβ€– ≀ 0", " β€–v j * (v i)⁻¹‖ ≀ 1", " β€–v jβ€– ≀ β€–v iβ€–", " βˆƒ k, β€–A k k - ΞΌβ€– ≀ βˆ‘ j ∈ Finset.univ.erase k, β€–A k jβ€–", " β€–A i i - ΞΌβ€– ≀ βˆ‘ j ∈ Finset.univ.erase i, β€–A ...
import Mathlib.Algebra.BigOperators.WithTop import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.ENNReal.Basic #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal variable {a b c d : ℝβ‰₯0∞} {r p q...
Mathlib/Data/ENNReal/Operations.lean
177
178
theorem lt_add_right (ha : a β‰  ∞) (hb : b β‰  0) : a < a + b := by
rwa [← pos_iff_ne_zero, ← ENNReal.add_lt_add_iff_left ha, add_zero] at hb
[ " a β‰  0 β†’ βˆ€ (n : β„•), a ^ n β‰  0", " Β¬a < 0", " a < a + b" ]
[ " a β‰  0 β†’ βˆ€ (n : β„•), a ^ n β‰  0", " Β¬a < 0" ]
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : ...
Mathlib/MeasureTheory/Group/Convolution.lean
50
55
theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by
unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability }
[ " dirac 1 βˆ— ΞΌ = ΞΌ", " map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) ΞΌ = ΞΌ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2", " ΞΌ βˆ— dirac 1 = ΞΌ", " map (fun x => x.1 * x.2) (ΞΌ.prod (dirac 1)) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ fun x => (x, 1)) ΞΌ...
[ " dirac 1 βˆ— ΞΌ = ΞΌ", " map (fun x => x.1 * x.2) ((dirac 1).prod ΞΌ) = ΞΌ", " map ((fun x => x.1 * x.2) ∘ Prod.mk 1) ΞΌ = ΞΌ", " Measurable (Prod.mk 1)", " Measurable fun x => x.1 * x.2" ]
import Mathlib.Algebra.Ring.Int import Mathlib.SetTheory.Game.PGame import Mathlib.Tactic.Abel #align_import set_theory.game.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" -- Porting note: many definitions here are noncomputable as the compiler does not support PGame.rec nonco...
Mathlib/SetTheory/Game/Basic.lean
118
120
theorem not_lf : βˆ€ {x y : Game}, Β¬x ⧏ y ↔ y ≀ x := by
rintro ⟨x⟩ ⟨y⟩ exact PGame.not_lf
[ " βˆ€ (a b c : Game), a + b + c = a + (b + c)", " Quot.mk Setoid.r x + Quot.mk Setoid.r y + Quot.mk Setoid.r z =\n Quot.mk Setoid.r x + (Quot.mk Setoid.r y + Quot.mk Setoid.r z)", " βˆ€ (a : Game), 0 + a = a", " 0 + Quot.mk Setoid.r x = Quot.mk Setoid.r x", " βˆ€ (a : Game), a + 0 = a", " Quot.mk Setoid.r x ...
[ " βˆ€ (a b c : Game), a + b + c = a + (b + c)", " Quot.mk Setoid.r x + Quot.mk Setoid.r y + Quot.mk Setoid.r z =\n Quot.mk Setoid.r x + (Quot.mk Setoid.r y + Quot.mk Setoid.r z)", " βˆ€ (a : Game), 0 + a = a", " 0 + Quot.mk Setoid.r x = Quot.mk Setoid.r x", " βˆ€ (a : Game), a + 0 = a", " Quot.mk Setoid.r x ...
import Mathlib.Data.Int.AbsoluteValue import Mathlib.LinearAlgebra.Matrix.Determinant.Basic #align_import linear_algebra.matrix.absolute_value from "leanprover-community/mathlib"@"ab0a2959c83b06280ef576bc830d4aa5fe8c8e61" open Matrix namespace Matrix open Equiv Finset variable {R S : Type*} [CommRing R] [Nontr...
Mathlib/LinearAlgebra/Matrix/AbsoluteValue.lean
52
61
theorem det_sum_le {ΞΉ : Type*} (s : Finset ΞΉ) {A : ΞΉ β†’ Matrix n n R} {abv : AbsoluteValue R S} {x : S} (hx : βˆ€ k i j, abv (A k i j) ≀ x) : abv (det (βˆ‘ k ∈ s, A k)) ≀ Nat.factorial (Fintype.card n) β€’ (Finset.card s β€’ x) ^ Fintype.card n := det_le fun i j => calc abv ((βˆ‘ k ∈ s, A k) i j) = abv (...
simp only [sum_apply] _ ≀ βˆ‘ k ∈ s, abv (A k i j) := abv.sum_le _ _ _ ≀ βˆ‘ _k ∈ s, x := sum_le_sum fun k _ => hx k i j _ = s.card β€’ x := sum_const _
[ " abv (Perm.sign Οƒ β€’ ∏ i : n, A (Οƒ i) i) = ∏ i : n, abv (A (Οƒ i) i)", " ∏ _i : n, x = x ^ Fintype.card n", " βˆ‘ _Οƒ : Perm n, x ^ Fintype.card n = (Fintype.card n).factorial β€’ x ^ Fintype.card n", " abv ((βˆ‘ k ∈ s, A k) i j) = abv (βˆ‘ k ∈ s, A k i j)" ]
[ " abv (Perm.sign Οƒ β€’ ∏ i : n, A (Οƒ i) i) = ∏ i : n, abv (A (Οƒ i) i)", " ∏ _i : n, x = x ^ Fintype.card n", " βˆ‘ _Οƒ : Perm n, x ^ Fintype.card n = (Fintype.card n).factorial β€’ x ^ Fintype.card n" ]
import Mathlib.Data.Int.Interval import Mathlib.RingTheory.Binomial import Mathlib.RingTheory.HahnSeries.PowerSeries import Mathlib.RingTheory.HahnSeries.Summable import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.Localization.FractionRing #align_import ring_theory.laurent_series from "leanprov...
Mathlib/RingTheory/LaurentSeries.lean
143
146
theorem ofPowerSeries_powerSeriesPart (x : LaurentSeries R) : ofPowerSeries β„€ R x.powerSeriesPart = single (-x.order) 1 * x := by
refine Eq.trans ?_ (congr rfl x.single_order_mul_powerSeriesPart) rw [← mul_assoc, single_mul_single, neg_add_self, mul_one, ← C_apply, C_one, one_mul]
[ " ((ofPowerSeries β„€ R) x).coeff ↑n = (PowerSeries.coeff R n) x", " powerSeriesPart 0 = 0", " (PowerSeries.coeff R n✝) (powerSeriesPart 0) = (PowerSeries.coeff R n✝) 0", " x.powerSeriesPart = 0 ↔ x = 0", " x.powerSeriesPart = 0 β†’ x = 0", " x β‰  0 β†’ x.powerSeriesPart β‰  0", " Β¬x = 0 β†’ Β¬x.powerSeriesPart = 0...
[ " ((ofPowerSeries β„€ R) x).coeff ↑n = (PowerSeries.coeff R n) x", " powerSeriesPart 0 = 0", " (PowerSeries.coeff R n✝) (powerSeriesPart 0) = (PowerSeries.coeff R n✝) 0", " x.powerSeriesPart = 0 ↔ x = 0", " x.powerSeriesPart = 0 β†’ x = 0", " x β‰  0 β†’ x.powerSeriesPart β‰  0", " Β¬x = 0 β†’ Β¬x.powerSeriesPart = 0...
import Mathlib.Algebra.Order.Group.TypeTags import Mathlib.FieldTheory.RatFunc.Degree import Mathlib.RingTheory.DedekindDomain.IntegralClosure import Mathlib.RingTheory.IntegrallyClosed import Mathlib.Topology.Algebra.ValuedField #align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563...
Mathlib/NumberTheory/FunctionField.lean
83
86
theorem algebraMap_injective [Algebra Fq[X] F] [Algebra (RatFunc Fq) F] [IsScalarTower Fq[X] (RatFunc Fq) F] : Function.Injective (⇑(algebraMap Fq[X] F)) := by
rw [IsScalarTower.algebraMap_eq Fq[X] (RatFunc Fq) F] exact (algebraMap (RatFunc Fq) F).injective.comp (IsFractionRing.injective Fq[X] (RatFunc Fq))
[ " FunctionField Fq F ↔ FiniteDimensional Fqt F", " βˆ€ (c : RatFunc Fq) (x : F), e c β€’ x = c β€’ x", " e c β€’ x = c β€’ x", " (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x", " (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c", " (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu...
[ " FunctionField Fq F ↔ FiniteDimensional Fqt F", " βˆ€ (c : RatFunc Fq) (x : F), e c β€’ x = c β€’ x", " e c β€’ x = c β€’ x", " (algebraMap Fqt F) (e c) * x = (algebraMap (RatFunc Fq) F) c * x", " (algebraMap Fqt F) (e c) = (algebraMap (RatFunc Fq) F) c", " (fun c => (algebraMap Fqt F) (e c)) = ⇑(algebraMap (RatFu...
import Mathlib.CategoryTheory.Sites.CompatiblePlus import Mathlib.CategoryTheory.Sites.ConcreteSheafification #align_import category_theory.sites.compatible_sheafification from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace CategoryTheory.GrothendieckTopology open CategoryThe...
Mathlib/CategoryTheory/Sites/CompatibleSheafification.lean
102
106
theorem sheafificationWhiskerRightIso_hom_app : (J.sheafificationWhiskerRightIso F).hom.app P = (J.sheafifyCompIso F P).hom := by
dsimp [sheafificationWhiskerRightIso, sheafifyCompIso] simp only [Category.id_comp, Category.comp_id] erw [Category.id_comp]
[ " (whiskeringLeft Cα΅’α΅– D E).obj (J.sheafify P) β‰… (whiskeringLeft Cα΅’α΅– D E).obj P β‹™ J.sheafification E", " (whiskeringLeft Cα΅’α΅– D E).obj (J.plusObj P) β‹™ J.plusFunctor E β‰…\n ((whiskeringLeft Cα΅’α΅– D E).obj P β‹™ J.plusFunctor E) β‹™ J.plusFunctor E", " (whiskeringLeft Cα΅’α΅– D E).obj (J.plusObj P) β‰… (whiskeringLeft Cα΅’α΅– D ...
[ " (whiskeringLeft Cα΅’α΅– D E).obj (J.sheafify P) β‰… (whiskeringLeft Cα΅’α΅– D E).obj P β‹™ J.sheafification E", " (whiskeringLeft Cα΅’α΅– D E).obj (J.plusObj P) β‹™ J.plusFunctor E β‰…\n ((whiskeringLeft Cα΅’α΅– D E).obj P β‹™ J.plusFunctor E) β‹™ J.plusFunctor E", " (whiskeringLeft Cα΅’α΅– D E).obj (J.plusObj P) β‰… (whiskeringLeft Cα΅’α΅– D ...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Analysis.Normed.Field.UnitBall #align_import analysis.complex.circle from "leanprover-community/mathlib"@"ad3dfaca9ea2465198bcf58aa114401c324e29d1" noncomputable section open Complex Metric open ComplexC...
Mathlib/Analysis/Complex/Circle.lean
62
62
theorem mem_circle_iff_normSq {z : β„‚} : z ∈ circle ↔ normSq z = 1 := by
simp [Complex.abs]
[ " z ∈ circle ↔ normSq z = 1" ]
[]
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
80
80
theorem expand_zero (f : R[X]) : expand R 0 f = C (eval 1 f) := by
simp [expand]
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
import Mathlib.Data.Stream.Defs import Mathlib.Logic.Function.Basic import Mathlib.Init.Data.List.Basic import Mathlib.Data.List.Basic #align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" set_option autoImplicit true open Nat Function Option namespace Stre...
Mathlib/Data/Stream/Init.lean
76
76
theorem tail_drop (n : Nat) (s : Stream' Ξ±) : tail (drop n s) = drop n (tail s) := by
simp
[ " (s.head :: s.tail) i = s i", " (s.head :: s.tail) 0 = s 0", " (s.head :: s.tail) (n✝ + 1) = s (n✝ + 1)", " drop n (drop m s) = drop (n + m) s", " (drop n (drop m s)).get n✝ = (drop (n + m) s).get n✝", " (drop i s).tail = drop (i + 1) s", " (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝", " (drop n...
[ " (s.head :: s.tail) i = s i", " (s.head :: s.tail) 0 = s 0", " (s.head :: s.tail) (n✝ + 1) = s (n✝ + 1)", " drop n (drop m s) = drop (n + m) s", " (drop n (drop m s)).get n✝ = (drop (n + m) s).get n✝", " (drop i s).tail = drop (i + 1) s", " (drop i s).tail.get n✝ = (drop (i + 1) s).get n✝" ]
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import data.nat.choose.central from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Nat def centralBinom (n : β„•) := (2 * n).choose n #alig...
Mathlib/Data/Nat/Choose/Central.lean
57
60
theorem choose_le_centralBinom (r n : β„•) : choose (2 * n) r ≀ centralBinom n := calc (2 * n).choose r ≀ (2 * n).choose (2 * n / 2) := choose_le_middle r (2 * n) _ = (2 * n).choose n := by
rw [Nat.mul_div_cancel_left n zero_lt_two]
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n" ]
[]
import Mathlib.RingTheory.IntegrallyClosed import Mathlib.RingTheory.Trace import Mathlib.RingTheory.Norm #align_import ring_theory.discriminant from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" universe u v w z open scoped Matrix open Matrix FiniteDimensional Fintype Polynomial Fin...
Mathlib/RingTheory/Discriminant.lean
121
124
theorem discr_of_matrix_mulVec (b : ΞΉ β†’ B) (P : Matrix ΞΉ ΞΉ A) : discr A (P.map (algebraMap A B) *α΅₯ b) = P.det ^ 2 * discr A b := by
rw [discr_def, traceMatrix_of_matrix_mulVec, det_mul, det_mul, det_transpose, mul_comm, ← mul_assoc, discr_def, pow_two]
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝", " discr A (⇑b ∘ ⇑f.symm) = discr A ⇑b", " discr A b = 0", " traceMatrix A b *α΅₯ g = 0", " (traceMatrix A b *α΅₯ g) i = 0 i", ...
[ " discr A b = discr A (⇑f ∘ b)", " (traceMatrix A b).det = discr A (⇑f ∘ b)", " traceMatrix A b = traceMatrix A (⇑f ∘ b)", " traceMatrix A b i✝ j✝ = traceMatrix A (⇑f ∘ b) i✝ j✝", " discr A (⇑b ∘ ⇑f.symm) = discr A ⇑b", " discr A b = 0", " traceMatrix A b *α΅₯ g = 0", " (traceMatrix A b *α΅₯ g) i = 0 i", ...
import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.comm_ring from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/CommRing.lean
155
166
theorem evalβ‚‚Hom_X {R : Type u} (c : β„€ β†’+* S) (f : MvPolynomial R β„€ β†’+* S) (x : MvPolynomial R β„€) : evalβ‚‚ c (f ∘ X) x = f x := by
apply MvPolynomial.induction_on x (fun n => by rw [hom_C f, evalβ‚‚_C] exact eq_intCast c n) (fun p q hp hq => by rw [evalβ‚‚_add, hp, hq] exact (f.map_add _ _).symm) (fun p n hp => by rw [evalβ‚‚_mul, evalβ‚‚_X, hp] exact (f.map_mul _ _).symm)
[ " evalβ‚‚ c (⇑f ∘ X) x = f x", " evalβ‚‚ c (⇑f ∘ X) (C n) = f (C n)", " c n = ↑n", " evalβ‚‚ c (⇑f ∘ X) (p + q) = f (p + q)", " f p + f q = f (p + q)", " evalβ‚‚ c (⇑f ∘ X) (p * X n) = f (p * X n)", " f p * (⇑f ∘ X) n = f (p * X n)" ]
[]
import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Calculus.Dslope import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Analytic.Uniqueness #align_import analysis.analytic.isolated_zeros from "leanprover-community/mathlib"@"a3209ddf94136d36e5e5c624b10b2a347cc9d090" open sco...
Mathlib/Analysis/Analytic/IsolatedZeros.lean
48
62
theorem exists_hasSum_smul_of_apply_eq_zero (hs : HasSum (fun m => z ^ m β€’ a m) s) (ha : βˆ€ k < n, a k = 0) : βˆƒ t : E, z ^ n β€’ t = s ∧ HasSum (fun m => z ^ m β€’ a (m + n)) t := by
obtain rfl | hn := n.eq_zero_or_pos Β· simpa by_cases h : z = 0 Β· have : s = 0 := hs.unique (by simpa [ha 0 hn, h] using hasSum_at_zero a) exact ⟨a n, by simp [h, hn.ne', this], by simpa [h] using hasSum_at_zero fun m => a (m + n)⟩ Β· refine ⟨(z ^ n)⁻¹ β€’ s, by field_simp [smul_smul], ?_⟩ have h1 : βˆ‘ i ...
[ " HasSum (fun n => 0 ^ n β€’ a n) (a 0)", " a 0 = 0 ^ 0 β€’ a 0", " 0 ^ b β€’ a b = 0", " βˆƒ t, z ^ n β€’ t = s ∧ HasSum (fun m => z ^ m β€’ a (m + n)) t", " βˆƒ t, z ^ 0 β€’ t = s ∧ HasSum (fun m => z ^ m β€’ a (m + 0)) t", " HasSum (fun m => z ^ m β€’ a m) 0", " z ^ n β€’ a n = s", " HasSum (fun m => z ^ m β€’ a (m + n)) ...
[ " HasSum (fun n => 0 ^ n β€’ a n) (a 0)", " a 0 = 0 ^ 0 β€’ a 0", " 0 ^ b β€’ a b = 0" ]
import Mathlib.Data.Int.Interval import Mathlib.Data.Int.SuccPred import Mathlib.Data.Int.ConditionallyCompleteOrder import Mathlib.Topology.Instances.Discrete import Mathlib.Topology.MetricSpace.Bounded import Mathlib.Order.Filter.Archimedean #align_import topology.instances.int from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/Int.lean
76
78
theorem cobounded_eq : Bornology.cobounded β„€ = atBot βŠ” atTop := by
simp_rw [← comap_dist_right_atTop (0 : β„€), dist_eq', sub_zero, ← comap_abs_atTop, ← @Int.comap_cast_atTop ℝ, comap_comap]; rfl
[ " dist m n = ↑|m - n|", " |↑m - ↑n| = ↑|m - n|", " Pairwise fun m n => 1 ≀ dist m n", " 1 ≀ dist m n", " 1 ≀ |↑m - ↑n|", " 1 ≀ |m - n|", " ball x r = Ioo βŒŠβ†‘x - rβŒ‹ βŒˆβ†‘x + rβŒ‰", " closedBall x r = Icc βŒˆβ†‘x - rβŒ‰ βŒŠβ†‘x + rβŒ‹", " IsCompact (closedBall x r)", " IsCompact (Icc βŒˆβ†‘x - rβŒ‰ βŒŠβ†‘x + rβŒ‹)", " Bornolog...
[ " dist m n = ↑|m - n|", " |↑m - ↑n| = ↑|m - n|", " Pairwise fun m n => 1 ≀ dist m n", " 1 ≀ dist m n", " 1 ≀ |↑m - ↑n|", " 1 ≀ |m - n|", " ball x r = Ioo βŒŠβ†‘x - rβŒ‹ βŒˆβ†‘x + rβŒ‰", " closedBall x r = Icc βŒˆβ†‘x - rβŒ‰ βŒŠβ†‘x + rβŒ‹", " IsCompact (closedBall x r)", " IsCompact (Icc βŒˆβ†‘x - rβŒ‰ βŒŠβ†‘x + rβŒ‹)" ]
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
162
165
theorem mk_coe_def (p : K[X]) (q : K[X]⁰) : -- Porting note: filled in `(FractionRing K[X])` that was an underscore. RatFunc.mk p q = ofFractionRing (IsLocalization.mk' (FractionRing K[X]) p q) := by
simp only [mk_eq_div', ← Localization.mk_eq_mk', FractionRing.mk_eq_div]
[ " { 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.List.OfFn import Mathlib.Data.List.Range #align_import data.list.indexes from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" assert_not_exists MonoidWithZero universe u v open Function namespace List variable {Ξ± : Type u} {Ξ² : Type v} section FoldrIdx -- Porting...
Mathlib/Data/List/Indexes.lean
246
250
theorem foldrIdx_eq_foldrIdxSpec (f : β„• β†’ Ξ± β†’ Ξ² β†’ Ξ²) (b as start) : foldrIdx f b as start = foldrIdxSpec f b as start := by
induction as generalizing start Β· rfl Β· simp only [foldrIdx, foldrIdxSpec_cons, *]
[ " foldrIdx f b as start = foldrIdxSpec f b as start", " foldrIdx f b [] start = foldrIdxSpec f b [] start", " foldrIdx f b (head✝ :: tail✝) start = foldrIdxSpec f b (head✝ :: tail✝) start" ]
[]
import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content noncomputable section universe u variable {K : Type u} namespace RatFunc section IntDegree open Polynomial variable [Field...
Mathlib/FieldTheory/RatFunc/Degree.lean
59
61
theorem intDegree_X : intDegree (X : RatFunc K) = 1 := by
rw [intDegree, num_X, Polynomial.natDegree_X, denom_X, Polynomial.natDegree_one, Int.ofNat_one, Int.ofNat_zero, sub_zero]
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0", " X.intDegree = 1" ]
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0" ]
import Mathlib.Topology.UniformSpace.UniformEmbedding import Mathlib.Topology.UniformSpace.Equiv #align_import topology.uniform_space.abstract_completion from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" noncomputable section attribute [local instance] Classical.propDecidable open F...
Mathlib/Topology/UniformSpace/AbstractCompletion.lean
136
138
theorem extend_coe [T2Space Ξ²] (hf : UniformContinuous f) (a : Ξ±) : (pkg.extend f) (ΞΉ a) = f a := by
rw [pkg.extend_def hf] exact pkg.denseInducing.extend_eq hf.continuous a
[ " pkg.extend f (pkg.coe a) = f a", " β‹―.extend f (pkg.coe a) = f a" ]
[]
import Mathlib.Algebra.Group.Support import Mathlib.Data.Set.Pointwise.SMul #align_import data.set.pointwise.support from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" open Pointwise open Function Set section Group variable {Ξ± Ξ² Ξ³ : Type*} [Group Ξ±] [MulAction Ξ± Ξ²]
Mathlib/Data/Set/Pointwise/Support.lean
26
29
theorem mulSupport_comp_inv_smul [One Ξ³] (c : Ξ±) (f : Ξ² β†’ Ξ³) : (mulSupport fun x ↦ f (c⁻¹ β€’ x)) = c β€’ mulSupport f := by
ext x simp only [mem_smul_set_iff_inv_smul_mem, mem_mulSupport]
[ " (mulSupport fun x => f (c⁻¹ β€’ x)) = c β€’ mulSupport f", " (x ∈ mulSupport fun x => f (c⁻¹ β€’ x)) ↔ x ∈ c β€’ mulSupport f" ]
[]
import Mathlib.SetTheory.Cardinal.Finite #align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" noncomputable section open scoped Classical variable {Ξ± Ξ² Ξ³ : Type*} def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± ≃ Fin (Nat.card Ξ±) := by have := (Finite....
Mathlib/Data/Finite/Card.lean
116
118
theorem card_eq_zero_iff [Finite Ξ±] : Nat.card Ξ± = 0 ↔ IsEmpty Ξ± := by
haveI := Fintype.ofFinite Ξ± simp only [Nat.card_eq_fintype_card, Fintype.card_eq_zero_iff]
[ " Ξ± ≃ Fin (Nat.card Ξ±)", " Ξ± ≃ Fin n", " Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0", " 0 < Nat.card Ξ± ↔ Nonempty Ξ±", " Nat.card Ξ± = Nat.card Ξ² ↔ Nonempty (Ξ± ≃ Ξ²)", " Nat.card Ξ± ≀ 1 ↔ Subsingleton Ξ±", " 1 < Nat.card Ξ± ↔ Nontrivial Ξ±", " Nat.card (Option Ξ±) = Nat.card Ξ± + 1", " Nat.card ...
[ " Ξ± ≃ Fin (Nat.card Ξ±)", " Ξ± ≃ Fin n", " Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0", " 0 < Nat.card Ξ± ↔ Nonempty Ξ±", " Nat.card Ξ± = Nat.card Ξ² ↔ Nonempty (Ξ± ≃ Ξ²)", " Nat.card Ξ± ≀ 1 ↔ Subsingleton Ξ±", " 1 < Nat.card Ξ± ↔ Nontrivial Ξ±", " Nat.card (Option Ξ±) = Nat.card Ξ± + 1", " Nat.card ...
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Data.Finite.Card #align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" variable {G : Type*} [Group G] variable {A : Type*} [AddGroup A] n...
Mathlib/Algebra/Group/Subgroup/Finite.lean
231
234
theorem pi_mem_of_mulSingle_mem [Finite Ξ·] [DecidableEq Ξ·] {H : Subgroup (βˆ€ i, f i)} (x : βˆ€ i, f i) (h : βˆ€ i, Pi.mulSingle i (x i) ∈ H) : x ∈ H := by
cases nonempty_fintype Ξ· exact pi_mem_of_mulSingle_mem_aux Finset.univ x (by simp) fun i _ => h i
[ " x ∈ H", " x = 1", " x i = 1 i", " x = Function.update x i 1 * Pi.mulSingle i (x i)", " x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j", " x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j", " Function.update x i 1 * Pi.mulSingle i (x i) ∈ H", " Function.update x i 1 ∈ H", " βˆ€ i_1 βˆ‰ I,...
[ " x ∈ H", " x = 1", " x i = 1 i", " x = Function.update x i 1 * Pi.mulSingle i (x i)", " x j = (Function.update x i 1 * Pi.mulSingle i (x i)) j", " x j = (Function.update x j 1 * Pi.mulSingle j (x j)) j", " Function.update x i 1 * Pi.mulSingle i (x i) ∈ H", " Function.update x i 1 ∈ H", " βˆ€ i_1 βˆ‰ I,...
import Mathlib.MeasureTheory.OuterMeasure.Basic open Filter Set open scoped ENNReal namespace MeasureTheory variable {Ξ± Ξ² F : Type*} [FunLike F (Set Ξ±) ℝβ‰₯0∞] [OuterMeasureClass F Ξ±] {ΞΌ : F} {s t : Set Ξ±} def ae (ΞΌ : F) : Filter Ξ± := .ofCountableUnion (ΞΌ Β· = 0) (fun _S hSc ↦ (measure_sUnion_null_iff hSc).2) fu...
Mathlib/MeasureTheory/OuterMeasure/AE.lean
79
79
theorem compl_mem_ae_iff {s : Set Ξ±} : sᢜ ∈ ae ΞΌ ↔ ΞΌ s = 0 := by
simp only [mem_ae_iff, compl_compl]
[ " sᢜ ∈ ae ΞΌ ↔ ΞΌ s = 0" ]
[]
import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.FieldTheory.Minpoly.Basic import Mathlib.RingTheory.Algebraic #align_import field_theory.minpoly.field from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" open scoped Classical open Polynomial Set Function minpoly namespace...
Mathlib/FieldTheory/Minpoly/Field.lean
53
62
theorem unique {p : A[X]} (pmonic : p.Monic) (hp : Polynomial.aeval x p = 0) (pmin : βˆ€ q : A[X], q.Monic β†’ Polynomial.aeval x q = 0 β†’ degree p ≀ degree q) : p = minpoly A x := by
have hx : IsIntegral A x := ⟨p, pmonic, hp⟩ symm; apply eq_of_sub_eq_zero by_contra hnz apply degree_le_of_ne_zero A x hnz (by simp [hp]) |>.not_lt apply degree_sub_lt _ (minpoly.ne_zero hx) · rw [(monic hx).leadingCoeff, pmonic.leadingCoeff] · exact le_antisymm (min A x pmonic hp) (pmin (minpoly A x) (m...
[ " (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0", " p = minpoly A x", " minpoly A x = p", " minpoly A x - p = 0", " False", " (Polynomial.aeval x) (minpoly A x - p) = 0", " (minpoly A x - p).degree < (minpoly A x).degree", " (minpoly A x).leadingCoeff = p.leadingCoeff", " (minpoly A x).degree = ...
[ " (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0" ]
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Data.List.Cycle import Mathlib.Data.Nat.Prime import Mathlib.Data.PNat.Basic import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.GroupTheory.GroupAction.Group #align_import dynamics.periodic_pts from "leanp...
Mathlib/Dynamics/PeriodicPts.lean
112
115
theorem right_of_add (hn : IsPeriodicPt f (n + m) x) (hm : IsPeriodicPt f n x) : IsPeriodicPt f m x := by
rw [add_comm] at hn exact hn.left_of_add hm
[ " IsPeriodicPt f (n + m) x", " IsFixedPt (f^[n] ∘ f^[m]) x", " IsPeriodicPt f n x", " IsPeriodicPt f m x" ]
[ " IsPeriodicPt f (n + m) x", " IsFixedPt (f^[n] ∘ f^[m]) x", " IsPeriodicPt f n x" ]
import Mathlib.Data.PNat.Prime import Mathlib.Algebra.IsPrimePow import Mathlib.NumberTheory.Cyclotomic.Basic import Mathlib.RingTheory.Adjoin.PowerBasis import Mathlib.RingTheory.Polynomial.Cyclotomic.Eval import Mathlib.RingTheory.Norm import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand #align_import number_theo...
Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
289
291
theorem norm_eq_neg_one_pow (hΞΆ : IsPrimitiveRoot ΞΆ 2) [IsDomain L] : norm K ΞΆ = (-1 : K) ^ finrank K L := by
rw [hΞΆ.eq_neg_one_of_two_right, show -1 = algebraMap K L (-1) by simp, Algebra.norm_algebraMap]
[ " (Algebra.norm K) ΞΆ = (-1) ^ finrank K L", " -1 = (algebraMap K L) (-1)" ]
[]
import Mathlib.Data.Sum.Order import Mathlib.Order.InitialSeg import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.PPWithUniv #align_import set_theory.ordinal.basic from "leanprover-community/mathlib"@"8ea5598db6caeddde6cb734aa179cc2408dbd345" assert_not_exists Module assert_not_exists Field noncomputabl...
Mathlib/SetTheory/Ordinal/Basic.lean
137
139
theorem eta (o : WellOrder) : mk o.Ξ± o.r o.wo = o := by
cases o rfl
[ " { Ξ± := o.Ξ±, r := o.r, wo := β‹― } = o", " { Ξ± := { Ξ± := α✝, r := r✝, wo := wo✝ }.Ξ±, r := { Ξ± := α✝, r := r✝, wo := wo✝ }.r, wo := β‹― } =\n { Ξ± := α✝, r := r✝, wo := wo✝ }" ]
[]
import Mathlib.CategoryTheory.Balanced import Mathlib.CategoryTheory.Limits.EssentiallySmall import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Subobject.Lattice import Mathlib.CategoryTheory.Subobject.WellPowered import Mathlib.Data.S...
Mathlib/CategoryTheory/Generator.lean
129
138
theorem isCodetecting_op_iff (𝒒 : Set C) : IsCodetecting 𝒒.op ↔ IsDetecting 𝒒 := by
refine ⟨fun h𝒒 X Y f hf => ?_, fun h𝒒 X Y f hf => ?_⟩ Β· refine (isIso_op_iff _).1 (h𝒒 _ fun G hG h => ?_) obtain ⟨t, ht, ht'⟩ := hf (unop G) (Set.mem_op.1 hG) h.unop exact ⟨t.op, Quiver.Hom.unop_inj ht, fun y hy => Quiver.Hom.unop_inj (ht' _ (Quiver.Hom.op_inj hy))⟩ Β· refine (isIso_unop_iff _).1...
[ " IsSeparating 𝒒.op ↔ IsCoseparating 𝒒", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒒.op ↔ IsSeparating 𝒒", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒒.unop ↔ IsSeparating 𝒒", " IsSep...
[ " IsSeparating 𝒒.op ↔ IsCoseparating 𝒒", " f = g", " (h ≫ f.op).unop = (h ≫ g.op).unop", " (f.unop ≫ h).op = (g.unop ≫ h).op", " IsCoseparating 𝒒.op ↔ IsSeparating 𝒒", " (f.op ≫ h).unop = (g.op ≫ h).unop", " (h ≫ f.unop).op = (h ≫ g.unop).op", " IsCoseparating 𝒒.unop ↔ IsSeparating 𝒒", " IsSep...
import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.FieldTheory.Minpoly.Field #align_import linear_algebra.eigenspace.minpoly from "leanprover-community/mathlib"@"c3216069e5f9369e6be586ccbfcde2592b3cec92" universe u v w namespace Module namespace End open Polynomial FiniteDimensional open scoped Poly...
Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
65
69
theorem isRoot_of_hasEigenvalue {f : End K V} {ΞΌ : K} (h : f.HasEigenvalue ΞΌ) : (minpoly K f).IsRoot ΞΌ := by
rcases (Submodule.ne_bot_iff _).1 h with ⟨w, ⟨H, ne0⟩⟩ refine Or.resolve_right (smul_eq_zero.1 ?_) ne0 simp [← aeval_apply_of_hasEigenvector ⟨H, ne0⟩, minpoly.aeval K f]
[ " f.eigenspace (-q.coeff 0 / q.leadingCoeff) =\n LinearMap.ker (q.leadingCoeff β€’ f - (algebraMap K (End K V)) (-q.coeff 0))", " q.leadingCoeff β‰  0", " False", " LinearMap.ker (q.leadingCoeff β€’ f - (algebraMap K (End K V)) (-q.coeff 0)) =\n LinearMap.ker ((aeval f) (C q.leadingCoeff * X + C (q.coeff 0)))...
[ " f.eigenspace (-q.coeff 0 / q.leadingCoeff) =\n LinearMap.ker (q.leadingCoeff β€’ f - (algebraMap K (End K V)) (-q.coeff 0))", " q.leadingCoeff β‰  0", " False", " LinearMap.ker (q.leadingCoeff β€’ f - (algebraMap K (End K V)) (-q.coeff 0)) =\n LinearMap.ker ((aeval f) (C q.leadingCoeff * X + C (q.coeff 0)))...
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Data.Nat.Choose.Sum import Mathlib.Data.Nat.Factorial.BigOperators import Mathlib.Data.Fin.VecNotation import Mathlib.Data.Finset.Sym import Mathlib.Data.Finsupp.Multiset #align_import data.nat.choose.multinomial from "leanprover-community/mathlib"@"2738d2ca56cbc...
Mathlib/Data/Nat/Choose/Multinomial.lean
88
92
theorem multinomial_congr {f g : Ξ± β†’ β„•} (h : βˆ€ a ∈ s, f a = g a) : multinomial s f = multinomial s g := by
simp only [multinomial]; congr 1 Β· rw [Finset.sum_congr rfl h] Β· exact Finset.prod_congr rfl fun a ha => by rw [h a ha]
[ " multinomial βˆ… f = 1", " multinomial (cons a s ha) f = (f a + βˆ‘ i ∈ s, f i).choose (f a) * multinomial s f", " 0 < ∏ i ∈ cons a s ha, (f i)!", " multinomial (insert a s) f = (f a + βˆ‘ i ∈ s, f i).choose (f a) * multinomial s f", " multinomial {a} f = 1", " (f a + βˆ‘ i ∈ βˆ…, f i).choose (f a) * multinomial βˆ…...
[ " multinomial βˆ… f = 1", " multinomial (cons a s ha) f = (f a + βˆ‘ i ∈ s, f i).choose (f a) * multinomial s f", " 0 < ∏ i ∈ cons a s ha, (f i)!", " multinomial (insert a s) f = (f a + βˆ‘ i ∈ s, f i).choose (f a) * multinomial s f", " multinomial {a} f = 1", " (f a + βˆ‘ i ∈ βˆ…, f i).choose (f a) * multinomial βˆ…...
import Mathlib.Init.Control.Combinators import Mathlib.Data.Option.Defs import Mathlib.Logic.IsEmpty import Mathlib.Logic.Relator import Mathlib.Util.CompileInductive import Aesop #align_import data.option.basic from "leanprover-community/mathlib"@"f340f229b1f461aa1c8ee11e0a172d0a3b301a4a" universe u namespace Op...
Mathlib/Data/Option/Basic.lean
46
46
theorem mem_map {f : Ξ± β†’ Ξ²} {y : Ξ²} {o : Option Ξ±} : y ∈ o.map f ↔ βˆƒ x ∈ o, f x = y := by
simp
[ " y ∈ Option.map f o ↔ βˆƒ x, x ∈ o ∧ f x = y" ]
[]
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Group.List import Mathlib.Data.List.Perm #align_import data.list.prime from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6" open List section CommMonoidWithZero variable {M : Type*} [CommMonoidWithZero M]
Mathlib/Data/List/Prime.lean
27
38
theorem Prime.dvd_prod_iff {p : M} {L : List M} (pp : Prime p) : p ∣ L.prod ↔ βˆƒ a ∈ L, p ∣ a := by
constructor · intro h induction' L with L_hd L_tl L_ih · rw [prod_nil] at h exact absurd h pp.not_dvd_one · rw [prod_cons] at h cases' pp.dvd_or_dvd h with hd hd · exact ⟨L_hd, mem_cons_self L_hd L_tl, hd⟩ · obtain ⟨x, hx1, hx2⟩ := L_ih hd exact ⟨x, mem_cons_of_mem L_hd ...
[ " p ∣ L.prod ↔ βˆƒ a ∈ L, p ∣ a", " p ∣ L.prod β†’ βˆƒ a ∈ L, p ∣ a", " βˆƒ a ∈ L, p ∣ a", " βˆƒ a ∈ [], p ∣ a", " βˆƒ a ∈ L_hd :: L_tl, p ∣ a", " (βˆƒ a ∈ L, p ∣ a) β†’ p ∣ L.prod" ]
[]
import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Cases import Mathlib.Algebra.NeZero import Mathlib.Logic.Function.Basic #align_import algebra.char_zero.defs from "leanprover-community/mathlib"@"d6aae1bcbd04b8de2022b9b83a5b5b10e10c777d" class CharZero (R) [AddMonoidWithOne R] : Prop where cast_injecti...
Mathlib/Algebra/CharZero/Defs.lean
79
79
theorem cast_eq_zero {n : β„•} : (n : R) = 0 ↔ n = 0 := by
rw [← cast_zero, cast_inj]
[ " m = n", " 0 = n", " ↑n = 0", " m + 1 = n", " m + 1 = 0", " ↑(m + 1) = 0", " m + 1 = n + 1", " ↑n = 0 ↔ n = 0" ]
[ " m = n", " 0 = n", " ↑n = 0", " m + 1 = n", " m + 1 = 0", " ↑(m + 1) = 0", " m + 1 = n + 1" ]
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
606
607
theorem rec_heq_iff_heq {C : Ξ± β†’ Sort*} {x : C a} {y : Ξ²} {e : a = b} : HEq (e β–Έ x) y ↔ HEq x y := by
subst e; rfl
[ " h β–Έ z = cast β‹― z", " β‹― β–Έ z = cast β‹― z", " HEq (t β–Έ p) p", " HEq (β‹― β–Έ p) p", " HEq (e β–Έ x) y", " HEq (β‹― β–Έ x) y", " HEq (e β–Έ x) y ↔ HEq x y", " HEq (β‹― β–Έ x) y ↔ HEq x y" ]
[ " h β–Έ z = cast β‹― z", " β‹― β–Έ z = cast β‹― z", " HEq (t β–Έ p) p", " HEq (β‹― β–Έ p) p", " HEq (e β–Έ x) y", " HEq (β‹― β–Έ x) y" ]
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
620
625
theorem oangle_right_eq_arctan_of_oangle_eq_pi_div_two {p₁ pβ‚‚ p₃ : P} (h : ∑ p₁ pβ‚‚ p₃ = ↑(Ο€ / 2)) : ∑ pβ‚‚ p₃ p₁ = Real.arctan (dist p₁ pβ‚‚ / dist p₃ pβ‚‚) := by
have hs : (∑ pβ‚‚ p₃ p₁).sign = 1 := by rw [oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two] rw [oangle_eq_angle_of_sign_eq_one hs, angle_eq_arctan_of_angle_eq_pi_div_two (angle_eq_pi_div_two_of_oangle_eq_pi_div_two h) (right_ne_of_oangle_eq_pi_div_two h)]
[ " ∑ pβ‚‚ p₃ p₁ = ↑(dist p₃ pβ‚‚ / dist p₁ p₃).arccos", " (∑ pβ‚‚ p₃ p₁).sign = 1", " ∑ p₃ p₁ pβ‚‚ = ↑(dist p₁ pβ‚‚ / dist p₁ p₃).arccos", " (∑ p₃ p₁ pβ‚‚).sign = 1", " ∑ pβ‚‚ p₃ p₁ = ↑(dist p₁ pβ‚‚ / dist p₁ p₃).arcsin", " ∑ p₃ p₁ pβ‚‚ = ↑(dist p₃ pβ‚‚ / dist p₁ p₃).arcsin", " ∑ pβ‚‚ p₃ p₁ = ↑(dist p₁ pβ‚‚ / dist p₃ pβ‚‚).arctan...
[ " ∑ pβ‚‚ p₃ p₁ = ↑(dist p₃ pβ‚‚ / dist p₁ p₃).arccos", " (∑ pβ‚‚ p₃ p₁).sign = 1", " ∑ p₃ p₁ pβ‚‚ = ↑(dist p₁ pβ‚‚ / dist p₁ p₃).arccos", " (∑ p₃ p₁ pβ‚‚).sign = 1", " ∑ pβ‚‚ p₃ p₁ = ↑(dist p₁ pβ‚‚ / dist p₁ p₃).arcsin", " ∑ p₃ p₁ pβ‚‚ = ↑(dist p₃ pβ‚‚ / dist p₁ p₃).arcsin" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
120
121
theorem rpow_pos_of_pos {x : ℝ} (hx : 0 < x) (y : ℝ) : 0 < x ^ y := by
rw [rpow_def_of_pos hx]; apply exp_pos
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
import Mathlib.Data.Set.Lattice #align_import order.concept from "leanprover-community/mathlib"@"1e05171a5e8cf18d98d9cf7b207540acb044acae" open Function OrderDual Set variable {ΞΉ : Sort*} {Ξ± Ξ² Ξ³ : Type*} {ΞΊ : ΞΉ β†’ Sort*} (r : Ξ± β†’ Ξ² β†’ Prop) {s s₁ sβ‚‚ : Set Ξ±} {t t₁ tβ‚‚ : Set Ξ²} def intentClosure (s : Set Ξ±) :...
Mathlib/Order/Concept.lean
180
185
theorem ext (h : c.fst = d.fst) : c = d := by
obtain ⟨⟨s₁, tβ‚βŸ©, h₁, _⟩ := c obtain ⟨⟨sβ‚‚, tβ‚‚βŸ©, hβ‚‚, _⟩ := d dsimp at h₁ hβ‚‚ h substs h h₁ hβ‚‚ rfl
[ " c = d", " { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝ } = d", " { toProd := (s₁, t₁), closure_fst := h₁, closure_snd := closure_snd✝¹ } =\n { toProd := (sβ‚‚, tβ‚‚), closure_fst := hβ‚‚, closure_snd := closure_snd✝ }", " { toProd := (s₁, intentClosure r s₁), closure_fst := β‹―, closure_s...
[]
import Mathlib.Analysis.BoxIntegral.Partition.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Topology.UniformSpace.Compact import Mathlib.Init.Data.Bool.Lemmas #align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open...
Mathlib/Analysis/BoxIntegral/Basic.lean
143
145
theorem integralSum_neg (f : ℝⁿ β†’ E) (vol : ΞΉ →ᡇᡃ E β†’L[ℝ] F) (Ο€ : TaggedPrepartition I) : integralSum (-f) vol Ο€ = -integralSum f vol Ο€ := by
simp only [integralSum, Pi.neg_apply, (vol _).map_neg, Finset.sum_neg_distrib]
[ " integralSum f vol (Ο€.biUnionTagged Ο€i) = βˆ‘ J ∈ Ο€.boxes, integralSum f vol (Ο€i J)", " (vol J') (f ((Ο€.biUnionTagged Ο€i).tag J')) = (vol J') (f ((Ο€i J).tag J'))", " integralSum f vol (Ο€.biUnionPrepartition Ο€i) = integralSum f vol Ο€", " βˆ‘ J' ∈ (Ο€i J).boxes, (vol J') (f ((Ο€.biUnionPrepartition Ο€i).tag J')) = (v...
[ " integralSum f vol (Ο€.biUnionTagged Ο€i) = βˆ‘ J ∈ Ο€.boxes, integralSum f vol (Ο€i J)", " (vol J') (f ((Ο€.biUnionTagged Ο€i).tag J')) = (vol J') (f ((Ο€i J).tag J'))", " integralSum f vol (Ο€.biUnionPrepartition Ο€i) = integralSum f vol Ο€", " βˆ‘ J' ∈ (Ο€i J).boxes, (vol J') (f ((Ο€.biUnionPrepartition Ο€i).tag J')) = (v...