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.Order.Filter.Basic #align_import order.filter.prod from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Set open Filter namespace Filter variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {ΞΉ : Sort*} section Prod variable {s : Set Ξ±} {t : Set Ξ²} {f : Filter Ξ±} {g : Filter Ξ²} protected ...
Mathlib/Order/Filter/Prod.lean
112
114
theorem prod_top : f Γ—Λ’ (⊀ : Filter Ξ²) = f.comap Prod.fst := by
dsimp only [SProd.sprod] rw [Filter.prod, comap_top, inf_top_eq]
[ " s ∈ f Γ—Λ’ g ↔ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁ Γ—Λ’ tβ‚‚ βŠ† s", " s ∈ comap Prod.fst f βŠ“ comap Prod.snd g ↔ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s", " s ∈ comap Prod.fst f βŠ“ comap Prod.snd g β†’ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s", " βˆƒ t₁_1 ∈ f, βˆƒ tβ‚‚_1 ∈ g, t₁_1.prod tβ‚‚_1 βŠ† t₁ ∩ tβ‚‚", " (βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s) β†’ s ...
[ " s ∈ f Γ—Λ’ g ↔ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁ Γ—Λ’ tβ‚‚ βŠ† s", " s ∈ comap Prod.fst f βŠ“ comap Prod.snd g ↔ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s", " s ∈ comap Prod.fst f βŠ“ comap Prod.snd g β†’ βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s", " βˆƒ t₁_1 ∈ f, βˆƒ tβ‚‚_1 ∈ g, t₁_1.prod tβ‚‚_1 βŠ† t₁ ∩ tβ‚‚", " (βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, t₁.prod tβ‚‚ βŠ† s) β†’ s ...
import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence import Mathlib.Algebra.ContinuedFractions.TerminatedStable import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Ring #align_import algebra.continued_fractions.convergents_equiv from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40a...
Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
134
150
theorem squashSeq_succ_n_tail_eq_squashSeq_tail_n : (squashSeq s (n + 1)).tail = squashSeq s.tail n := by
cases s_succ_succ_nth_eq : s.get? (n + 2) with | none => cases s_succ_nth_eq : s.get? (n + 1) <;> simp only [squashSeq, Stream'.Seq.get?_tail, s_succ_nth_eq, s_succ_succ_nth_eq] | some gp_succ_succ_n => obtain ⟨gp_succ_n, s_succ_nth_eq⟩ : βˆƒ gp_succ_n, s.get? (n + 1) = some gp_succ_n := s.ge_s...
[ " squashSeq s n = s", " (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }", " (squashSeq s n).get? m = s.get? m", " (squashSeq s (n + 1)).tail = squashSeq s.tail n", " (squashSeq s (n + 1)).tail.get? m = (squashSeq s.tail n).get? m" ]
[ " squashSeq s n = s", " (squashSeq s n).get? n = some { a := gp_n.a, b := gp_n.b + gp_succ_n.a / gp_succ_n.b }", " (squashSeq s n).get? m = s.get? m" ]
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
37
37
theorem same_add_div (h : b β‰  0) : (b + a) / b = 1 + a / b := by
rw [← div_self h, add_div]
[ " (a + b) / c = a / c + b / c", " (b + a) / b = 1 + a / b" ]
[ " (a + b) / c = a / c + b / c" ]
import Mathlib.Analysis.Normed.Group.Basic import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace import Mathlib.LinearAlgebra.AffineSpace.Midpoint #align_import analysis.normed.group.add_torsor from "leanprover-community/mathlib"@"837f72de63ad6cd96519cde5f1ffd5ed8d280ad0" noncomputable section open NNReal Topo...
Mathlib/Analysis/Normed/Group/AddTorsor.lean
114
116
theorem dist_vadd_left (v : V) (x : P) : dist (v +α΅₯ x) x = β€–vβ€– := by
-- porting note (#10745): was `simp [dist_eq_norm_vsub V _ x]` rw [dist_eq_norm_vsub V _ x, vadd_vsub]
[ " dist (c +α΅₯ x) (c +α΅₯ y) = dist x y", " dist (v₁ +α΅₯ x) (vβ‚‚ +α΅₯ x) = dist v₁ vβ‚‚", " dist (v +α΅₯ x) x = β€–vβ€–" ]
[ " dist (c +α΅₯ x) (c +α΅₯ y) = dist x y", " dist (v₁ +α΅₯ x) (vβ‚‚ +α΅₯ x) = dist v₁ vβ‚‚" ]
import Mathlib.Order.Filter.Basic import Mathlib.Data.Set.Countable #align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a" open Set Filter open Filter variable {ΞΉ : Sort*} {Ξ± Ξ² : Type*} class CountableInterFilter (l : Filter Ξ±) : Prop where ...
Mathlib/Order/Filter/CountableInter.lean
58
62
theorem countable_bInter_mem {ΞΉ : Type*} {S : Set ΞΉ} (hS : S.Countable) {s : βˆ€ i ∈ S, Set Ξ±} : (β‹‚ i, β‹‚ hi : i ∈ S, s i β€Ή_β€Ί) ∈ l ↔ βˆ€ i, βˆ€ hi : i ∈ S, s i β€Ή_β€Ί ∈ l := by
rw [biInter_eq_iInter] haveI := hS.toEncodable exact countable_iInter_mem.trans Subtype.forall
[ " β‹‚ i, β‹‚ (hi : i ∈ S), s i hi ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l", " β‹‚ x, s ↑x β‹― ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l" ]
[]
import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Polynomial open Finset (antid...
Mathlib/RingTheory/PowerSeries/Trunc.lean
99
106
theorem degree_trunc_lt (f : R⟦X⟧) (n) : (trunc n f).degree < n := by
rw [degree_lt_iff_coeff_zero] intros rw [coeff_trunc] split_ifs with h Β· rw [← not_le] at h contradiction Β· rfl
[ " (trunc n Ο†).coeff m = if m < n then (coeff R m) Ο† else 0", " (trunc n 0).coeff m = Polynomial.coeff 0 m", " (if m < n then 0 else 0) = 0", " 0 = 0", " (trunc (n + 1) 1).coeff m = Polynomial.coeff 1 m", " (if m < n + 1 then if m = 0 then 1 else 0 else 0) = if m = 0 then 1 else 0", " 1 = 1", " 0 = 1",...
[ " (trunc n Ο†).coeff m = if m < n then (coeff R m) Ο† else 0", " (trunc n 0).coeff m = Polynomial.coeff 0 m", " (if m < n then 0 else 0) = 0", " 0 = 0", " (trunc (n + 1) 1).coeff m = Polynomial.coeff 1 m", " (if m < n + 1 then if m = 0 then 1 else 0 else 0) = if m = 0 then 1 else 0", " 1 = 1", " 0 = 1",...
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic import Mathlib.MeasureTheory.Integral.MeanInequalities #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" open Filter open scoped ENNReal Topology namespace MeasureTheory variable ...
Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean
26
33
theorem snorm'_add_le {f g : Ξ± β†’ E} (hf : AEStronglyMeasurable f ΞΌ) (hg : AEStronglyMeasurable g ΞΌ) (hq1 : 1 ≀ q) : snorm' (f + g) q ΞΌ ≀ snorm' f q ΞΌ + snorm' g q ΞΌ := calc (∫⁻ a, (β€–(f + g) aβ€–β‚Š : ℝβ‰₯0∞) ^ q βˆ‚ΞΌ) ^ (1 / q) ≀ (∫⁻ a, ((fun a => (β€–f aβ€–β‚Š : ℝβ‰₯0∞)) + fun a => (β€–g aβ€–β‚Š : ℝβ‰₯0∞)) a ^ q βˆ‚ΞΌ) ^ (1 / ...
gcongr with a simp only [Pi.add_apply, ← ENNReal.coe_add, ENNReal.coe_le_coe, nnnorm_add_le] _ ≀ snorm' f q ΞΌ + snorm' g q ΞΌ := ENNReal.lintegral_Lp_add_le hf.ennnorm hg.ennnorm hq1
[ " (∫⁻ (a : Ξ±), ↑‖(f + g) aβ€–β‚Š ^ q βˆ‚ΞΌ) ^ (1 / q) ≀\n (∫⁻ (a : Ξ±), ((fun a => ↑‖f aβ€–β‚Š) + fun a => ↑‖g aβ€–β‚Š) a ^ q βˆ‚ΞΌ) ^ (1 / q)", " ↑‖(f + g) aβ€–β‚Š ≀ ((fun a => ↑‖f aβ€–β‚Š) + fun a => ↑‖g aβ€–β‚Š) a" ]
[]
import Mathlib.NumberTheory.FLT.Basic import Mathlib.NumberTheory.PythagoreanTriples import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.LinearCombination #align_import number_theory.fermat4 from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" noncomputable section open scope...
Mathlib/NumberTheory/FLT/Four.lean
124
136
theorem exists_odd_minimal {a b c : β„€} (h : Fermat42 a b c) : βˆƒ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 := by
obtain ⟨a0, b0, c0, hf⟩ := exists_minimal h cases' Int.emod_two_eq_zero_or_one a0 with hap hap Β· cases' Int.emod_two_eq_zero_or_one b0 with hbp hbp Β· exfalso have h1 : 2 ∣ (Int.gcd a0 b0 : β„€) := Int.dvd_gcd (Int.dvd_of_emod_eq_zero hap) (Int.dvd_of_emod_eq_zero hbp) rw [Int.gcd_eq_one_iff...
[ " Fermat42 a b c ↔ Fermat42 b a c", " a β‰  0 ∧ b β‰  0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b β‰  0 ∧ a β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " a β‰  0 ∧ b β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b β‰  0 ∧ a β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)", " a β‰  0 ∧ b β‰  0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a β‰  ...
[ " Fermat42 a b c ↔ Fermat42 b a c", " a β‰  0 ∧ b β‰  0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ b β‰  0 ∧ a β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " a β‰  0 ∧ b β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2 ↔ b β‰  0 ∧ a β‰  0 ∧ b ^ 4 + a ^ 4 = c ^ 2", " Fermat42 a b c ↔ Fermat42 (k * a) (k * b) (k ^ 2 * c)", " a β‰  0 ∧ b β‰  0 ∧ a ^ 4 + b ^ 4 = c ^ 2 ↔ k * a β‰  ...
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners import Mathlib.Geometry.Manifold.LocalInvariantProperties #align_import geometry.manifold.cont_mdiff from "leanprover-community/mathlib"@"e5ab837fc252451f3eb9124ae6e7b6f57455e7b9" open Set Function Filter ChartedSpace SmoothManifoldWithCorners open scope...
Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
97
100
theorem contDiffWithinAtProp_self_source {f : E β†’ H'} {s : Set E} {x : E} : ContDiffWithinAtProp π“˜(π•œ, E) I' n f s x ↔ ContDiffWithinAt π•œ n (I' ∘ f) s x := by
simp_rw [ContDiffWithinAtProp, modelWithCornersSelf_coe, range_id, inter_univ, modelWithCornersSelf_coe_symm, CompTriple.comp_eq, preimage_id_eq, id_eq]
[ " ContDiffWithinAtProp π“˜(π•œ, E) I' n f s x ↔ ContDiffWithinAt π•œ n (↑I' ∘ f) s x" ]
[]
import Mathlib.CategoryTheory.Category.Grpd import Mathlib.CategoryTheory.Groupoid import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Homotopy.Path import Mathlib.Data.Set.Subsingleton #align_import algebraic_topology.fundamental_groupoid.basic from "leanprover-community/mathlib"@"3d7987cda72abc473...
Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean
138
140
theorem transReflReparamAux_mem_I (t : I) : transReflReparamAux t ∈ I := by
unfold transReflReparamAux split_ifs <;> constructor <;> linarith [unitInterval.le_one t, unitInterval.nonneg t]
[ " Continuous reflTransSymmAux", " Continuous fun x => ↑x.2", " Continuous fun x => 1 / 2", " Continuous fun x => ↑x.1 * 2 * ↑x.2", " Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)", " βˆ€ (x : ↑I Γ— ↑I), ↑x.2 = 1 / 2 β†’ ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ref...
[ " Continuous reflTransSymmAux", " Continuous fun x => ↑x.2", " Continuous fun x => 1 / 2", " Continuous fun x => ↑x.1 * 2 * ↑x.2", " Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)", " βˆ€ (x : ↑I Γ— ↑I), ↑x.2 = 1 / 2 β†’ ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)", " ref...
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open AffineMap AffineEquiv section variable (R : Type*) {V V' P P' : Type*} [Ring R] [Invertible (2 : R)] [AddCommGroup V] [Modu...
Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
61
64
theorem AffineEquiv.pointReflection_midpoint_left (x y : P) : pointReflection R (midpoint R x y) x = y := by
rw [midpoint, pointReflection_apply, lineMap_apply, vadd_vsub, vadd_vadd, ← add_smul, ← two_mul, mul_invOf_self, one_smul, vsub_vadd]
[ " (pointReflection R (midpoint R x y)) x = y" ]
[]
import Mathlib.Data.Countable.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Order.Disjointed import Mathlib.MeasureTheory.OuterMeasure.Defs #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set F...
Mathlib/MeasureTheory/OuterMeasure/Basic.lean
116
118
theorem measure_iUnion_null_iff {ΞΉ : Sort*} [Countable ΞΉ] {s : ΞΉ β†’ Set Ξ±} : ΞΌ (⋃ i, s i) = 0 ↔ βˆ€ i, ΞΌ (s i) = 0 := by
rw [← sUnion_range, measure_sUnion_null_iff (countable_range s), forall_mem_range]
[ " ΞΌ (⋃ i, s i) ≀ βˆ‘' (i : ΞΉ), ΞΌ (s i)", " (fun x x_1 => x ≀ x_1) (ΞΌ (⨆ i, t i)) (βˆ‘' (i : β„•), ΞΌ (t i))", " ΞΌ (⋃ i, t i) = ΞΌ (⋃ i, disjointed t i)", " βˆ‘' (i : β„•), ΞΌ (disjointed t i) ≀ βˆ‘' (i : β„•), ΞΌ (t i)", " disjointed t a✝ βŠ† t a✝", " ΞΌ (⋃ i ∈ I, s i) ≀ βˆ‘' (i : ↑I), ΞΌ (s ↑i)", " ΞΌ (⋃ x, s ↑x) ≀ βˆ‘' (i : ↑I)...
[ " ΞΌ (⋃ i, s i) ≀ βˆ‘' (i : ΞΉ), ΞΌ (s i)", " (fun x x_1 => x ≀ x_1) (ΞΌ (⨆ i, t i)) (βˆ‘' (i : β„•), ΞΌ (t i))", " ΞΌ (⋃ i, t i) = ΞΌ (⋃ i, disjointed t i)", " βˆ‘' (i : β„•), ΞΌ (disjointed t i) ≀ βˆ‘' (i : β„•), ΞΌ (t i)", " disjointed t a✝ βŠ† t a✝", " ΞΌ (⋃ i ∈ I, s i) ≀ βˆ‘' (i : ↑I), ΞΌ (s ↑i)", " ΞΌ (⋃ x, s ↑x) ≀ βˆ‘' (i : ↑I)...
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option lin...
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
94
96
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
[ " P.toProperty f ↔ P f", " (βˆƒ (h : IsAffine Y), P f) ↔ P f" ]
[]
import Mathlib.Topology.EMetricSpace.Basic #align_import topology.metric_space.metric_separated from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" open EMetric Set noncomputable section def IsMetricSeparated {X : Type*} [EMetricSpace X] (s t : Set X) := βˆƒ r, r β‰  0 ∧ βˆ€ x ∈ s, βˆ€ y ∈...
Mathlib/Topology/MetricSpace/MetricSeparated.lean
78
85
theorem union_left {s'} (h : IsMetricSeparated s t) (h' : IsMetricSeparated s' t) : IsMetricSeparated (s βˆͺ s') t := by
rcases h, h' with ⟨⟨r, r0, hr⟩, ⟨r', r0', hr'⟩⟩ refine ⟨min r r', ?_, fun x hx y hy => hx.elim ?_ ?_⟩ Β· rw [← pos_iff_ne_zero] at r0 r0' ⊒ exact lt_min r0 r0' Β· exact fun hx => (min_le_left _ _).trans (hr _ hx _ hy) Β· exact fun hx => (min_le_right _ _).trans (hr' _ hx _ hy)
[ " r = 0", " IsMetricSeparated (s βˆͺ s') t", " min r r' β‰  0", " 0 < min r r'", " x ∈ s β†’ min r r' ≀ edist x y", " x ∈ s' β†’ min r r' ≀ edist x y" ]
[ " r = 0" ]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis #align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" open scoped Polynomial open Polynomial noncomputable sec...
Mathlib/RingTheory/IsAdjoinRoot.lean
174
175
theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0", " h.repr 0 ∈ Ideal.span {f}" ]
[ " (algebraMap R S) x = h.map (C x)", " p ∈ RingHom.ker h.map ↔ f ∣ p", " h.map p = 0 ↔ f ∣ p", " (aeval h.root) (C x) = h.map (C x)", " (aeval h.root) (p + q) = h.map (p + q)", " (aeval h.root) (C x * X ^ (n + 1)) = h.map (C x * X ^ (n + 1))", " (aeval h.root) f = 0" ]
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
97
99
theorem int_valuation_ne_zero (x : R) (hx : x β‰  0) : v.intValuationDef x β‰  0 := by
rw [intValuationDef, if_neg hx] exact WithZero.coe_ne_zero
[ " v.intValuationDef x β‰  0", " ↑(ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {x})).factors))) β‰  0" ]
[]
import Mathlib.Data.Finset.Lattice #align_import combinatorics.set_family.compression.down from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" variable {Ξ± : Type*} [DecidableEq Ξ±] {π’œ ℬ : Finset (Finset Ξ±)} {s : Finset Ξ±} {a : Ξ±} open Finset -- The namespace is here to distinguish fro...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
273
278
theorem compression_idem (a : Ξ±) (π’œ : Finset (Finset Ξ±)) : 𝓓 a (𝓓 a π’œ) = 𝓓 a π’œ := by
ext s refine mem_compression.trans ⟨?_, fun h => Or.inl ⟨h, erase_mem_compression_of_mem_compression h⟩⟩ rintro (h | h) · exact h.1 · cases h.1 (mem_compression_of_insert_mem_compression h.2)
[ " False", " s ∈ 𝓓 a π’œ ↔ s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ s βˆ‰ π’œ ∧ insert a s ∈ π’œ", " s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ (βˆƒ a_1 ∈ π’œ, a_1.erase a = s) ∧ s βˆ‰ π’œ ↔ s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ insert a s ∈ π’œ ∧ s βˆ‰ π’œ", " (βˆƒ a_1 ∈ π’œ, a_1.erase a = s) β†’ insert a s ∈ π’œ", " insert a (t.erase a) ∈ π’œ", " s.erase a ∈ 𝓓 a π’œ",...
[ " False", " s ∈ 𝓓 a π’œ ↔ s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ s βˆ‰ π’œ ∧ insert a s ∈ π’œ", " s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ (βˆƒ a_1 ∈ π’œ, a_1.erase a = s) ∧ s βˆ‰ π’œ ↔ s ∈ π’œ ∧ s.erase a ∈ π’œ ∨ insert a s ∈ π’œ ∧ s βˆ‰ π’œ", " (βˆƒ a_1 ∈ π’œ, a_1.erase a = s) β†’ insert a s ∈ π’œ", " insert a (t.erase a) ∈ π’œ", " s.erase a ∈ 𝓓 a π’œ",...
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" namespace Nat theorem gcd_greatest {a b d : β„•} (hda : d ∣ a) (hdb : d ∣ b) (hd ...
Mathlib/Data/Nat/GCD/Basic.lean
80
81
theorem gcd_add_self_left (m n : β„•) : gcd (m + n) n = gcd m n := by
rw [gcd_comm, gcd_add_self_right, gcd_comm]
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)", " (m...
[ " m.gcd (n + k * m) = m.gcd n", " m.gcd (n + m * k) = m.gcd n", " m.gcd (k * m + n) = m.gcd n", " m.gcd (m * k + n) = m.gcd n", " (m + k * n).gcd n = m.gcd n", " (m + n * k).gcd n = m.gcd n", " (k * n + m).gcd n = m.gcd n", " (n * k + m).gcd n = m.gcd n", " m.gcd (n + m) = m.gcd (n + 1 * m)" ]
import Mathlib.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Order.Zorn import Mathlib.Data.Finset.Order import Mathlib.Order.Interval.Set.OrderIso import Mathlib.Data.Finite.Set import Mathlib.Tactic.TFAE #alig...
Mathlib/Order/CompactlyGenerated/Basic.lean
110
149
theorem isCompactElement_iff_le_of_directed_sSup_le (k : Ξ±) : IsCompactElement k ↔ βˆ€ s : Set Ξ±, s.Nonempty β†’ DirectedOn (Β· ≀ Β·) s β†’ k ≀ sSup s β†’ βˆƒ x : Ξ±, x ∈ s ∧ k ≀ x := by
classical constructor Β· intro hk s hne hdir hsup obtain ⟨t, ht⟩ := hk s hsup -- certainly every element of t is below something in s, since ↑t βŠ† s. have t_below_s : βˆ€ x ∈ t, βˆƒ y ∈ s, x ≀ y := fun x hxt => ⟨x, ht.left hxt, le_rfl⟩ obtain ⟨x, ⟨hxs, hsupx⟩⟩ := Finset.sup_le_of_le_directe...
[ " IsCompactElement k ↔ βˆ€ (ΞΉ : Type u) (s : ΞΉ β†’ Ξ±), k ≀ iSup s β†’ βˆƒ t, k ≀ t.sup s", " IsCompactElement k β†’ βˆ€ (ΞΉ : Type u) (s : ΞΉ β†’ Ξ±), k ≀ iSup s β†’ βˆƒ t, k ≀ t.sup s", " βˆƒ t, k ≀ t.sup s", " t.sup id ≀ (Finset.image f Finset.univ).sup s", " βˆ€ b ∈ t, id b ≀ (Finset.image f Finset.univ).sup s", " id b ≀ (Fins...
[ " IsCompactElement k ↔ βˆ€ (ΞΉ : Type u) (s : ΞΉ β†’ Ξ±), k ≀ iSup s β†’ βˆƒ t, k ≀ t.sup s", " IsCompactElement k β†’ βˆ€ (ΞΉ : Type u) (s : ΞΉ β†’ Ξ±), k ≀ iSup s β†’ βˆƒ t, k ≀ t.sup s", " βˆƒ t, k ≀ t.sup s", " t.sup id ≀ (Finset.image f Finset.univ).sup s", " βˆ€ b ∈ t, id b ≀ (Finset.image f Finset.univ).sup s", " id b ≀ (Fins...
import Mathlib.CategoryTheory.Idempotents.Basic import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Equivalence #align_import category_theory.idempotents.karoubi from "leanprover-community/mathlib"@"200eda15d8ff5669854ff6bcc10aaf37cb70498f" noncomputable section open CategoryT...
Mathlib/CategoryTheory/Idempotents/Karoubi.lean
117
118
theorem hom_ext {P Q : Karoubi C} (f g : P ⟢ Q) (h : f.f = g.f) : f = g := by
simpa [hom_ext_iff] using h
[ " P = Q", " { X := X✝, p := p✝, idem := idem✝ } = Q", " { X := X✝¹, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }", " { X := X✝, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }", " 0 = P.p ≫ 0 ≫ Q.p", " P.p ≫ f.f = f.f", " f.f ≫ Q.p = f.f", " P.p ≫ f.f = f.f ≫ Q.p",...
[ " P = Q", " { X := X✝, p := p✝, idem := idem✝ } = Q", " { X := X✝¹, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }", " { X := X✝, p := p✝¹, idem := idem✝¹ } = { X := X✝, p := p✝, idem := idem✝ }", " 0 = P.p ≫ 0 ≫ Q.p", " P.p ≫ f.f = f.f", " f.f ≫ Q.p = f.f", " P.p ≫ f.f = f.f ≫ Q.p",...
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
118
125
theorem whiskerRight_toSheafify_sheafifyCompIso_hom : whiskerRight (J.toSheafify _) _ ≫ (J.sheafifyCompIso F P).hom = J.toSheafify _ := by
dsimp [sheafifyCompIso] erw [whiskerRight_comp, Category.assoc] slice_lhs 2 3 => rw [plusCompIso_whiskerRight] rw [Category.assoc, ← J.plusMap_comp, whiskerRight_toPlus_comp_plusCompIso_hom, ← Category.assoc, whiskerRight_toPlus_comp_plusCompIso_hom] rfl
[ " (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.Data.List.Join #align_import data.list.permutation from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" -- Make sure we don't import algebra assert_not_exists Monoid open Nat variable {Ξ± Ξ² : Type*} namespace List theorem permutationsAux2_fst (t : Ξ±) (ts : List Ξ±) (r : L...
Mathlib/Data/List/Permutation.lean
121
124
theorem permutationsAux2_snd_eq (t : Ξ±) (ts : List Ξ±) (r : List Ξ²) (ys : List Ξ±) (f : List Ξ± β†’ Ξ²) : (permutationsAux2 t ts r ys f).2 = ((permutationsAux2 t [] [] ys id).2.map fun x => f (x ++ ts)) ++ r := by
rw [← permutationsAux2_append, map_permutationsAux2, permutationsAux2_comp_append]
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
import Mathlib.CategoryTheory.Subobject.Limits #align_import algebra.homology.image_to_kernel from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u w open CategoryTheory CategoryTheory.Limits variable {ΞΉ : Type*} variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] o...
Mathlib/Algebra/Homology/ImageToKernel.lean
82
85
theorem factorThruImageSubobject_comp_imageToKernel (w : f ≫ g = 0) : factorThruImageSubobject f ≫ imageToKernel f g w = factorThruKernelSubobject g f w := by
ext simp
[ " kernel.lift g f w ≫ kernel.ΞΉ g = f", " Mono (imageToKernel f g w)", " Mono ((imageSubobject f).ofLE (kernelSubobject g) β‹―)", " imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow", " (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x", " factorThruIma...
[ " kernel.lift g f w ≫ kernel.ΞΉ g = f", " Mono (imageToKernel f g w)", " Mono ((imageSubobject f).ofLE (kernelSubobject g) β‹―)", " imageToKernel f g w ≫ (kernelSubobject g).arrow = (imageSubobject f).arrow", " (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Deprecated.Subring #align_import deprecated.subfield from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" variable {F : Type*} [Field F] (S : Set F) structure IsSubfield extends IsSubring S : Prop where inv_mem : βˆ€ {x : F}, x ∈ S β†’ x⁻...
Mathlib/Deprecated/Subfield.lean
46
53
theorem IsSubfield.pow_mem {a : F} {n : β„€} {s : Set F} (hs : IsSubfield s) (h : a ∈ s) : a ^ n ∈ s := by
cases' n with n n Β· suffices a ^ (n : β„€) ∈ s by exact this rw [zpow_natCast] exact hs.toIsSubring.toIsSubmonoid.pow_mem h Β· rw [zpow_negSucc] exact hs.inv_mem (hs.toIsSubring.toIsSubmonoid.pow_mem h)
[ " x / y ∈ S", " x * y⁻¹ ∈ S", " a ^ n ∈ s", " a ^ Int.ofNat n ∈ s", " a ^ ↑n ∈ s", " a ^ Int.negSucc n ∈ s", " (a ^ (n + 1))⁻¹ ∈ s" ]
[ " x / y ∈ S", " x * y⁻¹ ∈ S" ]
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Geometry.Euclidean.PerpBisector import Mathlib.Algebra.QuadraticDiscriminant #align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" noncomputable section open scoped Classical open ...
Mathlib/Geometry/Euclidean/Basic.lean
78
87
theorem inner_weightedVSub {ι₁ : Type*} {s₁ : Finset ι₁} {w₁ : ι₁ β†’ ℝ} (p₁ : ι₁ β†’ P) (h₁ : βˆ‘ i ∈ s₁, w₁ i = 0) {ΞΉβ‚‚ : Type*} {sβ‚‚ : Finset ΞΉβ‚‚} {wβ‚‚ : ΞΉβ‚‚ β†’ ℝ} (pβ‚‚ : ΞΉβ‚‚ β†’ P) (hβ‚‚ : βˆ‘ i ∈ sβ‚‚, wβ‚‚ i = 0) : βŸͺs₁.weightedVSub p₁ w₁, sβ‚‚.weightedVSub pβ‚‚ wβ‚‚βŸ« = (-βˆ‘ i₁ ∈ s₁, βˆ‘ iβ‚‚ ∈ sβ‚‚, w₁ i₁ * wβ‚‚ iβ‚‚ * (dist (p₁ i₁) (p...
rw [Finset.weightedVSub_apply, Finset.weightedVSub_apply, inner_sum_smul_sum_smul_of_sum_eq_zero _ h₁ _ hβ‚‚] simp_rw [vsub_sub_vsub_cancel_right] rcongr (i₁ iβ‚‚) <;> rw [dist_eq_norm_vsub V (p₁ i₁) (pβ‚‚ iβ‚‚)]
[ " dist p1 (midpoint ℝ p1 p2) = dist p2 (midpoint ℝ p1 p2)", " βŸͺ(s₁.weightedVSub p₁) w₁, (sβ‚‚.weightedVSub pβ‚‚) wβ‚‚βŸ«_ℝ =\n (-βˆ‘ i₁ ∈ s₁, βˆ‘ iβ‚‚ ∈ sβ‚‚, w₁ i₁ * wβ‚‚ iβ‚‚ * (dist (p₁ i₁) (pβ‚‚ iβ‚‚) * dist (p₁ i₁) (pβ‚‚ iβ‚‚))) / 2", " (-βˆ‘ i₁ ∈ s₁,\n βˆ‘ iβ‚‚ ∈ sβ‚‚,\n w₁ i₁ * wβ‚‚ iβ‚‚ *\n (β€–p₁ i₁ -α΅₯ Class...
[ " dist p1 (midpoint ℝ p1 p2) = dist p2 (midpoint ℝ p1 p2)" ]
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section General variable {Ξ± : Type*} {g : Gen...
Mathlib/Algebra/ContinuedFractions/Translations.lean
49
50
theorem part_denom_none_iff_s_none : g.partialDenominators.get? n = none ↔ g.s.get? n = none := by
cases s_nth_eq : g.s.get? n <;> simp [partialDenominators, s_nth_eq]
[ " g.TerminatedAt n ↔ g.s.TerminatedAt n", " g.TerminatedAt n ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ none = none", " g.partialNumerators.get? n = none ↔ some val✝ = none", " g.TerminatedAt n ↔ g.partialNumerators.get? n = none",...
[ " g.TerminatedAt n ↔ g.s.TerminatedAt n", " g.TerminatedAt n ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ g.s.get? n = none", " g.partialNumerators.get? n = none ↔ none = none", " g.partialNumerators.get? n = none ↔ some val✝ = none", " g.TerminatedAt n ↔ g.partialNumerators.get? n = none" ...
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Tactic.Ring #align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" def hyperoperation : β„• β†’ β„• β†’ β„• β†’ β„• | 0, _, k => k + 1 | 1, m, 0 => m | 2, _, 0 => 0 | _ + 3, _, 0 => 1 | n + 1, m, k + 1 ...
Mathlib/Data/Nat/Hyperoperation.lean
82
88
theorem hyperoperation_three : hyperoperation 3 = (Β· ^ Β·) := by
ext m k induction' k with bn bih Β· rw [hyperoperation_ge_three_eq_one] exact (pow_zero m).symm Β· rw [hyperoperation_recursion, hyperoperation_two, bih] exact (pow_succ' m bn).symm
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
[ " hyperoperation 0 m k = k.succ", " hyperoperation (n + 3) m 0 = 1", " hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)", " hyperoperation 1 = fun x x_1 => x + x_1", " hyperoperation 1 m k = m + k", " hyperoperation 1 m 0 = m + 0", " hyperoperation 1 m (bn + 1) = m + (b...
import Mathlib.Data.Matrix.Kronecker import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.TensorProduct.Basis #align_import linear_algebra.tensor_product.matrix from "leanprover-community/mathlib"@"f784cc6142443d9ee623a20788c282112c322081" variable {R : Type*} {M N P M' N' : Type*} {ΞΉ ΞΊ Ο„ ΞΉ' ΞΊ' ...
Mathlib/LinearAlgebra/TensorProduct/Matrix.lean
57
64
theorem TensorProduct.toMatrix_comm : toMatrix (bM.tensorProduct bN) (bN.tensorProduct bM) (TensorProduct.comm R M N) = (1 : Matrix (ΞΉ Γ— ΞΊ) (ΞΉ Γ— ΞΊ) R).submatrix Prod.swap _root_.id := by
ext ⟨i, j⟩ ⟨i', j'⟩ simp_rw [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, TensorProduct.comm_tmul, Basis.tensorProduct_repr_tmul_apply, Matrix.submatrix_apply, Prod.swap_prod_mk, _root_.id, Basis.repr_self_apply, Matrix.one_apply, Prod.ext_iff, ite_and, @eq_comm _ i', @eq_comm _ j'] sp...
[ " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)", " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa...
[ " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMatrix bN bN') g)", " (toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (map f g) (i, j) (i', j') =\n kroneckerMap (fun x x_1 => x * x_1) ((toMatrix bM bM') f) ((toMa...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Pi import Mathlib.Data.Fintype.Sum #align_import combinatorics.hales_jewett from "leanprover-community/mathlib"@"1126441d6bccf98c81214a0780c73d499f6721fe" open scoped Classical universe u v namespace ...
Mathlib/Combinatorics/HalesJewett.lean
204
207
theorem prod_apply {Ξ± ΞΉ ΞΉ'} (l : Line Ξ± ΞΉ) (l' : Line Ξ± ΞΉ') (x : Ξ±) : l.prod l' x = Sum.elim (l x) (l' x) := by
funext i cases i <;> rfl
[ " Inhabited (ColorFocused C)", " h ∈ 0 β†’ (fun x i => (h.line.idxFun i).getD x) none = fun x => none", " (fun i => Option.map f (l.idxFun i)) β‹―.choose = none", " (fun x i => (l.idxFun i).getD x) x i = x", " some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i", " (fun x i => ((map f l).idxFun i).getD x...
[ " Inhabited (ColorFocused C)", " h ∈ 0 β†’ (fun x i => (h.line.idxFun i).getD x) none = fun x => none", " (fun i => Option.map f (l.idxFun i)) β‹―.choose = none", " (fun x i => (l.idxFun i).getD x) x i = x", " some ((fun x i => (l.idxFun i).getD x) x i) = l.idxFun i", " (fun x i => ((map f l).idxFun i).getD x...
import Mathlib.CategoryTheory.Closed.Cartesian import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Adjunction.FullyFaithful #align_import category_theory.closed.functor from "leanprover-community/mathlib"@"cea27692b3fdeb328a2ddba6aabf181754543184" noncomputable secti...
Mathlib/CategoryTheory/Closed/Functor.lean
83
88
theorem expComparison_ev (A B : C) : Limits.prod.map (πŸ™ (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) = inv (prodComparison F _ _) ≫ F.map ((exp.ev _).app _) := by
convert transferNatTrans_counit _ _ (prodComparisonNatIso F A).inv B using 2 apply IsIso.inv_eq_of_hom_inv_id -- Porting note: was `ext` simp only [Limits.prodComparisonNatIso_inv, asIso_inv, NatIso.isIso_inv_app, IsIso.hom_inv_id]
[ " IsIso ((frobeniusMorphism F h A).app B)", " IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (πŸ™ (L.obj B)))", " prod.map (πŸ™ (F.obj A)) ((expComparison F A).app B) ≫ (exp.ev (F.obj A)).app (F.obj B) =\n inv (prodComparison F A (A ⟹ B)) ≫ F.map ((exp.ev A).app B)", " inv (prodComparison F ...
[ " IsIso ((frobeniusMorphism F h A).app B)", " IsIso (prodComparison L (F.obj A) B ≫ prod.map (h.counit.app A) (πŸ™ (L.obj B)))" ]
import Mathlib.Combinatorics.SimpleGraph.Coloring #align_import combinatorics.simple_graph.partition from "leanprover-community/mathlib"@"2303b3e299f1c75b07bceaaac130ce23044d1386" universe u v namespace SimpleGraph variable {V : Type u} (G : SimpleGraph V) structure Partition where parts : Set (Set V) ...
Mathlib/Combinatorics/SimpleGraph/Partition.lean
88
90
theorem partOfVertex_mem (v : V) : P.partOfVertex v ∈ P.parts := by
obtain ⟨h, -⟩ := (P.isPartition.2 v).choose_spec.1 exact h
[ " P.partOfVertex v ∈ P.parts" ]
[]
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing import Mathlib.AlgebraicGeometry.OpenImmersion #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" set_option linter.uppercaseLean3 false noncomputable section universe u open Topologica...
Mathlib/AlgebraicGeometry/Gluing.lean
302
304
theorem gluedCoverT'_fst_snd (x y z : 𝒰.J) : gluedCoverT' 𝒰 x y z ≫ pullback.fst ≫ pullback.snd = pullback.snd ≫ pullback.snd := by
delta gluedCoverT'; simp
[ " pullback pullback.fst pullback.fst ⟢ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟢ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟢ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)", " (pullback.fst ≫ 𝒰.map x) ≫ πŸ™ X = (pullbackSym...
[ " pullback pullback.fst pullback.fst ⟢ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟢ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟢ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)", " (pullback.fst ≫ 𝒰.map x) ≫ πŸ™ X = (pullbackSym...
import Mathlib.Order.PartialSups #align_import order.disjointed from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {Ξ± Ξ² : Type*} section GeneralizedBooleanAlgebra variable [GeneralizedBooleanAlgebra Ξ±] def disjointed (f : β„• β†’ Ξ±) : β„• β†’ Ξ± | 0 => f 0 | n + 1 => f (n + 1) ...
Mathlib/Order/Disjointed.lean
74
80
theorem disjoint_disjointed (f : β„• β†’ Ξ±) : Pairwise (Disjoint on disjointed f) := by
refine (Symmetric.pairwise_on Disjoint.symm _).2 fun m n h => ?_ cases n Β· exact (Nat.not_lt_zero _ h).elim exact disjoint_sdiff_self_right.mono_left ((disjointed_le f m).trans (le_partialSups_of_le f (Nat.lt_add_one_iff.1 h)))
[ " disjointed ≀ id", " disjointed f n ≀ id f n", " disjointed f 0 ≀ id f 0", " disjointed f (n✝ + 1) ≀ id f (n✝ + 1)", " Pairwise (Disjoint on disjointed f)", " Disjoint (disjointed f m) (disjointed f n)", " Disjoint (disjointed f m) (disjointed f 0)", " Disjoint (disjointed f m) (disjointed f (n✝ + 1)...
[ " disjointed ≀ id", " disjointed f n ≀ id f n", " disjointed f 0 ≀ id f 0", " disjointed f (n✝ + 1) ≀ id f (n✝ + 1)" ]
import Mathlib.Logic.Equiv.Option import Mathlib.Order.RelIso.Basic import Mathlib.Order.Disjoint import Mathlib.Order.WithBot import Mathlib.Tactic.Monotonicity.Attr import Mathlib.Util.AssertExists #align_import order.hom.basic from "leanprover-community/mathlib"@"62a5626868683c104774de8d85b9855234ac807c" open ...
Mathlib/Order/Hom/Basic.lean
180
182
theorem map_inv_le_iff (f : F) {a : Ξ±} {b : Ξ²} : EquivLike.inv f b ≀ a ↔ b ≀ f a := by
convert (map_le_map_iff f (a := EquivLike.inv f b) (b := a)).symm exact (EquivLike.right_inv f _).symm
[ " EquivLike.inv f b ≀ a ↔ b ≀ f a", " b = f (EquivLike.inv f b)" ]
[]
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Rat.Cast.Order import Mathlib.Order.Partition.Finpartition import Mathlib.Tactic.GCongr import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring #align_import combinatorics.simp...
Mathlib/Combinatorics/SimpleGraph/Density.lean
146
150
theorem edgeDensity_add_edgeDensity_compl (hs : s.Nonempty) (ht : t.Nonempty) : edgeDensity r s t + edgeDensity (fun x y ↦ Β¬r x y) s t = 1 := by
rw [edgeDensity, edgeDensity, div_add_div_same, div_eq_one_iff_eq] Β· exact mod_cast card_interedges_add_card_interedges_compl r s t Β· exact mod_cast (mul_pos hs.card_pos ht.card_pos).ne'
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r βˆ… t = βˆ…", " x ∈ interedges r sβ‚‚ tβ‚‚ β†’ x ∈ interedges r s₁ t₁", " x.1 ∈ sβ‚‚ ∧ x.2 ∈ tβ‚‚ ∧ r x.1 x.2 β†’ x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card", " Disjoint (...
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r βˆ… t = βˆ…", " x ∈ interedges r sβ‚‚ tβ‚‚ β†’ x ∈ interedges r s₁ t₁", " x.1 ∈ sβ‚‚ ∧ x.2 ∈ tβ‚‚ ∧ r x.1 x.2 β†’ x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card", " Disjoint (...
import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.Tactic.PPWithUniv import Mathlib.Data.Set.Defs #align_import category_theory.types from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded" namespace CategoryTheory -- morphism levels be...
Mathlib/CategoryTheory/Types.lean
256
261
theorem mono_iff_injective {X Y : Type u} (f : X ⟢ Y) : Mono f ↔ Function.Injective f := by
constructor Β· intro H x x' h rw [← homOfElement_eq_iff] at h ⊒ exact (cancel_mono f).mp h Β· exact fun H => ⟨fun g g' h => H.comp_left h⟩
[ " f = g", " f x = g x", " Mono (β†Ύf)", " β†Ύf ≫ inv (β†Ύf) = πŸ™ Ξ±", " x = y β†’ homOfElement x = homOfElement y", " Mono f ↔ Function.Injective f", " Mono f β†’ Function.Injective f", " x = x'", " homOfElement x = homOfElement x'", " Function.Injective f β†’ Mono f" ]
[ " f = g", " f x = g x", " Mono (β†Ύf)", " β†Ύf ≫ inv (β†Ύf) = πŸ™ Ξ±", " x = y β†’ homOfElement x = homOfElement y" ]
import Mathlib.Data.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign theorem sign_of_neg {r : ℝ} (hr : r < 0) : si...
Mathlib/Data/Real/Sign.lean
64
71
theorem sign_eq_zero_iff {r : ℝ} : sign r = 0 ↔ r = 0 := by
refine ⟨fun h => ?_, fun h => h.symm β–Έ sign_zero⟩ obtain hn | rfl | hp := lt_trichotomy r (0 : ℝ) Β· rw [sign_of_neg hn, neg_eq_zero] at h exact (one_ne_zero h).elim Β· rfl Β· rw [sign_of_pos hp] at h exact (one_ne_zero h).elim
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0" ]
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1" ]
import Mathlib.Algebra.Lie.Abelian #align_import algebra.lie.tensor_product from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec" suppress_compilation universe u v w w₁ wβ‚‚ w₃ variable {R : Type u} [CommRing R] open LieModule namespace TensorProduct open scoped TensorProduct namespace...
Mathlib/Algebra/Lie/TensorProduct.lean
115
122
theorem coe_liftLie_eq_lift_coe (f : M →ₗ⁅R,L⁆ N β†’β‚—[R] P) : ⇑(liftLie R L M N P f) = lift R L M N P f := by
suffices (liftLie R L M N P f : M βŠ—[R] N β†’β‚—[R] P) = lift R L M N P f by rw [← this, LieModuleHom.coe_toLinearMap] ext m n simp only [liftLie, LinearEquiv.trans_apply, LieModuleEquiv.coe_to_linearEquiv, coe_linearMap_maxTrivLinearMapEquivLieModuleHom, coe_maxTrivEquiv_apply, coe_linearMap_maxTrivLinea...
[ " ⁅x + y, t⁆ = ⁅x, t⁆ + ⁅y, t⁆", " (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.rTensor N ((toEnd R L M) y)) t +\n ((LinearMap.lTensor M ((toEnd R L N) x)) t + (LinearMap.lTensor M ((toEnd R L N) y)) t) =\n (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.lTensor M ((toEnd R L N) x)) t +\n...
[ " ⁅x + y, t⁆ = ⁅x, t⁆ + ⁅y, t⁆", " (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.rTensor N ((toEnd R L M) y)) t +\n ((LinearMap.lTensor M ((toEnd R L N) x)) t + (LinearMap.lTensor M ((toEnd R L N) y)) t) =\n (LinearMap.rTensor N ((toEnd R L M) x)) t + (LinearMap.lTensor M ((toEnd R L N) x)) t +\n...
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityT...
Mathlib/Probability/CondCount.lean
59
59
theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by
simp [condCount]
[ " condCount βˆ… = 0" ]
[]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.lagrange from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open Polynomial section PolynomialDetermination namespace Poly...
Mathlib/LinearAlgebra/Lagrange.lean
55
60
theorem eq_of_degree_sub_lt_of_eval_finset_eq (degree_fg_lt : (f - g).degree < s.card) (eval_fg : βˆ€ x ∈ s, f.eval x = g.eval x) : f = g := by
rw [← sub_eq_zero] refine eq_zero_of_degree_lt_of_eval_finset_eq_zero _ degree_fg_lt ?_ simp_rw [eval_sub, sub_eq_zero] exact eval_fg
[ " f = 0", " (degreeLTEquiv R s.card) ⟨f, degree_f_lt⟩ = 0", " f = g", " f - g = 0", " βˆ€ x ∈ s, eval x (f - g) = 0", " βˆ€ x ∈ s, eval x f = eval x g" ]
[ " f = 0", " (degreeLTEquiv R s.card) ⟨f, degree_f_lt⟩ = 0" ]
import Mathlib.Topology.Category.TopCat.Limits.Products #align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open TopologicalSpace open Cat...
Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
115
117
theorem pullbackIsoProdSubtype_inv_snd (f : X ⟢ Z) (g : Y ⟢ Z) : (pullbackIsoProdSubtype f g).inv ≫ pullback.snd = pullbackSnd f g := by
simp [pullbackCone, pullbackIsoProdSubtype]
[ " Continuous (Prod.fst ∘ Subtype.val)", " Continuous Prod.fst", " Continuous Subtype.val", " Continuous (Prod.snd ∘ Subtype.val)", " Continuous Prod.snd", " pullbackFst f g ≫ f = pullbackSnd f g ≫ g", " { toFun := fun x => (↑x).1, continuous_toFun := β‹― } ≫ f = { toFun := fun x => (↑x).2, continuous_toFu...
[ " Continuous (Prod.fst ∘ Subtype.val)", " Continuous Prod.fst", " Continuous Subtype.val", " Continuous (Prod.snd ∘ Subtype.val)", " Continuous Prod.snd", " pullbackFst f g ≫ f = pullbackSnd f g ≫ g", " { toFun := fun x => (↑x).1, continuous_toFun := β‹― } ≫ f = { toFun := fun x => (↑x).2, continuous_toFu...
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : β„•) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
148
149
theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
rw [← card_Ioo, Fintype.card_ofFinset]
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
[ " map valEmbedding (Icc a b) = Icc ↑a ↑b", " map valEmbedding (Ico a b) = Ico ↑a ↑b", " map valEmbedding (Ioc a b) = Ioc ↑a ↑b", " map valEmbedding (Ioo a b) = Ioo ↑a ↑b", " (Icc a b).card = ↑b + 1 - ↑a", " (Ico a b).card = ↑b - ↑a", " (Ioc a b).card = ↑b - ↑a", " (Ioo a b).card = ↑b - ↑a - 1", " (u...
import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.Subgroup.Simple import Mathlib.Tactic.Group import Mathlib.GroupTheory.Exponent #align_import group_theory.specific_groups.cyclic from "leanprover-community/mathli...
Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
110
116
theorem MonoidHom.map_cyclic {G : Type*} [Group G] [h : IsCyclic G] (Οƒ : G β†’* G) : βˆƒ m : β„€, βˆ€ g : G, Οƒ g = g ^ m := by
obtain ⟨h, hG⟩ := IsCyclic.exists_generator (Ξ± := G) obtain ⟨m, hm⟩ := hG (Οƒ h) refine ⟨m, fun g => ?_⟩ obtain ⟨n, rfl⟩ := hG g rw [MonoidHom.map_zpow, ← hm, ← zpow_mul, ← zpow_mul']
[ " x ∈ zpowers 1", " 1 ∈ zpowers 1", " Nontrivial Ξ±", " IsCyclic Ξ±", " βˆƒ m, βˆ€ (g : G), Οƒ g = g ^ m", " Οƒ g = g ^ m", " Οƒ ((fun x => h ^ x) n) = (fun x => h ^ x) n ^ m" ]
[ " x ∈ zpowers 1", " 1 ∈ zpowers 1", " Nontrivial α", " IsCyclic α" ]
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} #align list.length_enum_from List.enumFrom_length #align list.length_enum List.enum_length @[simp] theorem get?_enumFrom : βˆ€ n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a) | n, [], m => rfl | n, a :: l, 0 =...
Mathlib/Data/List/Enum.lean
48
50
theorem get_enumFrom (l : List Ξ±) (n) (i : Fin (l.enumFrom n).length) : (l.enumFrom n).get i = (n + i, l.get (i.cast enumFrom_length)) := by
simp [get_eq_get?]
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)", " (enumFrom n l)...
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)" ]
import Mathlib.Order.Filter.Lift import Mathlib.Order.Filter.AtTopBot #align_import order.filter.small_sets from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Filter open Filter Set variable {Ξ± Ξ² : Type*} {ΞΉ : Sort*} namespace Filter variable {l l' la : Filter Ξ±} {lb : Filter ...
Mathlib/Order/Filter/SmallSets.lean
116
117
theorem smallSets_top : (⊀ : Filter α).smallSets = ⊀ := by
rw [smallSets, lift'_top, powerset_univ, principal_univ]
[ " f.smallSets = generate (powerset '' f.sets)", " f.lift' powerset = β¨… b ∈ f.sets, π“Ÿ (𝒫 b)", " GaloisConnection (fun L => L.bind π“Ÿ) smallSets", " (fun L => L.bind π“Ÿ) L ≀ l ↔ L ≀ l.smallSets", " L.bind π“Ÿ ≀ l ↔ l.sets βŠ† powerset ⁻¹' L.sets", " Tendsto (fun x => f '' x) la.smallSets lb.smallSets ↔ Tends...
[ " f.smallSets = generate (powerset '' f.sets)", " f.lift' powerset = β¨… b ∈ f.sets, π“Ÿ (𝒫 b)", " GaloisConnection (fun L => L.bind π“Ÿ) smallSets", " (fun L => L.bind π“Ÿ) L ≀ l ↔ L ≀ l.smallSets", " L.bind π“Ÿ ≀ l ↔ l.sets βŠ† powerset ⁻¹' L.sets", " Tendsto (fun x => f '' x) la.smallSets lb.smallSets ↔ Tends...
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.Data.Complex.Orientation import Mathlib.Tactic.LinearCombination #align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af" non...
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
146
147
theorem areaForm_le (x y : E) : Ο‰ x y ≀ β€–xβ€– * β€–yβ€– := by
simpa [areaForm_to_volumeForm, Fin.prod_univ_succ] using o.volumeForm_apply_le ![x, y]
[ " E β†’β‚—[ℝ] E β†’β‚—[ℝ] ℝ", " (o.areaForm x) y = o.volumeForm ![x, y]", " (o.areaForm x) x = 0", " o.volumeForm ![x, x] = 0", " ![x, x] 0 = ![x, x] 1", " 0 β‰  1", " (o.areaForm x) y = -(o.areaForm y) x", " o.volumeForm ![x, y] = -o.volumeForm ![y, x]", " ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)", " ![x, y] ...
[ " E β†’β‚—[ℝ] E β†’β‚—[ℝ] ℝ", " (o.areaForm x) y = o.volumeForm ![x, y]", " (o.areaForm x) x = 0", " o.volumeForm ![x, x] = 0", " ![x, x] 0 = ![x, x] 1", " 0 β‰  1", " (o.areaForm x) y = -(o.areaForm y) x", " o.volumeForm ![x, y] = -o.volumeForm ![y, x]", " ![x, y] = ![y, x] ∘ ⇑(Equiv.swap 0 1)", " ![x, y] ...
import Mathlib.Algebra.Regular.Basic import Mathlib.Algebra.Ring.Defs #align_import algebra.ring.regular from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" variable {Ξ± : Type*} theorem isLeftRegular_of_non_zero_divisor [NonUnitalNonAssocRing Ξ±] (k : Ξ±) (h : βˆ€ x : Ξ±, k * x = 0 β†’ x...
Mathlib/Algebra/Ring/Regular.lean
28
31
theorem isRightRegular_of_non_zero_divisor [NonUnitalNonAssocRing Ξ±] (k : Ξ±) (h : βˆ€ x : Ξ±, x * k = 0 β†’ x = 0) : IsRightRegular k := by
refine fun x y (h' : x * k = y * k) => sub_eq_zero.mp (h _ ?_) rw [sub_mul, sub_eq_zero, h']
[ " IsLeftRegular k", " k * (x - y) = 0", " IsRightRegular k", " (x - y) * k = 0" ]
[ " IsLeftRegular k", " k * (x - y) = 0" ]
import Mathlib.Algebra.Algebra.Unitization import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul suppress_compilation variable (π•œ A : Type*) [NontriviallyNormedField π•œ] [NonUnitalNormedRing A] variable [NormedSpace π•œ A] [IsScalarTower π•œ A A] [SMulCommClass π•œ A A] open ContinuousLinearMap namespace Unitizati...
Mathlib/Analysis/NormedSpace/Unitization.lean
149
165
theorem lipschitzWith_addEquiv : LipschitzWith 2 (Unitization.addEquiv π•œ A) := by
rw [← Real.toNNReal_ofNat] refine AddMonoidHomClass.lipschitz_of_bound (Unitization.addEquiv π•œ A) 2 fun x => ?_ rw [norm_eq_sup, Prod.norm_def] refine max_le ?_ ?_ Β· rw [sup_eq_max, mul_max_of_nonneg _ _ (zero_le_two : (0 : ℝ) ≀ 2)] exact le_max_of_le_left ((le_add_of_nonneg_left (norm_nonneg _)).trans_...
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul π•œ A)).toRingHom x) =\n (x.fst, (algebraMap π•œ (A β†’L[π•œ] A)) x.fst + (mul π•œ A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul π•œ A)).toRingHom x) = (x.fst, (algebraMap π•œ (A β†’L[π•œ] A)) x.fst + (mul π•œ A) x.snd)", " Function.Injective ⇑(splitMul π•œ A)", " βˆ€ (a : Un...
[ " (x.fst + 0, (lift (NonUnitalAlgHom.Lmul π•œ A)).toRingHom x) =\n (x.fst, (algebraMap π•œ (A β†’L[π•œ] A)) x.fst + (mul π•œ A) x.snd)", " (x.fst, (lift (NonUnitalAlgHom.Lmul π•œ A)).toRingHom x) = (x.fst, (algebraMap π•œ (A β†’L[π•œ] A)) x.fst + (mul π•œ A) x.snd)", " Function.Injective ⇑(splitMul π•œ A)", " βˆ€ (a : Un...
import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.CharP.Algebra import Mathlib.Data.Nat.Prime #align_import algebra.char_p.exp_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe u variable (R : Type u) section Semiring variable [Semiring R] class inductive Ex...
Mathlib/Algebra/CharP/ExpChar.lean
86
89
theorem expChar_one_of_char_zero (q : β„•) [hp : CharP R 0] [hq : ExpChar R q] : q = 1 := by
cases' hq with q hq_one hq_prime hq_hchar Β· rfl Β· exact False.elim <| hq_prime.ne_zero <| hq_hchar.eq R hp
[ " ExpChar (R Γ— S) p", " ExpChar (R Γ— S) 1", " p = q", " 1 = q", " ringExpChar R = q", " ringExpChar R = 1", " max 0 1 = 1", " max q 1 = q", " q = 1", " 1 = 1" ]
[ " ExpChar (R Γ— S) p", " ExpChar (R Γ— S) 1", " p = q", " 1 = q", " ringExpChar R = q", " ringExpChar R = 1", " max 0 1 = 1", " max q 1 = q" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
87
89
theorem inv_logb_mul_base {a b : ℝ} (h₁ : a β‰  0) (hβ‚‚ : b β‰  0) (c : ℝ) : (logb (a * b) c)⁻¹ = (logb a c)⁻¹ + (logb b c)⁻¹ := by
simp_rw [inv_logb]; exact logb_mul h₁ hβ‚‚
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y", " b.logb (x / y) = b.logb x - b.logb y", " b.logb x⁻¹ = -b.logb x", " (a.logb b)⁻¹ = b.logb a", " ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹", " c.logb ...
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x", " b.logb (x * y) = b.logb x + b.logb y", " b.logb (x / y) = b.logb x - b.logb y", " b.logb x⁻¹ = -b.logb x", " (a.logb b)⁻¹ = b.logb a" ]
import Mathlib.Geometry.RingedSpace.LocallyRingedSpace import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.Geometry.RingedSpace.OpenImmersion import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers #align_import algebraic_geometry.locally_ringed_space.has_colimits from "leanprov...
Mathlib/Geometry/RingedSpace/LocallyRingedSpace/HasColimits.lean
214
223
theorem imageBasicOpen_image_open : IsOpen ((coequalizer.Ο€ f.1 g.1).base '' (imageBasicOpen f g U s).1) := by
rw [← (TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget _) f.1 g.1)).isOpen_preimage, TopCat.coequalizer_isOpen_iff, ← Set.preimage_comp] erw [← TopCat.coe_comp] rw [PreservesCoequalizer.iso_hom, ΞΉ_comp_coequalizerComparison] dsimp only [SheafedSpace.forget] -- Porting note (#11224): chan...
[ " IsLocalRingHom ((coequalizer.Ο€ f.val g.val).c.app { unop := U })", " IsLocalRingHom\n ((coequalizer.Ο€ (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ...
[ " IsLocalRingHom ((coequalizer.Ο€ f.val g.val).c.app { unop := U })", " IsLocalRingHom\n ((coequalizer.Ο€ (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c.app\n ...
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} #align list.length_enum_from List.enumFrom_length #align list.length_enum List.enum_length @[simp] theorem get?_enumFrom : βˆ€ n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a) | n, [], m => rfl | n, a :: l, 0 =...
Mathlib/Data/List/Enum.lean
30
31
theorem get?_enum (l : List Ξ±) (n) : get? (enum l) n = (get? l n).map fun a => (n, a) := by
rw [enum, get?_enumFrom, Nat.zero_add]
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)" ]
[ " Option.map (fun a => (n + 1 + m, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))", " Option.map (fun a => (n + m + 1, a)) (l.get? m) = Option.map (fun a => (n + (m + 1), a)) ((a :: l).get? (m + 1))" ]
import Mathlib.CategoryTheory.Subobject.MonoOver import Mathlib.CategoryTheory.Skeletal import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.Tactic.ApplyFun import Mathlib.Tactic.CategoryTheory.Elementwise #align_import category_theory.subobject.basic from "leanprover-community/mathlib"@"70fd9563a21e7b...
Mathlib/CategoryTheory/Subobject/Basic.lean
585
588
theorem map_comp (f : X ⟢ Y) (g : Y ⟢ Z) [Mono f] [Mono g] (x : Subobject X) : (map (f ≫ g)).obj x = (map g).obj ((map f).obj x) := by
induction' x using Quotient.inductionOn' with t exact Quotient.sound ⟨(MonoOver.mapComp _ _).app t⟩
[ " PartialOrder (Subobject X)", " PartialOrder (ThinSkeleton (MonoOver X))", " 𝟭 (Subobject A) β‰… lower e.functor β‹™ lower e.inverse", " 𝟭 (Subobject A) = lower e.functor β‹™ lower e.inverse", " 𝟭 (Subobject A) = ThinSkeleton.map (𝟭 (MonoOver A))", " lower e.functor β‹™ lower e.inverse = ThinSkeleton.map (e....
[ " PartialOrder (Subobject X)", " PartialOrder (ThinSkeleton (MonoOver X))", " 𝟭 (Subobject A) β‰… lower e.functor β‹™ lower e.inverse", " 𝟭 (Subobject A) = lower e.functor β‹™ lower e.inverse", " 𝟭 (Subobject A) = ThinSkeleton.map (𝟭 (MonoOver A))", " lower e.functor β‹™ lower e.inverse = ThinSkeleton.map (e....
import Mathlib.Topology.ContinuousOn import Mathlib.Order.Minimal open Set Classical variable {X : Type*} {Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X} section Preirreducible def IsPreirreducible (s : Set X) : Prop := βˆ€ u v : Set X, IsOpen u β†’ IsOpen v β†’ (s ∩ u).Nonempty β†’ (s ∩ v).Nonempt...
Mathlib/Topology/Irreducible.lean
118
127
theorem irreducibleComponents_eq_maximals_closed (X : Type*) [TopologicalSpace X] : irreducibleComponents X = maximals (Β· ≀ Β·) { s : Set X | IsClosed s ∧ IsIrreducible s } := by
ext s constructor Β· intro H exact ⟨⟨isClosed_of_mem_irreducibleComponents _ H, H.1⟩, fun x h e => H.2 h.2 e⟩ Β· intro H refine ⟨H.1.2, fun x h e => ?_⟩ have : closure x ≀ s := H.2 ⟨isClosed_closure, h.closure⟩ (e.trans subset_closure) exact le_trans subset_closure this
[ " (closure s ∩ u).Nonempty β†’ (closure s ∩ v).Nonempty β†’ (closure s ∩ (u ∩ v)).Nonempty ↔\n (s ∩ u).Nonempty β†’ (s ∩ v).Nonempty β†’ (s ∩ (u ∩ v)).Nonempty", " IsOpen u", " IsClosed s", " s = closure s", " irreducibleComponents X = maximals (fun x x_1 => x ≀ x_1) {s | IsClosed s ∧ IsIrreducible s}", " s ∈ ...
[ " (closure s ∩ u).Nonempty β†’ (closure s ∩ v).Nonempty β†’ (closure s ∩ (u ∩ v)).Nonempty ↔\n (s ∩ u).Nonempty β†’ (s ∩ v).Nonempty β†’ (s ∩ (u ∩ v)).Nonempty", " IsOpen u", " IsClosed s", " s = closure s" ]
import Mathlib.NumberTheory.SmoothNumbers import Mathlib.Analysis.PSeries open Set Nat open scoped Topology -- This needs `Mathlib.Analysis.RCLike.Basic`, so we put it here -- instead of in `Mathlib.NumberTheory.SmoothNumbers`. lemma Nat.roughNumbersUpTo_card_le' (N k : β„•) : (roughNumbersUpTo N k).card ≀ ...
Mathlib/NumberTheory/SumPrimeReciprocals.lean
86
97
theorem Nat.Primes.summable_rpow {r : ℝ} : Summable (fun p : Nat.Primes ↦ (p : ℝ) ^ r) ↔ r < -1 := by
by_cases h : r < -1 Β· -- case `r < -1` simp only [h, iff_true] exact (Real.summable_nat_rpow.mpr h).subtype _ Β· -- case `-1 ≀ r` simp only [h, iff_false] refine fun H ↦ Nat.Primes.not_summable_one_div <| H.of_nonneg_of_le (fun _ ↦ by positivity) ?_ intro p rw [one_div, ← Real.rpow_neg_one...
[ " ↑(N.roughNumbersUpTo k).card ≀ ↑N * βˆ‘ p ∈ N.succ.primesBelow \\ k.primesBelow, 1 / ↑p", " ↑(N.roughNumbersUpTo k).card ≀ βˆ‘ x ∈ N.succ.primesBelow \\ k.primesBelow, ↑N / ↑x", " 1 / 2 ≀ βˆ‘ p ∈ (4 ^ (k.primesBelow.card + 1)).succ.primesBelow \\ k.primesBelow, 1 / ↑p", " 4 ^ (k.primesBelow.card + 1) = 2 * Nβ‚€", ...
[ " ↑(N.roughNumbersUpTo k).card ≀ ↑N * βˆ‘ p ∈ N.succ.primesBelow \\ k.primesBelow, 1 / ↑p", " ↑(N.roughNumbersUpTo k).card ≀ βˆ‘ x ∈ N.succ.primesBelow \\ k.primesBelow, ↑N / ↑x", " 1 / 2 ≀ βˆ‘ p ∈ (4 ^ (k.primesBelow.card + 1)).succ.primesBelow \\ k.primesBelow, 1 / ↑p", " 4 ^ (k.primesBelow.card + 1) = 2 * Nβ‚€", ...
import Mathlib.Analysis.NormedSpace.Exponential #align_import analysis.normed_space.star.exponential from "leanprover-community/mathlib"@"1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9" open NormedSpace -- For `NormedSpace.exp`. section Star variable {A : Type*} [NormedRing A] [NormedAlgebra β„‚ A] [StarRing A] [Continu...
Mathlib/Analysis/NormedSpace/Star/Exponential.lean
42
48
theorem Commute.expUnitary_add {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) : expUnitary (a + b) = expUnitary a * expUnitary b := by
ext have hcomm : Commute (I β€’ (a : A)) (I β€’ (b : A)) := by unfold Commute SemiconjBy simp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm] simpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm
[ " expUnitary (a + b) = expUnitary a * expUnitary b", " ↑(expUnitary (a + b)) = ↑(expUnitary a * expUnitary b)", " Commute (I β€’ ↑a) (I β€’ ↑b)", " I β€’ ↑a * I β€’ ↑b = I β€’ ↑b * I β€’ ↑a" ]
[]
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputab...
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
86
91
theorem contDiff_const {c : F} : ContDiff π•œ n fun _ : E => c := by
suffices h : ContDiff π•œ ∞ fun _ : E => c from h.of_le le_top rw [contDiff_top_iff_fderiv] refine ⟨differentiable_const c, ?_⟩ rw [fderiv_const] exact contDiff_zero_fun
[ " iteratedFDerivWithin π•œ i (fun x => 0) s x = 0", " iteratedFDerivWithin π•œ 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin π•œ (fun ...
[ " iteratedFDerivWithin π•œ i (fun x => 0) s x = 0", " iteratedFDerivWithin π•œ 0 (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ 0 (fun x => 0) s x) x✝ = 0 x✝", " iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x = 0", " (iteratedFDerivWithin π•œ (i + 1) (fun x => 0) s x) m = 0 m", " ((fderivWithin π•œ (fun ...
import Mathlib.RingTheory.PowerSeries.Trunc import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.Derivation.Basic namespace PowerSeries open Polynomial Derivation Nat section CommutativeSemiring variable {R} [CommSemiring R] noncomputable def derivativeFun (f : R⟦X⟧) : R⟦X⟧ := mk fun n ↦ coef...
Mathlib/RingTheory/PowerSeries/Derivative.lean
60
68
theorem trunc_derivativeFun (f : R⟦X⟧) (n : β„•) : trunc n f.derivativeFun = derivative (trunc (n + 1) f) := by
ext d rw [coeff_trunc] split_ifs with h Β· have : d + 1 < n + 1 := succ_lt_succ_iff.2 h rw [coeff_derivativeFun, coeff_derivative, coeff_trunc, if_pos this] Β· have : Β¬d + 1 < n + 1 := by rwa [succ_lt_succ_iff] rw [coeff_derivative, coeff_trunc, if_neg this, zero_mul]
[ " (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)", " (↑f).derivativeFun = ↑(derivative f)", " (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)", " (f + g).derivativeFun = f.derivativeFun + g.derivativeFun", " (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g....
[ " (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)", " (↑f).derivativeFun = ↑(derivative f)", " (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)", " (f + g).derivativeFun = f.derivativeFun + g.derivativeFun", " (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g....
import Mathlib.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
57
58
theorem forall_mem_map {f : Ξ± β†’ Ξ²} {o : Option Ξ±} {p : Ξ² β†’ Prop} : (βˆ€ y ∈ o.map f, p y) ↔ βˆ€ x ∈ o, p (f x) := by
simp
[ " y ∈ Option.map f o ↔ βˆƒ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o", " (βˆ€ (y : Ξ²), y ∈ Option.map f o β†’ p y) ↔ βˆ€ (x : Ξ±), x ∈ o β†’ p (f x)" ]
[ " y ∈ Option.map f o ↔ βˆƒ x, x ∈ o ∧ f x = y", " f a ∈ Option.map f o ↔ a ∈ o" ]
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Choose.Sum import Mathlib.RingTheory.PowerSeries.Basic #align_import ring_theory.power_series.well_known from "leanprover-community/mathlib"@"8199f6717c150a7fe91c4534175f4cf99725978f" namespace PowerS...
Mathlib/RingTheory/PowerSeries/WellKnown.lean
174
176
theorem constantCoeff_exp : constantCoeff A (exp A) = 1 := by
rw [← coeff_zero_eq_constantCoeff_apply, coeff_exp] simp
[ " (constantCoeff A) (exp A) = 1", " (algebraMap β„š A) (1 / ↑0!) = 1" ]
[]
import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Normalizer #align_import algebra.lie.engel from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90" universe u₁ uβ‚‚ u₃ uβ‚„ variable {R : Type u₁} {L : Type uβ‚‚} {Lβ‚‚ : Type u₃} {M : Type uβ‚„} variable [CommRing R] [LieRing L] [LieAl...
Mathlib/Algebra/Lie/Engel.lean
128
140
theorem isNilpotentOfIsNilpotentSpanSupEqTop (hnp : IsNilpotent <| toEnd R L M x) (hIM : IsNilpotent R I M) : IsNilpotent R L M := by
obtain ⟨n, hn⟩ := hnp obtain ⟨k, hk⟩ := hIM have hk' : I.lcs M k = βŠ₯ := by simp only [← coe_toSubmodule_eq_iff, I.coe_lcs_eq, hk, bot_coeSubmodule] suffices βˆ€ l, lowerCentralSeries R L M (l * n) ≀ I.lcs M l by use k * n simpa [hk'] using this k intro l induction' l with l ih Β· simp Β· exact ...
[ " βˆƒ t, βˆƒ z ∈ I, y = t β€’ x + z", " βˆƒ t_1, βˆƒ z_1 ∈ I, t β€’ x + z = t_1 β€’ x + z_1", " β†‘β…βŠ€, N⁆ = Submodule.map ((toEnd R L M) x) ↑N βŠ” ↑⁅I, N⁆", " Submodule.span R {m | βˆƒ x, βˆƒ n ∈ N, ⁅x, n⁆ = m} =\n Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N βˆͺ {m | βˆƒ x ∈ I, βˆƒ n ∈ N, ⁅x, n⁆ = m})", " {m | βˆƒ x, βˆƒ n ∈ N, ⁅x, n⁆ =...
[ " βˆƒ t, βˆƒ z ∈ I, y = t β€’ x + z", " βˆƒ t_1, βˆƒ z_1 ∈ I, t β€’ x + z = t_1 β€’ x + z_1", " β†‘β…βŠ€, N⁆ = Submodule.map ((toEnd R L M) x) ↑N βŠ” ↑⁅I, N⁆", " Submodule.span R {m | βˆƒ x, βˆƒ n ∈ N, ⁅x, n⁆ = m} =\n Submodule.span R ((fun a => ⁅x, a⁆) '' ↑↑N βˆͺ {m | βˆƒ x ∈ I, βˆƒ n ∈ N, ⁅x, n⁆ = m})", " {m | βˆƒ x, βˆƒ n ∈ N, ⁅x, n⁆ =...
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.Analysis.Normed.Group.InfiniteSum import Mathlib.Topology.Algebra.InfiniteSum.Real #align_import analysis.normed.field.infinite_sum from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" variable {R : Type*} {ΞΉ : Type*} {ΞΉ' : Type*}...
Mathlib/Analysis/Normed/Field/InfiniteSum.lean
73
83
theorem summable_norm_sum_mul_antidiagonal_of_summable_norm {f g : β„• β†’ R} (hf : Summable fun x => β€–f xβ€–) (hg : Summable fun x => β€–g xβ€–) : Summable fun n => β€–βˆ‘ kl ∈ antidiagonal n, f kl.1 * g kl.2β€– := by
have := summable_sum_mul_antidiagonal_of_summable_mul (Summable.mul_of_nonneg hf hg (fun _ => norm_nonneg _) fun _ => norm_nonneg _) refine this.of_nonneg_of_le (fun _ => norm_nonneg _) (fun n ↦ ?_) calc β€–βˆ‘ kl ∈ antidiagonal n, f kl.1 * g kl.2β€– ≀ βˆ‘ kl ∈ antidiagonal n, β€–f kl.1 * g kl.2β€– := no...
[ " Summable fun x => βˆ‘' (y : ΞΉ'), f (x, y).1 * g (x, y).2", " Summable fun n => β€–βˆ‘ kl ∈ antidiagonal n, f kl.1 * g kl.2β€–", " β€–βˆ‘ kl ∈ antidiagonal n, f kl.1 * g kl.2β€– ≀ βˆ‘ kl ∈ antidiagonal n, β€–f kl.1β€– * β€–g kl.2β€–", " βˆ‘ kl ∈ antidiagonal n, β€–f kl.1 * g kl.2β€– ≀ βˆ‘ kl ∈ antidiagonal n, β€–f kl.1β€– * β€–g kl.2β€–", " β€–f i...
[ " Summable fun x => βˆ‘' (y : ΞΉ'), f (x, y).1 * g (x, y).2" ]
import Batteries.Classes.Order namespace Batteries.PairingHeapImp inductive Heap (Ξ± : Type u) where | nil : Heap Ξ± | node (a : Ξ±) (child sibling : Heap Ξ±) : Heap Ξ± deriving Repr def Heap.size : Heap Ξ± β†’ Nat | .nil => 0 | .node _ c s => c.size + 1 + s.size def Heap.singleton (a : Ξ±) : Heap Ξ± := ....
.lake/packages/batteries/Batteries/Data/PairingHeap.lean
138
140
theorem Heap.size_deleteMin {s : Heap Ξ±} (h : s.NoSibling) (eq : s.deleteMin le = some (a, s')) : s.size = s'.size + 1 := by
cases h with cases eq | node a c => rw [size_combine, size, size]
[ " (merge le s₁ sβ‚‚).NoSibling", " (match s₁, sβ‚‚ with\n | nil, nil => nil\n | nil, node aβ‚‚ cβ‚‚ sibling => node aβ‚‚ cβ‚‚ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node aβ‚‚ cβ‚‚ sibling_1 =>\n if le a₁ aβ‚‚ = true then node a₁ (node aβ‚‚ cβ‚‚ c₁) nil else node aβ‚‚ (node a₁ c₁ cβ‚‚) ni...
[ " (merge le s₁ sβ‚‚).NoSibling", " (match s₁, sβ‚‚ with\n | nil, nil => nil\n | nil, node aβ‚‚ cβ‚‚ sibling => node aβ‚‚ cβ‚‚ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node aβ‚‚ cβ‚‚ sibling_1 =>\n if le a₁ aβ‚‚ = true then node a₁ (node aβ‚‚ cβ‚‚ c₁) nil else node aβ‚‚ (node a₁ c₁ cβ‚‚) ni...
import Mathlib.Topology.Algebra.Constructions import Mathlib.Topology.Bases import Mathlib.Topology.UniformSpace.Basic #align_import topology.uniform_space.cauchy from "leanprover-community/mathlib"@"22131150f88a2d125713ffa0f4693e3355b1eb49" universe u v open scoped Classical open Filter TopologicalSpace Set Uni...
Mathlib/Topology/UniformSpace/Cauchy.lean
63
67
theorem Cauchy.ultrafilter_of {l : Filter Ξ±} (h : Cauchy l) : Cauchy (@Ultrafilter.of _ l h.1 : Filter Ξ±) := by
haveI := h.1 have := Ultrafilter.of_le l exact ⟨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2⟩
[ " (βˆ€ (i' : ΞΉ), p i' β†’ βˆƒ i ∈ f, id i Γ—Λ’ id i βŠ† s i') ↔ βˆ€ (i : ΞΉ), p i β†’ βˆƒ t ∈ f, βˆ€ x ∈ t, βˆ€ y ∈ t, (x, y) ∈ s i", " (f.NeBot ∧ βˆ€ s ∈ 𝓀 Ξ±, βˆƒ t ∈ f, βˆ€ x ∈ t, βˆ€ y ∈ t, (x, y) ∈ s) ↔ f.NeBot ∧ βˆ€ s ∈ 𝓀 Ξ±, βˆƒ t ∈ f, t Γ—Λ’ t βŠ† s", " Cauchy l ↔ l Γ—Λ’ l ≀ 𝓀 Ξ±", " Cauchy ↑(Ultrafilter.of l)" ]
[ " (βˆ€ (i' : ΞΉ), p i' β†’ βˆƒ i ∈ f, id i Γ—Λ’ id i βŠ† s i') ↔ βˆ€ (i : ΞΉ), p i β†’ βˆƒ t ∈ f, βˆ€ x ∈ t, βˆ€ y ∈ t, (x, y) ∈ s i", " (f.NeBot ∧ βˆ€ s ∈ 𝓀 Ξ±, βˆƒ t ∈ f, βˆ€ x ∈ t, βˆ€ y ∈ t, (x, y) ∈ s) ↔ f.NeBot ∧ βˆ€ s ∈ 𝓀 Ξ±, βˆƒ t ∈ f, t Γ—Λ’ t βŠ† s", " Cauchy l ↔ l Γ—Λ’ l ≀ 𝓀 Ξ±" ]
import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Module.Submodule.Basic #align_import algebra.direct_sum.decomposition from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" variable {ΞΉ R M Οƒ : Type*} open DirectSum namespace DirectSum section AddCommMonoid variable [Deci...
Mathlib/Algebra/DirectSum/Decomposition.lean
136
137
theorem decompose_of_mem_same {x : M} {i : ΞΉ} (hx : x ∈ β„³ i) : (decompose β„³ x i : M) = x := by
rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
[ " x = y", " { decompose' := x, left_inv := xl, right_inv := xr } = y", " { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }", " βˆ€ (m : M), p m", " (decompose β„³) ↑x = (of (fun i => β†₯(β„³ i)) i) x", " ↑(((decompose β„³) x) i) = x" ]
[ " x = y", " { decompose' := x, left_inv := xl, right_inv := xr } = y", " { decompose' := x, left_inv := xl, right_inv := xr } = { decompose' := y, left_inv := yl, right_inv := yr }", " βˆ€ (m : M), p m", " (decompose β„³) ↑x = (of (fun i => β†₯(β„³ i)) i) x" ]
import Mathlib.CategoryTheory.Limits.Types import Mathlib.CategoryTheory.Functor.Currying import Mathlib.CategoryTheory.Limits.FunctorCategory #align_import category_theory.limits.colimit_limit from "leanprover-community/mathlib"@"59382264386afdbaf1727e617f5fdda511992eb9" universe v₁ vβ‚‚ v u₁ uβ‚‚ u open CategoryTh...
Mathlib/CategoryTheory/Limits/ColimitLimit.lean
89
93
theorem ΞΉ_colimitLimitToLimitColimit_Ο€ (j) (k) : colimit.ΞΉ _ k ≫ colimitLimitToLimitColimit F ≫ limit.Ο€ _ j = limit.Ο€ ((curry.obj (Prod.swap K J β‹™ F)).obj k) j ≫ colimit.ΞΉ ((curry.obj F).obj j) k := by
dsimp [colimitLimitToLimitColimit] simp
[ " βˆ€ ⦃X Y : K⦄ (f : X ⟢ Y),\n (curry.obj (Prod.swap K J β‹™ F) β‹™ lim).map f ≫\n (fun k => limit.Ο€ ((curry.obj (Prod.swap K J β‹™ F)).obj k) j ≫ colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο€ ((curry.obj (Prod.swap K J β‹™ F)).obj k) j ≫ colimit.ΞΉ ((curry.obj F).obj j) k) X ≫\n ((Functor.c...
[ " βˆ€ ⦃X Y : K⦄ (f : X ⟢ Y),\n (curry.obj (Prod.swap K J β‹™ F) β‹™ lim).map f ≫\n (fun k => limit.Ο€ ((curry.obj (Prod.swap K J β‹™ F)).obj k) j ≫ colimit.ΞΉ ((curry.obj F).obj j) k) Y =\n (fun k => limit.Ο€ ((curry.obj (Prod.swap K J β‹™ F)).obj k) j ≫ colimit.ΞΉ ((curry.obj F).obj j) k) X ≫\n ((Functor.c...
import Mathlib.Order.Filter.Basic import Mathlib.Data.Set.Countable #align_import order.filter.countable_Inter from "leanprover-community/mathlib"@"b9e46fe101fc897fb2e7edaf0bf1f09ea49eb81a" open Set Filter open Filter variable {ΞΉ : Sort*} {Ξ± Ξ² : Type*} class CountableInterFilter (l : Filter Ξ±) : Prop where ...
Mathlib/Order/Filter/CountableInter.lean
116
121
theorem EventuallyLE.countable_bInter {ΞΉ : Type*} {S : Set ΞΉ} (hS : S.Countable) {s t : βˆ€ i ∈ S, Set Ξ±} (h : βˆ€ i hi, s i hi ≀ᢠ[l] t i hi) : β‹‚ i ∈ S, s i β€Ή_β€Ί ≀ᢠ[l] β‹‚ i ∈ S, t i β€Ή_β€Ί := by
simp only [biInter_eq_iInter] haveI := hS.toEncodable exact EventuallyLE.countable_iInter fun i => h i i.2
[ " β‹‚ i, β‹‚ (hi : i ∈ S), s i hi ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l", " β‹‚ x, s ↑x β‹― ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l", " (βˆ€αΆ  (x : Ξ±) in l, βˆ€ (i : ΞΉ), p x i) ↔ βˆ€ (i : ΞΉ), βˆ€αΆ  (x : Ξ±) in l, p x i", " (βˆ€αΆ  (x : Ξ±) in l, βˆ€ (i : ΞΉ) (hi : i ∈ S), p x i hi) ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), βˆ€αΆ  (x : Ξ±) in l, p x i h...
[ " β‹‚ i, β‹‚ (hi : i ∈ S), s i hi ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l", " β‹‚ x, s ↑x β‹― ∈ l ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), s i hi ∈ l", " (βˆ€αΆ  (x : Ξ±) in l, βˆ€ (i : ΞΉ), p x i) ↔ βˆ€ (i : ΞΉ), βˆ€αΆ  (x : Ξ±) in l, p x i", " (βˆ€αΆ  (x : Ξ±) in l, βˆ€ (i : ΞΉ) (hi : i ∈ S), p x i hi) ↔ βˆ€ (i : ΞΉ) (hi : i ∈ S), βˆ€αΆ  (x : Ξ±) in l, p x i h...
import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic import Mathlib.Tactic.Ring #align_import data.fintype.perm from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" open Function open Nat universe u v variable {Ξ± Ξ² Ξ³ : Type*} open Finset Function List Equiv Equiv.Per...
Mathlib/Data/Fintype/Perm.lean
102
128
theorem nodup_permsOfList : βˆ€ {l : List Ξ±}, l.Nodup β†’ (permsOfList l).Nodup | [], _ => by simp [permsOfList] | a :: l, hl => by have hl' : l.Nodup := hl.of_cons have hln' : (permsOfList l).Nodup := nodup_permsOfList hl' have hmeml : βˆ€ {f : Perm Ξ±}, f ∈ permsOfList l β†’ f a = a := fun {f} hf => not_...
rw [← hf.2, mul_apply, hmeml hf.1, swap_apply_left] have hiy : x a = List.get l j := by rw [← hg.2, mul_apply, hmeml hg.1, swap_apply_left] have hieqj : i = j := nodup_iff_injective_get.1 hl' (hix.symm.trans hiy) exact absurd hieqj (_root_.ne_of_lt hij) Β· intros f hf₁ hfβ‚‚ le...
[ " (permsOfList (a :: l)).length = (a :: l).length !", " (permsOfList (a :: l)).length = (l.length + 1) * l.length !", " l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !", " f ∈ permsOfList l", " f ∈ permsOfList []", " f ∈ permsOfList (a :: l)", " x β‰  a", " False", " βˆ€ (x : Ξ±),...
[ " (permsOfList (a :: l)).length = (a :: l).length !", " (permsOfList (a :: l)).length = (l.length + 1) * l.length !", " l.length ! + l.length * l.length ! = l.length * l.length ! + l.length !", " f ∈ permsOfList l", " f ∈ permsOfList []", " f ∈ permsOfList (a :: l)", " x β‰  a", " False", " βˆ€ (x : Ξ±),...
import Mathlib.Analysis.MeanInequalities import Mathlib.Data.Fintype.Order import Mathlib.LinearAlgebra.Matrix.Basis import Mathlib.Analysis.NormedSpace.WithLp #align_import analysis.normed_space.pi_Lp from "leanprover-community/mathlib"@"9d013ad8430ddddd350cff5c3db830278ded3c79" set_option linter.uppercaseLean3 f...
Mathlib/Analysis/NormedSpace/PiLp.lean
185
187
theorem edist_eq_iSup (f g : PiLp ∞ Ξ²) : edist f g = ⨆ i, edist (f i) (g i) := by
dsimp [edist] exact if_neg ENNReal.top_ne_zero
[ " edist f g = ⨆ i, edist (f i) (g i)", " (if ⊀ = 0 then ↑⋯.toFinset.card\n else if ⊀ = ⊀ then ⨆ i, edist (f i) (g i) else (βˆ‘ i : ΞΉ, edist (f i) (g i) ^ 0) ^ (1 / 0)) =\n ⨆ i, edist (f i) (g i)" ]
[]
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Set.Sigma #align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Multiset variable {ΞΉ : Type*} namespace Finset section Sigma variable {Ξ± : ΞΉ β†’ Type*} {Ξ² : Type*} (s s₁ sβ‚‚ : Finset ΞΉ) (...
Mathlib/Data/Finset/Sigma.lean
91
94
theorem sigma_eq_biUnion [DecidableEq (Ξ£i, Ξ± i)] (s : Finset ΞΉ) (t : βˆ€ i, Finset (Ξ± i)) : s.sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i := by
ext ⟨x, y⟩ simp [and_left_comm]
[ " (s.sigma t).Nonempty ↔ βˆƒ i ∈ s, (t i).Nonempty", " s.sigma t = βˆ… ↔ βˆ€ i ∈ s, t i = βˆ…", " (↑s).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)", " (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j", " βˆ€ ⦃a : (x : ΞΉ) Γ— Ξ± x⦄, a ∈ map (Embedding.sigmaMk i) (t i) β†’ a βˆ‰ map (Embedding.s...
[ " (s.sigma t).Nonempty ↔ βˆƒ i ∈ s, (t i).Nonempty", " s.sigma t = βˆ… ↔ βˆ€ i ∈ s, t i = βˆ…", " (↑s).PairwiseDisjoint fun i => map (Embedding.sigmaMk i) (t i)", " (_root_.Disjoint on fun i => map (Embedding.sigmaMk i) (t i)) i j", " βˆ€ ⦃a : (x : ΞΉ) Γ— Ξ± x⦄, a ∈ map (Embedding.sigmaMk i) (t i) β†’ a βˆ‰ map (Embedding.s...
import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.FieldDivision #align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3" namespace Po...
Mathlib/RingTheory/Polynomial/Content.lean
184
195
theorem content_eq_gcd_range_of_lt (p : R[X]) (n : β„•) (h : p.natDegree < n) : p.content = (Finset.range n).gcd p.coeff := by
apply dvd_antisymm_of_normalize_eq normalize_content Finset.normalize_gcd Β· rw [Finset.dvd_gcd_iff] intro i _ apply content_dvd_coeff _ Β· apply Finset.gcd_mono intro i simp only [Nat.lt_succ_iff, mem_support_iff, Ne, Finset.mem_range] contrapose! intro h1 apply coeff_eq_zero_of_natDeg...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
[ " p.content ∣ p.coeff n", " p.content ∣ 0", " (C r).content = normalize r", " (C r).support.gcd (C r).coeff = normalize r", " content 0 = 0", " content 1 = 1", " (X * p).content = p.content", " (Multiset.map (X * p).coeff (X * p).support.val).gcd = (Multiset.map p.coeff p.support.val).gcd", " Multis...
import Mathlib.Data.Fin.Fin2 import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Common #align_import data.typevec from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" universe u v w @[pp_with_univ] def TypeVec (n : β„•) := Fin2 n β†’ Type* #align typevec TypeVec instance {n} : Inh...
Mathlib/Data/TypeVec.lean
60
62
theorem Arrow.ext {Ξ± Ξ² : TypeVec n} (f g : Ξ± ⟹ Ξ²) : (βˆ€ i, f i = g i) β†’ f = g := by
intro h; funext i; apply h
[ " (βˆ€ (i : Fin2 n), f i = g i) β†’ f = g", " f = g", " f i = g i" ]
[]
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
158
162
theorem laverage_lt_top (hf : ∫⁻ x, f x βˆ‚ΞΌ β‰  ∞) : ⨍⁻ x, f x βˆ‚ΞΌ < ∞ := by
obtain rfl | hΞΌ := eq_or_ne ΞΌ 0 Β· simp Β· rw [laverage_eq] exact div_lt_top hf (measure_univ_ne_zero.2 hΞΌ)
[ " ⨍⁻ (_x : Ξ±), 0 βˆ‚ΞΌ = 0", " ⨍⁻ (x : Ξ±), f x βˆ‚0 = 0", " ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = (∫⁻ (x : Ξ±), f x βˆ‚ΞΌ) / ΞΌ univ", " ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±), f x βˆ‚ΞΌ", " ΞΌ univ * ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±), f x βˆ‚ΞΌ", " ⨍⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ = (∫⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ) / ΞΌ s", " ⨍⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±...
[ " ⨍⁻ (_x : Ξ±), 0 βˆ‚ΞΌ = 0", " ⨍⁻ (x : Ξ±), f x βˆ‚0 = 0", " ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = (∫⁻ (x : Ξ±), f x βˆ‚ΞΌ) / ΞΌ univ", " ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±), f x βˆ‚ΞΌ", " ΞΌ univ * ⨍⁻ (x : Ξ±), f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±), f x βˆ‚ΞΌ", " ⨍⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ = (∫⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ) / ΞΌ s", " ⨍⁻ (x : Ξ±) in s, f x βˆ‚ΞΌ = ∫⁻ (x : Ξ±...
import Mathlib.Data.Real.Cardinality import Mathlib.Topology.Separation import Mathlib.Topology.TietzeExtension open Set Function Cardinal Topology TopologicalSpace universe u variable {X : Type u} [TopologicalSpace X] [SeparableSpace X]
Mathlib/Topology/Separation/NotNormal.lean
26
53
theorem IsClosed.mk_lt_continuum [NormalSpace X] {s : Set X} (hs : IsClosed s) [DiscreteTopology s] : #s < 𝔠 := by
-- Proof by contradiction: assume `𝔠 ≀ #s` by_contra! h -- Choose a countable dense set `t : Set X` rcases exists_countable_dense X with ⟨t, htc, htd⟩ haveI := htc.to_subtype -- To obtain a contradiction, we will prove `2 ^ 𝔠 ≀ 𝔠`. refine (Cardinal.cantor 𝔠).not_le ?_ calc -- Any function `s β†’ ...
[ " #↑s < 𝔠", " False", " 2 ^ 𝔠 ≀ 𝔠", " 2 ^ 𝔠 ≀ #C(↑s, ℝ)", " 2 ^ 𝔠 ≀ 𝔠 ^ #↑s", " #C(↑s, ℝ) ≀ #C(X, ℝ)", " #(↑t β†’ ℝ) ≀ 𝔠", " 2 ^ (β„΅β‚€ * #↑t) ≀ 2 ^ β„΅β‚€" ]
[]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polyn...
Mathlib/Algebra/Polynomial/Eval.lean
100
100
theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by
rw [bit0, evalβ‚‚_add, bit0]
[ " evalβ‚‚ f x p = p.sum fun e a => f a * x ^ e", " f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ", " evalβ‚‚ f s Ο† = evalβ‚‚ f s Ο†", " evalβ‚‚ f 0 p = f (p.coeff 0)", " evalβ‚‚ f x 0 = 0", " evalβ‚‚ f x (C a) = f a", " evalβ‚‚ f x X = x", " evalβ‚‚ f x ((monomial n) r) = f r * x ^ n", " evalβ‚‚ f x (X ^ n) = x ^ ...
[ " evalβ‚‚ f x p = p.sum fun e a => f a * x ^ e", " f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ", " evalβ‚‚ f s Ο† = evalβ‚‚ f s Ο†", " evalβ‚‚ f 0 p = f (p.coeff 0)", " evalβ‚‚ f x 0 = 0", " evalβ‚‚ f x (C a) = f a", " evalβ‚‚ f x X = x", " evalβ‚‚ f x ((monomial n) r) = f r * x ^ n", " evalβ‚‚ f x (X ^ n) = x ^ ...
import Mathlib.RingTheory.WittVector.Identities #align_import ring_theory.witt_vector.domain from "leanprover-community/mathlib"@"b1d911acd60ab198808e853292106ee352b648ea" noncomputable section open scoped Classical namespace WittVector open Function variable {p : β„•} {R : Type*} local notation "π•Ž" => WittVe...
Mathlib/RingTheory/WittVector/Domain.lean
79
85
theorem eq_iterate_verschiebung {x : π•Ž R} {n : β„•} (h : βˆ€ i < n, x.coeff i = 0) : x = verschiebung^[n] (x.shift n) := by
induction' n with k ih Β· cases x; simp [shift] Β· dsimp; rw [verschiebung_shift] Β· exact ih fun i hi => h _ (hi.trans (Nat.lt_succ_self _)) Β· exact h
[ " verschiebung (x.shift k.succ) = x.shift k", " (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0", " k + 0 < k + 1", " (verschiebung (x.shift k.succ)).coeff (n✝ + 1) = (x.shift k).coeff (n✝ + 1)", " x.coeff (k.succ + n✝) = x.coeff (k + (n✝ + 1))", " k.succ + n✝ = k + (n✝ + 1)", " x = (⇑vers...
[ " verschiebung (x.shift k.succ) = x.shift k", " (verschiebung (x.shift k.succ)).coeff 0 = (x.shift k).coeff 0", " k + 0 < k + 1", " (verschiebung (x.shift k.succ)).coeff (n✝ + 1) = (x.shift k).coeff (n✝ + 1)", " x.coeff (k.succ + n✝) = x.coeff (k + (n✝ + 1))", " k.succ + n✝ = k + (n✝ + 1)" ]
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential import Mathlib.Geometry.Manifold.ContMDiffMap #align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle open sc...
Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
287
339
theorem ContMDiffOn.contMDiffOn_tangentMapWithin_aux {f : H β†’ H'} {s : Set H} (hf : ContMDiffOn I I' n f s) (hmn : m + 1 ≀ n) (hs : UniqueMDiffOn I s) : ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s) (Ο€ E (TangentSpace I) ⁻¹' s) := by
have m_le_n : m ≀ n := (le_add_right le_rfl).trans hmn have one_le_n : 1 ≀ n := (le_add_left le_rfl).trans hmn have U' : UniqueDiffOn π•œ (range I ∩ I.symm ⁻¹' s) := fun y hy ↦ by simpa only [UniqueMDiffOn, UniqueMDiffWithinAt, hy.1, inter_comm, mfld_simps] using hs (I.symm y) hy.2 rw [contMDiffOn_iff...
[ " ContinuousOn (tangentMapWithin I I' f s) (TotalSpace.proj ⁻¹' s)", " univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) = TotalSpace.proj ⁻¹' s", " { proj := x, snd := v } ∈ univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) ↔\n { proj := x, snd := v } ∈ TotalSpace.proj ...
[ " ContinuousOn (tangentMapWithin I I' f s) (TotalSpace.proj ⁻¹' s)", " univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) = TotalSpace.proj ⁻¹' s", " { proj := x, snd := v } ∈ univ ∩ ⇑(tangentBundleModelSpaceHomeomorph H I) ⁻¹' (Prod.fst ⁻¹' s) ↔\n { proj := x, snd := v } ∈ TotalSpace.proj ...
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Measure.Haar.Quotient import Mathlib.MeasureTheory.Constructions.Polish import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Topology.Algebra.Order.Floor #align_import measure_theory.integral.periodic from "leanprover-c...
Mathlib/MeasureTheory/Integral/Periodic.lean
39
46
theorem isAddFundamentalDomain_Ioc {T : ℝ} (hT : 0 < T) (t : ℝ) (ΞΌ : Measure ℝ := by
volume_tac) : IsAddFundamentalDomain (AddSubgroup.zmultiples T) (Ioc t (t + T)) ΞΌ := by refine IsAddFundamentalDomain.mk' measurableSet_Ioc.nullMeasurableSet fun x => ?_ have : Bijective (codRestrict (fun n : β„€ => n β€’ T) (AddSubgroup.zmultiples T) _) := (Equiv.ofInjective (fun n : β„€ => n β€’ T) (zsmul_strict...
[ " IsAddFundamentalDomain (β†₯(zmultiples T)) (Ioc t (t + T)) ΞΌ", " βˆƒ! g, g +α΅₯ x ∈ Ioc t (t + T)", " βˆƒ! x_1, codRestrict (fun n => n β€’ T) ↑(zmultiples T) β‹― x_1 +α΅₯ x ∈ Ioc t (t + T)" ]
[]
import Mathlib.Topology.Algebra.GroupWithZero import Mathlib.Topology.Order.OrderClosed #align_import topology.algebra.with_zero_topology from "leanprover-community/mathlib"@"3e0c4d76b6ebe9dfafb67d16f7286d2731ed6064" open Topology Filter TopologicalSpace Filter Set Function namespace WithZeroTopology variable {Ξ±...
Mathlib/Topology/Algebra/WithZeroTopology.lean
78
79
theorem tendsto_zero : Tendsto f l (𝓝 (0 : Ξ“β‚€)) ↔ βˆ€ (Ξ³β‚€) (_ : Ξ³β‚€ β‰  0), βˆ€αΆ  x in l, f x < Ξ³β‚€ := by
simp [nhds_zero]
[ " 𝓝 = update pure 0 (β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³))", " pure 0 ≀ β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)", " 𝓝 0 = β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)", " (𝓝 0).HasBasis (fun Ξ³ => Ξ³ β‰  0) Iio", " (β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)).HasBasis (fun Ξ³ => Ξ³ β‰  0) Iio", " DirectedOn ((fun Ξ³ => Iio Ξ³) ⁻¹'o fun x x_1 => x β‰₯ x_1...
[ " 𝓝 = update pure 0 (β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³))", " pure 0 ≀ β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)", " 𝓝 0 = β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)", " (𝓝 0).HasBasis (fun Ξ³ => Ξ³ β‰  0) Iio", " (β¨… Ξ³, β¨… (_ : Ξ³ β‰  0), π“Ÿ (Iio Ξ³)).HasBasis (fun Ξ³ => Ξ³ β‰  0) Iio", " DirectedOn ((fun Ξ³ => Iio Ξ³) ⁻¹'o fun x x_1 => x β‰₯ x_1...
import Mathlib.Order.Interval.Set.Image import Mathlib.Order.CompleteLatticeIntervals import Mathlib.Topology.Order.DenselyOrdered import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.intermediate_value from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filt...
Mathlib/Topology/Order/IntermediateValue.lean
105
112
theorem IsPreconnected.intermediate_valueβ‚‚_eventually₁ {s : Set X} (hs : IsPreconnected s) {a : X} {l : Filter X} (ha : a ∈ s) [NeBot l] (hl : l ≀ π“Ÿ s) {f g : X β†’ Ξ±} (hf : ContinuousOn f s) (hg : ContinuousOn g s) (ha' : f a ≀ g a) (he : g ≀ᢠ[l] f) : βˆƒ x ∈ s, f x = g x := by
rw [continuousOn_iff_continuous_restrict] at hf hg obtain ⟨b, h⟩ := @intermediate_value_univβ‚‚_eventually₁ _ _ _ _ _ _ (Subtype.preconnectedSpace hs) ⟨a, ha⟩ _ (comap_coe_neBot_of_le_principal hl) _ _ hf hg ha' (he.comap _) exact ⟨b, b.prop, h⟩
[ " βˆƒ x, f x = g x", " βˆƒ x ∈ s, f x = g x" ]
[ " βˆƒ x, f x = g x" ]
import Mathlib.Algebra.Order.Floor import Mathlib.Data.Rat.Cast.Order import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Ring #align_import data.rat.floor from "leanprover-community/mathlib"@"e1bccd6e40ae78370f01659715d3c948716e3b7e" open Int namespace Rat variable {Ξ± : Type*} [LinearOrderedField Ξ±] [FloorRi...
Mathlib/Data/Rat/Floor.lean
56
66
theorem floor_int_div_nat_eq_div {n : β„€} {d : β„•} : ⌊(↑n : β„š) / (↑d : β„š)βŒ‹ = n / (↑d : β„€) := by
rw [Rat.floor_def] obtain rfl | hd := @eq_zero_or_pos _ _ d Β· simp set q := (n : β„š) / d with q_eq obtain ⟨c, n_eq_c_mul_num, d_eq_c_mul_denom⟩ : βˆƒ c, n = c * q.num ∧ (d : β„€) = c * q.den := by rw [q_eq] exact mod_cast @Rat.exists_eq_mul_div_num_and_eq_mul_div_den n d (mod_cast hd.ne') rw [n_eq_c_mul...
[ " a.floor = a.num / ↑a.den", " (if a.den = 1 then a.num else a.num / ↑a.den) = a.num / ↑a.den", " a.num = a.num / ↑a.den", " a.num / ↑a.den = a.num / ↑a.den", " z ≀ { num := n, den := d, den_nz := h, reduced := c }.floor ↔ ↑z ≀ { num := n, den := d, den_nz := h, reduced := c }", " z ≀ n / ↑d ↔ ↑z ≀ { num ...
[ " a.floor = a.num / ↑a.den", " (if a.den = 1 then a.num else a.num / ↑a.den) = a.num / ↑a.den", " a.num = a.num / ↑a.den", " a.num / ↑a.den = a.num / ↑a.den", " z ≀ { num := n, den := d, den_nz := h, reduced := c }.floor ↔ ↑z ≀ { num := n, den := d, den_nz := h, reduced := c }", " z ≀ n / ↑d ↔ ↑z ≀ { num ...
import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly #align_import ring_theory.witt_vector.verschiebung from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c" namespace WittVector open MvPolynomial variable {p : β„•} {R S : Type*} [hp : Fact p.Prime] [Comm...
Mathlib/RingTheory/WittVector/Verschiebung.lean
65
71
theorem ghostComponent_verschiebungFun (x : π•Ž R) (n : β„•) : ghostComponent (n + 1) (verschiebungFun x) = p * ghostComponent n x := by
simp only [ghostComponent_apply, aeval_wittPolynomial] rw [Finset.sum_range_succ', verschiebungFun_coeff, if_pos rfl, zero_pow (pow_ne_zero _ hp.1.ne_zero), mul_zero, add_zero, Finset.mul_sum, Finset.sum_congr rfl] rintro i - simp only [pow_succ', verschiebungFun_coeff_succ, Nat.succ_sub_succ_eq_sub, mul_a...
[ " x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)", " x.verschiebungFun.coeff 0 = 0", " (ghostComponent 0) x.verschiebungFun = 0", " (ghostComponent (n + 1)) x.verschiebungFun = ↑p * (ghostComponent n) x", " βˆ‘ i ∈ Finset.range (n + 1 + 1), ↑p ^ i * x.verschiebungFun.coeff i ^ p ^ (n + 1 - i...
[ " x.verschiebungFun.coeff n = if n = 0 then 0 else x.coeff (n - 1)", " x.verschiebungFun.coeff 0 = 0", " (ghostComponent 0) x.verschiebungFun = 0" ]
import Mathlib.NumberTheory.Zsqrtd.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Data.Complex.Basic import Mathlib.Data.Real.Archimedean #align_import number_theory.zsqrtd.gaussian_int from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" open Zsqrtd Complex open sc...
Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
162
163
theorem intCast_complex_norm (x : β„€[i]) : (x.norm : β„‚) = Complex.normSq (x : β„‚) := by
cases x; rw [Zsqrtd.norm, normSq]; simp
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re", " ↑x.im = (toComplex x).im", " (toComplex { re :=...
[ " I * I = ↑(-1)", " toComplex { re := x, im := y } = ↑x + ↑y * I", " toComplex x = { re := ↑x.re, im := ↑x.im }", " (toComplex x).re = { re := ↑x.re, im := ↑x.im }.re", " (toComplex x).im = { re := ↑x.re, im := ↑x.im }.im", " ↑x.re = (toComplex x).re", " ↑x.im = (toComplex x).im", " (toComplex { re :=...
import Mathlib.Data.Set.Pointwise.Interval import Mathlib.LinearAlgebra.AffineSpace.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Prod #align_import linear_algebra.affine_space.affine_map from "leanprover-community/mathlib"@"bd1fc183335ea95a9519a1630bcf901...
Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
135
136
theorem linearMap_vsub (f : P1 →ᡃ[k] P2) (p1 p2 : P1) : f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2 := by
conv_rhs => rw [← vsub_vadd p1 p2, map_vadd, vadd_vsub]
[ " { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }", " f_linear v = g_linear v", " f_linear v +α΅₯ f p = g_linear v +α΅₯ f p", " f.linear (p1 -α΅₯ p2) = f p1 -α΅₯ f p2", "k : Type u_1\nV1 : Type u_2\nP1 : Type u_3\nV2 : Type u_4\nP2 : Type u_5\nV3 : Typ...
[ " { toFun := f, linear := f_linear, map_vadd' := f_add } = { toFun := g, linear := g_linear, map_vadd' := g_add }", " f_linear v = g_linear v", " f_linear v +α΅₯ f p = g_linear v +α΅₯ f p" ]
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
108
108
theorem laverage_zero : ⨍⁻ _x, (0 : ℝβ‰₯0∞) βˆ‚ΞΌ = 0 := by
rw [laverage, lintegral_zero]
[ " ⨍⁻ (_x : Ξ±), 0 βˆ‚ΞΌ = 0" ]
[]
import Batteries.Data.List.Count import Batteries.Data.Fin.Lemmas open Nat Function namespace List theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : βˆ€ {a'}, a' ∈ l β†’ R a a' := (pairwise_cons.1 p).1 _ theorem Pairwise.of_cons (p : (a :: l).Pairwise R) : Pairwise R l := (pairwise_cons.1 p).2 theorem...
.lake/packages/batteries/Batteries/Data/List/Pairwise.lean
104
104
theorem pairwise_singleton (R) (a : Ξ±) : Pairwise R [a] := by
simp
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " βˆ€ (a' : Ξ±), a' ∈ l β†’ S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (βˆ€ (a' : α✝), a' ∈ l✝ β†’ R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
[ " Pairwise S l", " Pairwise S []", " Pairwise S (a :: l)", " βˆ€ (a' : Ξ±), a' ∈ l β†’ S a a'", " Pairwise (fun a b => R a b ∧ S a b) l", " Pairwise (fun a b => R a b ∧ S a b) []", " Pairwise (fun a b => R a b ∧ S a b) (a✝¹ :: l✝)", " (βˆ€ (a' : α✝), a' ∈ l✝ β†’ R a✝¹ a' ∧ S a✝¹ a') ∧ Pairwise (fun a b => R a ...
import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" noncomputable section open Polynomial open Finsupp Finset namespace Polynomial universe u v w variable {R : Type u} {S : Type v} {ΞΉ : Type w} {a b ...
Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
111
117
theorem natDegree_C_mul_eq_of_mul_eq_one {ai : R} (au : ai * a = 1) : (C a * p).natDegree = p.natDegree := le_antisymm (natDegree_C_mul_le a p) (calc p.natDegree = (1 * p).natDegree := by
nth_rw 1 [← one_mul p] _ = (C ai * (C a * p)).natDegree := by rw [← C_1, ← au, RingHom.map_mul, ← mul_assoc] _ ≀ (C a * p).natDegree := natDegree_C_mul_le ai (C a * p))
[ " (p.comp q).natDegree ≀ p.natDegree * q.natDegree", " 0 ≀ p.natDegree * q.natDegree", " ↑(C (p.coeff n)).natDegree + n β€’ ↑q.natDegree = ↑(n * q.natDegree)", " ↑n * ↑q.natDegree = ↑(n * q.natDegree)", " False", " p.natDegree ≀ n ↔ βˆ€ (N : β„•), n < N β†’ p.coeff N = 0", " (p + q).natDegree ≀ n ↔ p.natDegree ...
[ " (p.comp q).natDegree ≀ p.natDegree * q.natDegree", " 0 ≀ p.natDegree * q.natDegree", " ↑(C (p.coeff n)).natDegree + n β€’ ↑q.natDegree = ↑(n * q.natDegree)", " ↑n * ↑q.natDegree = ↑(n * q.natDegree)", " False", " p.natDegree ≀ n ↔ βˆ€ (N : β„•), n < N β†’ p.coeff N = 0", " (p + q).natDegree ≀ n ↔ p.natDegree ...
import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.prod from "leanprover-community/mathlib"@"e354e865255654389cc46e6032160238df2e0f40" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal ...
Mathlib/Analysis/Calculus/FDeriv/Prod.lean
451
454
theorem hasFDerivAt_apply (i : ΞΉ) (f : βˆ€ i, F' i) : HasFDerivAt (π•œ:=π•œ) (fun f : βˆ€ i, F' i => f i) (proj i) f := by
apply HasStrictFDerivAt.hasFDerivAt apply hasStrictFDerivAt_apply
[ " HasStrictFDerivAt Ξ¦ Ξ¦' x ↔ βˆ€ (i : ΞΉ), HasStrictFDerivAt (fun x => Ξ¦ x i) ((proj i).comp Ξ¦') x", " ((fun p => Ξ¦ p.1 - Ξ¦ p.2 - Ξ¦' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n βˆ€ (i : ΞΉ), (fun p => Ξ¦ p.1 i - Ξ¦ p.2 i - ((proj i).comp Ξ¦') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2", " HasStrictFDerivAt ...
[ " HasStrictFDerivAt Ξ¦ Ξ¦' x ↔ βˆ€ (i : ΞΉ), HasStrictFDerivAt (fun x => Ξ¦ x i) ((proj i).comp Ξ¦') x", " ((fun p => Ξ¦ p.1 - Ξ¦ p.2 - Ξ¦' (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2) ↔\n βˆ€ (i : ΞΉ), (fun p => Ξ¦ p.1 i - Ξ¦ p.2 i - ((proj i).comp Ξ¦') (p.1 - p.2)) =o[𝓝 (x, x)] fun p => p.1 - p.2", " HasStrictFDerivAt ...
import Mathlib.Algebra.MvPolynomial.Supported import Mathlib.RingTheory.WittVector.Truncated #align_import ring_theory.witt_vector.mul_coeff from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section namespace WittVector variable (p : β„•) [hp : Fact p.Prime] variable {k ...
Mathlib/RingTheory/WittVector/MulCoeff.lean
120
135
theorem mul_polyOfInterest_aux1 (n : β„•) : βˆ‘ i ∈ range (n + 1), (p : 𝕄) ^ i * wittMul p i ^ p ^ (n - i) = wittPolyProd p n := by
simp only [wittPolyProd] convert wittStructureInt_prop p (X (0 : Fin 2) * X 1) n using 1 Β· simp only [wittPolynomial, wittMul] rw [AlgHom.map_sum] congr 1 with i congr 1 have hsupp : (Finsupp.single i (p ^ (n - i))).support = {i} := by rw [Finsupp.support_eq_singleton] simp only [and_...
[ " (wittPolyProd p n).vars βŠ† univ Γ—Λ’ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p β„€ n) * (rename (Prod.mk 1)) (wittPolynomial p β„€ n)).vars βŠ†\n univ Γ—Λ’ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p β„€ n)).vars βˆͺ ((rename (Prod.mk 1)) (wittPolynomial p β„€ n)).vars βŠ†\n univ Γ—Λ’ range (n ...
[ " (wittPolyProd p n).vars βŠ† univ Γ—Λ’ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p β„€ n) * (rename (Prod.mk 1)) (wittPolynomial p β„€ n)).vars βŠ†\n univ Γ—Λ’ range (n + 1)", " ((rename (Prod.mk 0)) (wittPolynomial p β„€ n)).vars βˆͺ ((rename (Prod.mk 1)) (wittPolynomial p β„€ n)).vars βŠ†\n univ Γ—Λ’ range (n ...
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {Ξ± : Type u} class OrderedAddCommGroup (Ξ± : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
318
319
theorem inv_mul_lt_one_iff_lt : a * b⁻¹ < 1 ↔ a < b := by
rw [← mul_lt_mul_iff_right b, inv_mul_cancel_right, one_mul]
[ " b ≀ c", " a⁻¹ < 1 ↔ 1 < a", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ * a < b * a ↔ 1 < b * a", " a * b < b⁻¹ * b ↔ a * b < 1", " a * b⁻¹ < c ↔ a < c * b", " c * b < a * b⁻¹ * b ↔ c * b < a", " a * b⁻¹ < 1 ↔ a < b" ]
[ " b ≀ c", " a⁻¹ < 1 ↔ 1 < a", " 1 < a⁻¹ ↔ a < 1", " a⁻¹ * a < b * a ↔ 1 < b * a", " a * b < b⁻¹ * b ↔ a * b < 1", " a * b⁻¹ < c ↔ a < c * b", " c * b < a * b⁻¹ * b ↔ c * b < a" ]
import Mathlib.Algebra.Ring.Defs import Mathlib.Algebra.Group.Ext local macro:max "local_hAdd[" type:term ", " inst:term "]" : term => `(term| (letI := $inst; HAdd.hAdd : $type β†’ $type β†’ $type)) local macro:max "local_hMul[" type:term ", " inst:term "]" : term => `(term| (letI := $inst; HMul.hMul : $type β†’ $typ...
Mathlib/Algebra/Ring/Ext.lean
497
499
theorem toSemiring_injective : Function.Injective (@toSemiring R) := by
rintro ⟨⟩ ⟨⟩ _; congr
[ " inst₁ = instβ‚‚", " toAddMonoid = toAddMonoid", " HAdd.hAdd = HAdd.hAdd", " NatCast.natCast = NatCast.natCast", " NatCast.natCast n = NatCast.natCast n", " NatCast.natCast 0 = NatCast.natCast 0", " 0 = 0", " NatCast.natCast (n + 1) = NatCast.natCast (n + 1)", " NatCast.natCast n + 1 = NatCast.natCas...
[ " inst₁ = instβ‚‚", " toAddMonoid = toAddMonoid", " HAdd.hAdd = HAdd.hAdd", " NatCast.natCast = NatCast.natCast", " NatCast.natCast n = NatCast.natCast n", " NatCast.natCast 0 = NatCast.natCast 0", " 0 = 0", " NatCast.natCast (n + 1) = NatCast.natCast (n + 1)", " NatCast.natCast n + 1 = NatCast.natCas...
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
61
67
theorem hammingDist_triangle (x y z : βˆ€ i, Ξ² i) : hammingDist x z ≀ hammingDist x y + hammingDist y z := by
classical unfold hammingDist refine le_trans (card_mono ?_) (card_union_le _ _) rw [← filter_or] exact monotone_filter_right _ fun i h ↦ (h.ne_or_ne _).imp_right Ne.symm
[ " 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" ]
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ...
Mathlib/Topology/MetricSpace/Isometry.lean
138
141
theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.closedBall (f x) r = EMetric.closedBall x r := by
ext y simp [h.edist_eq]
[ " Isometry f ↔ βˆ€ (x y : Ξ±), nndist (f x) (f y) = nndist x y", " Isometry f ↔ βˆ€ (x y : Ξ±), dist (f x) (f y) = dist x y", " edist x y ≀ ↑1 * edist (f x) (f y)", " edist (f x) (f y) = edist x y", " edist (f y) (f y) = edist y y", " edist (Prod.map f g x) (Prod.map f g y) = edist x y", " edist ((fun g i => ...
[ " Isometry f ↔ βˆ€ (x y : Ξ±), nndist (f x) (f y) = nndist x y", " Isometry f ↔ βˆ€ (x y : Ξ±), dist (f x) (f y) = dist x y", " edist x y ≀ ↑1 * edist (f x) (f y)", " edist (f x) (f y) = edist x y", " edist (f y) (f y) = edist y y", " edist (Prod.map f g x) (Prod.map f g y) = edist x y", " edist ((fun g i => ...
import Mathlib.LinearAlgebra.AffineSpace.AffineEquiv import Mathlib.Topology.Algebra.Module.Basic open Function structure ContinuousAffineEquiv (k P₁ Pβ‚‚ : Type*) {V₁ Vβ‚‚ : Type*} [Ring k] [AddCommGroup V₁] [Module k V₁] [AddTorsor V₁ P₁] [TopologicalSpace P₁] [AddCommGroup Vβ‚‚] [Module k Vβ‚‚] [AddTorsor Vβ‚‚ P...
Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
84
87
theorem coe_injective : Function.Injective ((↑) : (P₁ ≃ᡃL[k] Pβ‚‚) β†’ P₁ ≃ᡃ[k] Pβ‚‚) := by
intro e e' H cases e congr
[ " Injective toAffineEquiv", " { toAffineEquiv := e, continuous_toFun := econt, continuous_invFun := einv_cont } =\n { toAffineEquiv := e', continuous_toFun := e'cont, continuous_invFun := e'inv_cont }", " e = e'", " { toAffineEquiv := toAffineEquiv✝, continuous_toFun := continuous_toFun✝, continuous_invFun...
[ " Injective toAffineEquiv", " { toAffineEquiv := e, continuous_toFun := econt, continuous_invFun := einv_cont } =\n { toAffineEquiv := e', continuous_toFun := e'cont, continuous_invFun := e'inv_cont }" ]
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
73
85
theorem Οƒ_comp_Ο€Summand_id_eq_zero {n : β„•} (i : Fin (n + 1)) : X.Οƒ i ≫ s.Ο€Summand (IndexSet.id (op [n + 1])) = 0 := by
apply s.hom_ext' intro A dsimp only [SimplicialObject.Οƒ] rw [comp_zero, s.cofan_inj_epi_naturality_assoc A (SimplexCategory.Οƒ i).op, cofan_inj_Ο€Summand_eq_zero] rw [ne_comm] change Β¬(A.epiComp (SimplexCategory.Οƒ i).op).EqId rw [IndexSet.eqId_iff_len_eq] have h := SimplexCategory.len_le_of_epi (infe...
[ " 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.cofan Ξ”).inj A ≫ s.Ο€Summand B = 0", " ((s.cofan Ξ”).inj A ≫ s.desc Ξ” fun B_1 => if h : B_1 = B then eqToHom β‹― ...
[ " 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.cofan Ξ”).inj A ≫ s.Ο€Summand B = 0", " ((s.cofan Ξ”).inj A ≫ s.desc Ξ” fun B_1 => if h : B_1 = B then eqToHom β‹― ...
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.ConcreteCategory.BundledHom import Mathlib.CategoryTheory.Elementwise #align_import analysis.normed.group.SemiNormedGroup from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11...
Mathlib/Analysis/Normed/Group/SemiNormedGroupCat.lean
111
114
theorem isZero_of_subsingleton (V : SemiNormedGroupCat) [Subsingleton V] : Limits.IsZero V := by
refine ⟨fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩⟩ · ext x; have : x = 0 := Subsingleton.elim _ _; simp only [this, map_zero] · ext; apply Subsingleton.elim
[ " ConcreteCategory SemiNormedGroupCat", " ConcreteCategory (Bundled SeminormedAddCommGroup)", " f = g", " { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = g", " { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ ...
[ " ConcreteCategory SemiNormedGroupCat", " ConcreteCategory (Bundled SeminormedAddCommGroup)", " f = g", " { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = g", " { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ ...
import Batteries.Classes.Order namespace Batteries.PairingHeapImp inductive Heap (Ξ± : Type u) where | nil : Heap Ξ± | node (a : Ξ±) (child sibling : Heap Ξ±) : Heap Ξ± deriving Repr def Heap.size : Heap Ξ± β†’ Nat | .nil => 0 | .node _ c s => c.size + 1 + s.size def Heap.singleton (a : Ξ±) : Heap Ξ± := ....
.lake/packages/batteries/Batteries/Data/PairingHeap.lean
119
121
theorem Heap.size_merge_node (le) (a₁ : Ξ±) (c₁ s₁ : Heap Ξ±) (aβ‚‚ : Ξ±) (cβ‚‚ sβ‚‚ : Heap Ξ±) : (merge le (.node a₁ c₁ s₁) (.node aβ‚‚ cβ‚‚ sβ‚‚)).size = c₁.size + cβ‚‚.size + 2 := by
unfold merge; dsimp; split <;> simp_arith [size]
[ " (merge le s₁ sβ‚‚).NoSibling", " (match s₁, sβ‚‚ with\n | nil, nil => nil\n | nil, node aβ‚‚ cβ‚‚ sibling => node aβ‚‚ cβ‚‚ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node aβ‚‚ cβ‚‚ sibling_1 =>\n if le a₁ aβ‚‚ = true then node a₁ (node aβ‚‚ cβ‚‚ c₁) nil else node aβ‚‚ (node a₁ c₁ cβ‚‚) ni...
[ " (merge le s₁ sβ‚‚).NoSibling", " (match s₁, sβ‚‚ with\n | nil, nil => nil\n | nil, node aβ‚‚ cβ‚‚ sibling => node aβ‚‚ cβ‚‚ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node aβ‚‚ cβ‚‚ sibling_1 =>\n if le a₁ aβ‚‚ = true then node a₁ (node aβ‚‚ cβ‚‚ c₁) nil else node aβ‚‚ (node a₁ c₁ cβ‚‚) ni...
import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.Data.ZMod.Algebra #align_import ring_theory.polynomial.cyclotomic.expand from "leanprover-community/mathlib"@"0723536a0522d24fc2f159a096fb3304bef77472" namespace Polynomial @[simp]
Mathlib/RingTheory/Polynomial/Cyclotomic/Expand.lean
36
72
theorem cyclotomic_expand_eq_cyclotomic_mul {p n : β„•} (hp : Nat.Prime p) (hdiv : Β¬p ∣ n) (R : Type*) [CommRing R] : expand R p (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R := by
rcases Nat.eq_zero_or_pos n with (rfl | hnpos) Β· simp haveI := NeZero.of_pos hnpos suffices expand β„€ p (cyclotomic n β„€) = cyclotomic (n * p) β„€ * cyclotomic n β„€ by rw [← map_cyclotomic_int, ← map_expand, this, Polynomial.map_mul, map_cyclotomic_int, map_cyclotomic] refine eq_of_monic_of_dvd_of_natDe...
[ " (expand R p) (cyclotomic n R) = cyclotomic (n * p) R * cyclotomic n R", " (expand R p) (cyclotomic 0 R) = cyclotomic (0 * p) R * cyclotomic 0 R", " (expand β„€ p) (cyclotomic n β„€) = cyclotomic (n * p) β„€ * cyclotomic n β„€", " cyclotomic (n * p) β„€ * cyclotomic n β„€ ∣ (expand β„€ p) (cyclotomic n β„€)", " map (Int.c...
[]
import Mathlib.Analysis.Normed.Order.Basic import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.asymptotics.specific_asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Asymptotics open Topology sectio...
Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean
42
46
theorem pow_div_pow_eventuallyEq_atTop {p q : β„•} : (fun x : π•œ => x ^ p / x ^ q) =αΆ [atTop] fun x => x ^ ((p : β„€) - q) := by
apply (eventually_gt_atTop (0 : π•œ)).mono fun x hx => _ intro x hx simp [zpow_subβ‚€ hx.ne']
[ " (fun x => x ^ p / x ^ q) =αΆ [atTop] fun x => x ^ (↑p - ↑q)", " βˆ€ (x : π•œ), 0 < x β†’ (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x", " (fun x => x ^ p / x ^ q) x = (fun x => x ^ (↑p - ↑q)) x" ]
[]
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Rat.Cast.Order import Mathlib.Order.Partition.Finpartition import Mathlib.Tactic.GCongr import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring #align_import combinatorics.simp...
Mathlib/Combinatorics/SimpleGraph/Density.lean
159
160
theorem edgeDensity_empty_right (s : Finset Ξ±) : edgeDensity r s βˆ… = 0 := by
rw [edgeDensity, Finset.card_empty, Nat.cast_zero, mul_zero, div_zero]
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r βˆ… t = βˆ…", " x ∈ interedges r sβ‚‚ tβ‚‚ β†’ x ∈ interedges r s₁ t₁", " x.1 ∈ sβ‚‚ ∧ x.2 ∈ tβ‚‚ ∧ r x.1 x.2 β†’ x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card", " Disjoint (...
[ " x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2", " interedges r βˆ… t = βˆ…", " x ∈ interedges r sβ‚‚ tβ‚‚ β†’ x ∈ interedges r s₁ t₁", " x.1 ∈ sβ‚‚ ∧ x.2 ∈ tβ‚‚ ∧ r x.1 x.2 β†’ x.1 ∈ s₁ ∧ x.2 ∈ t₁ ∧ r x.1 x.2", " (interedges r s t).card + (interedges (fun x y => Β¬r x y) s t).card = s.card * t.card", " Disjoint (...