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.Algebra.Group.Defs import Mathlib.Control.Functor #align_import control.applicative from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v w section Lemmas open Function variable {F : Type u β†’ Type v} variable [Applicative F] [LawfulApplicative F] variable {Ξ± ...
Mathlib/Control/Applicative.lean
31
33
theorem Applicative.map_seq_map (f : Ξ± β†’ Ξ² β†’ Ξ³) (g : Οƒ β†’ Ξ²) (x : F Ξ±) (y : F Οƒ) : f <$> x <*> g <$> y = ((Β· ∘ g) ∘ f) <$> x <*> y := by
simp [flip, functor_norm]
[ " (Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq (((fun x => x ∘ g) ∘ f) <$> x) fun x => y" ]
[]
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
87
93
theorem mul_iff (k : β„€) (hk : k β‰  0) : PythagoreanTriple (k * x) (k * y) (k * z) ↔ PythagoreanTriple x y z := by
refine ⟨?_, fun h => h.mul k⟩ simp only [PythagoreanTriple] intro h rw [← mul_left_inj' (mul_ne_zero hk hk)] convert h using 1 <;> ring
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
[ " z * z β‰  2", " ⟨0, β‹―βŸ© * ⟨0, β‹―βŸ© β‰  2", " ⟨1, β‹―βŸ© * ⟨1, β‹―βŸ© β‰  2", " ⟨2, β‹―βŸ© * ⟨2, β‹―βŸ© β‰  2", " ⟨3, β‹―βŸ© * ⟨3, β‹―βŸ© β‰  2", " z * z % 4 β‰  2", " Β¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
import Mathlib.Topology.UniformSpace.Cauchy import Mathlib.Topology.UniformSpace.Separation import Mathlib.Topology.DenseEmbedding #align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c" open Filter Function Set Uniformity Topology sec...
Mathlib/Topology/UniformSpace/UniformEmbedding.lean
110
114
theorem UniformInducing.uniformContinuousOn_iff {f : Ξ± β†’ Ξ²} {g : Ξ² β†’ Ξ³} {S : Set Ξ±} (hg : UniformInducing g) : UniformContinuousOn f S ↔ UniformContinuousOn (g ∘ f) S := by
dsimp only [UniformContinuousOn, Tendsto] rw [← hg.comap_uniformity, ← map_le_iff_le_comap, Filter.map_map, comp_def, comp_def]
[ " UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²", " (βˆ€ (s : Set (Ξ± Γ— Ξ±)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓀 Ξ²) ↔ s ∈ 𝓀 Ξ±) ↔ βˆ€ (s : Set (Ξ± Γ— Ξ±)), s ∈ 𝓀 Ξ± ↔ s ∈ 𝓀 Ξ±", " UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓀 Ξ²) ≀ 𝓀 Ξ±", " 𝓀 Ξ± ≀ comap (fun x => (f x.1, f x.2)) (𝓀...
[ " UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²", " (βˆ€ (s : Set (Ξ± Γ— Ξ±)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓀 Ξ²) ↔ s ∈ 𝓀 Ξ±) ↔ βˆ€ (s : Set (Ξ± Γ— Ξ±)), s ∈ 𝓀 Ξ± ↔ s ∈ 𝓀 Ξ±", " UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓀 Ξ²) ≀ 𝓀 Ξ±", " 𝓀 Ξ± ≀ comap (fun x => (f x.1, f x.2)) (𝓀...
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Factorial.DoubleFactorial #align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74" noncomputable section open Polynomial namespace P...
Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
125
126
theorem leadingCoeff_hermite (n : β„•) : (hermite n).leadingCoeff = 1 := by
rw [← coeff_natDegree, natDegree_hermite, coeff_hermite_self]
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)", " hermite n = (fun p => X * p - derivative p)^[n] 1", " hermite 0 = (fun p => X * p - derivative p)^[0] 1", " hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1", " hermite 1 = X", " X * C 1 - derivative (C 1) = X", " (hermite (n + 1)...
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)", " hermite n = (fun p => X * p - derivative p)^[n] 1", " hermite 0 = (fun p => X * p - derivative p)^[0] 1", " hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1", " hermite 1 = X", " X * C 1 - derivative (C 1) = X", " (hermite (n + 1)...
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classi...
Mathlib/Topology/MetricSpace/Contracting.lean
53
53
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by
simp [hf.1]
[ " 0 < 1 - ↑K" ]
[]
import Mathlib.Algebra.DirectSum.Internal import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.MvPolynomial.Variables import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous import Mathlib.Algebra.Polynomial.Roots #align_i...
Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
99
102
theorem homogeneousSubmodule_eq_finsupp_supported [CommSemiring R] (n : β„•) : homogeneousSubmodule Οƒ R n = Finsupp.supported _ R { d | degree d = n } := by
simp_rw [← weightedDegree_one] exact weightedHomogeneousSubmodule_eq_finsupp_supported R 1 n
[ " (weightedDegree 1) d = degree d", " weightedTotalDegree 1 Ο† = Ο†.totalDegree", " (weightedDegree 1) c = n", " coeff c a β‰  0 ∨ coeff c b β‰  0", " coeff c a + coeff c b = 0", " coeff c a β‰  0", " False", " r β€’ coeff c a = 0", " r β€’ 0 = 0", " homogeneousSubmodule Οƒ R n = Finsupp.supported R R {d | deg...
[ " (weightedDegree 1) d = degree d", " weightedTotalDegree 1 Ο† = Ο†.totalDegree", " (weightedDegree 1) c = n", " coeff c a β‰  0 ∨ coeff c b β‰  0", " coeff c a + coeff c b = 0", " coeff c a β‰  0", " False", " r β€’ coeff c a = 0", " r β€’ 0 = 0" ]
import Mathlib.Algebra.Group.Hom.End import Mathlib.Algebra.Ring.Invertible import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Int.Cast.Lemmas import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" assert_n...
Mathlib/Algebra/Module/Defs.lean
104
104
theorem two_smul : (2 : R) β€’ x = x + x := by
rw [← one_add_one_eq_two, add_smul, one_smul]
[ " a β€’ x + b β€’ x = x", " 2 β€’ x = x + x" ]
[ " a β€’ x + b β€’ x = x" ]
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.FreeModule.Finite.Basic #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v v'...
Mathlib/LinearAlgebra/Dimension/Free.lean
55
58
theorem rank_mul_rank (A : Type v) [AddCommGroup A] [Module K A] [Module F A] [IsScalarTower F K A] [Module.Free K A] : Module.rank F K * Module.rank K A = Module.rank F A := by
convert lift_rank_mul_lift_rank F K A <;> rw [lift_id]
[ " lift.{w, v} (Module.rank F K) * lift.{v, w} (Module.rank K A) = lift.{v, w} (Module.rank F A)", " Module.rank F K * Module.rank K A = Module.rank F A", " Module.rank F K = lift.{v, v} (Module.rank F K)", " Module.rank K A = lift.{v, v} (Module.rank K A)", " Module.rank F A = lift.{v, v} (Module.rank F A)"...
[ " lift.{w, v} (Module.rank F K) * lift.{v, w} (Module.rank K A) = lift.{v, w} (Module.rank F A)" ]
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Combinatorics.SimpleGraph.Density import Mathlib.Data.Nat.Cast.Field import Mathlib.Order.Partition.Equipartition import Mathlib.SetTheory.Ordinal.Basic #align_import combinatorics.simple_graph.regularity.uniform from "leanprover-community/mathlib"@"bf7ef0e83e5b...
Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
148
151
theorem right_nonuniformWitnesses_subset (h : Β¬G.IsUniform Ξ΅ s t) : (G.nonuniformWitnesses Ξ΅ s t).2 βŠ† t := by
rw [nonuniformWitnesses, dif_pos h] exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.1
[ " DecidableRel (G.IsUniform Ξ΅)", " DecidableRel fun s t =>\n βˆ€ ⦃s' : Finset α⦄,\n s' βŠ† s β†’\n βˆ€ ⦃t' : Finset α⦄,\n t' βŠ† t β†’ ↑s.card * Ξ΅ ≀ ↑s'.card β†’ ↑t.card * Ξ΅ ≀ ↑t'.card β†’ |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < Ξ΅", " |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < Ξ΅'", " ...
[ " DecidableRel (G.IsUniform Ξ΅)", " DecidableRel fun s t =>\n βˆ€ ⦃s' : Finset α⦄,\n s' βŠ† s β†’\n βˆ€ ⦃t' : Finset α⦄,\n t' βŠ† t β†’ ↑s.card * Ξ΅ ≀ ↑s'.card β†’ ↑t.card * Ξ΅ ≀ ↑t'.card β†’ |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < Ξ΅", " |↑(G.edgeDensity s' t') - ↑(G.edgeDensity s t)| < Ξ΅'", " ...
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
62
63
theorem convex_ball (a : E) (r : ℝ) : Convex ℝ (Metric.ball a r) := by
simpa only [Metric.ball, sep_univ] using (convexOn_univ_dist a).convex_lt r
[ " β€–a β€’ xβ€– + β€–b β€’ yβ€– = a * β€–xβ€– + b * β€–yβ€–", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)" ]
[ " β€–a β€’ xβ€– + β€–b β€’ yβ€– = a * β€–xβ€– + b * β€–yβ€–", " ConvexOn ℝ s fun z' => dist z' z" ]
import Mathlib.Dynamics.Ergodic.MeasurePreserving #align_import dynamics.ergodic.ergodic from "leanprover-community/mathlib"@"809e920edfa343283cea507aedff916ea0f1bd88" open Set Function Filter MeasureTheory MeasureTheory.Measure open ENNReal variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} (f : Ξ± β†’ Ξ±) {s : Set Ξ±} ...
Mathlib/Dynamics/Ergodic/Ergodic.lean
74
76
theorem prob_eq_zero_or_one [IsProbabilityMeasure μ] (hf : PreErgodic f μ) (hs : MeasurableSet s) (hs' : f ⁻¹' s = s) : μ s = 0 ∨ μ s = 1 := by
simpa [hs] using hf.measure_self_or_compl_eq_zero hs hs'
[ " μ s = 0 ∨ μ sᢜ = 0", " μ s = 0 ∨ μ s = 1" ]
[ " μ s = 0 ∨ μ sᢜ = 0" ]
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.Dynamics.Minimal import Mathlib.GroupTheory.GroupAction.Hom import Mathlib.MeasureTheory.Group.MeasurableEquiv import Mathlib.MeasureTheory.Measure.Regular #align_import measure_theory.group.action from "leanprover-community/mathlib"@"f2ce6086713c78a7f8...
Mathlib/MeasureTheory/Group/Action.lean
90
95
theorem measurePreserving_smul : MeasurePreserving (c β€’ Β·) ΞΌ ΞΌ := { measurable := measurable_const_smul c map_eq := by
ext1 s hs rw [map_apply (measurable_const_smul c) hs] exact SMulInvariantMeasure.measure_preimage_smul c hs }
[ " map (fun x => c β€’ x) ΞΌ = ΞΌ", " (map (fun x => c β€’ x) ΞΌ) s = ΞΌ s", " ΞΌ ((fun x => c β€’ x) ⁻¹' s) = ΞΌ s" ]
[]
import Mathlib.Order.Interval.Multiset #align_import data.nat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" -- TODO -- assert_not_exists Ring open Finset Nat variable (a b c : β„•) namespace Nat instance instLocallyFiniteOrder : LocallyFiniteOrder β„• where finsetIcc a b...
Mathlib/Order/Interval/Finset/Nat.lean
109
109
theorem card_Iio : (Iio b).card = b := by
rw [Iio_eq_Ico, card_Ico, Nat.bot_eq_zero, Nat.sub_zero]
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := β‹― }) a b ↔ a ≀ x ∧ x ≀ b", " a ≀ x ∧ x < a + (b + 1 - a) ↔ a ≀ x ∧ x ≀ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := β‹― }) a b ↔ a ≀ x ∧ x < b", " a ≀ x ∧ x < a + (b - a) ↔ a ≀ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
[ " x ∈ (fun a b => { val := ↑(List.range' a (b + 1 - a)), nodup := β‹― }) a b ↔ a ≀ x ∧ x ≀ b", " a ≀ x ∧ x < a + (b + 1 - a) ↔ a ≀ x ∧ x ≀ b", " x ∈ (fun a b => { val := ↑(List.range' a (b - a)), nodup := β‹― }) a b ↔ a ≀ x ∧ x < b", " a ≀ x ∧ x < a + (b - a) ↔ a ≀ x ∧ x < b", " x ∈ (fun a b => { val := ↑(List....
import Mathlib.Init.ZeroOne import Mathlib.Data.Set.Defs import Mathlib.Order.Basic import Mathlib.Order.SymmDiff import Mathlib.Tactic.Tauto import Mathlib.Tactic.ByContra import Mathlib.Util.Delaborators #align_import data.set.basic from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" ...
Mathlib/Data/Set/Basic.lean
224
225
theorem forall_in_swap {p : Ξ± β†’ Ξ² β†’ Prop} : (βˆ€ a ∈ s, βˆ€ (b), p a b) ↔ βˆ€ (b), βˆ€ a ∈ s, p a b := by
tauto
[ " x✝ ∈ t", " x✝ ∈ s", " x ∈ s ↔ x ∈ t", " (βˆ€ a ∈ s, βˆ€ (b : Ξ²), p a b) ↔ βˆ€ (b : Ξ²), βˆ€ a ∈ s, p a b" ]
[ " x✝ ∈ t", " x✝ ∈ s", " x ∈ s ↔ x ∈ t" ]
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMa...
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
116
118
theorem comp_differentiable_iff {f : G β†’ E} : Differentiable π•œ (iso ∘ f) ↔ Differentiable π•œ f := by
rw [← differentiableOn_univ, ← differentiableOn_univ] exact iso.comp_differentiableOn_iff
[ " DifferentiableWithinAt π•œ (⇑iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x", " DifferentiableWithinAt π•œ f s x", " DifferentiableAt π•œ (⇑iso ∘ f) x ↔ DifferentiableAt π•œ f x", " DifferentiableOn π•œ (⇑iso ∘ f) s ↔ DifferentiableOn π•œ f s", " (βˆ€ x ∈ s, DifferentiableWithinAt π•œ (⇑iso ∘ f) s x) ↔ βˆ€ x ∈ s, Di...
[ " DifferentiableWithinAt π•œ (⇑iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x", " DifferentiableWithinAt π•œ f s x", " DifferentiableAt π•œ (⇑iso ∘ f) x ↔ DifferentiableAt π•œ f x", " DifferentiableOn π•œ (⇑iso ∘ f) s ↔ DifferentiableOn π•œ f s", " (βˆ€ x ∈ s, DifferentiableWithinAt π•œ (⇑iso ∘ f) s x) ↔ βˆ€ x ∈ s, Di...
import Mathlib.Algebra.Group.Commute.Units import Mathlib.Algebra.Group.Int import Mathlib.Algebra.GroupWithZero.Semiconj import Mathlib.Data.Nat.GCD.Basic import Mathlib.Order.Bounds.Basic #align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47" namespace Nat ...
Mathlib/Data/Int/GCD.lean
51
54
theorem xgcdAux_rec {r s t r' s' t'} (h : 0 < r) : xgcdAux r s t r' s' t' = xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t := by
obtain ⟨r, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h.ne' simp [xgcdAux]
[ " (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ...
[ " (invImage\n (fun x =>\n PSigma.casesOn x fun a a_1 =>\n PSigma.casesOn a_1 fun a_2 a_3 =>\n PSigma.casesOn a_3 fun a_4 a_5 => PSigma.casesOn a_5 fun a_6 a_7 => PSigma.casesOn a_7 fun a_8 a_9 => a)\n instWellFoundedRelationOfSizeOf).1\n ⟨r' % k.succ, ⟨s' - ↑q * s, ...
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
59
61
theorem mk_add_mem_enumFrom_iff_get? {n i : β„•} {x : Ξ±} {l : List Ξ±} : (n + i, x) ∈ enumFrom n l ↔ l.get? i = x := by
simp [mem_iff_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)", " (enumFrom n l)...
import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.weighted_homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Fins...
Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
120
122
theorem weightedTotalDegree_zero (w : Οƒ β†’ M) : weightedTotalDegree w (0 : MvPolynomial Οƒ R) = βŠ₯ := by
simp only [weightedTotalDegree, support_zero, Finset.sup_empty]
[ " (weightedDegree w) f = f.sum fun i c => c β€’ w i", " weightedTotalDegree' w p = βŠ₯ ↔ p = 0", " (βˆ€ (s : Οƒ β†’β‚€ β„•), coeff s p β‰  0 β†’ False) ↔ βˆ€ (d : Οƒ β†’β‚€ β„•), coeff d p = 0", " weightedTotalDegree' w 0 = βŠ₯", " weightedTotalDegree' w p = ↑(weightedTotalDegree w p)", " weightedTotalDegree' w p ≀ ↑(weightedTotalDe...
[ " (weightedDegree w) f = f.sum fun i c => c β€’ w i", " weightedTotalDegree' w p = βŠ₯ ↔ p = 0", " (βˆ€ (s : Οƒ β†’β‚€ β„•), coeff s p β‰  0 β†’ False) ↔ βˆ€ (d : Οƒ β†’β‚€ β„•), coeff d p = 0", " weightedTotalDegree' w 0 = βŠ₯", " weightedTotalDegree' w p = ↑(weightedTotalDegree w p)", " weightedTotalDegree' w p ≀ ↑(weightedTotalDe...
import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" open scoped LinearAlgebra.Projectivization variable {ΞΉ K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ΞΉ β†’ ...
Mathlib/LinearAlgebra/Projectivization/Independence.lean
98
99
theorem dependent_iff_not_independent : Dependent f ↔ Β¬Independent f := by
rw [dependent_iff, independent_iff]
[ " Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)", " Independent f β†’ LinearIndependent K (Projectivization.rep ∘ f)", " LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) β‹―)", " (Projectivization.rep ∘ fun i => mk K (ff i) β‹―) = a β€’ ff", " (Projectivization.rep ∘ fun i => mk K (...
[ " Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)", " Independent f β†’ LinearIndependent K (Projectivization.rep ∘ f)", " LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) β‹―)", " (Projectivization.rep ∘ fun i => mk K (ff i) β‹―) = a β€’ ff", " (Projectivization.rep ∘ fun i => mk K (...
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Factorial.DoubleFactorial #align_import ring_theory.polynomial.hermite.basic from "leanprover-community/mathlib"@"938d3db9c278f8a52c0f964a405806f0f2b09b74" noncomputable section open Polynomial namespace P...
Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
111
116
theorem degree_hermite (n : β„•) : (hermite n).degree = n := by
rw [degree_eq_of_le_of_coeff_ne_zero] Β· simp_rw [degree_le_iff_coeff_zero, Nat.cast_lt] rintro m hnm exact coeff_hermite_of_lt hnm Β· simp [coeff_hermite_self n]
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)", " hermite n = (fun p => X * p - derivative p)^[n] 1", " hermite 0 = (fun p => X * p - derivative p)^[0] 1", " hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1", " hermite 1 = X", " X * C 1 - derivative (C 1) = X", " (hermite (n + 1)...
[ " hermite (n + 1) = X * hermite n - derivative (hermite n)", " hermite n = (fun p => X * p - derivative p)^[n] 1", " hermite 0 = (fun p => X * p - derivative p)^[0] 1", " hermite (n + 1) = (fun p => X * p - derivative p)^[n + 1] 1", " hermite 1 = X", " X * C 1 - derivative (C 1) = X", " (hermite (n + 1)...
import Mathlib.Analysis.Complex.Isometry import Mathlib.Analysis.NormedSpace.ConformalLinearMap import Mathlib.Analysis.NormedSpace.FiniteDimension #align_import analysis.complex.conformal from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" noncomputable section open Complex Continuous...
Mathlib/Analysis/Complex/Conformal.lean
78
91
theorem IsConformalMap.is_complex_or_conj_linear (h : IsConformalMap g) : (βˆƒ map : β„‚ β†’L[β„‚] β„‚, map.restrictScalars ℝ = g) ∨ βˆƒ map : β„‚ β†’L[β„‚] β„‚, map.restrictScalars ℝ = g ∘L ↑conjCLE := by
rcases h with ⟨c, -, li, rfl⟩ obtain ⟨li, rfl⟩ : βˆƒ li' : β„‚ ≃ₗᡒ[ℝ] β„‚, li'.toLinearIsometry = li := ⟨li.toLinearIsometryEquiv rfl, by ext1; rfl⟩ rcases linear_isometry_complex li with ⟨a, rfl | rfl⟩ -- let rot := c β€’ (a : β„‚) β€’ ContinuousLinearMap.id β„‚ β„‚, Β· refine Or.inl ⟨c β€’ (a : β„‚) β€’ ContinuousLinearMap.i...
[ " (βˆƒ map, restrictScalars ℝ map = g) ∨ βˆƒ map, restrictScalars ℝ map = g.comp ↑conjCLE", " (βˆƒ map, restrictScalars ℝ map = c β€’ li.toContinuousLinearMap) ∨\n βˆƒ map, restrictScalars ℝ map = (c β€’ li.toContinuousLinearMap).comp ↑conjCLE", " (li.toLinearIsometryEquiv β‹―).toLinearIsometry = li", " (li.toLinearIsom...
[]
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Operations namespace Submodule open Pointwise variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M] variable {N N₁ Nβ‚‚ P P₁ Pβ‚‚ : Submodule R M} def colon (N P : Submodule R M) : Ideal R := annihilator (P.map N.mkQ) #align ...
Mathlib/RingTheory/Ideal/Colon.lean
81
84
theorem annihilator_quotient {N : Submodule R M} : Module.annihilator R (M ⧸ N) = N.colon ⊀ := by
simp_rw [SetLike.ext_iff, Module.mem_annihilator, colon, mem_annihilator, map_top, LinearMap.range_eq_top.mpr (mkQ_surjective N), mem_top, forall_true_left, forall_const]
[ " colon I ⊀ = I", " βˆ€ (x : R), (βˆ€ p ∈ ⊀, x * p ∈ I) ↔ x ∈ I", " βŠ₯.colon N = N.annihilator", " r ∈ N.colon (span R {x}) ↔ βˆ€ (a : R), r β€’ a β€’ x ∈ N", " (βˆ€ (a : R), r β€’ a β€’ x ∈ N) ↔ r β€’ x ∈ N", " (βˆ€ (a : R), a β€’ r β€’ x ∈ N) ↔ r β€’ x ∈ N", " r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I", " Module.annihilator R ...
[ " colon I ⊀ = I", " βˆ€ (x : R), (βˆ€ p ∈ ⊀, x * p ∈ I) ↔ x ∈ I", " βŠ₯.colon N = N.annihilator", " r ∈ N.colon (span R {x}) ↔ βˆ€ (a : R), r β€’ a β€’ x ∈ N", " (βˆ€ (a : R), r β€’ a β€’ x ∈ N) ↔ r β€’ x ∈ N", " (βˆ€ (a : R), a β€’ r β€’ x ∈ N) ↔ r β€’ x ∈ N", " r ∈ colon I (Ideal.span {x}) ↔ r * x ∈ I" ]
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.CategoryTheory.Limits.HasLimits import Mathlib.CategoryTheory.Limits.Types #align_import category_theory.limits.filtered from "leanprover-community/mathlib"@"e4ee4e30418efcb8cf304ba76ad653aeec04ba6e" universe w' w v u noncomputable section open Categor...
Mathlib/CategoryTheory/Limits/Filtered.lean
40
48
theorem IsFiltered.iff_nonempty_limit : IsFiltered C ↔ βˆ€ {J : Type v} [SmallCategory J] [FinCategory J] (F : J β₯€ C), βˆƒ (X : C), Nonempty (limit (F.op β‹™ yoneda.obj X)) := by
rw [IsFiltered.iff_cocone_nonempty.{v}] refine ⟨fun h J _ _ F => ?_, fun h J _ _ F => ?_⟩ · obtain ⟨c⟩ := h F exact ⟨c.pt, ⟨(limitCompYonedaIsoCocone F c.pt).inv c.ι⟩⟩ · obtain ⟨pt, ⟨ι⟩⟩ := h F exact ⟨⟨pt, (limitCompYonedaIsoCocone F pt).hom ι⟩⟩
[ " IsFiltered C ↔\n βˆ€ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J β₯€ C),\n βˆƒ X, Nonempty (limit (F.op β‹™ yoneda.obj X))", " (βˆ€ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J β₯€ C), Nonempty (Cocone F)) ↔\n βˆ€ {J : Type v} [inst : SmallCategory J] [inst_1 : Fi...
[]
import Mathlib.SetTheory.Cardinal.Finite #align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" noncomputable section open scoped Classical variable {Ξ± Ξ² Ξ³ : Type*} def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± ≃ Fin (Nat.card Ξ±) := by have := (Finite....
Mathlib/Data/Finite/Card.lean
93
95
theorem card_option [Finite Ξ±] : Nat.card (Option Ξ±) = Nat.card Ξ± + 1 := by
haveI := Fintype.ofFinite Ξ± simp only [Nat.card_eq_fintype_card, Fintype.card_option]
[ " Ξ± ≃ Fin (Nat.card Ξ±)", " Ξ± ≃ Fin n", " Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0", " 0 < Nat.card Ξ± ↔ Nonempty Ξ±", " Nat.card Ξ± = Nat.card Ξ² ↔ Nonempty (Ξ± ≃ Ξ²)", " Nat.card Ξ± ≀ 1 ↔ Subsingleton Ξ±", " 1 < Nat.card Ξ± ↔ Nontrivial Ξ±", " Nat.card (Option Ξ±) = Nat.card Ξ± + 1" ]
[ " Ξ± ≃ Fin (Nat.card Ξ±)", " Ξ± ≃ Fin n", " Nat.card Ξ± = if h : Finite Ξ± then Fintype.card Ξ± else 0", " 0 < Nat.card Ξ± ↔ Nonempty Ξ±", " Nat.card Ξ± = Nat.card Ξ² ↔ Nonempty (Ξ± ≃ Ξ²)", " Nat.card Ξ± ≀ 1 ↔ Subsingleton Ξ±", " 1 < Nat.card Ξ± ↔ Nontrivial Ξ±" ]
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) ...
Mathlib/Data/Option/NAry.lean
140
143
theorem mapβ‚‚_right_comm {f : Ξ΄ β†’ Ξ³ β†’ Ξ΅} {g : Ξ± β†’ Ξ² β†’ Ξ΄} {f' : Ξ± β†’ Ξ³ β†’ Ξ΄'} {g' : Ξ΄' β†’ Ξ² β†’ Ξ΅} (h_right_comm : βˆ€ a b c, f (g a b) c = g' (f' a c) b) : mapβ‚‚ f (mapβ‚‚ g a b) c = mapβ‚‚ g' (mapβ‚‚ f' a c) b := by
cases a <;> cases b <;> cases c <;> simp [h_right_comm]
[ " mapβ‚‚ f a b = Seq.seq (f <$> a) fun x => b", " mapβ‚‚ f none b = Seq.seq (f <$> none) fun x => b", " mapβ‚‚ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " mapβ‚‚ f a none = none", " mapβ‚‚ f none none = none", " mapβ‚‚ f (some val✝) none = none", " mapβ‚‚ f a (some b) = Option.map (fun a => f a b) a", ...
[ " mapβ‚‚ f a b = Seq.seq (f <$> a) fun x => b", " mapβ‚‚ f none b = Seq.seq (f <$> none) fun x => b", " mapβ‚‚ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b", " mapβ‚‚ f a none = none", " mapβ‚‚ f none none = none", " mapβ‚‚ f (some val✝) none = none", " mapβ‚‚ f a (some b) = Option.map (fun a => f a b) a", ...
import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Algebra.Module.Submodule.LinearMap open Function Pointwise Set variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {M : Type*} {M₁ : Type*} {Mβ‚‚ : Type*} {M₃ : Type*} namespace Submodule section AddCommMonoid variable [Semiring R] [...
Mathlib/Algebra/Module/Submodule/Map.lean
121
123
theorem map_add_le (f g : M β†’β‚›β‚—[σ₁₂] Mβ‚‚) : map (f + g) p ≀ map f p βŠ” map g p := by
rintro x ⟨m, hm, rfl⟩ exact add_mem_sup (mem_map_of_mem hm) (mem_map_of_mem hm)
[ " βˆ€ (c : Rβ‚‚) {x : Mβ‚‚},\n x ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier β†’\n c β€’ x ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier", " c β€’ f y ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier", " σ₁₂ a β€’ f y ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero...
[ " βˆ€ (c : Rβ‚‚) {x : Mβ‚‚},\n x ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier β†’\n c β€’ x ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier", " c β€’ f y ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero_mem' := β‹― }.carrier", " σ₁₂ a β€’ f y ∈ { carrier := ⇑f '' ↑p, add_mem' := β‹―, zero...
import Mathlib.Data.Finset.Image import Mathlib.Data.Multiset.Pi #align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9" namespace Finset open Multiset section Pi variable {Ξ± : Type*} def Pi.empty (Ξ² : Ξ± β†’ Sort*) (a : Ξ±) (h : a ∈ (βˆ… : Finset Ξ±)) : Ξ² a :=...
Mathlib/Data/Finset/Pi.lean
74
83
theorem Pi.cons_injective {a : Ξ±} {b : Ξ΄ a} {s : Finset Ξ±} (hs : a βˆ‰ s) : Function.Injective (Pi.cons s a b) := fun e₁ eβ‚‚ eq => @Multiset.Pi.cons_injective Ξ± _ Ξ΄ a b s.1 hs _ _ <| funext fun e => funext fun h => have : Pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] u...
rw [eq] this
[ " e ∈ insert a s", " cons s a b e₁ e β‹― = cons s a b eβ‚‚ e β‹―" ]
[]
import Mathlib.Data.Finsupp.Defs #align_import data.list.to_finsupp from "leanprover-community/mathlib"@"06a655b5fcfbda03502f9158bbf6c0f1400886f9" namespace List variable {M : Type*} [Zero M] (l : List M) [DecidablePred (getD l Β· 0 β‰  0)] (n : β„•) def toFinsupp : β„• β†’β‚€ M where toFun i := getD l i 0 support := ...
Mathlib/Data/List/ToFinsupp.lean
92
94
theorem toFinsupp_singleton (x : M) [DecidablePred (getD [x] Β· 0 β‰  0)] : toFinsupp [x] = Finsupp.single 0 x := by
ext ⟨_ | i⟩ <;> simp [Finsupp.single_apply, (Nat.zero_lt_succ _).ne]
[ " n ∈ Finset.filter (fun i => l.getD i 0 β‰  0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n β‰  0", " Β¬l.getD n 0 = 0 β†’ n < l.length", " l.length ≀ n β†’ l.getD n 0 = 0", " [].toFinsupp = 0", " [].toFinsupp a✝ = 0 a✝", " [x].toFinsupp = Finsupp.single 0 x", " [x].toFinsupp 0 = (Finsupp.single 0 x) 0", ...
[ " n ∈ Finset.filter (fun i => l.getD i 0 β‰  0) (Finset.range l.length) ↔ (fun i => l.getD i 0) n β‰  0", " Β¬l.getD n 0 = 0 β†’ n < l.length", " l.length ≀ n β†’ l.getD n 0 = 0", " [].toFinsupp = 0", " [].toFinsupp a✝ = 0 a✝" ]
import Mathlib.Algebra.Ring.Int import Mathlib.Data.ZMod.Basic import Mathlib.FieldTheory.Finite.Basic import Mathlib.Data.Fintype.BigOperators #align_import number_theory.sum_four_squares from "leanprover-community/mathlib"@"bd9851ca476957ea4549eb19b40e7b5ade9428cc" open Finset Polynomial FiniteField Equiv
Mathlib/NumberTheory/SumFourSquares.lean
28
31
theorem euler_four_squares {R : Type*} [CommRing R] (a b c d x y z w : R) : (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 + (a * w + b * z - c * y + d * x) ^ 2 = (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2) := by
ring
[ " (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 + (a * z - b * w + c * x + d * y) ^ 2 +\n (a * w + b * z - c * y + d * x) ^ 2 =\n (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)" ]
[]
import Mathlib.Algebra.Polynomial.Inductions import Mathlib.Algebra.Polynomial.Monic import Mathlib.RingTheory.Multiplicity import Mathlib.RingTheory.Ideal.Maps #align_import data.polynomial.div from "leanprover-community/mathlib"@"e1e7190efdcefc925cb36f257a8362ef22944204" noncomputable section open Polynomial ...
Mathlib/Algebra/Polynomial/Div.lean
166
173
theorem natDegree_modByMonic_lt (p : R[X]) {q : R[X]} (hmq : Monic q) (hq : q β‰  1) : natDegree (p %β‚˜ q) < q.natDegree := by
by_cases hpq : p %β‚˜ q = 0 Β· rw [hpq, natDegree_zero, Nat.pos_iff_ne_zero] contrapose! hq exact eq_one_of_monic_natDegree_zero hmq hq Β· haveI := Nontrivial.of_polynomial_ne hpq exact natDegree_lt_natDegree hpq (degree_modByMonic_lt p hmq)
[ " ↑q.natDegree ≀ ↑p.natDegree", " p.leadingCoeff β‰  0 β†’ q β‰  0 β†’ PartialOrder (WithBot β„•)", " p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree", " p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff", " (p %β‚˜ q).degree < q.degree", " (if hq : ...
[ " ↑q.natDegree ≀ ↑p.natDegree", " p.leadingCoeff β‰  0 β†’ q β‰  0 β†’ PartialOrder (WithBot β„•)", " p.degree = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).degree", " p.leadingCoeff = (q * (C p.leadingCoeff * X ^ (p.natDegree - q.natDegree))).leadingCoeff", " (p %β‚˜ q).degree < q.degree", " (if hq : ...
import Mathlib.MeasureTheory.Measure.Regular import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp import Mathlib.Topology.UrysohnsLemma import Mathlib.MeasureTheory.Integral.Bochner #align_import measure_theory.function.continuous_map_dense from "leanprover-community/mathlib"@"e0736bb5b48bdadbca19dbd857e12bee38ccf...
Mathlib/MeasureTheory/Function/ContinuousMapDense.lean
78
134
theorem exists_continuous_snorm_sub_le_of_closed [ΞΌ.OuterRegular] (hp : p β‰  ∞) {s u : Set Ξ±} (s_closed : IsClosed s) (u_open : IsOpen u) (hsu : s βŠ† u) (hs : ΞΌ s β‰  ∞) (c : E) {Ξ΅ : ℝβ‰₯0∞} (hΞ΅ : Ξ΅ β‰  0) : βˆƒ f : Ξ± β†’ E, Continuous f ∧ snorm (fun x => f x - s.indicator (fun _y => c) x) p ΞΌ ≀ Ξ΅ ∧ ...
obtain ⟨η, Ξ·_pos, hη⟩ : βˆƒ Ξ· : ℝβ‰₯0, 0 < Ξ· ∧ βˆ€ s : Set Ξ±, ΞΌ s ≀ Ξ· β†’ snorm (s.indicator fun _x => c) p ΞΌ ≀ Ξ΅ := exists_snorm_indicator_le hp c hΞ΅ have Ξ·pos : (0 : ℝβ‰₯0∞) < Ξ· := ENNReal.coe_lt_coe.2 Ξ·_pos obtain ⟨V, sV, V_open, h'V, hV⟩ : βˆƒ (V : Set Ξ±), V βŠ‡ s ∧ IsOpen V ∧ ΞΌ V < ∞ ∧ ΞΌ (V \ s) < Ξ· := s_cl...
[ " βˆƒ f,\n Continuous f ∧\n snorm (fun x => f x - s.indicator (fun _y => c) x) p ΞΌ ≀ Ξ΅ ∧\n (βˆ€ (x : Ξ±), β€–f xβ€– ≀ β€–cβ€–) ∧ Function.support f βŠ† u ∧ Memβ„’p f p ΞΌ", " β€–g xβ€– = g x", " βˆ€ (x : Ξ±), β€–g x β€’ cβ€– ≀ β€–cβ€–", " β€–g x β€’ cβ€– ≀ β€–cβ€–", " g x * β€–cβ€– ≀ β€–cβ€–", " g x ≀ 1", " βˆ€ (x : Ξ±), β€–g x β€’ c - s.indicator...
[]
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) section ReplaceVertex def replaceVertex : SimpleGraph V where Adj v w := if v = t then if w = t then False else G...
Mathlib/Combinatorics/SimpleGraph/Operations.lean
126
135
theorem card_edgeFinset_replaceVertex_of_adj (ha : G.Adj s t) : (G.replaceVertex s t).edgeFinset.card = G.edgeFinset.card + G.degree s - G.degree t - 1 := by
have inc : G.incidenceFinset t βŠ† G.edgeFinset := by simp [incidenceFinset, incidenceSet_subset] rw [G.edgeFinset_replaceVertex_of_adj ha, card_sdiff (by simp [ha]), card_union_of_disjoint G.disjoint_sdiff_neighborFinset_image, card_sdiff inc, ← Nat.sub_add_comm <| card_le_card inc, card_incidenceFinset_eq_...
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β†’\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
[ " (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) v w β†’\n (fun v w => if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s else G.Adj v w) w v", " (if v = t then if w = t then False else G.Adj s w else if w = t then G.Adj v s el...
import Mathlib.MeasureTheory.Measure.Haar.Basic import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional open sco...
Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
52
54
theorem mem_parallelepiped_iff (v : ΞΉ β†’ E) (x : E) : x ∈ parallelepiped v ↔ βˆƒ t ∈ Icc (0 : ΞΉ β†’ ℝ) 1, x = βˆ‘ i, t i β€’ v i := by
simp [parallelepiped, eq_comm]
[ " x ∈ parallelepiped v ↔ βˆƒ t ∈ Icc 0 1, x = βˆ‘ i : ΞΉ, t i β€’ v i" ]
[]
import Mathlib.Logic.Function.CompTypeclasses import Mathlib.Algebra.Group.Hom.Defs section MonoidHomCompTriple namespace MonoidHom class CompTriple {M N P : Type*} [Monoid M] [Monoid N] [Monoid P] (Ο† : M β†’* N) (ψ : N β†’* P) (Ο‡ : outParam (M β†’* P)) : Prop where comp_eq : ψ.comp Ο† = Ο‡ attribute [simp] C...
Mathlib/Algebra/Group/Hom/CompTypeclasses.lean
98
106
theorem comp_assoc {Q : Type*} [Monoid Q] {φ₁ : M β†’* N} {Ο†β‚‚ : N β†’* P} {φ₁₂ : M β†’* P} (ΞΊ : CompTriple φ₁ Ο†β‚‚ φ₁₂) {φ₃ : P β†’* Q} {φ₂₃ : N β†’* Q} (ΞΊ' : CompTriple Ο†β‚‚ φ₃ φ₂₃) {φ₁₂₃ : M β†’* Q} : CompTriple φ₁ φ₂₃ φ₁₂₃ ↔ CompTriple φ₁₂ φ₃ φ₁₂₃ := by
constructor <;> Β· rintro ⟨h⟩ exact ⟨by simp only [← ΞΊ.comp_eq, ← h, ← ΞΊ'.comp_eq, MonoidHom.comp_assoc]⟩
[ " Οƒ = id M", " Οƒ x✝ = (id M) x✝", " ψ.comp Ο† = ψ", " ψ.comp Ο† = Ο†", " ψ.comp Ο† = Ο‡", " _root_.id = ⇑(id M)", " β‡‘Οˆ ∘ ⇑φ = ⇑χ", " ψ (Ο† x) = Ο‡ x", " φ₁.CompTriple φ₂₃ φ₁₂₃ ↔ φ₁₂.CompTriple φ₃ φ₁₂₃", " φ₁.CompTriple φ₂₃ φ₁₂₃ β†’ φ₁₂.CompTriple φ₃ φ₁₂₃", " φ₁₂.CompTriple φ₃ φ₁₂₃", " φ₃.comp φ₁₂ = φ₁₂...
[ " Οƒ = id M", " Οƒ x✝ = (id M) x✝", " ψ.comp Ο† = ψ", " ψ.comp Ο† = Ο†", " ψ.comp Ο† = Ο‡", " _root_.id = ⇑(id M)", " β‡‘Οˆ ∘ ⇑φ = ⇑χ", " ψ (Ο† x) = Ο‡ x" ]
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
451
453
theorem toNonUnitalNonAssocRing_injective : Function.Injective (@toNonUnitalNonAssocRing 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.Order.BoundedOrder #align_import data.prod.lex from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± Ξ² Ξ³ : Type*} namespace Prod.Lex @[inherit_doc] notation:35 Ξ± " Γ—β‚— " Ξ²:34 => Lex (Prod Ξ± Ξ²) instance decidableEq (Ξ± Ξ² : Type*) [DecidableEq Ξ±] [DecidableEq Ξ²] ...
Mathlib/Data/Prod/Lex.lean
105
109
theorem monotone_fst [Preorder Ξ±] [LE Ξ²] (t c : Ξ± Γ—β‚— Ξ²) (h : t ≀ c) : (ofLex t).1 ≀ (ofLex c).1 := by
cases (Prod.Lex.le_iff t c).mp h with | inl h' => exact h'.le | inr h' => exact h'.1.le
[ " (a₁, b₁) < (aβ‚‚, bβ‚‚) ↔ (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) < (aβ‚‚, bβ‚‚) β†’ (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) ≀ (aβ‚‚, bβ‚‚)", " Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " False", " aβ‚‚ < a₁", " (a₁, b₁) ≀ (a₁, bβ‚‚) ∧ Β¬(a₁, bβ‚‚) ≀ (a₁, b₁)",...
[ " (a₁, b₁) < (aβ‚‚, bβ‚‚) ↔ (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) < (aβ‚‚, bβ‚‚) β†’ (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) ≀ (aβ‚‚, bβ‚‚) ∧ Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " (a₁, b₁) ≀ (aβ‚‚, bβ‚‚)", " Β¬(aβ‚‚, bβ‚‚) ≀ (a₁, b₁)", " False", " aβ‚‚ < a₁", " (a₁, b₁) ≀ (a₁, bβ‚‚) ∧ Β¬(a₁, bβ‚‚) ≀ (a₁, b₁)",...
import Mathlib.Tactic.CategoryTheory.Reassoc #align_import category_theory.isomorphism from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6" universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. namespace CategoryTheory open Category structure Iso {...
Mathlib/CategoryTheory/Iso.lean
117
117
theorem symm_symm_eq {X Y : C} (Ξ± : X β‰… Y) : Ξ±.symm.symm = Ξ± := by
cases Ξ±; rfl
[ " Ξ±.inv = Ξ±.inv ≫ Ξ².hom ≫ Ξ².inv", " Ξ±.inv ≫ Ξ².hom ≫ Ξ².inv = (Ξ±.inv ≫ Ξ±.hom) ≫ Ξ².inv", " (Ξ±.inv ≫ Ξ±.hom) ≫ Ξ².inv = Ξ².inv", " Ξ± = Ξ²", " { hom := hom✝, inv := inv✝, hom_inv_id := hom_inv_id✝, inv_hom_id := inv_hom_id✝ } = Ξ²", " { hom := hom✝¹, inv := inv✝¹, hom_inv_id := hom_inv_id✝¹, inv_hom_id := inv_hom_i...
[ " Ξ±.inv = Ξ±.inv ≫ Ξ².hom ≫ Ξ².inv", " Ξ±.inv ≫ Ξ².hom ≫ Ξ².inv = (Ξ±.inv ≫ Ξ±.hom) ≫ Ξ².inv", " (Ξ±.inv ≫ Ξ±.hom) ≫ Ξ².inv = Ξ².inv", " Ξ± = Ξ²", " { hom := hom✝, inv := inv✝, hom_inv_id := hom_inv_id✝, inv_hom_id := inv_hom_id✝ } = Ξ²", " { hom := hom✝¹, inv := inv✝¹, hom_inv_id := hom_inv_id✝¹, inv_hom_id := inv_hom_i...
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
90
92
theorem toNonUnitalNonAssocSemiring_injective : Function.Injective (@toNonUnitalNonAssocSemiring R) := by
rintro ⟨⟩ ⟨⟩ _; congr
[ " Function.Injective (@toNonUnitalNonAssocSemiring R)", " mk mul_assoc✝¹ = mk mul_assoc✝" ]
[]
import Mathlib.RingTheory.WittVector.Basic import Mathlib.RingTheory.WittVector.IsPoly #align_import ring_theory.witt_vector.init_tail from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" variable {p : β„•} [hp : Fact p.Prime] (n : β„•) {R : Type*} [CommRing R] -- type as `\bbW` local notat...
Mathlib/RingTheory/WittVector/InitTail.lean
88
109
theorem select_add_select_not : βˆ€ x : π•Ž R, select P x + select (fun i => Β¬P i) x = x := by
-- Porting note: TC search was insufficient to find this instance, even though all required -- instances exist. See zulip: [https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/WittVector.20saga/near/370073526] have : IsPoly p fun {R} [CommRing R] x ↦ select P x + select (fun i ↦ Β¬P i) x := ...
[ " (select P x).coeff n = (aeval x.coeff) (selectPoly P n)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)", " { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef...
[ " (select P x).coeff n = (aeval x.coeff) (selectPoly P n)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (if P n then X n else 0)", " (mk p fun n => if P n then x.coeff n else 0).coeff n = (aeval x.coeff) (X n)", " { coeff := fun n => if P n then x.coeff n else 0 }.coeff n = x.coef...
import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Tactic.ClearExclamation import Mathlib.Data.Nat.Cast.Basic set_option autoImplicit true namespace Mathlib open Lean hidi...
Mathlib/Tactic/NormNum/Basic.lean
125
126
theorem isintCast {R} [Ring R] (n m : β„€) : IsInt n m β†’ IsInt (n : R) m := by
rintro ⟨⟨⟩⟩; exact ⟨rfl⟩
[ " (↑(Int.negOfNat a✝)).natAbs = ↑a✝", " IsNat n m β†’ IsNat (↑n) m", " IsNat (↑↑m) m", " ↑↑m = ↑m", " IsInt n m β†’ IsInt (↑n) m", " IsInt (↑↑m) m" ]
[ " (↑(Int.negOfNat a✝)).natAbs = ↑a✝", " IsNat n m β†’ IsNat (↑n) m", " IsNat (↑↑m) m", " ↑↑m = ↑m" ]
import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.RingTheory.MvPolynomial.Basic #align_import field_theory.mv_polynomial from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f" noncomputable section open scoped Classical ...
Mathlib/FieldTheory/MvPolynomial.lean
34
40
theorem quotient_mk_comp_C_injective (I : Ideal (MvPolynomial Οƒ K)) (hI : I β‰  ⊀) : Function.Injective ((Ideal.Quotient.mk I).comp MvPolynomial.C) := by
refine (injective_iff_map_eq_zero _).2 fun x hx => ?_ rw [RingHom.comp_apply, Ideal.Quotient.eq_zero_iff_mem] at hx refine _root_.by_contradiction fun hx0 => absurd (I.eq_top_iff_one.2 ?_) hI have := I.mul_mem_left (MvPolynomial.C x⁻¹) hx rwa [← MvPolynomial.C.map_mul, inv_mul_cancel hx0, MvPolynomial.C_1] a...
[ " Function.Injective ⇑((Ideal.Quotient.mk I).comp C)", " x = 0", " 1 ∈ I" ]
[]
import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N ...
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
53
56
theorem FiniteDimensional.rank_linearMap : Module.rank S (M β†’β‚—[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul, ← finrank_eq_card_chooseBasisIndex, ← finrank_eq_rank R, lift_natCast]
[ " Module.rank S (M β†’β‚—[R] N) = lift.{w, v} (Module.rank R M) * lift.{v, w} (Module.rank S N)" ]
[]
import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Algebra.Order.Interval.Set.Monoid import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax #align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c...
Mathlib/Data/Set/Pointwise/Interval.lean
197
198
theorem preimage_add_const_Ico : (fun x => x + a) ⁻¹' Ico b c = Ico (b - a) (c - a) := by
simp [← Ici_inter_Iio]
[ " (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)", " (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)", " (fun x => x + a) ⁻¹' Ico b c ...
[ " (fun x => a + x) ⁻¹' Icc b c = Icc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ico b c = Ico (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioc b c = Ioc (b - a) (c - a)", " (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)", " (fun x => x + a) ⁻¹' Icc b c = Icc (b - a) (c - a)" ]
import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace ZMod section QuadCharModP @[simps] def Ο‡β‚„ : MulChar (ZMod 4) β„€...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
48
52
theorem isQuadratic_Ο‡β‚„ : Ο‡β‚„.IsQuadratic := by
intro a -- Porting note (#11043): was `decide!` fin_cases a all_goals decide
[ " βˆ€ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun y", " βˆ€ (a : ZMod 4), Β¬IsUnit a β†’ (↑{ toFun := ![0, 1, 0, -1], map_one' := β‹―, map_mul' := β‹― }).toFun a = 0", " Ο‡β‚„.IsQua...
[ " βˆ€ (x y : ZMod 4),\n { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun (x * y) =\n { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun x * { toFun := ![0, 1, 0, -1], map_one' := β‹― }.toFun y", " βˆ€ (a : ZMod 4), Β¬IsUnit a β†’ (↑{ toFun := ![0, 1, 0, -1], map_one' := β‹―, map_mul' := β‹― }).toFun a = 0" ]
import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.continuants_recurrence from "leanprover-community/mathlib"@"5f11361a98ae4acd77f5c1837686f6f0102cdc25" namespace GeneralizedContinuedFraction variable {K : Type*} {g : GeneralizedContinuedFraction K} {n : β„•} [Division...
Mathlib/Algebra/ContinuedFractions/ContinuantsRecurrence.lean
50
59
theorem numerators_recurrence {gp : Pair K} {ppredA predA : K} (succ_nth_s_eq : g.s.get? (n + 1) = some gp) (nth_num_eq : g.numerators n = ppredA) (succ_nth_num_eq : g.numerators (n + 1) = predA) : g.numerators (n + 2) = gp.b * predA + gp.a * ppredA := by
obtain ⟨ppredConts, nth_conts_eq, ⟨rfl⟩⟩ : βˆƒ conts, g.continuants n = conts ∧ conts.a = ppredA := exists_conts_a_of_num nth_num_eq obtain ⟨predConts, succ_nth_conts_eq, ⟨rfl⟩⟩ : βˆƒ conts, g.continuants (n + 1) = conts ∧ conts.a = predA := exists_conts_a_of_num succ_nth_num_eq rw [num_eq_conts_a, con...
[ " g.continuantsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }", " g.continuants (n + 1) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }", " g.continuants (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred....
[ " g.continuantsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }", " g.continuants (n + 1) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }", " g.continuants (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred....
import Mathlib.Data.Finset.Pointwise import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.DFinsupp.Order import Mathlib.Order.Interval.Finset.Basic #align_import data.dfinsupp.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open DFinsupp Finset open Pointwise vari...
Mathlib/Data/DFinsupp/Interval.lean
48
58
theorem mem_dfinsupp_iff : f ∈ s.dfinsupp t ↔ f.support βŠ† s ∧ βˆ€ i ∈ s, f i ∈ t i := by
refine mem_map.trans ⟨?_, ?_⟩ · rintro ⟨f, hf, rfl⟩ rw [Function.Embedding.coeFn_mk] -- Porting note: added to avoid heartbeat timeout refine ⟨support_mk_subset, fun i hi => ?_⟩ convert mem_pi.1 hf i hi exact mk_of_mem hi · refine fun h => ⟨fun i _ => f i, mem_pi.2 h.2, ?_⟩ ext i dsimp ...
[ " Function.Injective fun f => DFinsupp.mk s fun i => f ↑i β‹―", " f = g", " f i hi = g i hi", " f ∈ s.dfinsupp t ↔ f.support βŠ† s ∧ βˆ€ i ∈ s, f i ∈ t i", " (βˆƒ a ∈ s.pi t, { toFun := fun f => DFinsupp.mk s fun i => f ↑i β‹―, inj' := β‹― } a = f) β†’\n f.support βŠ† s ∧ βˆ€ i ∈ s, f i ∈ t i", " ({ toFun := fun f => DF...
[ " Function.Injective fun f => DFinsupp.mk s fun i => f ↑i β‹―", " f = g", " f i hi = g i hi" ]
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.PolarCoord import Mathlib.Analysis.Convex.Complex #align_import analysis.special_functions.gaussian from "leanprover-community/mathlib"@"7982767093ae38cba236487f9c9dd9cd99f63c16" noncomputable section open Real Set Measu...
Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
91
102
theorem integrableOn_rpow_mul_exp_neg_mul_rpow {p s b : ℝ} (hs : -1 < s) (hp : 1 ≀ p) (hb : 0 < b) : IntegrableOn (fun x : ℝ => x ^ s * exp (- b * x ^ p)) (Ioi 0) := by
have hib : 0 < b ^ (-p⁻¹) := rpow_pos_of_pos hb _ suffices IntegrableOn (fun x ↦ (b ^ (-p⁻¹)) ^ s * (x ^ s * exp (-x ^ p))) (Ioi 0) by rw [show 0 = b ^ (-p⁻¹) * 0 by rw [mul_zero], ← integrableOn_Ioi_comp_mul_left_iff _ _ hib] refine this.congr_fun (fun _ hx => ?_) measurableSet_Ioi rw [← mul_assoc, mu...
[ " (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - -b * x ^ p) atTop atTop", " (fun x => x * (b * x ^ (p - 1) + -1)) =αΆ [atTop] fun x => -x - -b * x ^ p", " x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p", " x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p", " b * x ^ p + -x =...
[ " (fun x => rexp (-b * x ^ p)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - -b * x ^ p) atTop atTop", " (fun x => x * (b * x ^ (p - 1) + -1)) =αΆ [atTop] fun x => -x - -b * x ^ p", " x * (b * x ^ (p - 1) + -1) = -x - -b * x ^ p", " x * (b * (x ^ p / x) + -1) = -x - -b * x ^ p", " b * x ^ p + -x =...
import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Ideal.Over import Mathlib.RingTheory.JacobsonIdeal #align_import ring_theory.jacobson from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0" set_option autoImplicit true universe u namespace Ideal open Polynomial ...
Mathlib/RingTheory/Jacobson.lean
132
148
theorem isJacobson_of_isIntegral [Algebra R S] [Algebra.IsIntegral R S] (hR : IsJacobson R) : IsJacobson S := by
rw [isJacobson_iff_prime_eq] intro P hP by_cases hP_top : comap (algebraMap R S) P = ⊀ · simp [comap_eq_top_iff.1 hP_top] · haveI : Nontrivial (R ⧸ comap (algebraMap R S) P) := Quotient.nontrivial hP_top rw [jacobson_eq_iff_jacobson_quotient_eq_bot] refine eq_bot_of_comap_eq_bot (R := R ⧸ comap (alge...
[ " IsJacobson R ↔ βˆ€ (P : Ideal R), P.IsPrime β†’ P.jacobson = P", " (βˆ€ (P : Ideal R), P.IsPrime β†’ P.jacobson = P) β†’ βˆ€ (I : Ideal R), I.IsRadical β†’ I.jacobson = I", " x ∈ I", " βˆ€ ⦃I_1 : Ideal R⦄, I_1 ∈ {J | I ≀ J ∧ J.IsPrime} β†’ x ∈ I_1", " x ∈ P", " βˆ€ ⦃I : Ideal R⦄, I ∈ {J | P ≀ J ∧ J.IsMaximal} β†’ x ∈ I", "...
[ " IsJacobson R ↔ βˆ€ (P : Ideal R), P.IsPrime β†’ P.jacobson = P", " (βˆ€ (P : Ideal R), P.IsPrime β†’ P.jacobson = P) β†’ βˆ€ (I : Ideal R), I.IsRadical β†’ I.jacobson = I", " x ∈ I", " βˆ€ ⦃I_1 : Ideal R⦄, I_1 ∈ {J | I ≀ J ∧ J.IsPrime} β†’ x ∈ I_1", " x ∈ P", " βˆ€ ⦃I : Ideal R⦄, I ∈ {J | P ≀ J ∧ J.IsMaximal} β†’ x ∈ I", "...
import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Algebra.Order.Interval.Set.Monoid import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax #align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c...
Mathlib/Data/Set/Pointwise/Interval.lean
56
58
theorem Ici_mul_Ici_subset' (a b : Ξ±) : Ici a * Ici b βŠ† Ici (a * b) := by
rintro x ⟨y, hya, z, hzb, rfl⟩ exact mul_le_mul' hya hzb
[ " Icc a b * Icc c d βŠ† Icc (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Icc (a * c) (b * d)", " Iic a * Iic b βŠ† Iic (a * b)", " (fun x x_1 => x * x_1) y z ∈ Iic (a * b)", " Ici a * Ici b βŠ† Ici (a * b)", " (fun x x_1 => x * x_1) y z ∈ Ici (a * b)" ]
[ " Icc a b * Icc c d βŠ† Icc (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Icc (a * c) (b * d)", " Iic a * Iic b βŠ† Iic (a * b)", " (fun x x_1 => x * x_1) y z ∈ Iic (a * b)" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Function Filter Set open scoped Topology name...
Mathlib/Analysis/SpecialFunctions/Arsinh.lean
168
168
theorem arsinh_nonpos_iff : arsinh x ≀ 0 ↔ x ≀ 0 := by
rw [← sinh_le_sinh, sinh_zero, sinh_arsinh]
[ " rexp x.arsinh = x + √(1 + x ^ 2)", " 0 < x + √(1 + x ^ 2)", " -x < √(1 + x ^ 2)", " (-x) ^ 2 < 1 + x ^ 2", " arsinh 0 = 0", " (-x).arsinh = -x.arsinh", " -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹", " (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1", " 0 ≀ 1 + x ^ 2", " x.arsinh.sinh = x", " ...
[ " rexp x.arsinh = x + √(1 + x ^ 2)", " 0 < x + √(1 + x ^ 2)", " -x < √(1 + x ^ 2)", " (-x) ^ 2 < 1 + x ^ 2", " arsinh 0 = 0", " (-x).arsinh = -x.arsinh", " -x + √(1 + (-x) ^ 2) = (x + √(1 + x ^ 2))⁻¹", " (-x + √(1 + (-x) ^ 2)) * (x + √(1 + x ^ 2)) = 1", " 0 ≀ 1 + x ^ 2", " x.arsinh.sinh = x", " ...
import Mathlib.GroupTheory.Coxeter.Length import Mathlib.Data.ZMod.Parity namespace CoxeterSystem open List Matrix Function variable {B : Type*} variable {W : Type*} [Group W] variable {M : CoxeterMatrix B} (cs : CoxeterSystem M W) local prefix:100 "s" => cs.simple local prefix:100 "Ο€" => cs.wordProd local prefi...
Mathlib/GroupTheory/Coxeter/Inversion.lean
76
78
theorem inv : t⁻¹ = t := by
rcases ht with ⟨w, i, rfl⟩ simp [mul_assoc]
[ " cs.IsReflection (cs.simple i)", " cs.simple i = 1 * cs.simple i * 1⁻¹", " t ^ 2 = 1", " (w * cs.simple i * w⁻¹) ^ 2 = 1", " t * t = 1", " w * cs.simple i * w⁻¹ * (w * cs.simple i * w⁻¹) = 1", " t⁻¹ = t", " (w * cs.simple i * w⁻¹)⁻¹ = w * cs.simple i * w⁻¹" ]
[ " cs.IsReflection (cs.simple i)", " cs.simple i = 1 * cs.simple i * 1⁻¹", " t ^ 2 = 1", " (w * cs.simple i * w⁻¹) ^ 2 = 1", " t * t = 1", " w * cs.simple i * w⁻¹ * (w * cs.simple i * w⁻¹) = 1" ]
import Mathlib.Algebra.FreeMonoid.Basic #align_import algebra.free_monoid.count from "leanprover-community/mathlib"@"a2d2e18906e2b62627646b5d5be856e6a642062f" variable {Ξ± : Type*} (p : Ξ± β†’ Prop) [DecidablePred p] namespace FreeAddMonoid def countP : FreeAddMonoid Ξ± β†’+ β„• where toFun := List.countP p map_zero...
Mathlib/Algebra/FreeMonoid/Count.lean
31
32
theorem countP_of (x : Ξ±) : countP p (of x) = if p x = true then 1 else 0 := by
simp [countP, List.countP, List.countP.go]
[ " (countP p) (of x) = if p x = (true = true) then 1 else 0" ]
[]
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
195
196
theorem logb_le_logb (h : 0 < x) (h₁ : 0 < y) : logb b x ≀ logb b y ↔ x ≀ y := by
rw [logb, logb, div_le_div_right (log_pos hb), log_le_log_iff 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", " ((a * b).logb c)⁻¹ = (a.logb c)⁻¹ + (b.logb c)⁻¹", " c.logb ...
import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Algebra.GCDMonoid.Nat #align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
Mathlib/RingTheory/Int/Basic.lean
88
90
theorem Int.Prime.dvd_mul {m n : β„€} {p : β„•} (hp : Nat.Prime p) (h : (p : β„€) ∣ m * n) : p ∣ m.natAbs ∨ p ∣ n.natAbs := by
rwa [← hp.dvd_mul, ← Int.natAbs_mul, ← Int.natCast_dvd]
[ " p ∣ m.natAbs ∨ p ∣ n.natAbs" ]
[]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² Ξ³ : Type*} section DenselyOrdered variable [TopologicalSpace Ξ±] [LinearOrder Ξ±] [OrderTopology Ξ±] [DenselyOrdered Ξ±] {a b : Ξ±} {s : Set Ξ±} theorem closure_Ioi' {a : Ξ±} (h : (Io...
Mathlib/Topology/Order/DenselyOrdered.lean
146
147
theorem Ico_subset_closure_interior (a b : Ξ±) : Ico a b βŠ† closure (interior (Ico a b)) := by
simpa only [dual_Ioc] using Ioc_subset_closure_interior (OrderDual.toDual b) (OrderDual.toDual a)
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
[ " closure (Ioi a) = Ici a", " closure (Ioi a) βŠ† Ici a", " Ici a βŠ† closure (Ioi a)", " a ∈ closure (Ioi a)", " closure (Ioo a b) = Icc a b", " closure (Ioo a b) βŠ† Icc a b", " Icc a b βŠ† closure (Ioo a b)", " {a, b} βŠ† closure (Ioo a b)", " a ∈ closure (Ioo a b) ∧ b ∈ closure (Ioo a b)", " βˆ… βŠ† closure...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
487
492
theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x) (hu : HasDerivWithinAt u u' s x) : HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by
have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
[ " HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x", " HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (...
[ " HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x", " HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x", " HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (...
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Algebra.Lie.Quotient #align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" variable {R L M M' : Type*} variable [CommRing R] [LieRing L] [LieAlgebra R L] varia...
Mathlib/Algebra/Lie/Normalizer.lean
75
78
theorem monotone_normalizer : Monotone (normalizer : LieSubmodule R L M β†’ LieSubmodule R L M) := by
intro N₁ Nβ‚‚ h m hm rw [mem_normalizer] at hm ⊒ exact fun x => h (hm x)
[ " ⁅x, a✝ + bβœβ† ∈ N", " ⁅x, aβœβ† + ⁅x, bβœβ† ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t β€’ m⁆ ∈ N", " t β€’ ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≀ N.normalizer", " m ∈ N.normalizer", " βˆ€ (x : L), ⁅x, m⁆ ∈ N", " (N₁ βŠ“ Nβ‚‚).normalizer = N₁.normalizer βŠ“ Nβ‚‚.normalizer", " m✝ ∈ (N₁ βŠ“ Nβ‚‚...
[ " ⁅x, a✝ + bβœβ† ∈ N", " ⁅x, aβœβ† + ⁅x, bβœβ† ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t β€’ m⁆ ∈ N", " t β€’ ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≀ N.normalizer", " m ∈ N.normalizer", " βˆ€ (x : L), ⁅x, m⁆ ∈ N", " (N₁ βŠ“ Nβ‚‚).normalizer = N₁.normalizer βŠ“ Nβ‚‚.normalizer", " m✝ ∈ (N₁ βŠ“ Nβ‚‚...
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ΞΉ : Type _} {Ξ± : ΞΉ β†’ Type _} section cylinder def cylinder (s : Finset ΞΉ) (S : Set (βˆ€ i : s, Ξ±...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
197
203
theorem union_cylinder (s₁ sβ‚‚ : Finset ΞΉ) (S₁ : Set (βˆ€ i : s₁, Ξ± i)) (Sβ‚‚ : Set (βˆ€ i : sβ‚‚, Ξ± i)) [DecidableEq ΞΉ] : cylinder s₁ S₁ βˆͺ cylinder sβ‚‚ Sβ‚‚ = cylinder (s₁ βˆͺ sβ‚‚) ((fun f ↦ fun j : s₁ ↦ f ⟨j, Finset.mem_union_left sβ‚‚ j.prop⟩) ⁻¹' S₁ βˆͺ (fun f ↦ fun j : sβ‚‚ ↦ f ⟨j, Finset.mem_union_righ...
ext1 f; simp only [mem_union, mem_cylinder, mem_setOf_eq]; rfl
[ " cylinder s βˆ… = βˆ…", " cylinder s univ = univ", " cylinder s S = βˆ… ↔ S = βˆ…", " cylinder s S = βˆ…", " S = βˆ…", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder sβ‚‚ Sβ‚‚ = cylinder (s₁ βˆͺ sβ‚‚) ((fun f j => f βŸ¨β†‘j, β‹―βŸ©) ⁻¹' S₁ ∩ (fun f j => f βŸ¨β†‘j, β‹―βŸ©) ⁻¹' Sβ‚‚)", " f ∈ cylind...
[ " cylinder s βˆ… = βˆ…", " cylinder s univ = univ", " cylinder s S = βˆ… ↔ S = βˆ…", " cylinder s S = βˆ…", " S = βˆ…", " False", " f' ∈ cylinder s S", " (fun i => f' ↑i) ∈ S", " cylinder s₁ S₁ ∩ cylinder sβ‚‚ Sβ‚‚ = cylinder (s₁ βˆͺ sβ‚‚) ((fun f j => f βŸ¨β†‘j, β‹―βŸ©) ⁻¹' S₁ ∩ (fun f j => f βŸ¨β†‘j, β‹―βŸ©) ⁻¹' Sβ‚‚)", " f ∈ cylind...
import Mathlib.ModelTheory.ElementaryMaps open FirstOrder namespace FirstOrder namespace Language open Structure variable {L : Language} {M : Type*} {N : Type*} {P : Type*} {Q : Type*} variable [L.Structure M] [L.Structure N] [L.Structure P] [L.Structure Q] def Substructure.IsElementary (S : L.Substructure M...
Mathlib/ModelTheory/ElementarySubstructures.lean
111
112
theorem theory_model_iff (S : L.ElementarySubstructure M) (T : L.Theory) : S ⊨ T ↔ M ⊨ T := by
simp only [Theory.model_iff, realize_sentence]
[ " { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'✝ }", " β†₯S ⊨ T ↔ M ⊨ T" ]
[ " { toSubstructure := { carrier := s, fun_mem := hs1 }, isElementary' := hs2 } =\n { toSubstructure := { carrier := t, fun_mem := ht1 }, isElementary' := isElementary'✝ }" ]
import Mathlib.Probability.Kernel.MeasurableIntegral #align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b" open MeasureTheory open scoped ENNReal namespace ProbabilityTheory namespace kernel variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}...
Mathlib/Probability/Kernel/Composition.lean
158
169
theorem measurable_compProdFun_of_finite (ΞΊ : kernel Ξ± Ξ²) [IsFiniteKernel ΞΊ] (Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³) [IsFiniteKernel Ξ·] (hs : MeasurableSet s) : Measurable fun a => compProdFun ΞΊ Ξ· a s := by
simp only [compProdFun] have h_meas : Measurable (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) := by have : (Function.uncurry fun a b => η (a, b) {c : γ | (b, c) ∈ s}) = fun p => η p {c : γ | (p.2, c) ∈ s} := by ext1 p rw [Function.uncurry_apply_pair] rw [this] e...
[ " compProdFun ΞΊ Ξ· a βˆ… = 0", " compProdFun ΞΊ Ξ· a (⋃ i, f i) = βˆ‘' (i : β„•), compProdFun ΞΊ Ξ· a (f i)", " (fun b => (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i}) = fun b => (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i} = (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " c ∈ {c | (b, c) ∈ ⋃ i, f i} ↔ c...
[ " compProdFun ΞΊ Ξ· a βˆ… = 0", " compProdFun ΞΊ Ξ· a (⋃ i, f i) = βˆ‘' (i : β„•), compProdFun ΞΊ Ξ· a (f i)", " (fun b => (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i}) = fun b => (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " (Ξ· (a, b)) {c | (b, c) ∈ ⋃ i, f i} = (Ξ· (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " c ∈ {c | (b, c) ∈ ⋃ i, f i} ↔ c...
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
286
293
theorem PartiallyWellOrderedOn.union (hs : s.PartiallyWellOrderedOn r) (ht : t.PartiallyWellOrderedOn r) : (s βˆͺ t).PartiallyWellOrderedOn r := by
rintro f hf rcases Nat.exists_subseq_of_forall_mem_union f hf with ⟨g, hgs | hgt⟩ · rcases hs _ hgs with ⟨m, n, hlt, hr⟩ exact ⟨g m, g n, g.strictMono hlt, hr⟩ · rcases ht _ hgt with ⟨m, n, hlt, hr⟩ exact ⟨g m, g n, g.strictMono hlt, hr⟩
[ " (s βˆͺ t).PartiallyWellOrderedOn r", " βˆƒ m n, m < n ∧ r (f m) (f n)" ]
[]
import Mathlib.Analysis.InnerProductSpace.Calculus import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.euclidean_dist from "leanprover-community/mathlib"@"9425b6f8220e53b059f5a4904786c3c4b50fc057" open scoped Topology open Set variable {E : Type*} [AddCommGroup E] [Topologi...
Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean
82
84
theorem closedBall_eq_image (x : E) (r : ℝ) : closedBall x r = toEuclidean.symm '' Metric.closedBall (toEuclidean x) r := by
rw [toEuclidean.image_symm_eq_preimage, closedBall_eq_preimage]
[ " closedBall x r = ⇑toEuclidean.symm '' Metric.closedBall (toEuclidean x) r" ]
[]
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
80
81
theorem pairwise_of_forall {l : List Ξ±} (H : βˆ€ x y, R x y) : Pairwise R l := by
induction l <;> 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.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic #align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" noncomputable section open FiniteDimensional Complex open scoped ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
140
140
theorem rotation_zero : o.rotation 0 = LinearIsometryEquiv.refl ℝ V := by
ext; simp [rotation]
[ " βˆ€ (x y : V),\n βŸͺ(ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n βŸͺx, y⟫_ℝ", " βŸͺ(ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.r...
[ " βˆ€ (x y : V),\n βŸͺ(ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n βŸͺx, y⟫_ℝ", " βŸͺ(ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.rightAngleRotation.toLinearEquiv) x,\n (ΞΈ.cos β€’ LinearMap.id + ΞΈ.sin β€’ ↑o.r...
import Mathlib.Data.ENNReal.Real #align_import data.real.conjugate_exponents from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open scoped ENNReal namespace Real @[mk_iff] structure IsConjExponent (p q : ℝ) : Prop where one_lt : 1 < p inv_add_inv_conj : p⁻...
Mathlib/Data/Real/ConjExponents.lean
85
88
theorem conj_eq : q = p / (p - 1) := by
have := h.inv_add_inv_conj rw [← eq_sub_iff_add_eq', inv_eq_iff_eq_inv] at this field_simp [this, h.ne_zero]
[ " q = p / (p - 1)" ]
[]
import Mathlib.Geometry.Euclidean.Angle.Oriented.Affine import Mathlib.Geometry.Euclidean.Angle.Unoriented.RightAngle #align_import geometry.euclidean.angle.oriented.right_angle from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped EuclideanGeometry ope...
Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
36
42
theorem oangle_add_right_eq_arccos_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(Ο€ / 2)) : o.oangle x (x + y) = Real.arccos (β€–xβ€– / β€–x + yβ€–) := by
have hs : (o.oangle x (x + y)).sign = 1 := by rw [oangle_sign_add_right, h, Real.Angle.sign_coe_pi_div_two] rw [o.oangle_eq_angle_of_sign_eq_one hs, InnerProductGeometry.angle_add_eq_arccos_of_inner_eq_zero (o.inner_eq_zero_of_oangle_eq_pi_div_two h)]
[ " o.oangle x (x + y) = ↑(β€–xβ€– / β€–x + yβ€–).arccos", " (o.oangle x (x + y)).sign = 1" ]
[]
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
89
94
theorem EventuallyLE.countable_bUnion {ΞΉ : 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 [biUnion_eq_iUnion] haveI := hS.toEncodable exact EventuallyLE.countable_iUnion 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.Topology.ContinuousFunction.Basic #align_import topology.compact_open from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter TopologicalSpace open scoped Topology namespace ContinuousMap section CompactOpen variable {Ξ± X Y Z T : Type*} variable [Topologica...
Mathlib/Topology/CompactOpen.lean
129
138
theorem continuous_comp' : Continuous fun x : C(X, Y) Γ— C(Y, Z) => x.2.comp x.1 := by
simp_rw [continuous_iff_continuousAt, ContinuousAt, tendsto_nhds_compactOpen] intro ⟨f, g⟩ K hK U hU (hKU : MapsTo (g ∘ f) K U) obtain ⟨L, hKL, hLc, hLU⟩ : βˆƒ L ∈ 𝓝˒ (f '' K), IsCompact L ∧ MapsTo g L U := exists_mem_nhdsSet_isCompact_mapsTo g.continuous (hK.image f.continuous) hU (mapsTo_image_iff.2 h...
[ " 𝓝 f = β¨… K, β¨… (_ : IsCompact K), β¨… U, β¨… (_ : IsOpen U), β¨… (_ : MapsTo (⇑f) K U), π“Ÿ {g | MapsTo (⇑g) K U}", " Tendsto f l (𝓝 g) ↔\n βˆ€ (K : Set Y), IsCompact K β†’ βˆ€ (U : Set Z), IsOpen U β†’ MapsTo (⇑g) K U β†’ βˆ€αΆ  (a : Ξ±) in l, MapsTo (⇑(f a)) K U", " compactOpen = induced g.comp compactOpen", " IsOpen {x | M...
[ " 𝓝 f = β¨… K, β¨… (_ : IsCompact K), β¨… U, β¨… (_ : IsOpen U), β¨… (_ : MapsTo (⇑f) K U), π“Ÿ {g | MapsTo (⇑g) K U}", " Tendsto f l (𝓝 g) ↔\n βˆ€ (K : Set Y), IsCompact K β†’ βˆ€ (U : Set Z), IsOpen U β†’ MapsTo (⇑g) K U β†’ βˆ€αΆ  (a : Ξ±) in l, MapsTo (⇑(f a)) K U", " compactOpen = induced g.comp compactOpen", " IsOpen {x | M...
import Mathlib.CategoryTheory.Preadditive.Basic #align_import category_theory.preadditive.functor_category from "leanprover-community/mathlib"@"829895f162a1f29d0133f4b3538f4cd1fb5bffd3" namespace CategoryTheory open CategoryTheory.Limits Preadditive variable {C D : Type*} [Category C] [Category D] [Preadditive D...
Mathlib/CategoryTheory/Preadditive/FunctorCategory.lean
123
124
theorem app_units_zsmul (X : C) (Ξ± : F ⟢ G) (n : β„€Λ£) : (n β€’ Ξ±).app X = n β€’ Ξ±.app X := by
apply app_zsmul
[ " βˆ€ (a b c : F ⟢ G), a + b + c = a + (b + c)", " a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)", " (a✝ + b✝ + c✝).app x✝ = (a✝ + (b✝ + c✝)).app x✝", " βˆ€ (a : F ⟢ G), 0 + a = a", " 0 + a✝ = a✝", " (0 + a✝).app x✝ = a✝.app x✝", " βˆ€ (a : F ⟢ G), a + 0 = a", " a✝ + 0 = a✝", " (a✝ + 0).app x✝ = a✝.app x✝", " βˆ€ (a b : ...
[ " βˆ€ (a b c : F ⟢ G), a + b + c = a + (b + c)", " a✝ + b✝ + c✝ = a✝ + (b✝ + c✝)", " (a✝ + b✝ + c✝).app x✝ = (a✝ + (b✝ + c✝)).app x✝", " βˆ€ (a : F ⟢ G), 0 + a = a", " 0 + a✝ = a✝", " (0 + a✝).app x✝ = a✝.app x✝", " βˆ€ (a : F ⟢ G), a + 0 = a", " a✝ + 0 = a✝", " (a✝ + 0).app x✝ = a✝.app x✝", " βˆ€ (a b : ...
import Mathlib.Analysis.Convex.Gauge import Mathlib.Analysis.Convex.Normed open Metric Bornology Filter Set open scoped NNReal Topology Pointwise noncomputable section section Module variable {E : Type*} [AddCommGroup E] [Module ℝ E] def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) β€’ x the...
Mathlib/Analysis/Convex/GaugeRescale.lean
75
80
theorem gaugeRescale_gaugeRescale {s t u : Set E} (hta : Absorbent ℝ t) (htb : IsVonNBounded ℝ t) (x : E) : gaugeRescale t u (gaugeRescale s t x) = gaugeRescale s u x := by
rcases eq_or_ne x 0 with rfl | hx; Β· simp rw [gaugeRescale_def s t x, gaugeRescale_smul, gaugeRescale, gaugeRescale, smul_smul, div_mul_div_cancel] exacts [((gauge_pos hta htb).2 hx).ne', div_nonneg (gauge_nonneg _) (gauge_nonneg _)]
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x", " gauge t (gaugeRescale s t 0) = gauge s 0", " ga...
[ " gaugeRescale s t (c β€’ x) = c β€’ gaugeRescale s t x", " (c * gauge s x / (c * gauge t x) * c) β€’ x = (c * (gauge s x / gauge t x)) β€’ x", " gaugeRescale s s x = x", " gaugeRescale s s 0 = 0", " gauge s x β‰  0", " gauge t (gaugeRescale s t x) = gauge s x", " gauge t (gaugeRescale s t 0) = gauge s 0", " ga...
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.SetTheory.Cardinal.Cofinality #align_import linear_algebra.basis from "leanprover-communit...
Mathlib/LinearAlgebra/Basis.lean
154
158
theorem repr_symm_apply (v) : b.repr.symm v = Finsupp.total ΞΉ M R b v := calc b.repr.symm v = b.repr.symm (v.sum Finsupp.single) := by
simp _ = v.sum fun i vi => b.repr.symm (Finsupp.single i vi) := map_finsupp_sum .. _ = Finsupp.total ΞΉ M R b v := by simp only [repr_symm_single, Finsupp.total_apply]
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
import Mathlib.Algebra.Group.Embedding import Mathlib.Data.Fin.Basic import Mathlib.Data.Finset.Union #align_import data.finset.image from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" -- TODO -- assert_not_exists OrderedCommMonoid assert_not_exists MonoidWithZero assert_not_exists MulA...
Mathlib/Data/Finset/Image.lean
81
86
theorem mem_map_equiv {f : Ξ± ≃ Ξ²} {b : Ξ²} : b ∈ s.map f.toEmbedding ↔ f.symm b ∈ s := by
rw [mem_map] exact ⟨by rintro ⟨a, H, rfl⟩ simpa, fun h => ⟨_, h, by simp⟩⟩
[ " b ∈ map f.toEmbedding s ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) ↔ f.symm b ∈ s", " (βˆƒ a ∈ s, f.toEmbedding a = b) β†’ f.symm b ∈ s", " f.symm (f.toEmbedding a) ∈ s", " f.toEmbedding (f.symm b) = b" ]
[]
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic #align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" universe u v section IsCoprime variable {R : Type ...
Mathlib/RingTheory/Coprime/Lemmas.lean
61
66
theorem IsCoprime.prod_left : (βˆ€ i ∈ t, IsCoprime (s i) x) β†’ IsCoprime (∏ i ∈ t, s i) x := by
classical refine Finset.induction_on t (fun _ ↦ isCoprime_one_left) fun b t hbt ih H ↦ ?_ rw [Finset.prod_insert hbt] rw [Finset.forall_mem_insert] at H exact H.1.mul_left (ih H.2)
[ " IsCoprime m n ↔ m.gcd n = 1", " IsCoprime m n β†’ m.gcd n = 1", " m.gcd n = 1", " 1 = m * a + n * b", " m.gcd n = 1 β†’ IsCoprime m n", " m.gcdA n * m + m.gcdB n * n = 1 β†’ βˆƒ a b, a * m + b * n = 1", " βˆƒ a b, a * m + b * n = 1", " IsCoprime ↑m ↑n ↔ m.Coprime n", " IsCoprime ↑a ↑b", " IsCoprime ↑↑a ↑↑...
[ " IsCoprime m n ↔ m.gcd n = 1", " IsCoprime m n β†’ m.gcd n = 1", " m.gcd n = 1", " 1 = m * a + n * b", " m.gcd n = 1 β†’ IsCoprime m n", " m.gcdA n * m + m.gcdB n * n = 1 β†’ βˆƒ a b, a * m + b * n = 1", " βˆƒ a b, a * m + b * n = 1", " IsCoprime ↑m ↑n ↔ m.Coprime n", " IsCoprime ↑a ↑b", " IsCoprime ↑↑a ↑↑...
import Mathlib.Analysis.Convex.Combination import Mathlib.Analysis.Convex.Extreme #align_import analysis.convex.independent from "leanprover-community/mathlib"@"fefd8a38be7811574cd2ec2f77d3a393a407f112" open scoped Classical open Affine open Finset Function variable {π•œ E ΞΉ : Type*} section OrderedSemiring va...
Mathlib/Analysis/Convex/Independent.lean
144
153
theorem convexIndependent_set_iff_inter_convexHull_subset {s : Set E} : ConvexIndependent π•œ ((↑) : s β†’ E) ↔ βˆ€ t, t βŠ† s β†’ s ∩ convexHull π•œ t βŠ† t := by
constructor Β· rintro hc t h x ⟨hxs, hxt⟩ refine hc { x | ↑x ∈ t } ⟨x, hxs⟩ ?_ rw [Subtype.coe_image_of_subset h] exact hxt Β· intro hc t x h rw [← Subtype.coe_injective.mem_set_image] exact hc (t.image ((↑) : s β†’ E)) (Subtype.coe_image_subset s t) ⟨x.prop, h⟩
[ " ConvexIndependent π•œ p", " x ∈ s", " Injective p", " p i ∈ (convexHull π•œ) (p '' {j})", " p j ∈ {p j}", " ConvexIndependent π•œ (p ∘ ⇑f)", " f x ∈ ⇑f '' s", " p (f x) ∈ (convexHull π•œ) (p '' (⇑f '' s))", " ConvexIndependent π•œ Subtype.val", " Subtype.val = p ∘ ⇑fe", " ↑x✝ = (p ∘ ⇑fe) x✝", " C...
[ " ConvexIndependent π•œ p", " x ∈ s", " Injective p", " p i ∈ (convexHull π•œ) (p '' {j})", " p j ∈ {p j}", " ConvexIndependent π•œ (p ∘ ⇑f)", " f x ∈ ⇑f '' s", " p (f x) ∈ (convexHull π•œ) (p '' (⇑f '' s))", " ConvexIndependent π•œ Subtype.val", " Subtype.val = p ∘ ⇑fe", " ↑x✝ = (p ∘ ⇑fe) x✝", " C...
import Mathlib.RingTheory.Ideal.Cotangent import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot #align_import ring_theory.etale from ...
Mathlib/RingTheory/Smooth/Basic.lean
68
88
theorem exists_lift {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallySmooth R A] (I : Ideal B) (hI : IsNilpotent I) (g : A →ₐ[R] B β§Έ I) : βˆƒ f : A →ₐ[R] B, (Ideal.Quotient.mkₐ R I).comp f = g := by
revert g change Function.Surjective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI Β· intro B _ I hI _; exact FormallySmooth.comp_surjective I hI Β· intro B _ I J hIJ h₁ hβ‚‚ _ g let this : ((B β§Έ I) β§Έ J.map (Ideal.Quotient.mk I)) ≃ₐ[R] B β§Έ J := { (...
[ " βˆƒ f, (Ideal.Quotient.mkₐ R I).comp f = g", " βˆ€ (g : A →ₐ[R] B β§Έ I), βˆƒ f, (Ideal.Quotient.mkₐ R I).comp f = g", " Function.Surjective (Ideal.Quotient.mkₐ R I).comp", " βˆ€ [_RB : Algebra R B], Function.Surjective (Ideal.Quotient.mkₐ R I).comp", " βˆ€ ⦃S : Type u⦄ [inst : CommRing S] (I : Ideal S),\n I ^ 2 =...
[]
import Mathlib.Analysis.BoxIntegral.DivergenceTheorem import Mathlib.Analysis.BoxIntegral.Integrability import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Analysis.Calculus.FDeriv.Equiv #align_impo...
Mathlib/MeasureTheory/Integral/DivergenceTheorem.lean
111
137
theorem integral_divergence_of_hasFDerivWithinAt_off_countable_aux₁ (I : Box (Fin (n + 1))) (f : ℝⁿ⁺¹ β†’ Eⁿ⁺¹) (f' : ℝⁿ⁺¹ β†’ ℝⁿ⁺¹ β†’L[ℝ] Eⁿ⁺¹) (s : Set ℝⁿ⁺¹) (hs : s.Countable) (Hc : ContinuousOn f (Box.Icc I)) (Hd : βˆ€ x ∈ (Box.Icc I) \ s, HasFDerivWithinAt f (f' x) (Box.Icc I) x) (Hi : IntegrableOn (f...
simp only [← setIntegral_congr_set_ae (Box.coe_ae_eq_Icc _)] have A := (Hi.mono_set Box.coe_subset_Icc).hasBoxIntegral βŠ₯ rfl have B := hasIntegral_GP_divergence_of_forall_hasDerivWithinAt I f f' (s ∩ Box.Icc I) (hs.mono inter_subset_left) (fun x hx => Hc _ hx.2) fun x hx => Hd _ ⟨hx.1, fun h => h...
[ " ∫ (x : Fin (n + 1) β†’ ℝ) in Box.Icc I, βˆ‘ i : Fin (n + 1), (f' x) (e i) i =\n βˆ‘ i : Fin (n + 1),\n ((∫ (x : Fin n β†’ ℝ) in Box.Icc (I.face i), f (i.insertNth (I.upper i) x) i) -\n ∫ (x : Fin n β†’ ℝ) in Box.Icc (I.face i), f (i.insertNth (I.lower i) x) i)", " ∫ (x : Fin (n + 1) β†’ ℝ) in ↑I, βˆ‘ i : Fin (...
[]
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Hom.Defs #align_import algebra.hom.group from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" -- `NeZero` cannot be additivised, hence its theory should be developed outside of the -- `Algebra.Group` folder. assert_not_exists...
Mathlib/Algebra/Group/Hom/Basic.lean
252
254
theorem comp_inv (Ο† : G β†’* H) (ψ : M β†’* G) : Ο†.comp ψ⁻¹ = (Ο†.comp ψ)⁻¹ := by
ext simp only [Function.comp_apply, inv_apply, map_inv, coe_comp]
[ " (fun g => (f g)⁻¹) (a * b) = (fun g => (f g)⁻¹) a * (fun g => (f g)⁻¹) b", " Ο†.comp ψ⁻¹ = (Ο†.comp ψ)⁻¹", " (Ο†.comp ψ⁻¹) x✝ = (Ο†.comp ψ)⁻¹ x✝" ]
[ " (fun g => (f g)⁻¹) (a * b) = (fun g => (f g)⁻¹) a * (fun g => (f g)⁻¹) b" ]
import Mathlib.Algebra.Algebra.Equiv import Mathlib.Algebra.Algebra.NonUnitalHom import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Finsupp.Basic import Mathlib.LinearAlgebra.Finsupp #align_import algebra.monoid_algebra.basic from "leanprover-community/mathlib"@...
Mathlib/Algebra/MonoidAlgebra/Basic.lean
249
251
theorem liftNC_one {g_hom : Type*} [FunLike g_hom G R] [OneHomClass g_hom G R] (f : k β†’+* R) (g : g_hom) : liftNC (f : k β†’+ R) g 1 = 1 := by
simp [one_def]
[ " (liftNC ↑f ⇑g) 1 = 1" ]
[]
import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq #align_import analysis.special_functions.pow.real from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" noncomputable section open scoped Classical open Real ComplexConjugate open Finset Set namespace Real variable {x y z...
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
128
128
theorem rpow_zero_pos (x : ℝ) : 0 < x ^ (0 : ℝ) := by
simp
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
[ " x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " (if ↑x = 0 then if ↑y = 0 then 1 else 0 else ((↑x).log * ↑y).exp).re =\n if x = 0 then if y = 0 then 1 else 0 else rexp (x.log * y)", " Complex.re 1 = 1", " Complex.re 1 = 0", " Complex.re 1 = rexp (x.log * y)", " Complex.re 0 = 1...
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section Real variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toReal_add (ha : a β‰  ∞) (hb : b β‰  ∞) : (a + b).toReal = a.toReal ...
Mathlib/Data/ENNReal/Real.lean
43
47
theorem toReal_sub_of_le {a b : ℝβ‰₯0∞} (h : b ≀ a) (ha : a β‰  ∞) : (a - b).toReal = a.toReal - b.toReal := by
lift b to ℝβ‰₯0 using ne_top_of_le_ne_top ha h lift a to ℝβ‰₯0 using ha simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)]
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal", " (a - b).toReal = a.toReal - b.toReal", " (a - ↑b).toReal = a.toReal - (↑b).toReal", " (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal" ]
[ " (a + b).toReal = a.toReal + b.toReal", " (↑a + b).toReal = (↑a).toReal + b.toReal", " (↑a + ↑b).toReal = (↑a).toReal + (↑b).toReal" ]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
382
385
theorem HasFDerivAt.comp_hasDerivAt_of_eq (hl : HasFDerivAt l l' y) (hf : HasDerivAt f f' x) (hy : y = f x) : HasDerivAt (l ∘ f) (l' f') x := by
rw [hy] at hl; exact hl.comp_hasDerivAt x hf
[ " HasDerivWithinAt (l ∘ f) (l' f') s x", " HasDerivAt (l ∘ f) (l' f') x" ]
[ " HasDerivWithinAt (l ∘ f) (l' f') s x" ]
import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Set.Pointwise.Iterate import Mathlib.Dynamics.Ergodic.Ergodic import Mathlib.MeasureTheory.Covering.DensityTheorem import Mathlib.MeasureTheory.Group.AddCircle import Mathlib.MeasureTheory.Measure.Haar.Unique #align_import dynamics.ergodic.add_circle from "lea...
Mathlib/Dynamics/Ergodic/AddCircle.lean
45
101
theorem ae_empty_or_univ_of_forall_vadd_ae_eq_self {s : Set <| AddCircle T} (hs : NullMeasurableSet s volume) {ΞΉ : Type*} {l : Filter ΞΉ} [l.NeBot] {u : ΞΉ β†’ AddCircle T} (hu₁ : βˆ€ i, (u i +α΅₯ s : Set _) =ᡐ[volume] s) (huβ‚‚ : Tendsto (addOrderOf ∘ u) l atTop) : s =ᡐ[volume] (βˆ… : Set <| AddCircle T) ∨ s =ᡐ[volume...
/- Sketch of proof: Assume `T = 1` for simplicity and let `ΞΌ` be the Haar measure. We may assume `s` has positive measure since otherwise there is nothing to prove. In this case, by Lebesgue's density theorem, there exists a point `d` of positive density. Let `Iβ±Ό` be the sequence of closed balls about `d...
[ " s =αΆ [ae volume] βˆ… ∨ s =αΆ [ae volume] univ", " s =αΆ [ae ΞΌ] βˆ… ∨ s =αΆ [ae ΞΌ] univ", " ENNReal.ofReal T β‰  0", " ΞΌ s = 0 ∨ ΞΌ s = ENNReal.ofReal T", " ΞΌ s = ENNReal.ofReal T", " Tendsto (fun j => ΞΌ (s ∩ I j) / ΞΌ (I j)) l (𝓝 1)", " 0 < 2 * ↑(n j)", " Tendsto Ξ΄ l (𝓝[>] 0)", " Tendsto Ξ΄ l (𝓝 0)", " 0 < T...
[]
import Mathlib.Algebra.Polynomial.Degree.TrailingDegree import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.reverse from "leanprover-community/mathlib"@"44de64f183393284a16016dfb2a48ac97382f2bd" namespace Polynomial open Polynomial Finsupp Finset open...
Mathlib/Algebra/Polynomial/Reverse.lean
139
141
theorem reflect_C_mul (f : R[X]) (r : R) (N : β„•) : reflect N (C r * f) = C r * reflect N f := by
ext simp only [coeff_reflect, coeff_C_mul]
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
[ " revAtFun N (revAtFun N i) = i", " (if (if i ≀ N then N - i else i) ≀ N then N - if i ≀ N then N - i else i else if i ≀ N then N - i else i) = i", " N - (N - i) = i", " N - i = i", " False", " N - i ≀ N", " i = i", " Function.Injective (revAtFun N)", " a = b", " (revAt N) i = i", " (revAt (N + ...
import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.Group.Prod import Mathlib.Data.PNat.Basic import Mathlib.GroupTheory.GroupAction.Prod variable {M : Type*} class PNatPowAssoc (M : Type*) [Mul M] [Pow M β„•+] : Prop where protected ppow_add : βˆ€ (k n : β„•+) (x : M), x ^ (k + n) = x ^ k * x ^ n prote...
Mathlib/Algebra/Group/PNatPowAssoc.lean
64
65
theorem ppow_mul_comm (m n : β„•+) (x : M) : x ^ m * x ^ n = x ^ n * x ^ m := by
simp only [← ppow_add, add_comm]
[ " x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)", " x ^ m * x ^ n = x ^ n * x ^ m" ]
[ " x ^ k * x ^ m * x ^ n = x ^ k * (x ^ m * x ^ n)" ]
import Mathlib.Algebra.Module.Submodule.Map #align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" open Function open Pointwise variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {K : Type*} variable {M : Type*} {M₁ : Type*} {Mβ‚‚ : Type*...
Mathlib/Algebra/Module/Submodule/Ker.lean
121
122
theorem le_ker_iff_map [RingHomSurjective τ₁₂] {f : F} {p : Submodule R M} : p ≀ ker f ↔ map f p = βŠ₯ := by
rw [ker, eq_bot_iff, map_le_iff_le_comap]
[ " ker f ≀ ker (g.comp f)", " ker f ≀ comap f (ker g)", " ker f βŠ” ker g ≀ ker (f βˆ˜β‚— g)", " ker f ≀ ker (f βˆ˜β‚— g)", " ker f ≀ ker (g βˆ˜β‚— f)", " x ∈ comap f p", " Disjoint p (ker f) ↔ βˆ€ x ∈ p, f x = 0 β†’ x = 0", " ker f = βŠ₯ ↔ βˆ€ (m : M), f m = 0 β†’ m = 0", " m = 0", " p ≀ ker f ↔ map f p = βŠ₯" ]
[ " ker f ≀ ker (g.comp f)", " ker f ≀ comap f (ker g)", " ker f βŠ” ker g ≀ ker (f βˆ˜β‚— g)", " ker f ≀ ker (f βˆ˜β‚— g)", " ker f ≀ ker (g βˆ˜β‚— f)", " x ∈ comap f p", " Disjoint p (ker f) ↔ βˆ€ x ∈ p, f x = 0 β†’ x = 0", " ker f = βŠ₯ ↔ βˆ€ (m : M), f m = 0 β†’ m = 0", " m = 0" ]
import Mathlib.Algebra.MvPolynomial.PDeriv import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Sum import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.RingTheory.Polynomial.Pochhammer #align_import ring_theory.polynomial.bernstein from "le...
Mathlib/RingTheory/Polynomial/Bernstein.lean
61
62
theorem eq_zero_of_lt {n Ξ½ : β„•} (h : n < Ξ½) : bernsteinPolynomial R n Ξ½ = 0 := by
simp [bernsteinPolynomial, Nat.choose_eq_zero_of_lt h]
[ " bernsteinPolynomial β„€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3", " 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3", " bernsteinPolynomial R n Ξ½ = 0" ]
[ " bernsteinPolynomial β„€ 3 2 = 3 * X ^ 2 - 3 * X ^ 3", " 3 * X ^ 2 * (1 - X) = 3 * X ^ 2 - 3 * X ^ 3" ]
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u...
Mathlib/Analysis/MeanInequalities.lean
150
166
theorem geom_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : ∏ i ∈ s, z i ^ w i = x := calc ∏ i ∈ s, z i ^ w i = ∏ i ∈ s, x ^ w i := by
refine prod_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hβ‚€ | hβ‚€ Β· rw [hβ‚€, rpow_zero, rpow_zero] Β· rw [hx i hi hβ‚€] _ = x := by rw [← rpow_sum_of_nonneg _ hw, hw', rpow_one] have : (βˆ‘ i ∈ s, w i) β‰  0 := by rw [hw'] exact one_ne_zero obtain ⟨i, his, ...
[ " ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i", " 0 ≀ βˆ‘ i ∈ s, w i * z i", " z i ^ w i = 0", " 0 ^ w i = 0", " ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)", " βˆ‘ i ∈ s, w i * z i = βˆ‘ x ∈ s, w x * rexp (z x).log", " βˆ€ x ∈ s, z x ^ w x = rexp ((z x).log * w x)", " βˆ€ x ∈ s, w x * z x = w x * rexp (z ...
[ " ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i", " 0 ≀ βˆ‘ i ∈ s, w i * z i", " z i ^ w i = 0", " 0 ^ w i = 0", " ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)", " βˆ‘ i ∈ s, w i * z i = βˆ‘ x ∈ s, w x * rexp (z x).log", " βˆ€ x ∈ s, z x ^ w x = rexp ((z x).log * w x)", " βˆ€ x ∈ s, w x * z x = w x * rexp (z ...
import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.RingTheory.Int.Basic import Mathlib.RingTheory.Localization.Integral import Mathlib.RingTheory.IntegrallyClosed #align_import ring_theory.polynomial.gauss_lemma from "leanprover-community/mathlib"@"e3f4be1fcb5376c4948d7f095bec45350bfb9d1a" open...
Mathlib/RingTheory/Polynomial/GaussLemma.lean
54
70
theorem integralClosure.mem_lifts_of_monic_of_dvd_map {f : R[X]} (hf : f.Monic) {g : K[X]} (hg : g.Monic) (hd : g ∣ f.map (algebraMap R K)) : g ∈ lifts (algebraMap (integralClosure R K) K) := by
have := mem_lift_of_splits_of_roots_mem_range (integralClosure R g.SplittingField) ((splits_id_iff_splits _).2 <| SplittingField.splits g) (hg.map _) fun a ha => (SetLike.ext_iff.mp (integralClosure R g.SplittingField).range_algebraMap _).mpr <| roots_mem_integralClosure hf ?_ Β· rw [lifts_iff_coe...
[ " g ∈ lifts (algebraMap (β†₯(integralClosure R K)) K)", " g.coeff n ∈ Set.range ⇑(algebraMap (β†₯(integralClosure R K)) K)", " g.coeff n ∈ ↑(integralClosure R K).toSubring", " evalβ‚‚ (algebraMap R K) (g.coeff n) p = 0", " eval (g.coeff n) (map (algebraMap R K) p) = 0", " Function.Injective ⇑(algebraMap K g.Spl...
[]
import Mathlib.Data.Int.Bitwise import Mathlib.Data.Int.Order.Lemmas import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.int.lemmas from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f" open Nat namespace Int theorem le_natCast_sub (m n : β„•) : (m ...
Mathlib/Data/Int/Lemmas.lean
70
72
theorem natAbs_inj_of_nonneg_of_nonpos {a b : β„€} (ha : 0 ≀ a) (hb : b ≀ 0) : natAbs a = natAbs b ↔ a = -b := by
simpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg ha (neg_nonneg_of_nonpos hb)
[ " ↑m - ↑n ≀ ↑(m - n)", " 0 ≀ ↑n", " a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2", " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs ≀ b.natAbs ↔ a ^ 2 ≀ b ^ 2", " a.natAbs ≀ b.natAbs ↔ a * a ≀ b * b", " a.natAbs = b.natAbs ↔ a ...
[ " ↑m - ↑n ≀ ↑(m - n)", " 0 ≀ ↑n", " a.natAbs = b.natAbs ↔ a ^ 2 = b ^ 2", " a.natAbs = b.natAbs ↔ a * a = b * b", " a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2", " a.natAbs < b.natAbs ↔ a * a < b * b", " a.natAbs ≀ b.natAbs ↔ a ^ 2 ≀ b ^ 2", " a.natAbs ≀ b.natAbs ↔ a * a ≀ b * b", " a.natAbs = b.natAbs ↔ a ...
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008...
Mathlib/Analysis/Normed/Group/Quotient.lean
181
184
theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = 0 ↔ m ∈ closure (S : Set M) := by
rw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero] exact ⟨0, S.zero_mem⟩
[ " β€–xβ€– = infDist 0 {m | ↑m = x}", " ‖↑xβ€– = infDist x ↑S", " infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S", " y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S", " β€–-xβ€– = β€–xβ€–", " sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})", " r ∈ norm '' {m | ↑m...
[ " β€–xβ€– = infDist 0 {m | ↑m = x}", " ‖↑xβ€– = infDist x ↑S", " infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S", " y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S", " β€–-xβ€– = β€–xβ€–", " sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})", " r ∈ norm '' {m | ↑m...
import Mathlib.Data.Nat.Prime import Mathlib.Tactic.NormNum.Basic #align_import data.nat.prime_norm_num from "leanprover-community/mathlib"@"10b4e499f43088dd3bb7b5796184ad5216648ab1" open Nat Qq Lean Meta namespace Mathlib.Meta.NormNum theorem not_prime_mul_of_ble (a b n : β„•) (h : a * b = n) (h₁ : a.ble 1 = fals...
Mathlib/Tactic/NormNum/Prime.lean
84
88
theorem minFacHelper_2 {n k k' : β„•} (e : k + 2 = k') (nk : Β¬ Nat.Prime k) (h : MinFacHelper n k) : MinFacHelper n k' := by
refine minFacHelper_1 e h Ξ» h2 ↦ ?_ rw [← h2] at nk exact nk <| minFac_prime h.one_lt.ne'
[ " 1 < n", " 1 < 0", " 1 < succ 0", " MinFacHelper n 3", " 2 < 3", " 3 % 2 = 1", " 3 ≀ n.minFac", " 3 ≀ p", " 3 ≀ 2", " MinFacHelper n k'", " MinFacHelper n (k + 2)", " (k + 2) % 2 = 1", " k % 2 = 1", " k + 2 ≀ n.minFac", " n.minFac + 2 ≀ n.minFac", " 2 = n.minFac", " 2 ∣ n.minFac", ...
[ " 1 < n", " 1 < 0", " 1 < succ 0", " MinFacHelper n 3", " 2 < 3", " 3 % 2 = 1", " 3 ≀ n.minFac", " 3 ≀ p", " 3 ≀ 2", " MinFacHelper n k'", " MinFacHelper n (k + 2)", " (k + 2) % 2 = 1", " k % 2 = 1", " k + 2 ≀ n.minFac", " n.minFac + 2 ≀ n.minFac", " 2 = n.minFac", " 2 ∣ n.minFac" ]
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort import Mathlib.Data.Set.Subsingleton #align_import combinatorics.composition from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open List variable {n : β„•} ...
Mathlib/Combinatorics/Enumerative/Composition.lean
207
210
theorem sizeUpTo_ofLength_le (i : β„•) (h : c.length ≀ i) : c.sizeUpTo i = n := by
dsimp [sizeUpTo] convert c.blocks_sum exact take_all_of_le h
[ " βˆ‘ i : Fin c.length, c.blocksFun i = n", "n : β„• c : Composition n | n", " c.length ≀ n", " c.length ≀ c.blocks.sum", " 0 < c.length", " 0 < c.blocks.sum", " c.blocks.sum = n", " c.sizeUpTo 0 = 0", " c.sizeUpTo i = n", " (take i c.blocks).sum = n", " take i c.blocks = c.blocks" ]
[ " βˆ‘ i : Fin c.length, c.blocksFun i = n", "n : β„• c : Composition n | n", " c.length ≀ n", " c.length ≀ c.blocks.sum", " 0 < c.length", " 0 < c.blocks.sum", " c.blocks.sum = n", " c.sizeUpTo 0 = 0" ]
import Mathlib.Data.List.Duplicate import Mathlib.Data.List.Sort #align_import data.list.nodup_equiv_fin from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace List variable {Ξ± : Type*} section Sublist theorem sublist_of_orderEmbedding_get?_eq {l l' : List Ξ±} (f : β„• β†ͺo β„•) ...
Mathlib/Data/List/NodupEquivFin.lean
144
161
theorem sublist_iff_exists_orderEmbedding_get?_eq {l l' : List Ξ±} : l <+ l' ↔ βˆƒ f : β„• β†ͺo β„•, βˆ€ ix : β„•, l.get? ix = l'.get? (f ix) := by
constructor Β· intro H induction' H with xs ys y _H IH xs ys x _H IH Β· simp Β· obtain ⟨f, hf⟩ := IH refine ⟨f.trans (OrderEmbedding.ofStrictMono (Β· + 1) fun _ => by simp), ?_⟩ simpa using hf Β· obtain ⟨f, hf⟩ := IH refine ⟨OrderEmbedding.ofMapLEIff (fun ix : β„• => if ix = 0 th...
[ " l <+ l'", " [] <+ l'", " hd :: tl <+ l'", " (fun i => f (i + 1) - (f 0 + 1)) a ≀ (fun i => f (i + 1) - (f 0 + 1)) b ↔ a ≀ b", " f (a + 1) - (f 0 + 1) ≀ f (b + 1) - (f 0 + 1) ↔ a ≀ b", " f 0 + 1 ≀ f (b + 1)", " 0 < b + 1", " βˆ€ (ix : β„•), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)", " tl.get? ix =...
[ " l <+ l'", " [] <+ l'", " hd :: tl <+ l'", " (fun i => f (i + 1) - (f 0 + 1)) a ≀ (fun i => f (i + 1) - (f 0 + 1)) b ↔ a ≀ b", " f (a + 1) - (f 0 + 1) ≀ f (b + 1) - (f 0 + 1) ↔ a ≀ b", " f 0 + 1 ≀ f (b + 1)", " 0 < b + 1", " βˆ€ (ix : β„•), tl.get? ix = (drop (f 0 + 1) l').get? (f' ix)", " tl.get? ix =...
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.SetTheory.Cardinal.Cofinality #align_import linear_algebra.basis from "leanprover-communit...
Mathlib/LinearAlgebra/Basis.lean
178
179
theorem repr_range : LinearMap.range (b.repr : M β†’β‚—[R] ΞΉ β†’β‚€ R) = Finsupp.supported R R univ := by
rw [LinearEquiv.range, Finsupp.supported_univ]
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1 = (↑g.repr.symm βˆ˜β‚— Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c β€’ Finsupp.single i 1)", " b...
import Mathlib.Topology.Algebra.InfiniteSum.Defs import Mathlib.Data.Fintype.BigOperators import Mathlib.Topology.Algebra.Monoid noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section tprod variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] {f g : Ξ² β†’ Ξ±} {a a₁ aβ‚‚ : ...
Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
387
388
theorem tprod_congr_set_coe (f : Ξ² β†’ Ξ±) {s t : Set Ξ²} (h : s = t) : ∏' x : s, f x = ∏' x : t, f x := by
rw [h]
[ " ∏' (x : ↑s), f ↑x = ∏' (x : ↑t), f ↑x" ]
[]
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.List.AList #align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" namespace AList variable {Ξ± M : Type*} [Zero M] open List noncomputable def lookupFinsupp (l : AList fun _x : Ξ± => M) : Ξ± β†’β‚€ M where ...
Mathlib/Data/Finsupp/AList.lean
95
98
theorem lookupFinsupp_eq_zero_iff [DecidableEq Ξ±] {l : AList fun _x : Ξ± => M} {a : Ξ±} : l.lookupFinsupp a = 0 ↔ a βˆ‰ l ∨ (0 : M) ∈ l.lookup a := by
rw [lookupFinsupp_apply, ← lookup_eq_none] cases' lookup a l with m <;> simp
[ " Finset Ξ±", " a ∈ (filter (fun x => decide (x.snd β‰  0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a β‰  0", " (βˆƒ b ∈ lookup a l, decide (b β‰  0) = true) ↔ (lookup a l).getD 0 β‰  0", " (βˆƒ b ∈ none, decide (b β‰  0) = true) ↔ none.getD 0 β‰  0", " (βˆƒ b ∈ some val✝, decide (b β‰  0) = true) ↔ (some val✝...
[ " Finset Ξ±", " a ∈ (filter (fun x => decide (x.snd β‰  0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a β‰  0", " (βˆƒ b ∈ lookup a l, decide (b β‰  0) = true) ↔ (lookup a l).getD 0 β‰  0", " (βˆƒ b ∈ none, decide (b β‰  0) = true) ↔ none.getD 0 β‰  0", " (βˆƒ b ∈ some val✝, decide (b β‰  0) = true) ↔ (some val✝...
import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.Ring #align_import data.nat.count from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Finset namespace Nat variable (p : β„• β†’ Prop) section Count variable [DecidablePred p] def count (n : β„•) : β„• := (List.range n)....
Mathlib/Data/Nat/Count.lean
54
56
theorem count_eq_card_filter_range (n : β„•) : count p n = ((range n).filter p).card := by
rw [count, List.countP_eq_length_filter] rfl
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " βˆ€ (x : β„•), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
[ " count p 0 = 0", " Fintype { i // i < n ∧ p i }", " βˆ€ (x : β„•), x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x ∈ filter p (range n) ↔ x ∈ fun x => x < n ∧ p x", " x < n ∧ p x ↔ x ∈ fun x => x < n ∧ p x" ]
import Mathlib.Data.Fintype.Card import Mathlib.Computability.Language import Mathlib.Tactic.NormNum #align_import computability.DFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Computability universe u v -- Porting note: Required as `DFA` is used in mathlib3 set_option li...
Mathlib/Computability/DFA.lean
137
148
theorem evalFrom_of_pow {x y : List Ξ±} {s : Οƒ} (hx : M.evalFrom s x = s) (hy : y ∈ ({x} : Language Ξ±)βˆ—) : M.evalFrom s y = s := by
rw [Language.mem_kstar] at hy rcases hy with ⟨S, rfl, hS⟩ induction' S with a S ih · rfl · have ha := hS a (List.mem_cons_self _ _) rw [Set.mem_singleton_iff] at ha rw [List.join, evalFrom_of_append, ha, hx] apply ih intro z hz exact hS z (List.mem_cons_of_mem a hz)
[ " M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a", " x ∈ M.accepts ↔ M.evalFrom M.start x ∈ M.accept", " βˆƒ q a b c,\n x = a ++ b ++ c ∧\n a.length + b.length ≀ Fintype.card Οƒ ∧ b β‰  [] ∧ M.evalFrom s a = q ∧ M.evalFrom q b = q ∧ M.evalFrom q c = t", " Fintype.card Οƒ < Fintype.card (Fin (Fintype.ca...
[ " M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a", " x ∈ M.accepts ↔ M.evalFrom M.start x ∈ M.accept", " βˆƒ q a b c,\n x = a ++ b ++ c ∧\n a.length + b.length ≀ Fintype.card Οƒ ∧ b β‰  [] ∧ M.evalFrom s a = q ∧ M.evalFrom q b = q ∧ M.evalFrom q c = t", " Fintype.card Οƒ < Fintype.card (Fin (Fintype.ca...
import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.GroupAction.Basic namespace MulAction universe u v variable {Ξ± : Type v} variable {G : Type u} [Group G] [MulAction G Ξ±] variable {M : Type u} [Monoid M] [MulAction M Ξ±] @[to_additive "If the action is periodic, t...
Mathlib/GroupTheory/GroupAction/Period.lean
87
88
theorem period_dvd_orderOf (m : M) (a : α) : period m a ∣ orderOf m := by
rw [← pow_smul_eq_iff_period_dvd, pow_orderOf_eq_one, one_smul]
[ " m ^ 1 β€’ a = a", " period m a ∣ orderOf m" ]
[ " m ^ 1 β€’ a = a" ]
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
152
153
theorem card_fintype_uIcc : Fintype.card (Set.uIcc a b) = (b - a : β„€).natAbs + 1 := by
rw [← card_uIcc, 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...