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.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Order.Bounds.OrderIso import Mathlib.Tactic.Positivity.Core #align_import algebra.order.field.basic from "leanprover-community/mathlib"@"84771a9f5f0bd5e5d6218811556508ddf476dcbd" open Function OrderDual variable {ΞΉ Ξ± Ξ² : Type*} section LinearOrderedSemifield variable [LinearOrderedSemifield Ξ±] {a b c d e : Ξ±} {m n : β„€} @[simps! (config := { simpRhs := true })] def OrderIso.mulLeftβ‚€ (a : Ξ±) (ha : 0 < a) : Ξ± ≃o Ξ± := { Equiv.mulLeftβ‚€ a ha.ne' with map_rel_iff' := @fun _ _ => mul_le_mul_left ha } #align order_iso.mul_leftβ‚€ OrderIso.mulLeftβ‚€ #align order_iso.mul_leftβ‚€_symm_apply OrderIso.mulLeftβ‚€_symm_apply #align order_iso.mul_leftβ‚€_apply OrderIso.mulLeftβ‚€_apply @[simps! (config := { simpRhs := true })] def OrderIso.mulRightβ‚€ (a : Ξ±) (ha : 0 < a) : Ξ± ≃o Ξ± := { Equiv.mulRightβ‚€ a ha.ne' with map_rel_iff' := @fun _ _ => mul_le_mul_right ha } #align order_iso.mul_rightβ‚€ OrderIso.mulRightβ‚€ #align order_iso.mul_rightβ‚€_symm_apply OrderIso.mulRightβ‚€_symm_apply #align order_iso.mul_rightβ‚€_apply OrderIso.mulRightβ‚€_apply theorem le_div_iff (hc : 0 < c) : a ≀ b / c ↔ a * c ≀ b := ⟨fun h => div_mul_cancelβ‚€ b (ne_of_lt hc).symm β–Έ mul_le_mul_of_nonneg_right h hc.le, fun h => calc a = a * c * (1 / c) := mul_mul_div a (ne_of_lt hc).symm _ ≀ b * (1 / c) := mul_le_mul_of_nonneg_right h (one_div_pos.2 hc).le _ = b / c := (div_eq_mul_one_div b c).symm ⟩ #align le_div_iff le_div_iff theorem le_div_iff' (hc : 0 < c) : a ≀ b / c ↔ c * a ≀ b := by rw [mul_comm, le_div_iff hc] #align le_div_iff' le_div_iff' theorem div_le_iff (hb : 0 < b) : a / b ≀ c ↔ a ≀ c * b := ⟨fun h => calc a = a / b * b := by rw [div_mul_cancelβ‚€ _ (ne_of_lt hb).symm] _ ≀ c * b := mul_le_mul_of_nonneg_right h hb.le , fun h => calc a / b = a * (1 / b) := div_eq_mul_one_div a b _ ≀ c * b * (1 / b) := mul_le_mul_of_nonneg_right h (one_div_pos.2 hb).le _ = c * b / b := (div_eq_mul_one_div (c * b) b).symm _ = c := by refine (div_eq_iff (ne_of_gt hb)).mpr rfl ⟩ #align div_le_iff div_le_iff theorem div_le_iff' (hb : 0 < b) : a / b ≀ c ↔ a ≀ b * c := by rw [mul_comm, div_le_iff hb] #align div_le_iff' div_le_iff' lemma div_le_commβ‚€ (hb : 0 < b) (hc : 0 < c) : a / b ≀ c ↔ a / c ≀ b := by rw [div_le_iff hb, div_le_iff' hc] theorem lt_div_iff (hc : 0 < c) : a < b / c ↔ a * c < b := lt_iff_lt_of_le_iff_le <| div_le_iff hc #align lt_div_iff lt_div_iff theorem lt_div_iff' (hc : 0 < c) : a < b / c ↔ c * a < b := by rw [mul_comm, lt_div_iff hc] #align lt_div_iff' lt_div_iff' theorem div_lt_iff (hc : 0 < c) : b / c < a ↔ b < a * c := lt_iff_lt_of_le_iff_le (le_div_iff hc) #align div_lt_iff div_lt_iff theorem div_lt_iff' (hc : 0 < c) : b / c < a ↔ b < c * a := by rw [mul_comm, div_lt_iff hc] #align div_lt_iff' div_lt_iff' lemma div_lt_commβ‚€ (hb : 0 < b) (hc : 0 < c) : a / b < c ↔ a / c < b := by rw [div_lt_iff hb, div_lt_iff' hc]
Mathlib/Algebra/Order/Field/Basic.lean
99
101
theorem inv_mul_le_iff (h : 0 < b) : b⁻¹ * a ≀ c ↔ a ≀ b * c := by
rw [inv_eq_one_div, mul_comm, ← div_eq_mul_one_div] exact div_le_iff' h
[ " a ≀ b / c ↔ c * a ≀ b", " a = a / b * b", " c * b / b = c", " a / b ≀ c ↔ a ≀ b * c", " a / b ≀ c ↔ a / c ≀ b", " a < b / c ↔ c * a < b", " b / c < a ↔ b < c * a", " a / b < c ↔ a / c < b", " b⁻¹ * a ≀ c ↔ a ≀ b * c" ]
[ " a ≀ b / c ↔ c * a ≀ b", " a = a / b * b", " c * b / b = c", " a / b ≀ c ↔ a ≀ b * c", " a / b ≀ c ↔ a / c ≀ b", " a < b / c ↔ c * a < b", " b / c < a ↔ b < c * a", " a / b < c ↔ a / c < b" ]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mathlib.Analysis.NormedSpace.AffineIsometry #align_import geometry.euclidean.angle.unoriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open Real RealInnerProductSpace namespace EuclideanGeometry open InnerProductGeometry variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {p pβ‚€ p₁ pβ‚‚ : P} nonrec def angle (p1 p2 p3 : P) : ℝ := angle (p1 -α΅₯ p2 : V) (p3 -α΅₯ p2) #align euclidean_geometry.angle EuclideanGeometry.angle @[inherit_doc] scoped notation "∠" => EuclideanGeometry.angle
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
50
57
theorem continuousAt_angle {x : P Γ— P Γ— P} (hx12 : x.1 β‰  x.2.1) (hx32 : x.2.2 β‰  x.2.1) : ContinuousAt (fun y : P Γ— P Γ— P => ∠ y.1 y.2.1 y.2.2) x := by
let f : P Γ— P Γ— P β†’ V Γ— V := fun y => (y.1 -α΅₯ y.2.1, y.2.2 -α΅₯ y.2.1) have hf1 : (f x).1 β‰  0 := by simp [hx12] have hf2 : (f x).2 β‰  0 := by simp [hx32] exact (InnerProductGeometry.continuousAt_angle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt
[ " ContinuousAt (fun y => ∠ y.1 y.2.1 y.2.2) x", " (f x).1 β‰  0", " (f x).2 β‰  0" ]
[]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.Algebra.Star.Subalgebra import Mathlib.Algebra.Star.Unitary import Mathlib.Topology.Algebra.Module.Star #align_import analysis.normed_space.star.basic from "leanprover-community/mathlib"@"aa6669832974f87406a3d9d70fc5707a60546207" open Topology local postfix:max "⋆" => star class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where norm_star : βˆ€ x : E, β€–x⋆‖ = β€–xβ€– #align normed_star_group NormedStarGroup export NormedStarGroup (norm_star) attribute [simp] norm_star variable {π•œ E Ξ± : Type*} instance RingHomIsometric.starRingEnd [NormedCommRing E] [StarRing E] [NormedStarGroup E] : RingHomIsometric (starRingEnd E) := ⟨@norm_star _ _ _ _⟩ #align ring_hom_isometric.star_ring_end RingHomIsometric.starRingEnd class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where norm_star_mul_self : βˆ€ {x : E}, β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€– #align cstar_ring CstarRing instance : CstarRing ℝ where norm_star_mul_self {x} := by simp only [star, id, norm_mul] namespace CstarRing section Unital variable [NormedRing E] [StarRing E] [CstarRing E] @[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
Mathlib/Analysis/NormedSpace/Star/Basic.lean
203
205
theorem norm_one [Nontrivial E] : β€–(1 : E)β€– = 1 := by
have : 0 < β€–(1 : E)β€– := norm_pos_iff.mpr one_ne_zero rw [← mul_left_inj' this.ne', ← norm_star_mul_self, mul_one, star_one, one_mul]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–", " β€–1β€– = 1" ]
[ " β€–x⋆ * xβ€– = β€–xβ€– * β€–xβ€–" ]
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.RingTheory.IntegralClosure import Mathlib.RingTheory.Polynomial.IntegralNormalization #align_import ring_theory.algebraic from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" universe u v w open scoped Classical open Polynomial section variable (R : Type u) {A : Type v} [CommRing R] [Ring A] [Algebra R A] def IsAlgebraic (x : A) : Prop := βˆƒ p : R[X], p β‰  0 ∧ aeval x p = 0 #align is_algebraic IsAlgebraic def Transcendental (x : A) : Prop := Β¬IsAlgebraic R x #align transcendental Transcendental theorem is_transcendental_of_subsingleton [Subsingleton R] (x : A) : Transcendental R x := fun ⟨p, h, _⟩ => h <| Subsingleton.elim p 0 #align is_transcendental_of_subsingleton is_transcendental_of_subsingleton variable {R} nonrec def Subalgebra.IsAlgebraic (S : Subalgebra R A) : Prop := βˆ€ x ∈ S, IsAlgebraic R x #align subalgebra.is_algebraic Subalgebra.IsAlgebraic variable (R A) protected class Algebra.IsAlgebraic : Prop := isAlgebraic : βˆ€ x : A, IsAlgebraic R x #align algebra.is_algebraic Algebra.IsAlgebraic variable {R A} lemma Algebra.isAlgebraic_def : Algebra.IsAlgebraic R A ↔ βˆ€ x : A, IsAlgebraic R x := ⟨fun ⟨h⟩ ↦ h, fun h ↦ ⟨h⟩⟩ theorem Subalgebra.isAlgebraic_iff (S : Subalgebra R A) : S.IsAlgebraic ↔ @Algebra.IsAlgebraic R S _ _ S.algebra := by delta Subalgebra.IsAlgebraic rw [Subtype.forall', Algebra.isAlgebraic_def] refine forall_congr' fun x => exists_congr fun p => and_congr Iff.rfl ?_ have h : Function.Injective S.val := Subtype.val_injective conv_rhs => rw [← h.eq_iff, AlgHom.map_zero] rw [← aeval_algHom_apply, S.val_apply] #align subalgebra.is_algebraic_iff Subalgebra.isAlgebraic_iff
Mathlib/RingTheory/Algebraic.lean
78
80
theorem Algebra.isAlgebraic_iff : Algebra.IsAlgebraic R A ↔ (⊀ : Subalgebra R A).IsAlgebraic := by
delta Subalgebra.IsAlgebraic simp only [Algebra.isAlgebraic_def, Algebra.mem_top, forall_prop_of_true, iff_self_iff]
[ " S.IsAlgebraic ↔ Algebra.IsAlgebraic R β†₯S", " (βˆ€ x ∈ S, _root_.IsAlgebraic R x) ↔ Algebra.IsAlgebraic R β†₯S", " (βˆ€ (x : β†₯S), _root_.IsAlgebraic R ↑x) ↔ βˆ€ (x : β†₯S), _root_.IsAlgebraic R x", " (aeval ↑x) p = 0 ↔ (aeval x) p = 0", "R : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R...
[ " S.IsAlgebraic ↔ Algebra.IsAlgebraic R β†₯S", " (βˆ€ x ∈ S, _root_.IsAlgebraic R x) ↔ Algebra.IsAlgebraic R β†₯S", " (βˆ€ (x : β†₯S), _root_.IsAlgebraic R ↑x) ↔ βˆ€ (x : β†₯S), _root_.IsAlgebraic R x", " (aeval ↑x) p = 0 ↔ (aeval x) p = 0", "R : Type u\nA : Type v\ninst✝² : CommRing R\ninst✝¹ : Ring A\ninst✝ : Algebra R...
import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8" open Function (update) open Relation namespace Turing namespace ToPartrec inductive Code | zero' | succ | tail | cons : Code β†’ Code β†’ Code | comp : Code β†’ Code β†’ Code | case : Code β†’ Code β†’ Code | fix : Code β†’ Code deriving DecidableEq, Inhabited #align turing.to_partrec.code Turing.ToPartrec.Code #align turing.to_partrec.code.zero' Turing.ToPartrec.Code.zero' #align turing.to_partrec.code.succ Turing.ToPartrec.Code.succ #align turing.to_partrec.code.tail Turing.ToPartrec.Code.tail #align turing.to_partrec.code.cons Turing.ToPartrec.Code.cons #align turing.to_partrec.code.comp Turing.ToPartrec.Code.comp #align turing.to_partrec.code.case Turing.ToPartrec.Code.case #align turing.to_partrec.code.fix Turing.ToPartrec.Code.fix def Code.eval : Code β†’ List β„• β†’. List β„• | Code.zero' => fun v => pure (0 :: v) | Code.succ => fun v => pure [v.headI.succ] | Code.tail => fun v => pure v.tail | Code.cons f fs => fun v => do let n ← Code.eval f v let ns ← Code.eval fs v pure (n.headI :: ns) | Code.comp f g => fun v => g.eval v >>= f.eval | Code.case f g => fun v => v.headI.rec (f.eval v.tail) fun y _ => g.eval (y::v.tail) | Code.fix f => PFun.fix fun v => (f.eval v).map fun v => if v.headI = 0 then Sum.inl v.tail else Sum.inr v.tail #align turing.to_partrec.code.eval Turing.ToPartrec.Code.eval namespace Code @[simp] theorem zero'_eval : zero'.eval = fun v => pure (0 :: v) := by simp [eval] @[simp]
Mathlib/Computability/TMToPartrec.lean
143
143
theorem succ_eval : succ.eval = fun v => pure [v.headI.succ] := by
simp [eval]
[ " zero'.eval = fun v => pure (0 :: v)", " succ.eval = fun v => pure [v.headI.succ]" ]
[ " zero'.eval = fun v => pure (0 :: v)" ]
import Mathlib.Data.Matroid.Restrict variable {Ξ± : Type*} {M : Matroid Ξ±} {E B I X R J : Set Ξ±} namespace Matroid open Set section EmptyOn def emptyOn (Ξ± : Type*) : Matroid Ξ± where E := βˆ… Base := (Β· = βˆ…) Indep := (Β· = βˆ…) indep_iff' := by simp [subset_empty_iff] exists_base := βŸ¨βˆ…, rfl⟩ base_exchange := by rintro _ _ rfl; simp maximality := by rintro _ _ _ rfl -; exact βŸ¨βˆ…, by simp [mem_maximals_iff]⟩ subset_ground := by simp @[simp] theorem emptyOn_ground : (emptyOn Ξ±).E = βˆ… := rfl @[simp] theorem emptyOn_base_iff : (emptyOn Ξ±).Base B ↔ B = βˆ… := Iff.rfl @[simp] theorem emptyOn_indep_iff : (emptyOn Ξ±).Indep I ↔ I = βˆ… := Iff.rfl theorem ground_eq_empty_iff : (M.E = βˆ…) ↔ M = emptyOn Ξ± := by simp only [emptyOn, eq_iff_indep_iff_indep_forall, iff_self_and] exact fun h ↦ by simp [h, subset_empty_iff] @[simp] theorem emptyOn_dual_eq : (emptyOn Ξ±)✢ = emptyOn Ξ± := by rw [← ground_eq_empty_iff]; rfl @[simp] theorem restrict_empty (M : Matroid Ξ±) : M β†Ύ (βˆ… : Set Ξ±) = emptyOn Ξ± := by simp [← ground_eq_empty_iff]
Mathlib/Data/Matroid/Constructions.lean
67
69
theorem eq_emptyOn_or_nonempty (M : Matroid α) : M = emptyOn α ∨ Matroid.Nonempty M := by
rw [← ground_eq_empty_iff] exact M.E.eq_empty_or_nonempty.elim Or.inl (fun h ↦ Or.inr ⟨h⟩)
[ " βˆ€ ⦃I : Set α⦄, (fun x => x = βˆ…) I ↔ βˆƒ B, (fun x => x = βˆ…) B ∧ I βŠ† B", " ExchangeProperty fun x => x = βˆ…", " (fun x => x = βˆ…) Y✝ β†’ βˆ€ a ∈ βˆ… \\ Y✝, βˆƒ b ∈ Y✝ \\ βˆ…, (fun x => x = βˆ…) (insert b (βˆ… \\ {a}))", " βˆ€ X βŠ† βˆ…, ExistsMaximalSubsetProperty (fun x => x = βˆ…) X", " (maximals (fun x x_1 => x βŠ† x_1) {Y | (fun ...
[ " βˆ€ ⦃I : Set α⦄, (fun x => x = βˆ…) I ↔ βˆƒ B, (fun x => x = βˆ…) B ∧ I βŠ† B", " ExchangeProperty fun x => x = βˆ…", " (fun x => x = βˆ…) Y✝ β†’ βˆ€ a ∈ βˆ… \\ Y✝, βˆƒ b ∈ Y✝ \\ βˆ…, (fun x => x = βˆ…) (insert b (βˆ… \\ {a}))", " βˆ€ X βŠ† βˆ…, ExistsMaximalSubsetProperty (fun x => x = βˆ…) X", " (maximals (fun x x_1 => x βŠ† x_1) {Y | (fun ...
import Mathlib.Data.List.Basic #align_import data.bool.all_any from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec" variable {Ξ± : Type*} {p : Ξ± β†’ Prop} [DecidablePred p] {l : List Ξ±} {a : Ξ±} namespace List -- Porting note: in Batteries #align list.all_nil List.all_nil #align list.all_cons List.all_consβ‚“ theorem all_iff_forall {p : Ξ± β†’ Bool} : all l p ↔ βˆ€ a ∈ l, p a := by induction' l with a l ih Β· exact iff_of_true rfl (forall_mem_nil _) simp only [all_cons, Bool.and_eq_true_iff, ih, forall_mem_cons] #align list.all_iff_forall List.all_iff_forall theorem all_iff_forall_prop : (all l fun a => p a) ↔ βˆ€ a ∈ l, p a := by simp only [all_iff_forall, decide_eq_true_iff] #align list.all_iff_forall_prop List.all_iff_forall_prop -- Porting note: in Batteries #align list.any_nil List.any_nil #align list.any_cons List.any_consβ‚“ theorem any_iff_exists {p : Ξ± β†’ Bool} : any l p ↔ βˆƒ a ∈ l, p a := by induction' l with a l ih Β· exact iff_of_false Bool.false_ne_true (not_exists_mem_nil _) simp only [any_cons, Bool.or_eq_true_iff, ih, exists_mem_cons_iff] #align list.any_iff_exists List.any_iff_exists
Mathlib/Data/Bool/AllAny.lean
48
48
theorem any_iff_exists_prop : (any l fun a => p a) ↔ βˆƒ a ∈ l, p a := by
simp [any_iff_exists]
[ " l.all p = true ↔ βˆ€ (a : Ξ±), a ∈ l β†’ p a = true", " [].all p = true ↔ βˆ€ (a : Ξ±), a ∈ [] β†’ p a = true", " (a :: l).all p = true ↔ βˆ€ (a_1 : Ξ±), a_1 ∈ a :: l β†’ p a_1 = true", " (l.all fun a => decide (p a)) = true ↔ βˆ€ (a : Ξ±), a ∈ l β†’ p a", " l.any p = true ↔ βˆƒ a, a ∈ l ∧ p a = true", " [].any p = true ↔ βˆƒ ...
[ " l.all p = true ↔ βˆ€ (a : Ξ±), a ∈ l β†’ p a = true", " [].all p = true ↔ βˆ€ (a : Ξ±), a ∈ [] β†’ p a = true", " (a :: l).all p = true ↔ βˆ€ (a_1 : Ξ±), a_1 ∈ a :: l β†’ p a_1 = true", " (l.all fun a => decide (p a)) = true ↔ βˆ€ (a : Ξ±), a ∈ l β†’ p a", " l.any p = true ↔ βˆƒ a, a ∈ l ∧ p a = true", " [].any p = true ↔ βˆƒ ...
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530ab69a726862c2ab6802b38c" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open Function universe u variable {α β G M : Type*} @[to_additive] instance CommMagma.to_isCommutative [CommMagma G] : Std.Commutative (α := G) (· * ·) := ⟨mul_comm⟩ #align comm_semigroup.to_is_commutative CommMagma.to_isCommutative #align add_comm_semigroup.to_is_commutative AddCommMagma.to_isCommutative attribute [local simp] mul_assoc sub_eq_add_neg section DivInvMonoid variable [DivInvMonoid G] {a b c : G} @[to_additive, field_simps] -- The attributes are out of order on purpose theorem inv_eq_one_div (x : G) : x⁻¹ = 1 / x := by rw [div_eq_mul_inv, one_mul] #align inv_eq_one_div inv_eq_one_div #align neg_eq_zero_sub neg_eq_zero_sub @[to_additive] theorem mul_one_div (x y : G) : x * (1 / y) = x / y := by rw [div_eq_mul_inv, one_mul, div_eq_mul_inv] #align mul_one_div mul_one_div #align add_zero_sub add_zero_sub @[to_additive] theorem mul_div_assoc (a b c : G) : a * b / c = a * (b / c) := by rw [div_eq_mul_inv, div_eq_mul_inv, mul_assoc _ _ _] #align mul_div_assoc mul_div_assoc #align add_sub_assoc add_sub_assoc @[to_additive, field_simps] -- The attributes are out of order on purpose theorem mul_div_assoc' (a b c : G) : a * (b / c) = a * b / c := (mul_div_assoc _ _ _).symm #align mul_div_assoc' mul_div_assoc' #align add_sub_assoc' add_sub_assoc' @[to_additive (attr := simp)] theorem one_div (a : G) : 1 / a = a⁻¹ := (inv_eq_one_div a).symm #align one_div one_div #align zero_sub zero_sub @[to_additive]
Mathlib/Algebra/Group/Basic.lean
474
474
theorem mul_div (a b c : G) : a * (b / c) = a * b / c := by
simp only [mul_assoc, div_eq_mul_inv]
[ " x⁻¹ = 1 / x", " x * (1 / y) = x / y", " a * b / c = a * (b / c)", " a * (b / c) = a * b / c" ]
[ " x⁻¹ = 1 / x", " x * (1 / y) = x / y", " a * b / c = a * (b / c)" ]
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp] theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by cases n <;> rfl #align nat.choose_zero_right Nat.choose_zero_right @[simp] theorem choose_zero_succ (k : β„•) : choose 0 (succ k) = 0 := rfl #align nat.choose_zero_succ Nat.choose_zero_succ theorem choose_succ_succ (n k : β„•) : choose (succ n) (succ k) = choose n k + choose n (succ k) := rfl #align nat.choose_succ_succ Nat.choose_succ_succ theorem choose_succ_succ' (n k : β„•) : choose (n + 1) (k + 1) = choose n k + choose n (k + 1) := rfl theorem choose_eq_zero_of_lt : βˆ€ {n k}, n < k β†’ choose n k = 0 | _, 0, hk => absurd hk (Nat.not_lt_zero _) | 0, k + 1, _ => choose_zero_succ _ | n + 1, k + 1, hk => by have hnk : n < k := lt_of_succ_lt_succ hk have hnk1 : n < k + 1 := lt_of_succ_lt hk rw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1] #align nat.choose_eq_zero_of_lt Nat.choose_eq_zero_of_lt @[simp] theorem choose_self (n : β„•) : choose n n = 1 := by induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)] #align nat.choose_self Nat.choose_self @[simp] theorem choose_succ_self (n : β„•) : choose n (succ n) = 0 := choose_eq_zero_of_lt (lt_succ_self _) #align nat.choose_succ_self Nat.choose_succ_self @[simp] lemma choose_one_right (n : β„•) : choose n 1 = n := by induction n <;> simp [*, choose, Nat.add_comm] #align nat.choose_one_right Nat.choose_one_right -- The `n+1`-st triangle number is `n` more than the `n`-th triangle number
Mathlib/Data/Nat/Choose/Basic.lean
93
95
theorem triangle_succ (n : β„•) : (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n := by
rw [← add_mul_div_left, Nat.mul_comm 2 n, ← Nat.mul_add, Nat.add_sub_cancel, Nat.mul_comm] cases n <;> rfl; apply zero_lt_succ
[ " n.choose 0 = 1", " choose 0 0 = 1", " (n✝ + 1).choose 0 = 1", " (n + 1).choose (k + 1) = 0", " n.choose n = 1", " (n✝ + 1).choose (n✝ + 1) = 1", " n.choose 1 = n", " choose 0 1 = 0", " (n✝ + 1).choose 1 = n✝ + 1", " (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n", " n * (n + 1) / 2 = n * (n -...
[ " n.choose 0 = 1", " choose 0 0 = 1", " (n✝ + 1).choose 0 = 1", " (n + 1).choose (k + 1) = 0", " n.choose n = 1", " (n✝ + 1).choose (n✝ + 1) = 1", " n.choose 1 = n", " choose 0 1 = 0", " (n✝ + 1).choose 1 = n✝ + 1" ]
import Mathlib.LinearAlgebra.Matrix.DotProduct import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.Diagonal #align_import data.matrix.rank from "leanprover-community/mathlib"@"17219820a8aa8abe85adf5dfde19af1dd1bd8ae7" open Matrix namespace Matrix open FiniteDimensional variable {l m n o R : Type*} [Fintype n] [Fintype o] section CommRing variable [CommRing R] noncomputable def rank (A : Matrix m n R) : β„• := finrank R <| LinearMap.range A.mulVecLin #align matrix.rank Matrix.rank @[simp] theorem rank_one [StrongRankCondition R] [DecidableEq n] : rank (1 : Matrix n n R) = Fintype.card n := by rw [rank, mulVecLin_one, LinearMap.range_id, finrank_top, finrank_pi] #align matrix.rank_one Matrix.rank_one @[simp] theorem rank_zero [Nontrivial R] : rank (0 : Matrix m n R) = 0 := by rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot] #align matrix.rank_zero Matrix.rank_zero theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) : A.rank ≀ Fintype.card n := by haveI : Module.Finite R (n β†’ R) := Module.Finite.pi haveI : Module.Free R (n β†’ R) := Module.Free.pi _ _ exact A.mulVecLin.finrank_range_le.trans_eq (finrank_pi _) #align matrix.rank_le_card_width Matrix.rank_le_card_width theorem rank_le_width [StrongRankCondition R] {m n : β„•} (A : Matrix (Fin m) (Fin n) R) : A.rank ≀ n := A.rank_le_card_width.trans <| (Fintype.card_fin n).le #align matrix.rank_le_width Matrix.rank_le_width theorem rank_mul_le_left [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) : (A * B).rank ≀ A.rank := by rw [rank, rank, mulVecLin_mul] exact Cardinal.toNat_le_toNat (LinearMap.rank_comp_le_left _ _) (rank_lt_aleph0 _ _) #align matrix.rank_mul_le_left Matrix.rank_mul_le_left theorem rank_mul_le_right [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) : (A * B).rank ≀ B.rank := by rw [rank, rank, mulVecLin_mul] exact finrank_le_finrank_of_rank_le_rank (LinearMap.lift_rank_comp_le_right _ _) (rank_lt_aleph0 _ _) #align matrix.rank_mul_le_right Matrix.rank_mul_le_right theorem rank_mul_le [StrongRankCondition R] (A : Matrix m n R) (B : Matrix n o R) : (A * B).rank ≀ min A.rank B.rank := le_min (rank_mul_le_left _ _) (rank_mul_le_right _ _) #align matrix.rank_mul_le Matrix.rank_mul_le
Mathlib/Data/Matrix/Rank.lean
89
93
theorem rank_unit [StrongRankCondition R] [DecidableEq n] (A : (Matrix n n R)Λ£) : (A : Matrix n n R).rank = Fintype.card n := by
apply le_antisymm (rank_le_card_width (A : Matrix n n R)) _ have := rank_mul_le_left (A : Matrix n n R) (↑A⁻¹ : Matrix n n R) rwa [← Units.val_mul, mul_inv_self, Units.val_one, rank_one] at this
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≀ Fintype.card n", " (A * B).rank ≀ A.rank", " finrank R β†₯(LinearMap.range (A.mulVecLin βˆ˜β‚— B.mulVecLin)) ≀ finrank R β†₯(LinearMap.range A.mulVecLin)", " (A * B).rank ≀ B.rank", " finrank R β†₯(LinearMap.range (A.mulVecLin βˆ˜β‚— B.mulVecLin)) ≀ finrank R β†₯(Li...
[ " rank 1 = Fintype.card n", " rank 0 = 0", " A.rank ≀ Fintype.card n", " (A * B).rank ≀ A.rank", " finrank R β†₯(LinearMap.range (A.mulVecLin βˆ˜β‚— B.mulVecLin)) ≀ finrank R β†₯(LinearMap.range A.mulVecLin)", " (A * B).rank ≀ B.rank", " finrank R β†₯(LinearMap.range (A.mulVecLin βˆ˜β‚— B.mulVecLin)) ≀ finrank R β†₯(Li...
import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.LinearAlgebra.Basic import Mathlib.LinearAlgebra.Basis import Mathlib.LinearAlgebra.BilinearMap #align_import linear_algebra.sesquilinear_form from "leanprover-community/mathlib"@"87c54600fe3cdc7d32ff5b50873ac724d86aef8d" variable {R R₁ Rβ‚‚ R₃ M M₁ Mβ‚‚ M₃ Mₗ₁ Mₗ₁' Mβ‚—β‚‚ Mβ‚—β‚‚' K K₁ Kβ‚‚ V V₁ Vβ‚‚ n : Type*} namespace LinearMap section CommRing -- the `β‚—` subscript variables are for special cases about linear (as opposed to semilinear) maps variable [CommSemiring R] [CommSemiring R₁] [AddCommMonoid M₁] [Module R₁ M₁] [CommSemiring Rβ‚‚] [AddCommMonoid Mβ‚‚] [Module Rβ‚‚ Mβ‚‚] [AddCommMonoid M] [Module R M] {I₁ : R₁ β†’+* R} {Iβ‚‚ : Rβ‚‚ β†’+* R} {I₁' : R₁ β†’+* R} def IsOrtho (B : M₁ β†’β‚›β‚—[I₁] Mβ‚‚ β†’β‚›β‚—[Iβ‚‚] M) (x : M₁) (y : Mβ‚‚) : Prop := B x y = 0 #align linear_map.is_ortho LinearMap.IsOrtho theorem isOrtho_def {B : M₁ β†’β‚›β‚—[I₁] Mβ‚‚ β†’β‚›β‚—[Iβ‚‚] M} {x y} : B.IsOrtho x y ↔ B x y = 0 := Iff.rfl #align linear_map.is_ortho_def LinearMap.isOrtho_def theorem isOrtho_zero_left (B : M₁ β†’β‚›β‚—[I₁] Mβ‚‚ β†’β‚›β‚—[Iβ‚‚] M) (x) : IsOrtho B (0 : M₁) x := by dsimp only [IsOrtho] rw [map_zero B, zero_apply] #align linear_map.is_ortho_zero_left LinearMap.isOrtho_zero_left theorem isOrtho_zero_right (B : M₁ β†’β‚›β‚—[I₁] Mβ‚‚ β†’β‚›β‚—[Iβ‚‚] M) (x) : IsOrtho B x (0 : Mβ‚‚) := map_zero (B x) #align linear_map.is_ortho_zero_right LinearMap.isOrtho_zero_right theorem isOrtho_flip {B : M₁ β†’β‚›β‚—[I₁] M₁ β†’β‚›β‚—[I₁'] M} {x y} : B.IsOrtho x y ↔ B.flip.IsOrtho y x := by simp_rw [isOrtho_def, flip_apply] #align linear_map.is_ortho_flip LinearMap.isOrtho_flip def IsOrthoα΅’ (B : M₁ β†’β‚›β‚—[I₁] M₁ β†’β‚›β‚—[I₁'] M) (v : n β†’ M₁) : Prop := Pairwise (B.IsOrtho on v) set_option linter.uppercaseLean3 false in #align linear_map.is_Ortho LinearMap.IsOrthoα΅’ theorem isOrthoα΅’_def {B : M₁ β†’β‚›β‚—[I₁] M₁ β†’β‚›β‚—[I₁'] M} {v : n β†’ M₁} : B.IsOrthoα΅’ v ↔ βˆ€ i j : n, i β‰  j β†’ B (v i) (v j) = 0 := Iff.rfl set_option linter.uppercaseLean3 false in #align linear_map.is_Ortho_def LinearMap.isOrthoα΅’_def
Mathlib/LinearAlgebra/SesquilinearForm.lean
91
98
theorem isOrthoα΅’_flip (B : M₁ β†’β‚›β‚—[I₁] M₁ β†’β‚›β‚—[I₁'] M) {v : n β†’ M₁} : B.IsOrthoα΅’ v ↔ B.flip.IsOrthoα΅’ v := by
simp_rw [isOrthoα΅’_def] constructor <;> intro h i j hij Β· rw [flip_apply] exact h j i (Ne.symm hij) simp_rw [flip_apply] at h exact h j i (Ne.symm hij)
[ " B.IsOrtho 0 x", " (B 0) x = 0", " B.IsOrtho x y ↔ B.flip.IsOrtho y x", " B.IsOrthoα΅’ v ↔ B.flip.IsOrthoα΅’ v", " (βˆ€ (i j : n), i β‰  j β†’ (B (v i)) (v j) = 0) ↔ βˆ€ (i j : n), i β‰  j β†’ (B.flip (v i)) (v j) = 0", " (βˆ€ (i j : n), i β‰  j β†’ (B (v i)) (v j) = 0) β†’ βˆ€ (i j : n), i β‰  j β†’ (B.flip (v i)) (v j) = 0", " (βˆ€...
[ " B.IsOrtho 0 x", " (B 0) x = 0", " B.IsOrtho x y ↔ B.flip.IsOrtho y x" ]
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Algebra.Opposites import Mathlib.Algebra.Ring.Defs #align_import algebra.ring.basic from "leanprover-community/mathlib"@"2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c" variable {R : Type*} open Function namespace AddHom @[simps (config := .asFn)] def mulLeft [Distrib R] (r : R) : AddHom R R where toFun := (r * Β·) map_add' := mul_add r #align add_hom.mul_left AddHom.mulLeft #align add_hom.mul_left_apply AddHom.mulLeft_apply @[simps (config := .asFn)] def mulRight [Distrib R] (r : R) : AddHom R R where toFun a := a * r map_add' _ _ := add_mul _ _ r #align add_hom.mul_right AddHom.mulRight #align add_hom.mul_right_apply AddHom.mulRight_apply end AddHom section HasDistribNeg section Group variable {Ξ± : Type*} [Group Ξ±] [HasDistribNeg Ξ±] @[simp]
Mathlib/Algebra/Ring/Basic.lean
112
113
theorem inv_neg' (a : α) : (-a)⁻¹ = -a⁻¹ := by
rw [eq_comm, eq_inv_iff_mul_eq_one, neg_mul, mul_neg, neg_neg, mul_left_inv]
[ " (-a)⁻¹ = -a⁻¹" ]
[]
import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.integer from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" variable {R : Type*} [CommSemiring R] {M : Submonoid R} {S : Type*} [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] open Function namespace IsLocalization section variable (R) -- TODO: define a subalgebra of `IsInteger`s def IsInteger (a : S) : Prop := a ∈ (algebraMap R S).rangeS #align is_localization.is_integer IsLocalization.IsInteger end theorem isInteger_zero : IsInteger R (0 : S) := Subsemiring.zero_mem _ #align is_localization.is_integer_zero IsLocalization.isInteger_zero theorem isInteger_one : IsInteger R (1 : S) := Subsemiring.one_mem _ #align is_localization.is_integer_one IsLocalization.isInteger_one theorem isInteger_add {a b : S} (ha : IsInteger R a) (hb : IsInteger R b) : IsInteger R (a + b) := Subsemiring.add_mem _ ha hb #align is_localization.is_integer_add IsLocalization.isInteger_add theorem isInteger_mul {a b : S} (ha : IsInteger R a) (hb : IsInteger R b) : IsInteger R (a * b) := Subsemiring.mul_mem _ ha hb #align is_localization.is_integer_mul IsLocalization.isInteger_mul theorem isInteger_smul {a : R} {b : S} (hb : IsInteger R b) : IsInteger R (a β€’ b) := by rcases hb with ⟨b', hb⟩ use a * b' rw [← hb, (algebraMap R S).map_mul, Algebra.smul_def] #align is_localization.is_integer_smul IsLocalization.isInteger_smul variable (M) variable [IsLocalization M S] theorem exists_integer_multiple' (a : S) : βˆƒ b : M, IsInteger R (a * algebraMap R S b) := let ⟨⟨Num, denom⟩, h⟩ := IsLocalization.surj _ a ⟨denom, Set.mem_range.mpr ⟨Num, h.symm⟩⟩ #align is_localization.exists_integer_multiple' IsLocalization.exists_integer_multiple'
Mathlib/RingTheory/Localization/Integer.lean
85
87
theorem exists_integer_multiple (a : S) : βˆƒ b : M, IsInteger R ((b : R) β€’ a) := by
simp_rw [Algebra.smul_def, mul_comm _ a] apply exists_integer_multiple'
[ " IsInteger R (a β€’ b)", " (algebraMap R S) (a * b') = a β€’ b", " βˆƒ b, IsInteger R (↑b β€’ a)", " βˆƒ b, IsInteger R (a * (algebraMap R S) ↑b)" ]
[ " IsInteger R (a β€’ b)", " (algebraMap R S) (a * b') = a β€’ b" ]
import Mathlib.Algebra.Order.Monoid.Unbundled.Basic #align_import algebra.order.monoid.min_max from "leanprover-community/mathlib"@"de87d5053a9fe5cbde723172c0fb7e27e7436473" open Function variable {Ξ± Ξ² : Type*} section CovariantClassMulLe variable [LinearOrder Ξ±] section Mul variable [Mul Ξ±] @[to_additive] theorem lt_or_lt_of_mul_lt_mul [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· ≀ Β·)] [CovariantClass Ξ± Ξ± (Function.swap (Β· * Β·)) (Β· ≀ Β·)] {a₁ aβ‚‚ b₁ bβ‚‚ : Ξ±} : a₁ * b₁ < aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ < bβ‚‚ := by contrapose! exact fun h => mul_le_mul' h.1 h.2 #align lt_or_lt_of_mul_lt_mul lt_or_lt_of_mul_lt_mul #align lt_or_lt_of_add_lt_add lt_or_lt_of_add_lt_add @[to_additive] theorem le_or_lt_of_mul_le_mul [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· ≀ Β·)] [CovariantClass Ξ± Ξ± (Function.swap (Β· * Β·)) (Β· < Β·)] {a₁ aβ‚‚ b₁ bβ‚‚ : Ξ±} : a₁ * b₁ ≀ aβ‚‚ * bβ‚‚ β†’ a₁ ≀ aβ‚‚ ∨ b₁ < bβ‚‚ := by contrapose! exact fun h => mul_lt_mul_of_lt_of_le h.1 h.2 #align le_or_lt_of_mul_le_mul le_or_lt_of_mul_le_mul #align le_or_lt_of_add_le_add le_or_lt_of_add_le_add @[to_additive]
Mathlib/Algebra/Order/Monoid/Unbundled/MinMax.lean
108
112
theorem lt_or_le_of_mul_le_mul [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· < Β·)] [CovariantClass Ξ± Ξ± (Function.swap (Β· * Β·)) (Β· ≀ Β·)] {a₁ aβ‚‚ b₁ bβ‚‚ : Ξ±} : a₁ * b₁ ≀ aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ ≀ bβ‚‚ := by
contrapose! exact fun h => mul_lt_mul_of_le_of_lt h.1 h.2
[ " a₁ * b₁ < aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ < bβ‚‚", " aβ‚‚ ≀ a₁ ∧ bβ‚‚ ≀ b₁ β†’ aβ‚‚ * bβ‚‚ ≀ a₁ * b₁", " a₁ * b₁ ≀ aβ‚‚ * bβ‚‚ β†’ a₁ ≀ aβ‚‚ ∨ b₁ < bβ‚‚", " aβ‚‚ < a₁ ∧ bβ‚‚ ≀ b₁ β†’ aβ‚‚ * bβ‚‚ < a₁ * b₁", " a₁ * b₁ ≀ aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ ≀ bβ‚‚", " aβ‚‚ ≀ a₁ ∧ bβ‚‚ < b₁ β†’ aβ‚‚ * bβ‚‚ < a₁ * b₁" ]
[ " a₁ * b₁ < aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ < bβ‚‚", " aβ‚‚ ≀ a₁ ∧ bβ‚‚ ≀ b₁ β†’ aβ‚‚ * bβ‚‚ ≀ a₁ * b₁", " a₁ * b₁ ≀ aβ‚‚ * bβ‚‚ β†’ a₁ ≀ aβ‚‚ ∨ b₁ < bβ‚‚", " aβ‚‚ < a₁ ∧ bβ‚‚ ≀ b₁ β†’ aβ‚‚ * bβ‚‚ < a₁ * b₁" ]
import Mathlib.MeasureTheory.Integral.Lebesgue open Set hiding restrict restrict_apply open Filter ENNReal NNReal MeasureTheory.Measure namespace MeasureTheory variable {Ξ± : Type*} {m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} noncomputable def Measure.withDensity {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (f : Ξ± β†’ ℝβ‰₯0∞) : Measure Ξ± := Measure.ofMeasurable (fun s _ => ∫⁻ a in s, f a βˆ‚ΞΌ) (by simp) fun s hs hd => lintegral_iUnion hs hd _ #align measure_theory.measure.with_density MeasureTheory.Measure.withDensity @[simp] theorem withDensity_apply (f : Ξ± β†’ ℝβ‰₯0∞) {s : Set Ξ±} (hs : MeasurableSet s) : ΞΌ.withDensity f s = ∫⁻ a in s, f a βˆ‚ΞΌ := Measure.ofMeasurable_apply s hs #align measure_theory.with_density_apply MeasureTheory.withDensity_apply theorem withDensity_apply_le (f : Ξ± β†’ ℝβ‰₯0∞) (s : Set Ξ±) : ∫⁻ a in s, f a βˆ‚ΞΌ ≀ ΞΌ.withDensity f s := by let t := toMeasurable (ΞΌ.withDensity f) s calc ∫⁻ a in s, f a βˆ‚ΞΌ ≀ ∫⁻ a in t, f a βˆ‚ΞΌ := lintegral_mono_set (subset_toMeasurable (withDensity ΞΌ f) s) _ = ΞΌ.withDensity f t := (withDensity_apply f (measurableSet_toMeasurable (withDensity ΞΌ f) s)).symm _ = ΞΌ.withDensity f s := measure_toMeasurable s theorem withDensity_apply' [SFinite ΞΌ] (f : Ξ± β†’ ℝβ‰₯0∞) (s : Set Ξ±) : ΞΌ.withDensity f s = ∫⁻ a in s, f a βˆ‚ΞΌ := by apply le_antisymm ?_ (withDensity_apply_le f s) let t := toMeasurable ΞΌ s calc ΞΌ.withDensity f s ≀ ΞΌ.withDensity f t := measure_mono (subset_toMeasurable ΞΌ s) _ = ∫⁻ a in t, f a βˆ‚ΞΌ := withDensity_apply f (measurableSet_toMeasurable ΞΌ s) _ = ∫⁻ a in s, f a βˆ‚ΞΌ := by congr 1; exact restrict_toMeasurable_of_sFinite s @[simp] lemma withDensity_zero_left (f : Ξ± β†’ ℝβ‰₯0∞) : (0 : Measure Ξ±).withDensity f = 0 := by ext s hs rw [withDensity_apply _ hs] simp theorem withDensity_congr_ae {f g : Ξ± β†’ ℝβ‰₯0∞} (h : f =ᡐ[ΞΌ] g) : ΞΌ.withDensity f = ΞΌ.withDensity g := by refine Measure.ext fun s hs => ?_ rw [withDensity_apply _ hs, withDensity_apply _ hs] exact lintegral_congr_ae (ae_restrict_of_ae h) #align measure_theory.with_density_congr_ae MeasureTheory.withDensity_congr_ae lemma withDensity_mono {f g : Ξ± β†’ ℝβ‰₯0∞} (hfg : f ≀ᡐ[ΞΌ] g) : ΞΌ.withDensity f ≀ ΞΌ.withDensity g := by refine le_iff.2 fun s hs ↦ ?_ rw [withDensity_apply _ hs, withDensity_apply _ hs] refine set_lintegral_mono_ae' hs ?_ filter_upwards [hfg] with x h_le using fun _ ↦ h_le
Mathlib/MeasureTheory/Measure/WithDensity.lean
97
102
theorem withDensity_add_left {f : Ξ± β†’ ℝβ‰₯0∞} (hf : Measurable f) (g : Ξ± β†’ ℝβ‰₯0∞) : ΞΌ.withDensity (f + g) = ΞΌ.withDensity f + ΞΌ.withDensity g := by
refine Measure.ext fun s hs => ?_ rw [withDensity_apply _ hs, Measure.add_apply, withDensity_apply _ hs, withDensity_apply _ hs, ← lintegral_add_left hf] simp only [Pi.add_apply]
[ " (fun s x => ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ) βˆ… β‹― = 0", " ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ ≀ (ΞΌ.withDensity f) s", " (ΞΌ.withDensity f) s = ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " (ΞΌ.withDensity f) s ≀ ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " ∫⁻ (a : Ξ±) in t, f a βˆ‚ΞΌ = ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " ΞΌ.restrict t = ΞΌ.restrict s", " withDensity 0 f =...
[ " (fun s x => ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ) βˆ… β‹― = 0", " ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ ≀ (ΞΌ.withDensity f) s", " (ΞΌ.withDensity f) s = ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " (ΞΌ.withDensity f) s ≀ ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " ∫⁻ (a : Ξ±) in t, f a βˆ‚ΞΌ = ∫⁻ (a : Ξ±) in s, f a βˆ‚ΞΌ", " ΞΌ.restrict t = ΞΌ.restrict s", " withDensity 0 f =...
import Mathlib.RingTheory.Ideal.Maps import Mathlib.Topology.Algebra.Nonarchimedean.Bases import Mathlib.Topology.Algebra.UniformRing #align_import topology.algebra.nonarchimedean.adic_topology from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" variable {R : Type*} [CommRing R] open Set TopologicalAddGroup Submodule Filter open Topology Pointwise namespace Ideal theorem adic_basis (I : Ideal R) : SubmodulesRingBasis fun n : β„• => (I ^ n β€’ ⊀ : Ideal R) := { inter := by suffices βˆ€ i j : β„•, βˆƒ k, I ^ k ≀ I ^ i ∧ I ^ k ≀ I ^ j by simpa only [smul_eq_mul, mul_top, Algebra.id.map_eq_id, map_id, le_inf_iff] using this intro i j exact ⟨max i j, pow_le_pow_right (le_max_left i j), pow_le_pow_right (le_max_right i j)⟩ leftMul := by suffices βˆ€ (a : R) (i : β„•), βˆƒ j : β„•, a β€’ I ^ j ≀ I ^ i by simpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this intro r n use n rintro a ⟨x, hx, rfl⟩ exact (I ^ n).smul_mem r hx mul := by suffices βˆ€ i : β„•, βˆƒ j : β„•, (↑(I ^ j) * ↑(I ^ j) : Set R) βŠ† (↑(I ^ i) : Set R) by simpa only [smul_top_eq_map, Algebra.id.map_eq_id, map_id] using this intro n use n rintro a ⟨x, _hx, b, hb, rfl⟩ exact (I ^ n).smul_mem x hb } #align ideal.adic_basis Ideal.adic_basis def ringFilterBasis (I : Ideal R) := I.adic_basis.toRing_subgroups_basis.toRingFilterBasis #align ideal.ring_filter_basis Ideal.ringFilterBasis def adicTopology (I : Ideal R) : TopologicalSpace R := (adic_basis I).topology #align ideal.adic_topology Ideal.adicTopology theorem nonarchimedean (I : Ideal R) : @NonarchimedeanRing R _ I.adicTopology := I.adic_basis.toRing_subgroups_basis.nonarchimedean #align ideal.nonarchimedean Ideal.nonarchimedean theorem hasBasis_nhds_zero_adic (I : Ideal R) : HasBasis (@nhds R I.adicTopology (0 : R)) (fun _n : β„• => True) fun n => ((I ^ n : Ideal R) : Set R) := ⟨by intro U rw [I.ringFilterBasis.toAddGroupFilterBasis.nhds_zero_hasBasis.mem_iff] constructor Β· rintro ⟨-, ⟨i, rfl⟩, h⟩ replace h : ↑(I ^ i) βŠ† U := by simpa using h exact ⟨i, trivial, h⟩ Β· rintro ⟨i, -, h⟩ exact ⟨(I ^ i : Ideal R), ⟨i, by simp⟩, h⟩⟩ #align ideal.has_basis_nhds_zero_adic Ideal.hasBasis_nhds_zero_adic theorem hasBasis_nhds_adic (I : Ideal R) (x : R) : HasBasis (@nhds R I.adicTopology x) (fun _n : β„• => True) fun n => (fun y => x + y) '' (I ^ n : Ideal R) := by letI := I.adicTopology have := I.hasBasis_nhds_zero_adic.map fun y => x + y rwa [map_add_left_nhds_zero x] at this #align ideal.has_basis_nhds_adic Ideal.hasBasis_nhds_adic variable (I : Ideal R) (M : Type*) [AddCommGroup M] [Module R M]
Mathlib/Topology/Algebra/Nonarchimedean/AdicTopology.lean
116
126
theorem adic_module_basis : I.ringFilterBasis.SubmodulesBasis fun n : β„• => I ^ n β€’ (⊀ : Submodule R M) := { inter := fun i j => ⟨max i j, le_inf_iff.mpr ⟨smul_mono_left <| pow_le_pow_right (le_max_left i j), smul_mono_left <| pow_le_pow_right (le_max_right i j)⟩⟩ smul := fun m i => ⟨(I ^ i β€’ ⊀ : Ideal R), ⟨i, by simp⟩, fun a a_in => by replace a_in : a ∈ I ^ i := by
simpa [(I ^ i).mul_top] using a_in exact smul_mem_smul a_in mem_top⟩ }
[ " βˆ€ (i j : β„•), βˆƒ k, I ^ k β€’ ⊀ ≀ I ^ i β€’ ⊀ βŠ“ I ^ j β€’ ⊀", " βˆ€ (i j : β„•), βˆƒ k, I ^ k ≀ I ^ i ∧ I ^ k ≀ I ^ j", " βˆƒ k, I ^ k ≀ I ^ i ∧ I ^ k ≀ I ^ j", " βˆ€ (a : R) (i : β„•), βˆƒ j, a β€’ I ^ j β€’ ⊀ ≀ I ^ i β€’ ⊀", " βˆ€ (a : R) (i : β„•), βˆƒ j, a β€’ I ^ j ≀ I ^ i", " βˆƒ j, r β€’ I ^ j ≀ I ^ n", " r β€’ I ^ n ≀ I ^ n", " (Dis...
[ " βˆ€ (i j : β„•), βˆƒ k, I ^ k β€’ ⊀ ≀ I ^ i β€’ ⊀ βŠ“ I ^ j β€’ ⊀", " βˆ€ (i j : β„•), βˆƒ k, I ^ k ≀ I ^ i ∧ I ^ k ≀ I ^ j", " βˆƒ k, I ^ k ≀ I ^ i ∧ I ^ k ≀ I ^ j", " βˆ€ (a : R) (i : β„•), βˆƒ j, a β€’ I ^ j β€’ ⊀ ≀ I ^ i β€’ ⊀", " βˆ€ (a : R) (i : β„•), βˆƒ j, a β€’ I ^ j ≀ I ^ i", " βˆƒ j, r β€’ I ^ j ≀ I ^ n", " r β€’ I ^ n ≀ I ^ n", " (Dis...
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" namespace MeasureTheory open Filter open scoped ENNReal variable {Ξ± E : Type*} {m m0 : MeasurableSpace Ξ±} {p : ℝβ‰₯0∞} {q : ℝ} {ΞΌ : Measure Ξ±} [NormedAddCommGroup E] theorem snorm'_trim (hm : m ≀ m0) {f : Ξ± β†’ E} (hf : StronglyMeasurable[m] f) : snorm' f q (ΞΌ.trim hm) = snorm' f q ΞΌ := by simp_rw [snorm'] congr 1 refine lintegral_trim hm ?_ refine @Measurable.pow_const _ _ _ _ _ _ _ m _ (@Measurable.coe_nnreal_ennreal _ m _ ?_) q apply @StronglyMeasurable.measurable exact @StronglyMeasurable.nnnorm Ξ± m _ _ _ hf #align measure_theory.snorm'_trim MeasureTheory.snorm'_trim theorem limsup_trim (hm : m ≀ m0) {f : Ξ± β†’ ℝβ‰₯0∞} (hf : Measurable[m] f) : limsup f (ae (ΞΌ.trim hm)) = limsup f (ae ΞΌ) := by simp_rw [limsup_eq] suffices h_set_eq : { a : ℝβ‰₯0∞ | βˆ€α΅ n βˆ‚ΞΌ.trim hm, f n ≀ a } = { a : ℝβ‰₯0∞ | βˆ€α΅ n βˆ‚ΞΌ, f n ≀ a } by rw [h_set_eq] ext1 a suffices h_meas_eq : ΞΌ { x | Β¬f x ≀ a } = ΞΌ.trim hm { x | Β¬f x ≀ a } by simp_rw [Set.mem_setOf_eq, ae_iff, h_meas_eq] refine (trim_measurableSet_eq hm ?_).symm refine @MeasurableSet.compl _ _ m (@measurableSet_le ℝβ‰₯0∞ _ _ _ _ m _ _ _ _ _ hf ?_) exact @measurable_const _ _ _ m _ #align measure_theory.limsup_trim MeasureTheory.limsup_trim theorem essSup_trim (hm : m ≀ m0) {f : Ξ± β†’ ℝβ‰₯0∞} (hf : Measurable[m] f) : essSup f (ΞΌ.trim hm) = essSup f ΞΌ := by simp_rw [essSup] exact limsup_trim hm hf #align measure_theory.ess_sup_trim MeasureTheory.essSup_trim theorem snormEssSup_trim (hm : m ≀ m0) {f : Ξ± β†’ E} (hf : StronglyMeasurable[m] f) : snormEssSup f (ΞΌ.trim hm) = snormEssSup f ΞΌ := essSup_trim _ (@StronglyMeasurable.ennnorm _ m _ _ _ hf) #align measure_theory.snorm_ess_sup_trim MeasureTheory.snormEssSup_trim theorem snorm_trim (hm : m ≀ m0) {f : Ξ± β†’ E} (hf : StronglyMeasurable[m] f) : snorm f p (ΞΌ.trim hm) = snorm f p ΞΌ := by by_cases h0 : p = 0 Β· simp [h0] by_cases h_top : p = ∞ Β· simpa only [h_top, snorm_exponent_top] using snormEssSup_trim hm hf simpa only [snorm_eq_snorm' h0 h_top] using snorm'_trim hm hf #align measure_theory.snorm_trim MeasureTheory.snorm_trim
Mathlib/MeasureTheory/Function/LpSeminorm/Trim.lean
68
71
theorem snorm_trim_ae (hm : m ≀ m0) {f : Ξ± β†’ E} (hf : AEStronglyMeasurable f (ΞΌ.trim hm)) : snorm f p (ΞΌ.trim hm) = snorm f p ΞΌ := by
rw [snorm_congr_ae hf.ae_eq_mk, snorm_congr_ae (ae_eq_of_ae_eq_trim hf.ae_eq_mk)] exact snorm_trim hm hf.stronglyMeasurable_mk
[ " snorm' f q (ΞΌ.trim hm) = snorm' f q ΞΌ", " (∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ.trim hm) ^ (1 / q) = (∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ) ^ (1 / q)", " ∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ.trim hm = ∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ", " Measurable fun a => ↑‖f aβ€–β‚Š ^ q", " Measurable fun a => β€–f aβ€–β‚Š", " StronglyMeasurable fun a => β€–f aβ€–β‚Š"...
[ " snorm' f q (ΞΌ.trim hm) = snorm' f q ΞΌ", " (∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ.trim hm) ^ (1 / q) = (∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ) ^ (1 / q)", " ∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ.trim hm = ∫⁻ (a : Ξ±), ↑‖f aβ€–β‚Š ^ q βˆ‚ΞΌ", " Measurable fun a => ↑‖f aβ€–β‚Š ^ q", " Measurable fun a => β€–f aβ€–β‚Š", " StronglyMeasurable fun a => β€–f aβ€–β‚Š"...
import Mathlib.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 RelPrime variable {Ξ± I} [CommMonoid Ξ±] [DecompositionMonoid Ξ±] {x y z : Ξ±} {s : I β†’ Ξ±} {t : Finset I} theorem IsRelPrime.prod_left : (βˆ€ i ∈ t, IsRelPrime (s i) x) β†’ IsRelPrime (∏ i ∈ t, s i) x := by classical refine Finset.induction_on t (fun _ ↦ isRelPrime_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) theorem IsRelPrime.prod_right : (βˆ€ i ∈ t, IsRelPrime x (s i)) β†’ IsRelPrime x (∏ i ∈ t, s i) := by simpa only [isRelPrime_comm] using IsRelPrime.prod_left (Ξ± := Ξ±) theorem IsRelPrime.prod_left_iff : IsRelPrime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, IsRelPrime (s i) x := by classical refine Finset.induction_on t (iff_of_true isRelPrime_one_left fun _ ↦ by simp) fun b t hbt ih ↦ ?_ rw [Finset.prod_insert hbt, IsRelPrime.mul_left_iff, ih, Finset.forall_mem_insert]
Mathlib/RingTheory/Coprime/Lemmas.lean
250
251
theorem IsRelPrime.prod_right_iff : IsRelPrime x (∏ i ∈ t, s i) ↔ βˆ€ i ∈ t, IsRelPrime x (s i) := by
simpa only [isRelPrime_comm] using IsRelPrime.prod_left_iff (Ξ± := Ξ±)
[ " (βˆ€ i ∈ t, IsRelPrime (s i) x) β†’ IsRelPrime (∏ i ∈ t, s i) x", " IsRelPrime (∏ i ∈ insert b t, s i) x", " IsRelPrime (s b * ∏ x ∈ t, s x) x", " (βˆ€ i ∈ t, IsRelPrime x (s i)) β†’ IsRelPrime x (∏ i ∈ t, s i)", " IsRelPrime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, IsRelPrime (s i) x", " x✝ ∈ βˆ… β†’ IsRelPrime (s x✝) x", " ...
[ " (βˆ€ i ∈ t, IsRelPrime (s i) x) β†’ IsRelPrime (∏ i ∈ t, s i) x", " IsRelPrime (∏ i ∈ insert b t, s i) x", " IsRelPrime (s b * ∏ x ∈ t, s x) x", " (βˆ€ i ∈ t, IsRelPrime x (s i)) β†’ IsRelPrime x (∏ i ∈ t, s i)", " IsRelPrime (∏ i ∈ t, s i) x ↔ βˆ€ i ∈ t, IsRelPrime (s i) x", " x✝ ∈ βˆ… β†’ IsRelPrime (s x✝) x", " ...
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {X ΞΉ : Type*} variable [PseudoMetricSpace Ξ±] namespace Metric #align metric.bounded Bornology.IsBounded section Bounded variable {x : Ξ±} {s t : Set Ξ±} {r : ℝ} #noalign metric.bounded_iff_is_bounded #align metric.bounded_empty Bornology.isBounded_empty #align metric.bounded_iff_mem_bounded Bornology.isBounded_iff_forall_mem #align metric.bounded.mono Bornology.IsBounded.subset theorem isBounded_closedBall : IsBounded (closedBall x r) := isBounded_iff.2 ⟨r + r, fun y hy z hz => calc dist y z ≀ dist y x + dist z x := dist_triangle_right _ _ _ _ ≀ r + r := add_le_add hy hz⟩ #align metric.bounded_closed_ball Metric.isBounded_closedBall theorem isBounded_ball : IsBounded (ball x r) := isBounded_closedBall.subset ball_subset_closedBall #align metric.bounded_ball Metric.isBounded_ball theorem isBounded_sphere : IsBounded (sphere x r) := isBounded_closedBall.subset sphere_subset_closedBall #align metric.bounded_sphere Metric.isBounded_sphere theorem isBounded_iff_subset_closedBall (c : Ξ±) : IsBounded s ↔ βˆƒ r, s βŠ† closedBall c r := ⟨fun h ↦ (isBounded_iff.1 (h.insert c)).imp fun _r hr _x hx ↦ hr (.inr hx) (mem_insert _ _), fun ⟨_r, hr⟩ ↦ isBounded_closedBall.subset hr⟩ #align metric.bounded_iff_subset_ball Metric.isBounded_iff_subset_closedBall theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : Ξ±) : βˆƒ r, s βŠ† closedBall c r := (isBounded_iff_subset_closedBall c).1 h #align metric.bounded.subset_ball Bornology.IsBounded.subset_closedBall theorem _root_.Bornology.IsBounded.subset_ball_lt (h : IsBounded s) (a : ℝ) (c : Ξ±) : βˆƒ r, a < r ∧ s βŠ† ball c r := let ⟨r, hr⟩ := h.subset_closedBall c ⟨max r a + 1, (le_max_right _ _).trans_lt (lt_add_one _), hr.trans <| closedBall_subset_ball <| (le_max_left _ _).trans_lt (lt_add_one _)⟩ theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : Ξ±) : βˆƒ r, s βŠ† ball c r := (h.subset_ball_lt 0 c).imp fun _ ↦ And.right theorem isBounded_iff_subset_ball (c : Ξ±) : IsBounded s ↔ βˆƒ r, s βŠ† ball c r := ⟨(IsBounded.subset_ball Β· c), fun ⟨_r, hr⟩ ↦ isBounded_ball.subset hr⟩ theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : Ξ±) : βˆƒ r, a < r ∧ s βŠ† closedBall c r := let ⟨r, har, hr⟩ := h.subset_ball_lt a c ⟨r, har, hr.trans ball_subset_closedBall⟩ #align metric.bounded.subset_ball_lt Bornology.IsBounded.subset_closedBall_lt theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s) := let ⟨C, h⟩ := isBounded_iff.1 h isBounded_iff.2 ⟨C, fun _a ha _b hb => isClosed_Iic.closure_subset <| map_mem_closureβ‚‚ continuous_dist ha hb h⟩ #align metric.bounded_closure_of_bounded Metric.isBounded_closure_of_isBounded protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s) := isBounded_closure_of_isBounded h #align metric.bounded.closure Bornology.IsBounded.closure @[simp] theorem isBounded_closure_iff : IsBounded (closure s) ↔ IsBounded s := ⟨fun h => h.subset subset_closure, fun h => h.closure⟩ #align metric.bounded_closure_iff Metric.isBounded_closure_iff #align metric.bounded_union Bornology.isBounded_union #align metric.bounded.union Bornology.IsBounded.union #align metric.bounded_bUnion Bornology.isBounded_biUnion #align metric.bounded.prod Bornology.IsBounded.prod theorem hasBasis_cobounded_compl_closedBall (c : Ξ±) : (cobounded Ξ±).HasBasis (fun _ ↦ True) (fun r ↦ (closedBall c r)ᢜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_closedBall c).trans <| by simp⟩ theorem hasBasis_cobounded_compl_ball (c : Ξ±) : (cobounded Ξ±).HasBasis (fun _ ↦ True) (fun r ↦ (ball c r)ᢜ) := ⟨compl_surjective.forall.2 fun _ ↦ (isBounded_iff_subset_ball c).trans <| by simp⟩ @[simp] theorem comap_dist_right_atTop (c : Ξ±) : comap (dist Β· c) atTop = cobounded Ξ± := (atTop_basis.comap _).eq_of_same_basis <| by simpa only [compl_def, mem_ball, not_lt] using hasBasis_cobounded_compl_ball c @[simp] theorem comap_dist_left_atTop (c : Ξ±) : comap (dist c) atTop = cobounded Ξ± := by simpa only [dist_comm _ c] using comap_dist_right_atTop c @[simp]
Mathlib/Topology/MetricSpace/Bounded.lean
137
139
theorem tendsto_dist_right_atTop_iff (c : Ξ±) {f : Ξ² β†’ Ξ±} {l : Filter Ξ²} : Tendsto (fun x ↦ dist (f x) c) l atTop ↔ Tendsto f l (cobounded Ξ±) := by
rw [← comap_dist_right_atTop c, tendsto_comap_iff, Function.comp_def]
[ " (βˆƒ r, x✝ βŠ† closedBall c r) ↔ βˆƒ i, True ∧ (closedBall c i)ᢜ βŠ† x✝ᢜ", " (βˆƒ r, x✝ βŠ† ball c r) ↔ βˆƒ i, True ∧ (ball c i)ᢜ βŠ† x✝ᢜ", " (cobounded Ξ±).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i", " comap (dist c) atTop = cobounded Ξ±", " Tendsto (fun x => dist (f x) c) l atTop ↔ Tendsto f l (cobo...
[ " (βˆƒ r, x✝ βŠ† closedBall c r) ↔ βˆƒ i, True ∧ (closedBall c i)ᢜ βŠ† x✝ᢜ", " (βˆƒ r, x✝ βŠ† ball c r) ↔ βˆƒ i, True ∧ (ball c i)ᢜ βŠ† x✝ᢜ", " (cobounded Ξ±).HasBasis (fun x => True) fun i => (fun x => dist x c) ⁻¹' Ici i", " comap (dist c) atTop = cobounded Ξ±" ]
import Mathlib.RingTheory.PowerSeries.Trunc import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.Derivation.Basic namespace PowerSeries open Polynomial Derivation Nat section CommutativeSemiring variable {R} [CommSemiring R] noncomputable def derivativeFun (f : R⟦X⟧) : R⟦X⟧ := mk fun n ↦ coeff R (n + 1) f * (n + 1) theorem coeff_derivativeFun (f : R⟦X⟧) (n : β„•) : coeff R n f.derivativeFun = coeff R (n + 1) f * (n + 1) := by rw [derivativeFun, coeff_mk] theorem derivativeFun_coe (f : R[X]) : (f : R⟦X⟧).derivativeFun = derivative f := by ext rw [coeff_derivativeFun, coeff_coe, coeff_coe, coeff_derivative] theorem derivativeFun_add (f g : R⟦X⟧) : derivativeFun (f + g) = derivativeFun f + derivativeFun g := by ext rw [coeff_derivativeFun, map_add, map_add, coeff_derivativeFun, coeff_derivativeFun, add_mul] theorem derivativeFun_C (r : R) : derivativeFun (C R r) = 0 := by ext n -- Note that `map_zero` didn't get picked up, apparently due to a missing `FunLike.coe` rw [coeff_derivativeFun, coeff_succ_C, zero_mul, (coeff R n).map_zero] theorem trunc_derivativeFun (f : R⟦X⟧) (n : β„•) : trunc n f.derivativeFun = derivative (trunc (n + 1) f) := by ext d rw [coeff_trunc] split_ifs with h Β· have : d + 1 < n + 1 := succ_lt_succ_iff.2 h rw [coeff_derivativeFun, coeff_derivative, coeff_trunc, if_pos this] Β· have : Β¬d + 1 < n + 1 := by rwa [succ_lt_succ_iff] rw [coeff_derivative, coeff_trunc, if_neg this, zero_mul] --A special case of `derivativeFun_mul`, used in its proof. private theorem derivativeFun_coe_mul_coe (f g : R[X]) : derivativeFun (f * g : R⟦X⟧) = f * derivative g + g * derivative f := by rw [← coe_mul, derivativeFun_coe, derivative_mul, add_comm, mul_comm _ g, ← coe_mul, ← coe_mul, Polynomial.coe_add] theorem derivativeFun_mul (f g : R⟦X⟧) : derivativeFun (f * g) = f β€’ g.derivativeFun + g β€’ f.derivativeFun := by ext n have h₁ : n < n + 1 := lt_succ_self n have hβ‚‚ : n < n + 1 + 1 := Nat.lt_add_right _ h₁ rw [coeff_derivativeFun, map_add, coeff_mul_eq_coeff_trunc_mul_trunc _ _ (lt_succ_self _), smul_eq_mul, smul_eq_mul, coeff_mul_eq_coeff_trunc_mul_truncβ‚‚ g f.derivativeFun hβ‚‚ h₁, coeff_mul_eq_coeff_trunc_mul_truncβ‚‚ f g.derivativeFun hβ‚‚ h₁, trunc_derivativeFun, trunc_derivativeFun, ← map_add, ← derivativeFun_coe_mul_coe, coeff_derivativeFun]
Mathlib/RingTheory/PowerSeries/Derivative.lean
87
88
theorem derivativeFun_one : derivativeFun (1 : R⟦X⟧) = 0 := by
rw [← map_one (C R), derivativeFun_C (1 : R)]
[ " (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)", " (↑f).derivativeFun = ↑(derivative f)", " (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)", " (f + g).derivativeFun = f.derivativeFun + g.derivativeFun", " (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g....
[ " (coeff R n) f.derivativeFun = (coeff R (n + 1)) f * (↑n + 1)", " (↑f).derivativeFun = ↑(derivative f)", " (coeff R n✝) (↑f).derivativeFun = (coeff R n✝) ↑(derivative f)", " (f + g).derivativeFun = f.derivativeFun + g.derivativeFun", " (coeff R n✝) (f + g).derivativeFun = (coeff R n✝) (f.derivativeFun + g....
import Mathlib.Init.Logic import Mathlib.Tactic.AdaptationNote import Mathlib.Tactic.Coe set_option autoImplicit true -- We align Lean 3 lemmas with lemmas in `Init.SimpLemmas` in Lean 4. #align band_self Bool.and_self #align band_tt Bool.and_true #align band_ff Bool.and_false #align tt_band Bool.true_and #align ff_band Bool.false_and #align bor_self Bool.or_self #align bor_tt Bool.or_true #align bor_ff Bool.or_false #align tt_bor Bool.true_or #align ff_bor Bool.false_or #align bnot_bnot Bool.not_not namespace Bool #align bool.cond_tt Bool.cond_true #align bool.cond_ff Bool.cond_false #align cond_a_a Bool.cond_self attribute [simp] xor_self #align bxor_self Bool.xor_self #align bxor_tt Bool.xor_true #align bxor_ff Bool.xor_false #align tt_bxor Bool.true_xor #align ff_bxor Bool.false_xor theorem true_eq_false_eq_False : Β¬true = false := by decide #align tt_eq_ff_eq_false Bool.true_eq_false_eq_False theorem false_eq_true_eq_False : Β¬false = true := by decide #align ff_eq_tt_eq_false Bool.false_eq_true_eq_False theorem eq_false_eq_not_eq_true (b : Bool) : (Β¬b = true) = (b = false) := by simp #align eq_ff_eq_not_eq_tt Bool.eq_false_eq_not_eq_true theorem eq_true_eq_not_eq_false (b : Bool) : (Β¬b = false) = (b = true) := by simp #align eq_tt_eq_not_eq_ft Bool.eq_true_eq_not_eq_false theorem eq_false_of_not_eq_true {b : Bool} : Β¬b = true β†’ b = false := Eq.mp (eq_false_eq_not_eq_true b) #align eq_ff_of_not_eq_tt Bool.eq_false_of_not_eq_true theorem eq_true_of_not_eq_false {b : Bool} : Β¬b = false β†’ b = true := Eq.mp (eq_true_eq_not_eq_false b) #align eq_tt_of_not_eq_ff Bool.eq_true_of_not_eq_false theorem and_eq_true_eq_eq_true_and_eq_true (a b : Bool) : ((a && b) = true) = (a = true ∧ b = true) := by simp #align band_eq_true_eq_eq_tt_and_eq_tt Bool.and_eq_true_eq_eq_true_and_eq_true theorem or_eq_true_eq_eq_true_or_eq_true (a b : Bool) : ((a || b) = true) = (a = true ∨ b = true) := by simp #align bor_eq_true_eq_eq_tt_or_eq_tt Bool.or_eq_true_eq_eq_true_or_eq_true
Mathlib/Init/Data/Bool/Lemmas.lean
76
76
theorem not_eq_true_eq_eq_false (a : Bool) : (not a = true) = (a = false) := by
cases a <;> simp
[ " ¬true = false", " ¬false = true", " (¬b = true) = (b = false)", " (¬b = false) = (b = true)", " ((a && b) = true) = (a = true ∧ b = true)", " ((a || b) = true) = (a = true ∨ b = true)", " ((!a) = true) = (a = false)", " ((!false) = true) = (false = false)", " ((!true) = true) = (true = false)" ]
[ " ¬true = false", " ¬false = true", " (¬b = true) = (b = false)", " (¬b = false) = (b = true)", " ((a && b) = true) = (a = true ∧ b = true)", " ((a || b) = true) = (a = true ∨ b = true)" ]
import Mathlib.Geometry.Manifold.ContMDiff.Defs open Set Filter Function open scoped Topology Manifold variable {π•œ : Type*} [NontriviallyNormedField π•œ] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π•œ E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] -- declare a smooth manifold `M'` over the pair `(E', H')`. {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π•œ E'] {H' : Type*} [TopologicalSpace H'] (I' : ModelWithCorners π•œ E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [SmoothManifoldWithCorners I' M'] -- declare a manifold `M''` over the pair `(E'', H'')`. {E'' : Type*} [NormedAddCommGroup E''] [NormedSpace π•œ E''] {H'' : Type*} [TopologicalSpace H''] {I'' : ModelWithCorners π•œ E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M''] -- declare functions, sets, points and smoothness indices {e : PartialHomeomorph M H} {e' : PartialHomeomorph M' H'} {f f₁ : M β†’ M'} {s s₁ t : Set M} {x : M} {m n : β„•βˆž} variable {I I'} section Composition
Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
52
77
theorem ContMDiffWithinAt.comp {t : Set M'} {g : M' β†’ M''} (x : M) (hg : ContMDiffWithinAt I' I'' n g t (f x)) (hf : ContMDiffWithinAt I I' n f s x) (st : MapsTo f s t) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by
rw [contMDiffWithinAt_iff] at hg hf ⊒ refine ⟨hg.1.comp hf.1 st, ?_⟩ set e := extChartAt I x set e' := extChartAt I' (f x) have : e' (f x) = (writtenInExtChartAt I I' x f) (e x) := by simp only [e, e', mfld_simps] rw [this] at hg have A : βˆ€αΆ  y in 𝓝[e.symm ⁻¹' s ∩ range I] e x, f (e.symm y) ∈ t ∧ f (e.symm y) ∈ e'.source := by simp only [e, ← map_extChartAt_nhdsWithin, eventually_map] filter_upwards [hf.1.tendsto (extChartAt_source_mem_nhds I' (f x)), inter_mem_nhdsWithin s (extChartAt_source_mem_nhds I x)] rintro x' (hfx' : f x' ∈ e'.source) ⟨hx's, hx'⟩ simp only [e.map_source hx', true_and_iff, e.left_inv hx', st hx's, *] refine ((hg.2.comp _ (hf.2.mono inter_subset_right) inter_subset_left).mono_of_mem (inter_mem ?_ self_mem_nhdsWithin)).congr_of_eventuallyEq ?_ ?_ Β· filter_upwards [A] rintro x' ⟨ht, hfx'⟩ simp only [*, mem_preimage, writtenInExtChartAt, (Β· ∘ Β·), mem_inter_iff, e'.left_inv, true_and_iff] exact mem_range_self _ Β· filter_upwards [A] rintro x' ⟨-, hfx'⟩ simp only [*, (Β· ∘ Β·), writtenInExtChartAt, e'.left_inv] Β· simp only [e, e', writtenInExtChartAt, (Β· ∘ Β·), mem_extChartAt_source, e.left_inv, e'.left_inv]
[ " ContMDiffWithinAt I I'' n (g ∘ f) s x", " ContinuousWithinAt (g ∘ f) s x ∧\n ContDiffWithinAt π•œ n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑(extChartAt I x).symm)\n (↑(extChartAt I x).symm ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)", " ContDiffWithinAt π•œ n (↑(extChartAt I'' ((g ∘ f) x)) ∘ (g ∘ f) ∘ ↑...
[]
import Mathlib.MeasureTheory.MeasurableSpace.Defs import Mathlib.SetTheory.Cardinal.Cofinality import Mathlib.SetTheory.Cardinal.Continuum #align_import measure_theory.card_measurable_space from "leanprover-community/mathlib"@"f2b108e8e97ba393f22bf794989984ddcc1da89b" universe u variable {Ξ± : Type u} open Cardinal Set -- Porting note: fix universe below, not here local notation "ω₁" => (WellOrder.Ξ± <| Quotient.out <| Cardinal.ord (aleph 1 : Cardinal)) namespace MeasurableSpace def generateMeasurableRec (s : Set (Set Ξ±)) : (ω₁ : Type u) β†’ Set (Set Ξ±) | i => let S := ⋃ j : Iio i, generateMeasurableRec s (j.1) s βˆͺ {βˆ…} βˆͺ compl '' S βˆͺ Set.range fun f : β„• β†’ S => ⋃ n, (f n).1 termination_by i => i decreasing_by exact j.2 #align measurable_space.generate_measurable_rec MeasurableSpace.generateMeasurableRec theorem self_subset_generateMeasurableRec (s : Set (Set Ξ±)) (i : ω₁) : s βŠ† generateMeasurableRec s i := by unfold generateMeasurableRec apply_rules [subset_union_of_subset_left] exact subset_rfl #align measurable_space.self_subset_generate_measurable_rec MeasurableSpace.self_subset_generateMeasurableRec
Mathlib/MeasureTheory/MeasurableSpace/Card.lean
62
65
theorem empty_mem_generateMeasurableRec (s : Set (Set Ξ±)) (i : ω₁) : βˆ… ∈ generateMeasurableRec s i := by
unfold generateMeasurableRec exact mem_union_left _ (mem_union_left _ (mem_union_right _ (mem_singleton βˆ…)))
[ " (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝", " s βŠ† generateMeasurableRec s i", " s βŠ†\n let i := i;\n let S := ⋃ j, generateMeasurableRec s ↑j;\n s βˆͺ {βˆ…} βˆͺ compl '' S βˆͺ range fun f => ⋃ n, ↑(f n)", " s βŠ† s", " βˆ… ∈ generateMeasurableRec s i", " βˆ… ∈\n let i := i;\n l...
[ " (invImage (fun x => x) (hasWellFoundedOut (aleph 1).ord)).1 (↑j) a✝", " s βŠ† generateMeasurableRec s i", " s βŠ†\n let i := i;\n let S := ⋃ j, generateMeasurableRec s ↑j;\n s βˆͺ {βˆ…} βˆͺ compl '' S βˆͺ range fun f => ⋃ n, ↑(f n)", " s βŠ† s" ]
import Mathlib.Order.PartialSups #align_import order.disjointed from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {Ξ± Ξ² : Type*} section GeneralizedBooleanAlgebra variable [GeneralizedBooleanAlgebra Ξ±] def disjointed (f : β„• β†’ Ξ±) : β„• β†’ Ξ± | 0 => f 0 | n + 1 => f (n + 1) \ partialSups f n #align disjointed disjointed @[simp] theorem disjointed_zero (f : β„• β†’ Ξ±) : disjointed f 0 = f 0 := rfl #align disjointed_zero disjointed_zero theorem disjointed_succ (f : β„• β†’ Ξ±) (n : β„•) : disjointed f (n + 1) = f (n + 1) \ partialSups f n := rfl #align disjointed_succ disjointed_succ theorem disjointed_le_id : disjointed ≀ (id : (β„• β†’ Ξ±) β†’ β„• β†’ Ξ±) := by rintro f n cases n Β· rfl Β· exact sdiff_le #align disjointed_le_id disjointed_le_id theorem disjointed_le (f : β„• β†’ Ξ±) : disjointed f ≀ f := disjointed_le_id f #align disjointed_le disjointed_le theorem disjoint_disjointed (f : β„• β†’ Ξ±) : Pairwise (Disjoint on disjointed f) := by refine (Symmetric.pairwise_on Disjoint.symm _).2 fun m n h => ?_ cases n Β· exact (Nat.not_lt_zero _ h).elim exact disjoint_sdiff_self_right.mono_left ((disjointed_le f m).trans (le_partialSups_of_le f (Nat.lt_add_one_iff.1 h))) #align disjoint_disjointed disjoint_disjointed -- Porting note: `disjointedRec` had a change in universe level. def disjointedRec {f : β„• β†’ Ξ±} {p : Ξ± β†’ Sort*} (hdiff : βˆ€ ⦃t i⦄, p t β†’ p (t \ f i)) : βˆ€ ⦃n⦄, p (f n) β†’ p (disjointed f n) | 0 => id | n + 1 => fun h => by suffices H : βˆ€ k, p (f (n + 1) \ partialSups f k) from H n rintro k induction' k with k ih Β· exact hdiff h rw [partialSups_succ, ← sdiff_sdiff_left] exact hdiff ih #align disjointed_rec disjointedRec @[simp] theorem disjointedRec_zero {f : β„• β†’ Ξ±} {p : Ξ± β†’ Sort*} (hdiff : βˆ€ ⦃t i⦄, p t β†’ p (t \ f i)) (hβ‚€ : p (f 0)) : disjointedRec hdiff hβ‚€ = hβ‚€ := rfl #align disjointed_rec_zero disjointedRec_zero -- TODO: Find a useful statement of `disjointedRec_succ`. protected lemma Monotone.disjointed_succ {f : β„• β†’ Ξ±} (hf : Monotone f) (n : β„•) : disjointed f (n + 1) = f (n + 1) \ f n := by rw [disjointed_succ, hf.partialSups_eq] #align monotone.disjointed_eq Monotone.disjointed_succ protected lemma Monotone.disjointed_succ_sup {f : β„• β†’ Ξ±} (hf : Monotone f) (n : β„•) : disjointed f (n + 1) βŠ” f n = f (n + 1) := by rw [hf.disjointed_succ, sdiff_sup_cancel]; exact hf n.le_succ @[simp]
Mathlib/Order/Disjointed.lean
114
118
theorem partialSups_disjointed (f : β„• β†’ Ξ±) : partialSups (disjointed f) = partialSups f := by
ext n induction' n with k ih Β· rw [partialSups_zero, partialSups_zero, disjointed_zero] Β· rw [partialSups_succ, partialSups_succ, disjointed_succ, ih, sup_sdiff_self_right]
[ " disjointed ≀ id", " disjointed f n ≀ id f n", " disjointed f 0 ≀ id f 0", " disjointed f (n✝ + 1) ≀ id f (n✝ + 1)", " Pairwise (Disjoint on disjointed f)", " Disjoint (disjointed f m) (disjointed f n)", " Disjoint (disjointed f m) (disjointed f 0)", " Disjoint (disjointed f m) (disjointed f (n✝ + 1)...
[ " disjointed ≀ id", " disjointed f n ≀ id f n", " disjointed f 0 ≀ id f 0", " disjointed f (n✝ + 1) ≀ id f (n✝ + 1)", " Pairwise (Disjoint on disjointed f)", " Disjoint (disjointed f m) (disjointed f n)", " Disjoint (disjointed f m) (disjointed f 0)", " Disjoint (disjointed f m) (disjointed f (n✝ + 1)...
import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Analysis.InnerProductSpace.l2Space import Mathlib.MeasureTheory.Function.ContinuousMapDense import Mathlib.MeasureTheory.Function.L2Space import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.Periodic import Mathlib.Topology.ContinuousFunction.StoneWeierstrass import Mathlib.MeasureTheory.Integral.FundThmCalculus #align_import analysis.fourier.add_circle from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" noncomputable section open scoped ENNReal ComplexConjugate Real open TopologicalSpace ContinuousMap MeasureTheory MeasureTheory.Measure Algebra Submodule Set variable {T : ℝ} open AddCircle section Monomials def fourier (n : β„€) : C(AddCircle T, β„‚) where toFun x := toCircle (n β€’ x :) continuous_toFun := continuous_induced_dom.comp <| continuous_toCircle.comp <| continuous_zsmul _ #align fourier fourier @[simp] theorem fourier_apply {n : β„€} {x : AddCircle T} : fourier n x = toCircle (n β€’ x :) := rfl #align fourier_apply fourier_apply -- @[simp] -- Porting note: simp normal form is `fourier_coe_apply'` theorem fourier_coe_apply {n : β„€} {x : ℝ} : fourier n (x : AddCircle T) = Complex.exp (2 * Ο€ * Complex.I * n * x / T) := by rw [fourier_apply, ← QuotientAddGroup.mk_zsmul, toCircle, Function.Periodic.lift_coe, expMapCircle_apply, Complex.ofReal_mul, Complex.ofReal_div, Complex.ofReal_mul, zsmul_eq_mul, Complex.ofReal_mul, Complex.ofReal_intCast] norm_num congr 1; ring #align fourier_coe_apply fourier_coe_apply @[simp] theorem fourier_coe_apply' {n : β„€} {x : ℝ} : toCircle (n β€’ (x : AddCircle T) :) = Complex.exp (2 * Ο€ * Complex.I * n * x / T) := by rw [← fourier_apply]; exact fourier_coe_apply -- @[simp] -- Porting note: simp normal form is `fourier_zero'`
Mathlib/Analysis/Fourier/AddCircle.lean
132
135
theorem fourier_zero {x : AddCircle T} : fourier 0 x = 1 := by
induction x using QuotientAddGroup.induction_on' simp only [fourier_coe_apply] norm_num
[ " (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑...
[ " (fourier n) ↑x = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (↑2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " (2 * ↑π / ↑T * (↑n * ↑x) * Complex.I).exp = (2 * ↑π * Complex.I * ↑n * ↑x / ↑T).exp", " 2 * ↑π / ↑T * (↑n * ↑x) * Complex.I = 2 * ↑π * Complex.I * ↑n * ↑x / ↑...
import Mathlib.MeasureTheory.Integral.Bochner import Mathlib.MeasureTheory.Group.Measure #align_import measure_theory.group.integration from "leanprover-community/mathlib"@"ec247d43814751ffceb33b758e8820df2372bf6f" namespace MeasureTheory open Measure TopologicalSpace open scoped ENNReal variable {π•œ M Ξ± G E F : Type*} [MeasurableSpace G] variable [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] variable {ΞΌ : Measure G} {f : G β†’ E} {g : G} section MeasurableInv variable [Group G] [MeasurableInv G] @[to_additive] theorem Integrable.comp_inv [IsInvInvariant ΞΌ] {f : G β†’ F} (hf : Integrable f ΞΌ) : Integrable (fun t => f t⁻¹) ΞΌ := (hf.mono_measure (map_inv_eq_self ΞΌ).le).comp_measurable measurable_inv #align measure_theory.integrable.comp_inv MeasureTheory.Integrable.comp_inv #align measure_theory.integrable.comp_neg MeasureTheory.Integrable.comp_neg @[to_additive]
Mathlib/MeasureTheory/Group/Integral.lean
40
43
theorem integral_inv_eq_self (f : G β†’ E) (ΞΌ : Measure G) [IsInvInvariant ΞΌ] : ∫ x, f x⁻¹ βˆ‚ΞΌ = ∫ x, f x βˆ‚ΞΌ := by
have h : MeasurableEmbedding fun x : G => x⁻¹ := (MeasurableEquiv.inv G).measurableEmbedding rw [← h.integral_map, map_inv_eq_self]
[ " ∫ (x : G), f x⁻¹ βˆ‚ΞΌ = ∫ (x : G), f x βˆ‚ΞΌ" ]
[]
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.NormedSpace.LinearIsometry #align_import analysis.normed_space.conformal_linear_map from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1" noncomputable section open Function LinearIsometry ContinuousLinearMap def IsConformalMap {R : Type*} {X Y : Type*} [NormedField R] [SeminormedAddCommGroup X] [SeminormedAddCommGroup Y] [NormedSpace R X] [NormedSpace R Y] (f' : X β†’L[R] Y) := βˆƒ c β‰  (0 : R), βˆƒ li : X β†’β‚—α΅’[R] Y, f' = c β€’ li.toContinuousLinearMap #align is_conformal_map IsConformalMap variable {R M N G M' : Type*} [NormedField R] [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] [SeminormedAddCommGroup G] [NormedSpace R M] [NormedSpace R N] [NormedSpace R G] [NormedAddCommGroup M'] [NormedSpace R M'] {f : M β†’L[R] N} {g : N β†’L[R] G} {c : R} theorem isConformalMap_id : IsConformalMap (id R M) := ⟨1, one_ne_zero, id, by simp⟩ #align is_conformal_map_id isConformalMap_id theorem IsConformalMap.smul (hf : IsConformalMap f) {c : R} (hc : c β‰  0) : IsConformalMap (c β€’ f) := by rcases hf with ⟨c', hc', li, rfl⟩ exact ⟨c * c', mul_ne_zero hc hc', li, smul_smul _ _ _⟩ #align is_conformal_map.smul IsConformalMap.smul theorem isConformalMap_const_smul (hc : c β‰  0) : IsConformalMap (c β€’ id R M) := isConformalMap_id.smul hc #align is_conformal_map_const_smul isConformalMap_const_smul protected theorem LinearIsometry.isConformalMap (f' : M β†’β‚—α΅’[R] N) : IsConformalMap f'.toContinuousLinearMap := ⟨1, one_ne_zero, f', (one_smul _ _).symm⟩ #align linear_isometry.is_conformal_map LinearIsometry.isConformalMap @[nontriviality] theorem isConformalMap_of_subsingleton [Subsingleton M] (f' : M β†’L[R] N) : IsConformalMap f' := ⟨1, one_ne_zero, ⟨0, fun x => by simp [Subsingleton.elim x 0]⟩, Subsingleton.elim _ _⟩ #align is_conformal_map_of_subsingleton isConformalMap_of_subsingleton namespace IsConformalMap theorem comp (hg : IsConformalMap g) (hf : IsConformalMap f) : IsConformalMap (g.comp f) := by rcases hf with ⟨cf, hcf, lif, rfl⟩ rcases hg with ⟨cg, hcg, lig, rfl⟩ refine ⟨cg * cf, mul_ne_zero hcg hcf, lig.comp lif, ?_⟩ rw [smul_comp, comp_smul, mul_smul] rfl #align is_conformal_map.comp IsConformalMap.comp protected theorem injective {f : M' β†’L[R] N} (h : IsConformalMap f) : Function.Injective f := by rcases h with ⟨c, hc, li, rfl⟩ exact (smul_right_injective _ hc).comp li.injective #align is_conformal_map.injective IsConformalMap.injective
Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean
97
100
theorem ne_zero [Nontrivial M'] {f' : M' β†’L[R] N} (hf' : IsConformalMap f') : f' β‰  0 := by
rintro rfl rcases exists_ne (0 : M') with ⟨a, ha⟩ exact ha (hf'.injective rfl)
[ " ContinuousLinearMap.id R M = 1 β€’ LinearIsometry.id.toContinuousLinearMap", " IsConformalMap (c β€’ f)", " IsConformalMap (c β€’ c' β€’ li.toContinuousLinearMap)", " β€–0 xβ€– = β€–xβ€–", " IsConformalMap (g.comp f)", " IsConformalMap (g.comp (cf β€’ lif.toContinuousLinearMap))", " IsConformalMap ((cg β€’ lig.toContinuo...
[ " ContinuousLinearMap.id R M = 1 β€’ LinearIsometry.id.toContinuousLinearMap", " IsConformalMap (c β€’ f)", " IsConformalMap (c β€’ c' β€’ li.toContinuousLinearMap)", " β€–0 xβ€– = β€–xβ€–", " IsConformalMap (g.comp f)", " IsConformalMap (g.comp (cf β€’ lif.toContinuousLinearMap))", " IsConformalMap ((cg β€’ lig.toContinuo...
import Mathlib.Order.MinMax import Mathlib.Data.Set.Subsingleton import Mathlib.Tactic.Says #align_import data.set.intervals.basic from "leanprover-community/mathlib"@"3ba15165bd6927679be7c22d6091a87337e3cd0c" open Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² : Type*} namespace Set section Preorder variable [Preorder Ξ±] {a a₁ aβ‚‚ b b₁ bβ‚‚ c x : Ξ±} def Ioo (a b : Ξ±) := { x | a < x ∧ x < b } #align set.Ioo Set.Ioo def Ico (a b : Ξ±) := { x | a ≀ x ∧ x < b } #align set.Ico Set.Ico def Iio (a : Ξ±) := { x | x < a } #align set.Iio Set.Iio def Icc (a b : Ξ±) := { x | a ≀ x ∧ x ≀ b } #align set.Icc Set.Icc def Iic (b : Ξ±) := { x | x ≀ b } #align set.Iic Set.Iic def Ioc (a b : Ξ±) := { x | a < x ∧ x ≀ b } #align set.Ioc Set.Ioc def Ici (a : Ξ±) := { x | a ≀ x } #align set.Ici Set.Ici def Ioi (a : Ξ±) := { x | a < x } #align set.Ioi Set.Ioi theorem Ioo_def (a b : Ξ±) : { x | a < x ∧ x < b } = Ioo a b := rfl #align set.Ioo_def Set.Ioo_def theorem Ico_def (a b : Ξ±) : { x | a ≀ x ∧ x < b } = Ico a b := rfl #align set.Ico_def Set.Ico_def theorem Iio_def (a : Ξ±) : { x | x < a } = Iio a := rfl #align set.Iio_def Set.Iio_def theorem Icc_def (a b : Ξ±) : { x | a ≀ x ∧ x ≀ b } = Icc a b := rfl #align set.Icc_def Set.Icc_def theorem Iic_def (b : Ξ±) : { x | x ≀ b } = Iic b := rfl #align set.Iic_def Set.Iic_def theorem Ioc_def (a b : Ξ±) : { x | a < x ∧ x ≀ b } = Ioc a b := rfl #align set.Ioc_def Set.Ioc_def theorem Ici_def (a : Ξ±) : { x | a ≀ x } = Ici a := rfl #align set.Ici_def Set.Ici_def theorem Ioi_def (a : Ξ±) : { x | a < x } = Ioi a := rfl #align set.Ioi_def Set.Ioi_def @[simp] theorem mem_Ioo : x ∈ Ioo a b ↔ a < x ∧ x < b := Iff.rfl #align set.mem_Ioo Set.mem_Ioo @[simp] theorem mem_Ico : x ∈ Ico a b ↔ a ≀ x ∧ x < b := Iff.rfl #align set.mem_Ico Set.mem_Ico @[simp] theorem mem_Iio : x ∈ Iio b ↔ x < b := Iff.rfl #align set.mem_Iio Set.mem_Iio @[simp] theorem mem_Icc : x ∈ Icc a b ↔ a ≀ x ∧ x ≀ b := Iff.rfl #align set.mem_Icc Set.mem_Icc @[simp] theorem mem_Iic : x ∈ Iic b ↔ x ≀ b := Iff.rfl #align set.mem_Iic Set.mem_Iic @[simp] theorem mem_Ioc : x ∈ Ioc a b ↔ a < x ∧ x ≀ b := Iff.rfl #align set.mem_Ioc Set.mem_Ioc @[simp] theorem mem_Ici : x ∈ Ici a ↔ a ≀ x := Iff.rfl #align set.mem_Ici Set.mem_Ici @[simp] theorem mem_Ioi : x ∈ Ioi a ↔ a < x := Iff.rfl #align set.mem_Ioi Set.mem_Ioi instance decidableMemIoo [Decidable (a < x ∧ x < b)] : Decidable (x ∈ Ioo a b) := by assumption #align set.decidable_mem_Ioo Set.decidableMemIoo instance decidableMemIco [Decidable (a ≀ x ∧ x < b)] : Decidable (x ∈ Ico a b) := by assumption #align set.decidable_mem_Ico Set.decidableMemIco instance decidableMemIio [Decidable (x < b)] : Decidable (x ∈ Iio b) := by assumption #align set.decidable_mem_Iio Set.decidableMemIio instance decidableMemIcc [Decidable (a ≀ x ∧ x ≀ b)] : Decidable (x ∈ Icc a b) := by assumption #align set.decidable_mem_Icc Set.decidableMemIcc instance decidableMemIic [Decidable (x ≀ b)] : Decidable (x ∈ Iic b) := by assumption #align set.decidable_mem_Iic Set.decidableMemIic instance decidableMemIoc [Decidable (a < x ∧ x ≀ b)] : Decidable (x ∈ Ioc a b) := by assumption #align set.decidable_mem_Ioc Set.decidableMemIoc instance decidableMemIci [Decidable (a ≀ x)] : Decidable (x ∈ Ici a) := by assumption #align set.decidable_mem_Ici Set.decidableMemIci instance decidableMemIoi [Decidable (a < x)] : Decidable (x ∈ Ioi a) := by assumption #align set.decidable_mem_Ioi Set.decidableMemIoi -- Porting note (#10618): `simp` can prove this -- @[simp] theorem left_mem_Ioo : a ∈ Ioo a b ↔ False := by simp [lt_irrefl] #align set.left_mem_Ioo Set.left_mem_Ioo -- Porting note (#10618): `simp` can prove this -- @[simp] theorem left_mem_Ico : a ∈ Ico a b ↔ a < b := by simp [le_refl] #align set.left_mem_Ico Set.left_mem_Ico -- Porting note (#10618): `simp` can prove this -- @[simp]
Mathlib/Order/Interval/Set/Basic.lean
191
191
theorem left_mem_Icc : a ∈ Icc a b ↔ a ≀ b := by
simp [le_refl]
[ " Decidable (x ∈ Ioo a b)", " Decidable (x ∈ Ico a b)", " Decidable (x ∈ Iio b)", " Decidable (x ∈ Icc a b)", " Decidable (x ∈ Iic b)", " Decidable (x ∈ Ioc a b)", " Decidable (x ∈ Ici a)", " Decidable (x ∈ Ioi a)", " a ∈ Ioo a b ↔ False", " a ∈ Ico a b ↔ a < b", " a ∈ Icc a b ↔ a ≀ b" ]
[ " Decidable (x ∈ Ioo a b)", " Decidable (x ∈ Ico a b)", " Decidable (x ∈ Iio b)", " Decidable (x ∈ Icc a b)", " Decidable (x ∈ Iic b)", " Decidable (x ∈ Ioc a b)", " Decidable (x ∈ Ici a)", " Decidable (x ∈ Ioi a)", " a ∈ Ioo a b ↔ False", " a ∈ Ico a b ↔ a < b" ]
import Mathlib.RingTheory.WittVector.Frobenius import Mathlib.RingTheory.WittVector.Verschiebung import Mathlib.RingTheory.WittVector.MulP #align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" namespace WittVector variable {p : β„•} {R : Type*} [hp : Fact p.Prime] [CommRing R] -- type as `\bbW` local notation "π•Ž" => WittVector p noncomputable section -- Porting note: `ghost_calc` failure: `simp only []` and the manual instances had to be added. theorem frobenius_verschiebung (x : π•Ž R) : frobenius (verschiebung x) = x * p := by have : IsPoly p fun {R} [CommRing R] x ↦ frobenius (verschiebung x) := IsPoly.comp (hg := frobenius_isPoly p) (hf := verschiebung_isPoly) have : IsPoly p fun {R} [CommRing R] x ↦ x * p := mulN_isPoly p p ghost_calc x ghost_simp [mul_comm] #align witt_vector.frobenius_verschiebung WittVector.frobenius_verschiebung theorem verschiebung_zmod (x : π•Ž (ZMod p)) : verschiebung x = x * p := by rw [← frobenius_verschiebung, frobenius_zmodp] #align witt_vector.verschiebung_zmod WittVector.verschiebung_zmod variable (p R) theorem coeff_p_pow [CharP R p] (i : β„•) : ((p : π•Ž R) ^ i).coeff i = 1 := by induction' i with i h Β· simp only [Nat.zero_eq, one_coeff_zero, Ne, pow_zero] Β· rw [pow_succ, ← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ, h, one_pow] #align witt_vector.coeff_p_pow WittVector.coeff_p_pow theorem coeff_p_pow_eq_zero [CharP R p] {i j : β„•} (hj : j β‰  i) : ((p : π•Ž R) ^ i).coeff j = 0 := by induction' i with i hi generalizing j Β· rw [pow_zero, one_coeff_eq_of_pos] exact Nat.pos_of_ne_zero hj Β· rw [pow_succ, ← frobenius_verschiebung, coeff_frobenius_charP] cases j Β· rw [verschiebung_coeff_zero, zero_pow hp.out.ne_zero] Β· rw [verschiebung_coeff_succ, hi (ne_of_apply_ne _ hj), zero_pow hp.out.ne_zero] #align witt_vector.coeff_p_pow_eq_zero WittVector.coeff_p_pow_eq_zero theorem coeff_p [CharP R p] (i : β„•) : (p : π•Ž R).coeff i = if i = 1 then 1 else 0 := by split_ifs with hi Β· simpa only [hi, pow_one] using coeff_p_pow p R 1 Β· simpa only [pow_one] using coeff_p_pow_eq_zero p R hi #align witt_vector.coeff_p WittVector.coeff_p @[simp] theorem coeff_p_zero [CharP R p] : (p : π•Ž R).coeff 0 = 0 := by rw [coeff_p, if_neg] exact zero_ne_one #align witt_vector.coeff_p_zero WittVector.coeff_p_zero @[simp]
Mathlib/RingTheory/WittVector/Identities.lean
87
87
theorem coeff_p_one [CharP R p] : (p : π•Ž R).coeff 1 = 1 := by
rw [coeff_p, if_pos rfl]
[ " frobenius (verschiebung x) = x * ↑p", " βˆ€ (n : β„•), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)", " verschiebung x = x * ↑p", " (↑p ^ i).coeff i = 1", " (↑p ^ 0).coeff 0 = 1", " (↑p ^ (i + 1)).coeff (i + 1) = 1", " (↑p ^ i).coeff j = 0", " (↑p ^ 0).coeff j = 0", " ...
[ " frobenius (verschiebung x) = x * ↑p", " βˆ€ (n : β„•), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)", " verschiebung x = x * ↑p", " (↑p ^ i).coeff i = 1", " (↑p ^ 0).coeff 0 = 1", " (↑p ^ (i + 1)).coeff (i + 1) = 1", " (↑p ^ i).coeff j = 0", " (↑p ^ 0).coeff j = 0", " ...
import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set Filter ENNReal Topology NNReal TopologicalSpace namespace MeasureTheory namespace Measure def InnerRegularWRT {Ξ±} {_ : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (p q : Set Ξ± β†’ Prop) := βˆ€ ⦃U⦄, q U β†’ βˆ€ r < ΞΌ U, βˆƒ K, K βŠ† U ∧ p K ∧ r < ΞΌ K #align measure_theory.measure.inner_regular MeasureTheory.Measure.InnerRegularWRT namespace InnerRegularWRT variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p q : Set Ξ± β†’ Prop} {U : Set Ξ±} {Ξ΅ : ℝβ‰₯0∞} theorem measure_eq_iSup (H : InnerRegularWRT ΞΌ p q) (hU : q U) : ΞΌ U = ⨆ (K) (_ : K βŠ† U) (_ : p K), ΞΌ K := by refine le_antisymm (le_of_forall_lt fun r hr => ?_) (iSupβ‚‚_le fun K hK => iSup_le fun _ => ΞΌ.mono hK) simpa only [lt_iSup_iff, exists_prop] using H hU r hr #align measure_theory.measure.inner_regular.measure_eq_supr MeasureTheory.Measure.InnerRegularWRT.measure_eq_iSup theorem exists_subset_lt_add (H : InnerRegularWRT ΞΌ p q) (h0 : p βˆ…) (hU : q U) (hΞΌU : ΞΌ U β‰  ∞) (hΞ΅ : Ξ΅ β‰  0) : βˆƒ K, K βŠ† U ∧ p K ∧ ΞΌ U < ΞΌ K + Ξ΅ := by rcases eq_or_ne (ΞΌ U) 0 with hβ‚€ | hβ‚€ Β· refine βŸ¨βˆ…, empty_subset _, h0, ?_⟩ rwa [measure_empty, hβ‚€, zero_add, pos_iff_ne_zero] Β· rcases H hU _ (ENNReal.sub_lt_self hΞΌU hβ‚€ hΞ΅) with ⟨K, hKU, hKc, hrK⟩ exact ⟨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hΞΌU) hrK⟩ #align measure_theory.measure.inner_regular.exists_subset_lt_add MeasureTheory.Measure.InnerRegularWRT.exists_subset_lt_add protected theorem map {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β†’ Prop} (H : InnerRegularWRT ΞΌ pa qa) {f : Ξ± β†’ Ξ²} (hf : AEMeasurable f ΞΌ) {pb qb : Set Ξ² β†’ Prop} (hAB : βˆ€ U, qb U β†’ qa (f ⁻¹' U)) (hAB' : βˆ€ K, pa K β†’ pb (f '' K)) (hBβ‚‚ : βˆ€ U, qb U β†’ MeasurableSet U) : InnerRegularWRT (map f ΞΌ) pb qb := by intro U hU r hr rw [map_apply_of_aemeasurable hf (hBβ‚‚ _ hU)] at hr rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩ refine ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_⟩ exact hK.trans_le (le_map_apply_image hf _) #align measure_theory.measure.inner_regular.map MeasureTheory.Measure.InnerRegularWRT.map
Mathlib/MeasureTheory/Measure/Regular.lean
244
252
theorem map' {Ξ± Ξ²} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {ΞΌ : Measure Ξ±} {pa qa : Set Ξ± β†’ Prop} (H : InnerRegularWRT ΞΌ pa qa) (f : Ξ± ≃ᡐ Ξ²) {pb qb : Set Ξ² β†’ Prop} (hAB : βˆ€ U, qb U β†’ qa (f ⁻¹' U)) (hAB' : βˆ€ K, pa K β†’ pb (f '' K)) : InnerRegularWRT (map f ΞΌ) pb qb := by
intro U hU r hr rw [f.map_apply U] at hr rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩ refine ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_⟩ rwa [f.map_apply, f.preimage_image]
[ " ΞΌ U = ⨆ K, ⨆ (_ : K βŠ† U), ⨆ (_ : p K), ΞΌ K", " r < ⨆ K, ⨆ (_ : K βŠ† U), ⨆ (_ : p K), ΞΌ K", " βˆƒ K βŠ† U, p K ∧ ΞΌ U < ΞΌ K + Ξ΅", " ΞΌ U < ΞΌ βˆ… + Ξ΅", " (map f ΞΌ).InnerRegularWRT pb qb", " βˆƒ K βŠ† U, pb K ∧ r < (map f ΞΌ) K", " r < (map f ΞΌ) (f '' K)", " (map (⇑f) ΞΌ).InnerRegularWRT pb qb", " βˆƒ K βŠ† U, pb K ∧ r...
[ " ΞΌ U = ⨆ K, ⨆ (_ : K βŠ† U), ⨆ (_ : p K), ΞΌ K", " r < ⨆ K, ⨆ (_ : K βŠ† U), ⨆ (_ : p K), ΞΌ K", " βˆƒ K βŠ† U, p K ∧ ΞΌ U < ΞΌ K + Ξ΅", " ΞΌ U < ΞΌ βˆ… + Ξ΅", " (map f ΞΌ).InnerRegularWRT pb qb", " βˆƒ K βŠ† U, pb K ∧ r < (map f ΞΌ) K", " r < (map f ΞΌ) (f '' K)" ]
import Mathlib.RingTheory.WittVector.Frobenius import Mathlib.RingTheory.WittVector.Verschiebung import Mathlib.RingTheory.WittVector.MulP #align_import ring_theory.witt_vector.identities from "leanprover-community/mathlib"@"0798037604b2d91748f9b43925fb7570a5f3256c" namespace WittVector variable {p : β„•} {R : Type*} [hp : Fact p.Prime] [CommRing R] -- type as `\bbW` local notation "π•Ž" => WittVector p noncomputable section -- Porting note: `ghost_calc` failure: `simp only []` and the manual instances had to be added.
Mathlib/RingTheory/WittVector/Identities.lean
42
47
theorem frobenius_verschiebung (x : π•Ž R) : frobenius (verschiebung x) = x * p := by
have : IsPoly p fun {R} [CommRing R] x ↦ frobenius (verschiebung x) := IsPoly.comp (hg := frobenius_isPoly p) (hf := verschiebung_isPoly) have : IsPoly p fun {R} [CommRing R] x ↦ x * p := mulN_isPoly p p ghost_calc x ghost_simp [mul_comm]
[ " frobenius (verschiebung x) = x * ↑p", " βˆ€ (n : β„•), (ghostComponent n) (frobenius (verschiebung x)) = (ghostComponent n) (x * ↑p)" ]
[]
import Mathlib.Data.Rat.Cast.Defs import Mathlib.Algebra.Field.Basic #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" namespace Rat variable {Ξ± : Type*} [DivisionRing Ξ±] -- Porting note: rewrote proof @[simp] theorem cast_inv_nat (n : β„•) : ((n⁻¹ : β„š) : Ξ±) = (n : Ξ±)⁻¹ := by cases' n with n Β· simp rw [cast_def, inv_natCast_num, inv_natCast_den, if_neg n.succ_ne_zero, Int.sign_eq_one_of_pos (Nat.cast_pos.mpr n.succ_pos), Int.cast_one, one_div] #align rat.cast_inv_nat Rat.cast_inv_nat -- Porting note: proof got a lot easier - is this still the intended statement? @[simp]
Mathlib/Data/Rat/Cast/Lemmas.lean
37
40
theorem cast_inv_int (n : β„€) : ((n⁻¹ : β„š) : Ξ±) = (n : Ξ±)⁻¹ := by
cases' n with n n Β· simp [ofInt_eq_cast, cast_inv_nat] Β· simp only [ofInt_eq_cast, Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
[ " ↑(↑n)⁻¹ = (↑n)⁻¹", " ↑(↑0)⁻¹ = (↑0)⁻¹", " ↑(↑(n + 1))⁻¹ = (↑(n + 1))⁻¹", " ↑(↑(Int.ofNat n))⁻¹ = (↑(Int.ofNat n))⁻¹", " ↑(↑(Int.negSucc n))⁻¹ = (↑(Int.negSucc n))⁻¹" ]
[ " ↑(↑n)⁻¹ = (↑n)⁻¹", " ↑(↑0)⁻¹ = (↑0)⁻¹", " ↑(↑(n + 1))⁻¹ = (↑(n + 1))⁻¹" ]
import Mathlib.Data.Fin.VecNotation import Mathlib.Logic.Embedding.Set #align_import logic.equiv.fin from "leanprover-community/mathlib"@"bd835ef554f37ef9b804f0903089211f89cb370b" assert_not_exists MonoidWithZero universe u variable {m n : β„•} def finZeroEquiv : Fin 0 ≃ Empty := Equiv.equivEmpty _ #align fin_zero_equiv finZeroEquiv def finZeroEquiv' : Fin 0 ≃ PEmpty.{u} := Equiv.equivPEmpty _ #align fin_zero_equiv' finZeroEquiv' def finOneEquiv : Fin 1 ≃ Unit := Equiv.equivPUnit _ #align fin_one_equiv finOneEquiv def finTwoEquiv : Fin 2 ≃ Bool where toFun := ![false, true] invFun b := b.casesOn 0 1 left_inv := Fin.forall_fin_two.2 <| by simp right_inv := Bool.forall_bool.2 <| by simp #align fin_two_equiv finTwoEquiv @[simps (config := .asFn)] def piFinTwoEquiv (Ξ± : Fin 2 β†’ Type u) : (βˆ€ i, Ξ± i) ≃ Ξ± 0 Γ— Ξ± 1 where toFun f := (f 0, f 1) invFun p := Fin.cons p.1 <| Fin.cons p.2 finZeroElim left_inv _ := funext <| Fin.forall_fin_two.2 ⟨rfl, rfl⟩ right_inv := fun _ => rfl #align pi_fin_two_equiv piFinTwoEquiv #align pi_fin_two_equiv_symm_apply piFinTwoEquiv_symm_apply #align pi_fin_two_equiv_apply piFinTwoEquiv_apply theorem Fin.preimage_apply_01_prod {Ξ± : Fin 2 β†’ Type u} (s : Set (Ξ± 0)) (t : Set (Ξ± 1)) : (fun f : βˆ€ i, Ξ± i => (f 0, f 1)) ⁻¹' s Γ—Λ’ t = Set.pi Set.univ (Fin.cons s <| Fin.cons t finZeroElim) := by ext f simp [Fin.forall_fin_two] #align fin.preimage_apply_01_prod Fin.preimage_apply_01_prod theorem Fin.preimage_apply_01_prod' {Ξ± : Type u} (s t : Set Ξ±) : (fun f : Fin 2 β†’ Ξ± => (f 0, f 1)) ⁻¹' s Γ—Λ’ t = Set.pi Set.univ ![s, t] := @Fin.preimage_apply_01_prod (fun _ => Ξ±) s t #align fin.preimage_apply_01_prod' Fin.preimage_apply_01_prod' @[simps! (config := .asFn)] def prodEquivPiFinTwo (Ξ± Ξ² : Type u) : Ξ± Γ— Ξ² ≃ βˆ€ i : Fin 2, ![Ξ±, Ξ²] i := (piFinTwoEquiv (Fin.cons Ξ± (Fin.cons Ξ² finZeroElim))).symm #align prod_equiv_pi_fin_two prodEquivPiFinTwo #align prod_equiv_pi_fin_two_apply prodEquivPiFinTwo_apply #align prod_equiv_pi_fin_two_symm_apply prodEquivPiFinTwo_symm_apply @[simps (config := .asFn)] def finTwoArrowEquiv (Ξ± : Type*) : (Fin 2 β†’ Ξ±) ≃ Ξ± Γ— Ξ± := { piFinTwoEquiv fun _ => Ξ± with invFun := fun x => ![x.1, x.2] } #align fin_two_arrow_equiv finTwoArrowEquiv #align fin_two_arrow_equiv_symm_apply finTwoArrowEquiv_symm_apply #align fin_two_arrow_equiv_apply finTwoArrowEquiv_apply def OrderIso.piFinTwoIso (Ξ± : Fin 2 β†’ Type u) [βˆ€ i, Preorder (Ξ± i)] : (βˆ€ i, Ξ± i) ≃o Ξ± 0 Γ— Ξ± 1 where toEquiv := piFinTwoEquiv Ξ± map_rel_iff' := Iff.symm Fin.forall_fin_two #align order_iso.pi_fin_two_iso OrderIso.piFinTwoIso def OrderIso.finTwoArrowIso (Ξ± : Type*) [Preorder Ξ±] : (Fin 2 β†’ Ξ±) ≃o Ξ± Γ— Ξ± := { OrderIso.piFinTwoIso fun _ => Ξ± with toEquiv := finTwoArrowEquiv Ξ± } #align order_iso.fin_two_arrow_iso OrderIso.finTwoArrowIso def finSuccEquiv' (i : Fin (n + 1)) : Fin (n + 1) ≃ Option (Fin n) where toFun := i.insertNth none some invFun x := x.casesOn' i (Fin.succAbove i) left_inv x := Fin.succAboveCases i (by simp) (fun j => by simp) x right_inv x := by cases x <;> dsimp <;> simp #align fin_succ_equiv' finSuccEquiv' @[simp] theorem finSuccEquiv'_at (i : Fin (n + 1)) : (finSuccEquiv' i) i = none := by simp [finSuccEquiv'] #align fin_succ_equiv'_at finSuccEquiv'_at @[simp] theorem finSuccEquiv'_succAbove (i : Fin (n + 1)) (j : Fin n) : finSuccEquiv' i (i.succAbove j) = some j := @Fin.insertNth_apply_succAbove n (fun _ => Option (Fin n)) i _ _ _ #align fin_succ_equiv'_succ_above finSuccEquiv'_succAbove theorem finSuccEquiv'_below {i : Fin (n + 1)} {m : Fin n} (h : Fin.castSucc m < i) : (finSuccEquiv' i) (Fin.castSucc m) = m := by rw [← Fin.succAbove_of_castSucc_lt _ _ h, finSuccEquiv'_succAbove] #align fin_succ_equiv'_below finSuccEquiv'_below
Mathlib/Logic/Equiv/Fin.lean
126
128
theorem finSuccEquiv'_above {i : Fin (n + 1)} {m : Fin n} (h : i ≀ Fin.castSucc m) : (finSuccEquiv' i) m.succ = some m := by
rw [← Fin.succAbove_of_le_castSucc _ _ h, finSuccEquiv'_succAbove]
[ " (fun b => Bool.casesOn b 0 1) (![false, true] 0) = 0 ∧ (fun b => Bool.casesOn b 0 1) (![false, true] 1) = 1", " ![false, true] ((fun b => Bool.casesOn b 0 1) false) = false ∧\n ![false, true] ((fun b => Bool.casesOn b 0 1) true) = true", " (fun f => (f 0, f 1)) ⁻¹' s Γ—Λ’ t = Set.univ.pi (cons s (cons t finZ...
[ " (fun b => Bool.casesOn b 0 1) (![false, true] 0) = 0 ∧ (fun b => Bool.casesOn b 0 1) (![false, true] 1) = 1", " ![false, true] ((fun b => Bool.casesOn b 0 1) false) = false ∧\n ![false, true] ((fun b => Bool.casesOn b 0 1) true) = true", " (fun f => (f 0, f 1)) ⁻¹' s Γ—Λ’ t = Set.univ.pi (cons s (cons t finZ...
import Mathlib.Order.Filter.Bases #align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Set Function open scoped Classical open Filter namespace Filter variable {ΞΉ : Type*} {Ξ± : ΞΉ β†’ Type*} {f f₁ fβ‚‚ : (i : ΞΉ) β†’ Filter (Ξ± i)} {s : (i : ΞΉ) β†’ Set (Ξ± i)} {p : βˆ€ i, Ξ± i β†’ Prop} section CoprodCat -- for "Coprod" set_option linter.uppercaseLean3 false protected def coprodα΅’ (f : βˆ€ i, Filter (Ξ± i)) : Filter (βˆ€ i, Ξ± i) := ⨆ i : ΞΉ, comap (eval i) (f i) #align filter.Coprod Filter.coprodα΅’ theorem mem_coprodα΅’_iff {s : Set (βˆ€ i, Ξ± i)} : s ∈ Filter.coprodα΅’ f ↔ βˆ€ i : ΞΉ, βˆƒ t₁ ∈ f i, eval i ⁻¹' t₁ βŠ† s := by simp [Filter.coprodα΅’] #align filter.mem_Coprod_iff Filter.mem_coprodα΅’_iff theorem compl_mem_coprodα΅’ {s : Set (βˆ€ i, Ξ± i)} : sᢜ ∈ Filter.coprodα΅’ f ↔ βˆ€ i, (eval i '' s)ᢜ ∈ f i := by simp only [Filter.coprodα΅’, mem_iSup, compl_mem_comap] #align filter.compl_mem_Coprod Filter.compl_mem_coprodα΅’ theorem coprodα΅’_neBot_iff' : NeBot (Filter.coprodα΅’ f) ↔ (βˆ€ i, Nonempty (Ξ± i)) ∧ βˆƒ d, NeBot (f d) := by simp only [Filter.coprodα΅’, iSup_neBot, ← exists_and_left, ← comap_eval_neBot_iff'] #align filter.Coprod_ne_bot_iff' Filter.coprodα΅’_neBot_iff' @[simp] theorem coprodα΅’_neBot_iff [βˆ€ i, Nonempty (Ξ± i)] : NeBot (Filter.coprodα΅’ f) ↔ βˆƒ d, NeBot (f d) := by simp [coprodα΅’_neBot_iff', *] #align filter.Coprod_ne_bot_iff Filter.coprodα΅’_neBot_iff
Mathlib/Order/Filter/Pi.lean
248
250
theorem coprodα΅’_eq_bot_iff' : Filter.coprodα΅’ f = βŠ₯ ↔ (βˆƒ i, IsEmpty (Ξ± i)) ∨ f = βŠ₯ := by
simpa only [not_neBot, not_and_or, funext_iff, not_forall, not_exists, not_nonempty_iff] using coprodα΅’_neBot_iff'.not
[ " s ∈ Filter.coprodα΅’ f ↔ βˆ€ (i : ΞΉ), βˆƒ t₁ ∈ f i, eval i ⁻¹' t₁ βŠ† s", " sᢜ ∈ Filter.coprodα΅’ f ↔ βˆ€ (i : ΞΉ), (eval i '' s)ᢜ ∈ f i", " (Filter.coprodα΅’ f).NeBot ↔ (βˆ€ (i : ΞΉ), Nonempty (Ξ± i)) ∧ βˆƒ d, (f d).NeBot", " (Filter.coprodα΅’ f).NeBot ↔ βˆƒ d, (f d).NeBot", " Filter.coprodα΅’ f = βŠ₯ ↔ (βˆƒ i, IsEmpty (Ξ± i)) ∨ f = βŠ₯"...
[ " s ∈ Filter.coprodα΅’ f ↔ βˆ€ (i : ΞΉ), βˆƒ t₁ ∈ f i, eval i ⁻¹' t₁ βŠ† s", " sᢜ ∈ Filter.coprodα΅’ f ↔ βˆ€ (i : ΞΉ), (eval i '' s)ᢜ ∈ f i", " (Filter.coprodα΅’ f).NeBot ↔ (βˆ€ (i : ΞΉ), Nonempty (Ξ± i)) ∧ βˆƒ d, (f d).NeBot", " (Filter.coprodα΅’ f).NeBot ↔ βˆƒ d, (f d).NeBot" ]
import Mathlib.Topology.ContinuousOn #align_import topology.algebra.order.left_right from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open Set Filter Topology section TopologicalSpace variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [LinearOrder Ξ±] [TopologicalSpace Ξ²]
Mathlib/Topology/Order/LeftRight.lean
111
112
theorem nhds_left_sup_nhds_right (a : Ξ±) : 𝓝[≀] a βŠ” 𝓝[β‰₯] a = 𝓝 a := by
rw [← nhdsWithin_union, Iic_union_Ici, nhdsWithin_univ]
[ " 𝓝[≀] a βŠ” 𝓝[β‰₯] a = 𝓝 a" ]
[]
import Mathlib.Data.Complex.Module import Mathlib.Data.Complex.Order import Mathlib.Data.Complex.Exponential import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.InfiniteSum.Module import Mathlib.Topology.Instances.RealVectorSpace #align_import analysis.complex.basic from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b" assert_not_exists Absorbs noncomputable section namespace Complex variable {z : β„‚} open ComplexConjugate Topology Filter instance : Norm β„‚ := ⟨abs⟩ @[simp] theorem norm_eq_abs (z : β„‚) : β€–zβ€– = abs z := rfl #align complex.norm_eq_abs Complex.norm_eq_abs lemma norm_I : β€–Iβ€– = 1 := abs_I theorem norm_exp_ofReal_mul_I (t : ℝ) : β€–exp (t * I)β€– = 1 := by simp only [norm_eq_abs, abs_exp_ofReal_mul_I] set_option linter.uppercaseLean3 false in #align complex.norm_exp_of_real_mul_I Complex.norm_exp_ofReal_mul_I instance instNormedAddCommGroup : NormedAddCommGroup β„‚ := AddGroupNorm.toNormedAddCommGroup { abs with map_zero' := map_zero abs neg' := abs.map_neg eq_zero_of_map_eq_zero' := fun _ => abs.eq_zero.1 } instance : NormedField β„‚ where dist_eq _ _ := rfl norm_mul' := map_mul abs instance : DenselyNormedField β„‚ where lt_norm_lt r₁ rβ‚‚ hβ‚€ hr := let ⟨x, h⟩ := exists_between hr ⟨x, by rwa [norm_eq_abs, abs_ofReal, abs_of_pos (hβ‚€.trans_lt h.1)]⟩ instance {R : Type*} [NormedField R] [NormedAlgebra R ℝ] : NormedAlgebra R β„‚ where norm_smul_le r x := by rw [← algebraMap_smul ℝ r x, real_smul, norm_mul, norm_eq_abs, abs_ofReal, ← Real.norm_eq_abs, norm_algebraMap'] variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace β„‚ E] -- see Note [lower instance priority] instance (priority := 900) _root_.NormedSpace.complexToReal : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ β„‚ E #align normed_space.complex_to_real NormedSpace.complexToReal -- see Note [lower instance priority] instance (priority := 900) _root_.NormedAlgebra.complexToReal {A : Type*} [SeminormedRing A] [NormedAlgebra β„‚ A] : NormedAlgebra ℝ A := NormedAlgebra.restrictScalars ℝ β„‚ A theorem dist_eq (z w : β„‚) : dist z w = abs (z - w) := rfl #align complex.dist_eq Complex.dist_eq theorem dist_eq_re_im (z w : β„‚) : dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2) := by rw [sq, sq] rfl #align complex.dist_eq_re_im Complex.dist_eq_re_im @[simp] theorem dist_mk (x₁ y₁ xβ‚‚ yβ‚‚ : ℝ) : dist (mk x₁ y₁) (mk xβ‚‚ yβ‚‚) = √((x₁ - xβ‚‚) ^ 2 + (y₁ - yβ‚‚) ^ 2) := dist_eq_re_im _ _ #align complex.dist_mk Complex.dist_mk theorem dist_of_re_eq {z w : β„‚} (h : z.re = w.re) : dist z w = dist z.im w.im := by rw [dist_eq_re_im, h, sub_self, zero_pow two_ne_zero, zero_add, Real.sqrt_sq_eq_abs, Real.dist_eq] #align complex.dist_of_re_eq Complex.dist_of_re_eq theorem nndist_of_re_eq {z w : β„‚} (h : z.re = w.re) : nndist z w = nndist z.im w.im := NNReal.eq <| dist_of_re_eq h #align complex.nndist_of_re_eq Complex.nndist_of_re_eq theorem edist_of_re_eq {z w : β„‚} (h : z.re = w.re) : edist z w = edist z.im w.im := by rw [edist_nndist, edist_nndist, nndist_of_re_eq h] #align complex.edist_of_re_eq Complex.edist_of_re_eq theorem dist_of_im_eq {z w : β„‚} (h : z.im = w.im) : dist z w = dist z.re w.re := by rw [dist_eq_re_im, h, sub_self, zero_pow two_ne_zero, add_zero, Real.sqrt_sq_eq_abs, Real.dist_eq] #align complex.dist_of_im_eq Complex.dist_of_im_eq theorem nndist_of_im_eq {z w : β„‚} (h : z.im = w.im) : nndist z w = nndist z.re w.re := NNReal.eq <| dist_of_im_eq h #align complex.nndist_of_im_eq Complex.nndist_of_im_eq theorem edist_of_im_eq {z w : β„‚} (h : z.im = w.im) : edist z w = edist z.re w.re := by rw [edist_nndist, edist_nndist, nndist_of_im_eq h] #align complex.edist_of_im_eq Complex.edist_of_im_eq
Mathlib/Analysis/Complex/Basic.lean
137
139
theorem dist_conj_self (z : β„‚) : dist (conj z) z = 2 * |z.im| := by
rw [dist_of_re_eq (conj_re z), conj_im, dist_comm, Real.dist_eq, sub_neg_eq_add, ← two_mul, _root_.abs_mul, abs_of_pos (zero_lt_two' ℝ)]
[ " β€–cexp (↑t * I)β€– = 1", " r₁ < ‖↑xβ€– ∧ ‖↑xβ€– < rβ‚‚", " β€–r β€’ xβ€– ≀ β€–rβ€– * β€–xβ€–", " dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)", " dist z w = √((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))", " dist z w = dist z.im w.im", " edist z w = edist z.im w.im", " dist z w = dist z.re w.re", ...
[ " β€–cexp (↑t * I)β€– = 1", " r₁ < ‖↑xβ€– ∧ ‖↑xβ€– < rβ‚‚", " β€–r β€’ xβ€– ≀ β€–rβ€– * β€–xβ€–", " dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)", " dist z w = √((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im))", " dist z w = dist z.im w.im", " edist z w = edist z.im w.im", " dist z w = dist z.re w.re", ...
import Mathlib.Algebra.MvPolynomial.Monad #align_import data.mv_polynomial.expand from "leanprover-community/mathlib"@"5da451b4c96b4c2e122c0325a7fce17d62ee46c6" namespace MvPolynomial variable {Οƒ Ο„ R S : Type*} [CommSemiring R] [CommSemiring S] noncomputable def expand (p : β„•) : MvPolynomial Οƒ R →ₐ[R] MvPolynomial Οƒ R := { (evalβ‚‚Hom C fun i ↦ X i ^ p : MvPolynomial Οƒ R β†’+* MvPolynomial Οƒ R) with commutes' := fun _ ↦ evalβ‚‚Hom_C _ _ _ } #align mv_polynomial.expand MvPolynomial.expand -- @[simp] -- Porting note (#10618): simp can prove this theorem expand_C (p : β„•) (r : R) : expand p (C r : MvPolynomial Οƒ R) = C r := evalβ‚‚Hom_C _ _ _ set_option linter.uppercaseLean3 false in #align mv_polynomial.expand_C MvPolynomial.expand_C @[simp] theorem expand_X (p : β„•) (i : Οƒ) : expand p (X i : MvPolynomial Οƒ R) = X i ^ p := evalβ‚‚Hom_X' _ _ _ set_option linter.uppercaseLean3 false in #align mv_polynomial.expand_X MvPolynomial.expand_X @[simp] theorem expand_monomial (p : β„•) (d : Οƒ β†’β‚€ β„•) (r : R) : expand p (monomial d r) = C r * ∏ i ∈ d.support, (X i ^ p) ^ d i := bind₁_monomial _ _ _ #align mv_polynomial.expand_monomial MvPolynomial.expand_monomial theorem expand_one_apply (f : MvPolynomial Οƒ R) : expand 1 f = f := by simp only [expand, pow_one, evalβ‚‚Hom_eq_bindβ‚‚, bindβ‚‚_C_left, RingHom.toMonoidHom_eq_coe, RingHom.coe_monoidHom_id, AlgHom.coe_mk, RingHom.coe_mk, MonoidHom.id_apply, RingHom.id_apply] #align mv_polynomial.expand_one_apply MvPolynomial.expand_one_apply @[simp] theorem expand_one : expand 1 = AlgHom.id R (MvPolynomial Οƒ R) := by ext1 f rw [expand_one_apply, AlgHom.id_apply] #align mv_polynomial.expand_one MvPolynomial.expand_one theorem expand_comp_bind₁ (p : β„•) (f : Οƒ β†’ MvPolynomial Ο„ R) : (expand p).comp (bind₁ f) = bind₁ fun i ↦ expand p (f i) := by apply algHom_ext intro i simp only [AlgHom.comp_apply, bind₁_X_right] #align mv_polynomial.expand_comp_bind₁ MvPolynomial.expand_comp_bind₁ theorem expand_bind₁ (p : β„•) (f : Οƒ β†’ MvPolynomial Ο„ R) (Ο† : MvPolynomial Οƒ R) : expand p (bind₁ f Ο†) = bind₁ (fun i ↦ expand p (f i)) Ο† := by rw [← AlgHom.comp_apply, expand_comp_bind₁] #align mv_polynomial.expand_bind₁ MvPolynomial.expand_bind₁ @[simp] theorem map_expand (f : R β†’+* S) (p : β„•) (Ο† : MvPolynomial Οƒ R) : map f (expand p Ο†) = expand p (map f Ο†) := by simp [expand, map_bind₁] #align mv_polynomial.map_expand MvPolynomial.map_expand @[simp] theorem rename_expand (f : Οƒ β†’ Ο„) (p : β„•) (Ο† : MvPolynomial Οƒ R) : rename f (expand p Ο†) = expand p (rename f Ο†) := by simp [expand, bind₁_rename, rename_bind₁, Function.comp] #align mv_polynomial.rename_expand MvPolynomial.rename_expand @[simp]
Mathlib/Algebra/MvPolynomial/Expand.lean
88
92
theorem rename_comp_expand (f : Οƒ β†’ Ο„) (p : β„•) : (rename f).comp (expand p) = (expand p).comp (rename f : MvPolynomial Οƒ R →ₐ[R] MvPolynomial Ο„ R) := by
ext1 Ο† simp only [rename_expand, AlgHom.comp_apply]
[ " (expand 1) f = f", " expand 1 = AlgHom.id R (MvPolynomial Οƒ R)", " (expand 1) (X f) = (AlgHom.id R (MvPolynomial Οƒ R)) (X f)", " (expand p).comp (bind₁ f) = bind₁ fun i => (expand p) (f i)", " βˆ€ (i : Οƒ), ((expand p).comp (bind₁ f)) (X i) = (bind₁ fun i => (expand p) (f i)) (X i)", " ((expand p).comp (bi...
[ " (expand 1) f = f", " expand 1 = AlgHom.id R (MvPolynomial Οƒ R)", " (expand 1) (X f) = (AlgHom.id R (MvPolynomial Οƒ R)) (X f)", " (expand p).comp (bind₁ f) = bind₁ fun i => (expand p) (f i)", " βˆ€ (i : Οƒ), ((expand p).comp (bind₁ f)) (X i) = (bind₁ fun i => (expand p) (f i)) (X i)", " ((expand p).comp (bi...
import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.matrix from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open scoped NNReal Matrix namespace Matrix variable {R l m n Ξ± Ξ² : Type*} [Fintype l] [Fintype m] [Fintype n] section LinfLinf section SeminormedAddCommGroup variable [SeminormedAddCommGroup Ξ±] [SeminormedAddCommGroup Ξ²] protected def seminormedAddCommGroup : SeminormedAddCommGroup (Matrix m n Ξ±) := Pi.seminormedAddCommGroup #align matrix.seminormed_add_comm_group Matrix.seminormedAddCommGroup attribute [local instance] Matrix.seminormedAddCommGroup -- Porting note (#10756): new theorem (along with all the uses of this lemma below) theorem norm_def (A : Matrix m n Ξ±) : β€–Aβ€– = β€–fun i j => A i jβ€– := rfl lemma norm_eq_sup_sup_nnnorm (A : Matrix m n Ξ±) : β€–Aβ€– = Finset.sup Finset.univ fun i ↦ Finset.sup Finset.univ fun j ↦ β€–A i jβ€–β‚Š := by simp_rw [Matrix.norm_def, Pi.norm_def, Pi.nnnorm_def] -- Porting note (#10756): new theorem (along with all the uses of this lemma below) theorem nnnorm_def (A : Matrix m n Ξ±) : β€–Aβ€–β‚Š = β€–fun i j => A i jβ€–β‚Š := rfl theorem norm_le_iff {r : ℝ} (hr : 0 ≀ r) {A : Matrix m n Ξ±} : β€–Aβ€– ≀ r ↔ βˆ€ i j, β€–A i jβ€– ≀ r := by simp_rw [norm_def, pi_norm_le_iff_of_nonneg hr] #align matrix.norm_le_iff Matrix.norm_le_iff theorem nnnorm_le_iff {r : ℝβ‰₯0} {A : Matrix m n Ξ±} : β€–Aβ€–β‚Š ≀ r ↔ βˆ€ i j, β€–A i jβ€–β‚Š ≀ r := by simp_rw [nnnorm_def, pi_nnnorm_le_iff] #align matrix.nnnorm_le_iff Matrix.nnnorm_le_iff theorem norm_lt_iff {r : ℝ} (hr : 0 < r) {A : Matrix m n Ξ±} : β€–Aβ€– < r ↔ βˆ€ i j, β€–A i jβ€– < r := by simp_rw [norm_def, pi_norm_lt_iff hr] #align matrix.norm_lt_iff Matrix.norm_lt_iff
Mathlib/Analysis/Matrix.lean
102
104
theorem nnnorm_lt_iff {r : ℝβ‰₯0} (hr : 0 < r) {A : Matrix m n Ξ±} : β€–Aβ€–β‚Š < r ↔ βˆ€ i j, β€–A i jβ€–β‚Š < r := by
simp_rw [nnnorm_def, pi_nnnorm_lt_iff hr]
[ " β€–Aβ€– = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => β€–A i jβ€–β‚Š)", " β€–Aβ€– ≀ r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€– ≀ r", " β€–Aβ€–β‚Š ≀ r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€–β‚Š ≀ r", " β€–Aβ€– < r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€– < r", " β€–Aβ€–β‚Š < r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€–β‚Š < r" ]
[ " β€–Aβ€– = ↑(Finset.univ.sup fun i => Finset.univ.sup fun j => β€–A i jβ€–β‚Š)", " β€–Aβ€– ≀ r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€– ≀ r", " β€–Aβ€–β‚Š ≀ r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€–β‚Š ≀ r", " β€–Aβ€– < r ↔ βˆ€ (i : m) (j : n), β€–A i jβ€– < r" ]
import Mathlib.Algebra.Group.Subsemigroup.Basic #align_import group_theory.subsemigroup.membership from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff" assert_not_exists MonoidWithZero variable {ΞΉ : Sort*} {M A B : Type*} section NonAssoc variable [Mul M] open Set namespace Subsemigroup -- TODO: this section can be generalized to `[MulMemClass B M] [CompleteLattice B]` -- such that `complete_lattice.le` coincides with `set_like.le` @[to_additive] theorem mem_iSup_of_directed {S : ΞΉ β†’ Subsemigroup M} (hS : Directed (Β· ≀ Β·) S) {x : M} : (x ∈ ⨆ i, S i) ↔ βˆƒ i, x ∈ S i := by refine ⟨?_, fun ⟨i, hi⟩ ↦ le_iSup S i hi⟩ suffices x ∈ closure (⋃ i, (S i : Set M)) β†’ βˆƒ i, x ∈ S i by simpa only [closure_iUnion, closure_eq (S _)] using this refine fun hx ↦ closure_induction hx (fun y hy ↦ mem_iUnion.mp hy) ?_ rintro x y ⟨i, hi⟩ ⟨j, hj⟩ rcases hS i j with ⟨k, hki, hkj⟩ exact ⟨k, (S k).mul_mem (hki hi) (hkj hj)⟩ #align subsemigroup.mem_supr_of_directed Subsemigroup.mem_iSup_of_directed #align add_subsemigroup.mem_supr_of_directed AddSubsemigroup.mem_iSup_of_directed @[to_additive] theorem coe_iSup_of_directed {S : ΞΉ β†’ Subsemigroup M} (hS : Directed (Β· ≀ Β·) S) : ((⨆ i, S i : Subsemigroup M) : Set M) = ⋃ i, S i := Set.ext fun x => by simp [mem_iSup_of_directed hS] #align subsemigroup.coe_supr_of_directed Subsemigroup.coe_iSup_of_directed #align add_subsemigroup.coe_supr_of_directed AddSubsemigroup.coe_iSup_of_directed @[to_additive]
Mathlib/Algebra/Group/Subsemigroup/Membership.lean
67
70
theorem mem_sSup_of_directed_on {S : Set (Subsemigroup M)} (hS : DirectedOn (Β· ≀ Β·) S) {x : M} : x ∈ sSup S ↔ βˆƒ s ∈ S, x ∈ s := by
simp only [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, SetCoe.exists, Subtype.coe_mk, exists_prop]
[ " x ∈ ⨆ i, S i ↔ βˆƒ i, x ∈ S i", " x ∈ ⨆ i, S i β†’ βˆƒ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) β†’ βˆƒ i, x ∈ S i", " βˆ€ (x y : M), (βˆƒ i, x ∈ S i) β†’ (βˆƒ i, y ∈ S i) β†’ βˆƒ i, x * y ∈ S i", " βˆƒ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)", " x ∈ sSup S ↔ βˆƒ s ∈ S, x ∈ s" ]
[ " x ∈ ⨆ i, S i ↔ βˆƒ i, x ∈ S i", " x ∈ ⨆ i, S i β†’ βˆƒ i, x ∈ S i", " x ∈ closure (⋃ i, ↑(S i)) β†’ βˆƒ i, x ∈ S i", " βˆ€ (x y : M), (βˆƒ i, x ∈ S i) β†’ (βˆƒ i, y ∈ S i) β†’ βˆƒ i, x * y ∈ S i", " βˆƒ i, x * y ∈ S i", " x ∈ ↑(⨆ i, S i) ↔ x ∈ ⋃ i, ↑(S i)" ]
import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.supported from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" universe u v w namespace MvPolynomial variable {Οƒ Ο„ : Type*} {R : Type u} {S : Type v} {r : R} {e : β„•} {n m : Οƒ} section CommSemiring variable [CommSemiring R] {p q : MvPolynomial Οƒ R} variable (R) noncomputable def supported (s : Set Οƒ) : Subalgebra R (MvPolynomial Οƒ R) := Algebra.adjoin R (X '' s) #align mv_polynomial.supported MvPolynomial.supported variable {R} open Algebra theorem supported_eq_range_rename (s : Set Οƒ) : supported R s = (rename ((↑) : s β†’ Οƒ)).range := by rw [supported, Set.image_eq_range, adjoin_range_eq_range_aeval, rename] congr #align mv_polynomial.supported_eq_range_rename MvPolynomial.supported_eq_range_rename noncomputable def supportedEquivMvPolynomial (s : Set Οƒ) : supported R s ≃ₐ[R] MvPolynomial s R := (Subalgebra.equivOfEq _ _ (supported_eq_range_rename s)).trans (AlgEquiv.ofInjective (rename ((↑) : s β†’ Οƒ)) (rename_injective _ Subtype.val_injective)).symm #align mv_polynomial.supported_equiv_mv_polynomial MvPolynomial.supportedEquivMvPolynomial @[simp, nolint simpNF] -- Porting note: the `simpNF` linter complained about this lemma. theorem supportedEquivMvPolynomial_symm_C (s : Set Οƒ) (x : R) : (supportedEquivMvPolynomial s).symm (C x) = algebraMap R (supported R s) x := by ext1 simp [supportedEquivMvPolynomial, MvPolynomial.algebraMap_eq] set_option linter.uppercaseLean3 false in #align mv_polynomial.supported_equiv_mv_polynomial_symm_C MvPolynomial.supportedEquivMvPolynomial_symm_C @[simp, nolint simpNF] -- Porting note: the `simpNF` linter complained about this lemma. theorem supportedEquivMvPolynomial_symm_X (s : Set Οƒ) (i : s) : (↑((supportedEquivMvPolynomial s).symm (X i : MvPolynomial s R)) : MvPolynomial Οƒ R) = X ↑i := by simp [supportedEquivMvPolynomial] set_option linter.uppercaseLean3 false in #align mv_polynomial.supported_equiv_mv_polynomial_symm_X MvPolynomial.supportedEquivMvPolynomial_symm_X variable {s t : Set Οƒ} theorem mem_supported : p ∈ supported R s ↔ ↑p.vars βŠ† s := by classical rw [supported_eq_range_rename, AlgHom.mem_range] constructor Β· rintro ⟨p, rfl⟩ refine _root_.trans (Finset.coe_subset.2 (vars_rename _ _)) ?_ simp Β· intro hs exact exists_rename_eq_of_vars_subset_range p ((↑) : s β†’ Οƒ) Subtype.val_injective (by simpa) #align mv_polynomial.mem_supported MvPolynomial.mem_supported theorem supported_eq_vars_subset : (supported R s : Set (MvPolynomial Οƒ R)) = { p | ↑p.vars βŠ† s } := Set.ext fun _ ↦ mem_supported #align mv_polynomial.supported_eq_vars_subset MvPolynomial.supported_eq_vars_subset @[simp] theorem mem_supported_vars (p : MvPolynomial Οƒ R) : p ∈ supported R (↑p.vars : Set Οƒ) := by rw [mem_supported] #align mv_polynomial.mem_supported_vars MvPolynomial.mem_supported_vars variable (s) theorem supported_eq_adjoin_X : supported R s = Algebra.adjoin R (X '' s) := rfl set_option linter.uppercaseLean3 false in #align mv_polynomial.supported_eq_adjoin_X MvPolynomial.supported_eq_adjoin_X @[simp] theorem supported_univ : supported R (Set.univ : Set Οƒ) = ⊀ := by simp [Algebra.eq_top_iff, mem_supported] #align mv_polynomial.supported_univ MvPolynomial.supported_univ @[simp] theorem supported_empty : supported R (βˆ… : Set Οƒ) = βŠ₯ := by simp [supported_eq_adjoin_X] #align mv_polynomial.supported_empty MvPolynomial.supported_empty variable {s} theorem supported_mono (st : s βŠ† t) : supported R s ≀ supported R t := Algebra.adjoin_mono (Set.image_subset _ st) #align mv_polynomial.supported_mono MvPolynomial.supported_mono @[simp]
Mathlib/Algebra/MvPolynomial/Supported.lean
117
118
theorem X_mem_supported [Nontrivial R] {i : Οƒ} : X i ∈ supported R s ↔ i ∈ s := by
simp [mem_supported]
[ " supported R s = (rename Subtype.val).range", " (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range", " (supportedEquivMvPolynomial s).symm (C x) = (algebraMap R β†₯(supported R s)) x", " ↑((supportedEquivMvPolynomial s).symm (C x)) = ↑((algebraMap R β†₯(supported R s)) x)", " ↑((supportedEquivMvPoly...
[ " supported R s = (rename Subtype.val).range", " (aeval fun x => X ↑x).range = (aeval (X ∘ Subtype.val)).range", " (supportedEquivMvPolynomial s).symm (C x) = (algebraMap R β†₯(supported R s)) x", " ↑((supportedEquivMvPolynomial s).symm (C x)) = ↑((algebraMap R β†₯(supported R s)) x)", " ↑((supportedEquivMvPoly...
import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.LocalExtr.Basic #align_import analysis.calculus.darboux from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d" open Filter Set open scoped Topology Classical variable {a b : ℝ} {f f' : ℝ β†’ ℝ} theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≀ b) (hf : βˆ€ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a < m) (hmb : m < f' b) : m ∈ f' '' Ioo a b := by rcases hab.eq_or_lt with (rfl | hab') Β· exact (lt_asymm hma hmb).elim set g : ℝ β†’ ℝ := fun x => f x - m * x have hg : βˆ€ x ∈ Icc a b, HasDerivWithinAt g (f' x - m) (Icc a b) x := by intro x hx simpa using (hf x hx).sub ((hasDerivWithinAt_id x _).const_mul m) obtain ⟨c, cmem, hc⟩ : βˆƒ c ∈ Icc a b, IsMinOn g (Icc a b) c := isCompact_Icc.exists_isMinOn (nonempty_Icc.2 <| hab) fun x hx => (hg x hx).continuousWithinAt have cmem' : c ∈ Ioo a b := by rcases cmem.1.eq_or_lt with (rfl | hac) -- Show that `c` can't be equal to `a` Β· refine absurd (sub_nonneg.1 <| nonneg_of_mul_nonneg_right ?_ (sub_pos.2 hab')) (not_le_of_lt hma) have : b - a ∈ posTangentConeAt (Icc a b) a := mem_posTangentConeAt_of_segment_subset (segment_eq_Icc hab β–Έ Subset.refl _) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg a (left_mem_Icc.2 hab)) this rcases cmem.2.eq_or_gt with (rfl | hcb) -- Show that `c` can't be equal to `b` Β· refine absurd (sub_nonpos.1 <| nonpos_of_mul_nonneg_right ?_ (sub_lt_zero.2 hab')) (not_le_of_lt hmb) have : a - b ∈ posTangentConeAt (Icc a b) b := mem_posTangentConeAt_of_segment_subset (by rw [segment_symm, segment_eq_Icc hab]) simpa only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply] using hc.localize.hasFDerivWithinAt_nonneg (hg b (right_mem_Icc.2 hab)) this exact ⟨hac, hcb⟩ use c, cmem' rw [← sub_eq_zero] have : Icc a b ∈ 𝓝 c := by rwa [← mem_interior_iff_mem_nhds, interior_Icc] exact (hc.isLocalMin this).hasDerivAt_eq_zero ((hg c cmem).hasDerivAt this) #align exists_has_deriv_within_at_eq_of_gt_of_lt exists_hasDerivWithinAt_eq_of_gt_of_lt theorem exists_hasDerivWithinAt_eq_of_lt_of_gt (hab : a ≀ b) (hf : βˆ€ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : m < f' a) (hmb : f' b < m) : m ∈ f' '' Ioo a b := let ⟨c, cmem, hc⟩ := exists_hasDerivWithinAt_eq_of_gt_of_lt hab (fun x hx => (hf x hx).neg) (neg_lt_neg hma) (neg_lt_neg hmb) ⟨c, cmem, neg_injective hc⟩ #align exists_has_deriv_within_at_eq_of_lt_of_gt exists_hasDerivWithinAt_eq_of_lt_of_gt
Mathlib/Analysis/Calculus/Darboux.lean
76
90
theorem Set.OrdConnected.image_hasDerivWithinAt {s : Set ℝ} (hs : OrdConnected s) (hf : βˆ€ x ∈ s, HasDerivWithinAt f (f' x) s x) : OrdConnected (f' '' s) := by
apply ordConnected_of_Ioo rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ - m ⟨hma, hmb⟩ rcases le_total a b with hab | hab Β· have : Icc a b βŠ† s := hs.out ha hb rcases exists_hasDerivWithinAt_eq_of_gt_of_lt hab (fun x hx => (hf x <| this hx).mono this) hma hmb with ⟨c, cmem, hc⟩ exact ⟨c, this <| Ioo_subset_Icc_self cmem, hc⟩ Β· have : Icc b a βŠ† s := hs.out hb ha rcases exists_hasDerivWithinAt_eq_of_lt_of_gt hab (fun x hx => (hf x <| this hx).mono this) hmb hma with ⟨c, cmem, hc⟩ exact ⟨c, this <| Ioo_subset_Icc_self cmem, hc⟩
[ " m ∈ f' '' Ioo a b", " m ∈ f' '' Ioo a a", " βˆ€ x ∈ Icc a b, HasDerivWithinAt g (f' x - m) (Icc a b) x", " HasDerivWithinAt g (f' x - m) (Icc a b) x", " c ∈ Ioo a b", " a ∈ Ioo a b", " 0 ≀ (b - a) * (f' a - m)", " b ∈ Ioo a b", " 0 ≀ (a - b) * (f' b - m)", " segment ℝ b a βŠ† Icc a b", " f' c = m"...
[ " m ∈ f' '' Ioo a b", " m ∈ f' '' Ioo a a", " βˆ€ x ∈ Icc a b, HasDerivWithinAt g (f' x - m) (Icc a b) x", " HasDerivWithinAt g (f' x - m) (Icc a b) x", " c ∈ Ioo a b", " a ∈ Ioo a b", " 0 ≀ (b - a) * (f' a - m)", " b ∈ Ioo a b", " 0 ≀ (a - b) * (f' b - m)", " segment ℝ b a βŠ† Icc a b", " f' c = m"...
import Mathlib.LinearAlgebra.Matrix.BilinearForm import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Vandermonde import Mathlib.LinearAlgebra.Trace import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.PrimitiveElement import Mathlib.FieldTheory.Galois import Mathlib.RingTheory.PowerBasis import Mathlib.FieldTheory.Minpoly.MinpolyDiv #align_import ring_theory.trace from "leanprover-community/mathlib"@"3e068ece210655b7b9a9477c3aff38a492400aa1" universe u v w z variable {R S T : Type*} [CommRing R] [CommRing S] [CommRing T] variable [Algebra R S] [Algebra R T] variable {K L : Type*} [Field K] [Field L] [Algebra K L] variable {ΞΉ ΞΊ : Type w} [Fintype ΞΉ] open FiniteDimensional open LinearMap (BilinForm) open LinearMap open Matrix open scoped Matrix namespace Algebra variable (b : Basis ΞΉ R S) variable (R S) noncomputable def trace : S β†’β‚—[R] R := (LinearMap.trace R S).comp (lmul R S).toLinearMap #align algebra.trace Algebra.trace variable {S} -- Not a `simp` lemma since there are more interesting ways to rewrite `trace R S x`, -- for example `trace_trace` theorem trace_apply (x) : trace R S x = LinearMap.trace R S (lmul R S x) := rfl #align algebra.trace_apply Algebra.trace_apply theorem trace_eq_zero_of_not_exists_basis (h : Β¬βˆƒ s : Finset S, Nonempty (Basis s R S)) : trace R S = 0 := by ext s; simp [trace_apply, LinearMap.trace, h] #align algebra.trace_eq_zero_of_not_exists_basis Algebra.trace_eq_zero_of_not_exists_basis variable {R} -- Can't be a `simp` lemma because it depends on a choice of basis
Mathlib/RingTheory/Trace.lean
109
111
theorem trace_eq_matrix_trace [DecidableEq ΞΉ] (b : Basis ΞΉ R S) (s : S) : trace R S s = Matrix.trace (Algebra.leftMulMatrix b s) := by
rw [trace_apply, LinearMap.trace_eq_matrix_trace _ b, ← toMatrix_lmul_eq]; rfl
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace" ]
[ " trace R S = 0", " (trace R S) s = 0 s" ]
import Mathlib.Algebra.CharP.LocalRing import Mathlib.RingTheory.Ideal.Quotient import Mathlib.Tactic.FieldSimp #align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" variable (R : Type*) [CommRing R] class MixedCharZero (p : β„•) : Prop where [toCharZero : CharZero R] charP_quotient : βˆƒ I : Ideal R, I β‰  ⊀ ∧ CharP (R β§Έ I) p #align mixed_char_zero MixedCharZero namespace MixedCharZero
Mathlib/Algebra/CharP/MixedCharZero.lean
85
105
theorem reduce_to_p_prime {P : Prop} : (βˆ€ p > 0, MixedCharZero R p β†’ P) ↔ βˆ€ p : β„•, p.Prime β†’ MixedCharZero R p β†’ P := by
constructor Β· intro h q q_prime q_mixedChar exact h q (Nat.Prime.pos q_prime) q_mixedChar Β· intro h q q_pos q_mixedChar rcases q_mixedChar.charP_quotient with ⟨I, hI_ne_top, _⟩ -- Krull's Thm: There exists a prime ideal `P` such that `I ≀ P` rcases Ideal.exists_le_maximal I hI_ne_top with ⟨M, hM_max, h_IM⟩ let r := ringChar (R β§Έ M) have r_pos : r β‰  0 := by have q_zero := congr_arg (Ideal.Quotient.factor I M h_IM) (CharP.cast_eq_zero (R β§Έ I) q) simp only [map_natCast, map_zero] at q_zero apply ne_zero_of_dvd_ne_zero (ne_of_gt q_pos) exact (CharP.cast_eq_zero_iff (R β§Έ M) r q).mp q_zero have r_prime : Nat.Prime r := or_iff_not_imp_right.1 (CharP.char_is_prime_or_zero (R β§Έ M) r) r_pos apply h r r_prime have : CharZero R := q_mixedChar.toCharZero exact ⟨⟨M, hM_max.ne_top, ringChar.of_eq rfl⟩⟩
[ " (βˆ€ p > 0, MixedCharZero R p β†’ P) ↔ βˆ€ (p : β„•), p.Prime β†’ MixedCharZero R p β†’ P", " (βˆ€ p > 0, MixedCharZero R p β†’ P) β†’ βˆ€ (p : β„•), p.Prime β†’ MixedCharZero R p β†’ P", " P", " (βˆ€ (p : β„•), p.Prime β†’ MixedCharZero R p β†’ P) β†’ βˆ€ p > 0, MixedCharZero R p β†’ P", " r β‰  0", " r ∣ q", " MixedCharZero R r" ]
[]
import Mathlib.Geometry.Manifold.Algebra.Monoid #align_import geometry.manifold.algebra.lie_group from "leanprover-community/mathlib"@"f9ec187127cc5b381dfcf5f4a22dacca4c20b63d" noncomputable section open scoped Manifold -- See note [Design choices about smooth algebraic structures] class LieAddGroup {π•œ : Type*} [NontriviallyNormedField π•œ] {H : Type*} [TopologicalSpace H] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] (I : ModelWithCorners π•œ E H) (G : Type*) [AddGroup G] [TopologicalSpace G] [ChartedSpace H G] extends SmoothAdd I G : Prop where smooth_neg : Smooth I I fun a : G => -a #align lie_add_group LieAddGroup -- See note [Design choices about smooth algebraic structures] @[to_additive] class LieGroup {π•œ : Type*} [NontriviallyNormedField π•œ] {H : Type*} [TopologicalSpace H] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] (I : ModelWithCorners π•œ E H) (G : Type*) [Group G] [TopologicalSpace G] [ChartedSpace H G] extends SmoothMul I G : Prop where smooth_inv : Smooth I I fun a : G => a⁻¹ #align lie_group LieGroup section PointwiseDivision variable {π•œ : Type*} [NontriviallyNormedField π•œ] {H : Type*} [TopologicalSpace H] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {I : ModelWithCorners π•œ E H} {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] {J : ModelWithCorners π•œ F F} {G : Type*} [TopologicalSpace G] [ChartedSpace H G] [Group G] [LieGroup I G] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace π•œ E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners π•œ E' H'} {M : Type*} [TopologicalSpace M] [ChartedSpace H' M] {E'' : Type*} [NormedAddCommGroup E''] [NormedSpace π•œ E''] {H'' : Type*} [TopologicalSpace H''] {I'' : ModelWithCorners π•œ E'' H''} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H'' M'] {n : β„•βˆž} section variable (I) @[to_additive "In an additive Lie group, inversion is a smooth map."] theorem smooth_inv : Smooth I I fun x : G => x⁻¹ := LieGroup.smooth_inv #align smooth_inv smooth_inv #align smooth_neg smooth_neg @[to_additive "An additive Lie group is an additive topological group. This is not an instance for technical reasons, see note [Design choices about smooth algebraic structures]."] theorem topologicalGroup_of_lieGroup : TopologicalGroup G := { continuousMul_of_smooth I with continuous_inv := (smooth_inv I).continuous } #align topological_group_of_lie_group topologicalGroup_of_lieGroup #align topological_add_group_of_lie_add_group topologicalAddGroup_of_lieAddGroup end @[to_additive] theorem ContMDiffWithinAt.inv {f : M β†’ G} {s : Set M} {xβ‚€ : M} (hf : ContMDiffWithinAt I' I n f s xβ‚€) : ContMDiffWithinAt I' I n (fun x => (f x)⁻¹) s xβ‚€ := ((smooth_inv I).of_le le_top).contMDiffAt.contMDiffWithinAt.comp xβ‚€ hf <| Set.mapsTo_univ _ _ #align cont_mdiff_within_at.inv ContMDiffWithinAt.inv #align cont_mdiff_within_at.neg ContMDiffWithinAt.neg @[to_additive] theorem ContMDiffAt.inv {f : M β†’ G} {xβ‚€ : M} (hf : ContMDiffAt I' I n f xβ‚€) : ContMDiffAt I' I n (fun x => (f x)⁻¹) xβ‚€ := ((smooth_inv I).of_le le_top).contMDiffAt.comp xβ‚€ hf #align cont_mdiff_at.inv ContMDiffAt.inv #align cont_mdiff_at.neg ContMDiffAt.neg @[to_additive] theorem ContMDiffOn.inv {f : M β†’ G} {s : Set M} (hf : ContMDiffOn I' I n f s) : ContMDiffOn I' I n (fun x => (f x)⁻¹) s := fun x hx => (hf x hx).inv #align cont_mdiff_on.inv ContMDiffOn.inv #align cont_mdiff_on.neg ContMDiffOn.neg @[to_additive] theorem ContMDiff.inv {f : M β†’ G} (hf : ContMDiff I' I n f) : ContMDiff I' I n fun x => (f x)⁻¹ := fun x => (hf x).inv #align cont_mdiff.inv ContMDiff.inv #align cont_mdiff.neg ContMDiff.neg @[to_additive] nonrec theorem SmoothWithinAt.inv {f : M β†’ G} {s : Set M} {xβ‚€ : M} (hf : SmoothWithinAt I' I f s xβ‚€) : SmoothWithinAt I' I (fun x => (f x)⁻¹) s xβ‚€ := hf.inv #align smooth_within_at.inv SmoothWithinAt.inv #align smooth_within_at.neg SmoothWithinAt.neg @[to_additive] nonrec theorem SmoothAt.inv {f : M β†’ G} {xβ‚€ : M} (hf : SmoothAt I' I f xβ‚€) : SmoothAt I' I (fun x => (f x)⁻¹) xβ‚€ := hf.inv #align smooth_at.inv SmoothAt.inv #align smooth_at.neg SmoothAt.neg @[to_additive] nonrec theorem SmoothOn.inv {f : M β†’ G} {s : Set M} (hf : SmoothOn I' I f s) : SmoothOn I' I (fun x => (f x)⁻¹) s := hf.inv #align smooth_on.inv SmoothOn.inv #align smooth_on.neg SmoothOn.neg @[to_additive] nonrec theorem Smooth.inv {f : M β†’ G} (hf : Smooth I' I f) : Smooth I' I fun x => (f x)⁻¹ := hf.inv #align smooth.inv Smooth.inv #align smooth.neg Smooth.neg @[to_additive]
Mathlib/Geometry/Manifold/Algebra/LieGroup.lean
171
174
theorem ContMDiffWithinAt.div {f g : M β†’ G} {s : Set M} {xβ‚€ : M} (hf : ContMDiffWithinAt I' I n f s xβ‚€) (hg : ContMDiffWithinAt I' I n g s xβ‚€) : ContMDiffWithinAt I' I n (fun x => f x / g x) s xβ‚€ := by
simp_rw [div_eq_mul_inv]; exact hf.mul hg.inv
[ " ContMDiffWithinAt I' I n (fun x => f x / g x) s xβ‚€", " ContMDiffWithinAt I' I n (fun x => f x * (g x)⁻¹) s xβ‚€" ]
[]
import Batteries.Data.DList import Mathlib.Mathport.Rename import Mathlib.Tactic.Cases #align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" universe u #align dlist Batteries.DList namespace Batteries.DList open Function variable {Ξ± : Type u} #align dlist.of_list Batteries.DList.ofList def lazy_ofList (l : Thunk (List Ξ±)) : DList Ξ± := ⟨fun xs => l.get ++ xs, fun t => by simp⟩ #align dlist.lazy_of_list Batteries.DList.lazy_ofList #align dlist.to_list Batteries.DList.toList #align dlist.empty Batteries.DList.empty #align dlist.singleton Batteries.DList.singleton attribute [local simp] Function.comp #align dlist.cons Batteries.DList.cons #align dlist.concat Batteries.DList.push #align dlist.append Batteries.DList.append attribute [local simp] ofList toList empty singleton cons push append theorem toList_ofList (l : List Ξ±) : DList.toList (DList.ofList l) = l := by cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil] #align dlist.to_list_of_list Batteries.DList.toList_ofList theorem ofList_toList (l : DList Ξ±) : DList.ofList (DList.toList l) = l := by cases' l with app inv simp only [ofList, toList, mk.injEq] funext x rw [(inv x)] #align dlist.of_list_to_list Batteries.DList.ofList_toList theorem toList_empty : toList (@empty Ξ±) = [] := by simp #align dlist.to_list_empty Batteries.DList.toList_empty theorem toList_singleton (x : Ξ±) : toList (singleton x) = [x] := by simp #align dlist.to_list_singleton Batteries.DList.toList_singleton theorem toList_append (l₁ lβ‚‚ : DList Ξ±) : toList (l₁ ++ lβ‚‚) = toList l₁ ++ toList lβ‚‚ := show toList (DList.append l₁ lβ‚‚) = toList l₁ ++ toList lβ‚‚ by cases' l₁ with _ l₁_invariant; cases' lβ‚‚; simp; rw [l₁_invariant] #align dlist.to_list_append Batteries.DList.toList_append
Mathlib/Data/DList/Defs.lean
80
81
theorem toList_cons (x : Ξ±) (l : DList Ξ±) : toList (cons x l) = x :: toList l := by
cases l; simp
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
[ " (fun xs => l.get ++ xs) t = (fun xs => l.get ++ xs) [] ++ t", " (ofList l).toList = l", " (ofList (head✝ :: tail✝)).toList = head✝ :: tail✝", " ofList l.toList = l", " ofList { apply := app, invariant := inv }.toList = { apply := app, invariant := inv }", " (fun x => app [] ++ x) = app", " app [] ++ x...
import Mathlib.Algebra.MvPolynomial.Funext import Mathlib.Algebra.Ring.ULift import Mathlib.RingTheory.WittVector.Basic #align_import ring_theory.witt_vector.is_poly from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" namespace WittVector universe u variable {p : β„•} {R S : Type u} {Οƒ idx : Type*} [CommRing R] [CommRing S] local notation "π•Ž" => WittVector p -- type as `\bbW` open MvPolynomial open Function (uncurry) variable (p) noncomputable section theorem poly_eq_of_wittPolynomial_bind_eq' [Fact p.Prime] (f g : β„• β†’ MvPolynomial (idx Γ— β„•) β„€) (h : βˆ€ n, bind₁ f (wittPolynomial p _ n) = bind₁ g (wittPolynomial p _ n)) : f = g := by ext1 n apply MvPolynomial.map_injective (Int.castRingHom β„š) Int.cast_injective rw [← Function.funext_iff] at h replace h := congr_arg (fun fam => bind₁ (MvPolynomial.map (Int.castRingHom β„š) ∘ fam) (xInTermsOfW p β„š n)) h simpa only [Function.comp, map_bind₁, map_wittPolynomial, ← bind₁_bind₁, bind₁_wittPolynomial_xInTermsOfW, bind₁_X_right] using h #align witt_vector.poly_eq_of_witt_polynomial_bind_eq' WittVector.poly_eq_of_wittPolynomial_bind_eq'
Mathlib/RingTheory/WittVector/IsPoly.lean
125
133
theorem poly_eq_of_wittPolynomial_bind_eq [Fact p.Prime] (f g : β„• β†’ MvPolynomial β„• β„€) (h : βˆ€ n, bind₁ f (wittPolynomial p _ n) = bind₁ g (wittPolynomial p _ n)) : f = g := by
ext1 n apply MvPolynomial.map_injective (Int.castRingHom β„š) Int.cast_injective rw [← Function.funext_iff] at h replace h := congr_arg (fun fam => bind₁ (MvPolynomial.map (Int.castRingHom β„š) ∘ fam) (xInTermsOfW p β„š n)) h simpa only [Function.comp, map_bind₁, map_wittPolynomial, ← bind₁_bind₁, bind₁_wittPolynomial_xInTermsOfW, bind₁_X_right] using h
[ " f = g", " f n = g n", " (MvPolynomial.map (Int.castRingHom β„š)) (f n) = (MvPolynomial.map (Int.castRingHom β„š)) (g n)" ]
[ " f = g", " f n = g n", " (MvPolynomial.map (Int.castRingHom β„š)) (f n) = (MvPolynomial.map (Int.castRingHom β„š)) (g n)" ]
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_import ring_theory.mv_polynomial.homogeneous from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" namespace MvPolynomial variable {Οƒ : Type*} {Ο„ : Type*} {R : Type*} {S : Type*} def degree (d : Οƒ β†’β‚€ β„•) := βˆ‘ i ∈ d.support, d i theorem weightedDegree_one (d : Οƒ β†’β‚€ β„•) : weightedDegree 1 d = degree d := by simp [weightedDegree, degree, Finsupp.total, Finsupp.sum] def IsHomogeneous [CommSemiring R] (Ο† : MvPolynomial Οƒ R) (n : β„•) := IsWeightedHomogeneous 1 Ο† n #align mv_polynomial.is_homogeneous MvPolynomial.IsHomogeneous variable [CommSemiring R] theorem weightedTotalDegree_one (Ο† : MvPolynomial Οƒ R) : weightedTotalDegree (1 : Οƒ β†’ β„•) Ο† = Ο†.totalDegree := by simp only [totalDegree, weightedTotalDegree, weightedDegree, LinearMap.toAddMonoidHom_coe, Finsupp.total, Pi.one_apply, Finsupp.coe_lsum, LinearMap.coe_smulRight, LinearMap.id_coe, id, Algebra.id.smul_eq_mul, mul_one] variable (Οƒ R) def homogeneousSubmodule (n : β„•) : Submodule R (MvPolynomial Οƒ R) where carrier := { x | x.IsHomogeneous n } smul_mem' r a ha c hc := by rw [coeff_smul] at hc apply ha intro h apply hc rw [h] exact smul_zero r zero_mem' d hd := False.elim (hd <| coeff_zero _) add_mem' {a b} ha hb c hc := by rw [coeff_add] at hc obtain h | h : coeff c a β‰  0 ∨ coeff c b β‰  0 := by contrapose! hc simp only [hc, add_zero] Β· exact ha h Β· exact hb h #align mv_polynomial.homogeneous_submodule MvPolynomial.homogeneousSubmodule @[simp] lemma weightedHomogeneousSubmodule_one (n : β„•) : weightedHomogeneousSubmodule R 1 n = homogeneousSubmodule Οƒ R n := rfl variable {Οƒ R} @[simp] theorem mem_homogeneousSubmodule [CommSemiring R] (n : β„•) (p : MvPolynomial Οƒ R) : p ∈ homogeneousSubmodule Οƒ R n ↔ p.IsHomogeneous n := Iff.rfl #align mv_polynomial.mem_homogeneous_submodule MvPolynomial.mem_homogeneousSubmodule variable (Οƒ R) 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 #align mv_polynomial.homogeneous_submodule_eq_finsupp_supported MvPolynomial.homogeneousSubmodule_eq_finsupp_supported variable {Οƒ R} theorem homogeneousSubmodule_mul [CommSemiring R] (m n : β„•) : homogeneousSubmodule Οƒ R m * homogeneousSubmodule Οƒ R n ≀ homogeneousSubmodule Οƒ R (m + n) := weightedHomogeneousSubmodule_mul 1 m n #align mv_polynomial.homogeneous_submodule_mul MvPolynomial.homogeneousSubmodule_mul section variable [CommSemiring R] theorem isHomogeneous_monomial {d : Οƒ β†’β‚€ β„•} (r : R) {n : β„•} (hn : degree d = n) : IsHomogeneous (monomial d r) n := by simp_rw [← weightedDegree_one] at hn exact isWeightedHomogeneous_monomial 1 d r hn #align mv_polynomial.is_homogeneous_monomial MvPolynomial.isHomogeneous_monomial variable (Οƒ) theorem totalDegree_zero_iff_isHomogeneous {p : MvPolynomial Οƒ R} : p.totalDegree = 0 ↔ IsHomogeneous p 0 := by rw [← weightedTotalDegree_one, ← isWeightedHomogeneous_zero_iff_weightedTotalDegree_eq_zero, IsHomogeneous] alias ⟨isHomogeneous_of_totalDegree_zero, _⟩ := totalDegree_zero_iff_isHomogeneous #align mv_polynomial.is_homogeneous_of_total_degree_zero MvPolynomial.isHomogeneous_of_totalDegree_zero
Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
132
134
theorem isHomogeneous_C (r : R) : IsHomogeneous (C r : MvPolynomial Οƒ R) 0 := by
apply isHomogeneous_monomial simp only [degree, Finsupp.zero_apply, Finset.sum_const_zero]
[ " (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", " homogeneousSubmodule Οƒ R n = Finsupp.supported R R {d | deg...
import Mathlib.Algebra.Polynomial.Expand import Mathlib.Algebra.Polynomial.Laurent import Mathlib.LinearAlgebra.Matrix.Charpoly.Basic import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.RingTheory.Polynomial.Nilpotent #align_import linear_algebra.matrix.charpoly.coeff from "leanprover-community/mathlib"@"9745b093210e9dac443af24da9dba0f9e2b6c912" noncomputable section -- porting note: whenever there was `∏ i : n, X - C (M i i)`, I replaced it with -- `∏ i : n, (X - C (M i i))`, since otherwise Lean would parse as `(∏ i : n, X) - C (M i i)` universe u v w z open Finset Matrix Polynomial variable {R : Type u} [CommRing R] variable {n G : Type v} [DecidableEq n] [Fintype n] variable {Ξ± Ξ² : Type v} [DecidableEq Ξ±] variable {M : Matrix n n R} namespace Matrix theorem charmatrix_apply_natDegree [Nontrivial R] (i j : n) : (charmatrix M i j).natDegree = ite (i = j) 1 0 := by by_cases h : i = j <;> simp [h, ← degree_eq_iff_natDegree_eq_of_pos (Nat.succ_pos 0)] #align charmatrix_apply_nat_degree Matrix.charmatrix_apply_natDegree theorem charmatrix_apply_natDegree_le (i j : n) : (charmatrix M i j).natDegree ≀ ite (i = j) 1 0 := by split_ifs with h <;> simp [h, natDegree_X_le] #align charmatrix_apply_nat_degree_le Matrix.charmatrix_apply_natDegree_le variable (M) theorem charpoly_sub_diagonal_degree_lt : (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1) := by rw [charpoly, det_apply', ← insert_erase (mem_univ (Equiv.refl n)), sum_insert (not_mem_erase (Equiv.refl n) univ), add_comm] simp only [charmatrix_apply_eq, one_mul, Equiv.Perm.sign_refl, id, Int.cast_one, Units.val_one, add_sub_cancel_right, Equiv.coe_refl] rw [← mem_degreeLT] apply Submodule.sum_mem (degreeLT R (Fintype.card n - 1)) intro c hc; rw [← C_eq_intCast, C_mul'] apply Submodule.smul_mem (degreeLT R (Fintype.card n - 1)) ↑↑(Equiv.Perm.sign c) rw [mem_degreeLT] apply lt_of_le_of_lt degree_le_natDegree _ rw [Nat.cast_lt] apply lt_of_le_of_lt _ (Equiv.Perm.fixed_point_card_lt_of_ne_one (ne_of_mem_erase hc)) apply le_trans (Polynomial.natDegree_prod_le univ fun i : n => charmatrix M (c i) i) _ rw [card_eq_sum_ones]; rw [sum_filter]; apply sum_le_sum intros apply charmatrix_apply_natDegree_le #align matrix.charpoly_sub_diagonal_degree_lt Matrix.charpoly_sub_diagonal_degree_lt theorem charpoly_coeff_eq_prod_coeff_of_le {k : β„•} (h : Fintype.card n - 1 ≀ k) : M.charpoly.coeff k = (∏ i : n, (X - C (M i i))).coeff k := by apply eq_of_sub_eq_zero; rw [← coeff_sub] apply Polynomial.coeff_eq_zero_of_degree_lt apply lt_of_lt_of_le (charpoly_sub_diagonal_degree_lt M) ?_ rw [Nat.cast_le]; apply h #align matrix.charpoly_coeff_eq_prod_coeff_of_le Matrix.charpoly_coeff_eq_prod_coeff_of_le theorem det_of_card_zero (h : Fintype.card n = 0) (M : Matrix n n R) : M.det = 1 := by rw [Fintype.card_eq_zero_iff] at h suffices M = 1 by simp [this] ext i exact h.elim i #align matrix.det_of_card_zero Matrix.det_of_card_zero
Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
96
119
theorem charpoly_degree_eq_dim [Nontrivial R] (M : Matrix n n R) : M.charpoly.degree = Fintype.card n := by
by_cases h : Fintype.card n = 0 Β· rw [h] unfold charpoly rw [det_of_card_zero] Β· simp Β· assumption rw [← sub_add_cancel M.charpoly (∏ i : n, (X - C (M i i)))] -- Porting note: added `↑` in front of `Fintype.card n` have h1 : (∏ i : n, (X - C (M i i))).degree = ↑(Fintype.card n) := by rw [degree_eq_iff_natDegree_eq_of_pos (Nat.pos_of_ne_zero h), natDegree_prod'] Β· simp_rw [natDegree_X_sub_C] rw [← Finset.card_univ, sum_const, smul_eq_mul, mul_one] simp_rw [(monic_X_sub_C _).leadingCoeff] simp rw [degree_add_eq_right_of_degree_lt] Β· exact h1 rw [h1] apply lt_trans (charpoly_sub_diagonal_degree_lt M) rw [Nat.cast_lt] rw [← Nat.pred_eq_sub_one] apply Nat.pred_lt apply h
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≀ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≀ 1", " (M.charmatrix i j).natDegree ≀ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (βˆ‘ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
[ " (M.charmatrix i j).natDegree = if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≀ if i = j then 1 else 0", " (M.charmatrix i j).natDegree ≀ 1", " (M.charmatrix i j).natDegree ≀ 0", " (M.charpoly - ∏ i : n, (X - C (M i i))).degree < ↑(Fintype.card n - 1)", " (βˆ‘ x ∈ univ.erase (Equiv.refl n), ↑↑(Eq...
import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs #align_import ring_theory.witt_vector.basic from "leanprover-community/mathlib"@"9556784a5b84697562e9c6acb40500d4a82e675a" noncomputable section open MvPolynomial Function variable {p : β„•} {R S T : Type*} [hp : Fact p.Prime] [CommRing R] [CommRing S] [CommRing T] variable {Ξ± : Type*} {Ξ² : Type*} local notation "π•Ž" => WittVector p local notation "W_" => wittPolynomial p -- type as `\bbW` open scoped Witt namespace WittVector def mapFun (f : Ξ± β†’ Ξ²) : π•Ž Ξ± β†’ π•Ž Ξ² := fun x => mk _ (f ∘ x.coeff) #align witt_vector.map_fun WittVector.mapFun namespace mapFun -- Porting note: switched the proof to tactic mode. I think that `ext` was the issue. theorem injective (f : Ξ± β†’ Ξ²) (hf : Injective f) : Injective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := by intros _ _ h ext p exact hf (congr_arg (fun x => coeff x p) h : _) #align witt_vector.map_fun.injective WittVector.mapFun.injective theorem surjective (f : Ξ± β†’ Ξ²) (hf : Surjective f) : Surjective (mapFun f : π•Ž Ξ± β†’ π•Ž Ξ²) := fun x => ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]⟩ #align witt_vector.map_fun.surjective WittVector.mapFun.surjective -- Porting note: using `(x y : π•Ž R)` instead of `(x y : WittVector p R)` produced sorries. variable (f : R β†’+* S) (x y : WittVector p R) -- porting note: a very crude port. macro "map_fun_tac" : tactic => `(tactic| ( ext n simp only [mapFun, mk, comp_apply, zero_coeff, map_zero, -- Porting note: the lemmas on the next line do not have the `simp` tag in mathlib4 add_coeff, sub_coeff, mul_coeff, neg_coeff, nsmul_coeff, zsmul_coeff, pow_coeff, peval, map_aeval, algebraMap_int_eq, coe_evalβ‚‚Hom] <;> try { cases n <;> simp <;> done } <;> -- Porting note: this line solves `one` apply evalβ‚‚Hom_congr (RingHom.ext_int _ _) _ rfl <;> ext ⟨i, k⟩ <;> fin_cases i <;> rfl)) -- and until `pow`. -- We do not tag these lemmas as `@[simp]` because they will be bundled in `map` later on. theorem zero : mapFun f (0 : π•Ž R) = 0 := by map_fun_tac #align witt_vector.map_fun.zero WittVector.mapFun.zero theorem one : mapFun f (1 : π•Ž R) = 1 := by map_fun_tac #align witt_vector.map_fun.one WittVector.mapFun.one theorem add : mapFun f (x + y) = mapFun f x + mapFun f y := by map_fun_tac #align witt_vector.map_fun.add WittVector.mapFun.add theorem sub : mapFun f (x - y) = mapFun f x - mapFun f y := by map_fun_tac #align witt_vector.map_fun.sub WittVector.mapFun.sub theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by map_fun_tac #align witt_vector.map_fun.mul WittVector.mapFun.mul theorem neg : mapFun f (-x) = -mapFun f x := by map_fun_tac #align witt_vector.map_fun.neg WittVector.mapFun.neg
Mathlib/RingTheory/WittVector/Basic.lean
120
120
theorem nsmul (n : β„•) (x : WittVector p R) : mapFun f (n β€’ x) = n β€’ mapFun f x := by
map_fun_tac
[ " Injective (mapFun f)", " aβ‚βœ = aβ‚‚βœ", " aβ‚βœ.coeff p = aβ‚‚βœ.coeff p", " mapFun f (mk p fun n => Classical.choose β‹―) = x", " (mapFun f (mk p fun n => Classical.choose β‹―)).coeff n = x.coeff n", " mapFun (⇑f) 0 = 0", " mapFun (⇑f) 1 = 1", " mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y", " mapFun ...
[ " Injective (mapFun f)", " aβ‚βœ = aβ‚‚βœ", " aβ‚βœ.coeff p = aβ‚‚βœ.coeff p", " mapFun f (mk p fun n => Classical.choose β‹―) = x", " (mapFun f (mk p fun n => Classical.choose β‹―)).coeff n = x.coeff n", " mapFun (⇑f) 0 = 0", " mapFun (⇑f) 1 = 1", " mapFun (⇑f) (x + y) = mapFun (⇑f) x + mapFun (⇑f) y", " mapFun ...
import Mathlib.Data.Real.Irrational import Mathlib.Data.Nat.Fib.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Algebra.LinearRecurrence import Mathlib.Tactic.NormNum.NatFib import Mathlib.Tactic.NormNum.Prime #align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open Polynomial abbrev goldenRatio : ℝ := (1 + √5) / 2 #align golden_ratio goldenRatio abbrev goldenConj : ℝ := (1 - √5) / 2 #align golden_conj goldenConj @[inherit_doc goldenRatio] scoped[goldenRatio] notation "Ο†" => goldenRatio @[inherit_doc goldenConj] scoped[goldenRatio] notation "ψ" => goldenConj open Real goldenRatio theorem inv_gold : φ⁻¹ = -ψ := by have : 1 + √5 β‰  0 := ne_of_gt (add_pos (by norm_num) <| Real.sqrt_pos.mpr (by norm_num)) field_simp [sub_mul, mul_add] norm_num #align inv_gold inv_gold theorem inv_goldConj : ψ⁻¹ = -Ο† := by rw [inv_eq_iff_eq_inv, ← neg_inv, ← neg_eq_iff_eq_neg] exact inv_gold.symm #align inv_gold_conj inv_goldConj @[simp] theorem gold_mul_goldConj : Ο† * ψ = -1 := by field_simp rw [← sq_sub_sq] norm_num #align gold_mul_gold_conj gold_mul_goldConj @[simp] theorem goldConj_mul_gold : ψ * Ο† = -1 := by rw [mul_comm] exact gold_mul_goldConj #align gold_conj_mul_gold goldConj_mul_gold @[simp] theorem gold_add_goldConj : Ο† + ψ = 1 := by rw [goldenRatio, goldenConj] ring #align gold_add_gold_conj gold_add_goldConj theorem one_sub_goldConj : 1 - Ο† = ψ := by linarith [gold_add_goldConj] #align one_sub_gold_conj one_sub_goldConj
Mathlib/Data/Real/GoldenRatio.lean
79
80
theorem one_sub_gold : 1 - ψ = Ο† := by
linarith [gold_add_goldConj]
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -Ο†", " -ψ = φ⁻¹", " Ο† * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * Ο† = -1", " Ο† + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - Ο† = ψ", " 1 - ψ = Ο†" ]
[ " φ⁻¹ = -ψ", " 0 < 1", " 0 < 5", " 2 * 2 = 5 - 1", " ψ⁻¹ = -Ο†", " -ψ = φ⁻¹", " Ο† * ψ = -1", " (1 + √5) * (1 - √5) = -(2 * 2)", " 1 ^ 2 - √5 ^ 2 = -(2 * 2)", " ψ * Ο† = -1", " Ο† + ψ = 1", " (1 + √5) / 2 + (1 - √5) / 2 = 1", " 1 - Ο† = ψ" ]
import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.SuccPred import Mathlib.Order.Interval.Set.Monotone import Mathlib.Order.OrderIsoNat #align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0" open Finset namespace Nat variable (p : β„• β†’ Prop) noncomputable def nth (p : β„• β†’ Prop) (n : β„•) : β„• := by classical exact if h : Set.Finite (setOf p) then (h.toFinset.sort (Β· ≀ Β·)).getD n 0 else @Nat.Subtype.orderIsoOfNat (setOf p) (Set.Infinite.to_subtype h) n #align nat.nth Nat.nth variable {p} theorem nth_of_card_le (hf : (setOf p).Finite) {n : β„•} (hn : hf.toFinset.card ≀ n) : nth p n = 0 := by rw [nth, dif_pos hf, List.getD_eq_default]; rwa [Finset.length_sort] #align nat.nth_of_card_le Nat.nth_of_card_le theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : β„•) : nth p n = (h.toFinset.sort (Β· ≀ Β·)).getD n 0 := dif_pos h #align nat.nth_eq_nthd_sort Nat.nth_eq_getD_sort theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β„•} (hn : n < hf.toFinset.card) : nth p n = hf.toFinset.orderEmbOfFin rfl ⟨n, hn⟩ := by rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get] #align nat.nth_eq_order_emb_of_fin Nat.nth_eq_orderEmbOfFin theorem nth_strictMonoOn (hf : (setOf p).Finite) : StrictMonoOn (nth p) (Set.Iio hf.toFinset.card) := by rintro m (hm : m < _) n (hn : n < _) h simp only [nth_eq_orderEmbOfFin, *] exact OrderEmbedding.strictMono _ h #align nat.nth_strict_mono_on Nat.nth_strictMonoOn theorem nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β„•} (h : m < n) (hn : n < hf.toFinset.card) : nth p m < nth p n := nth_strictMonoOn hf (h.trans hn) hn h #align nat.nth_lt_nth_of_lt_card Nat.nth_lt_nth_of_lt_card theorem nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β„•} (h : m ≀ n) (hn : n < hf.toFinset.card) : nth p m ≀ nth p n := (nth_strictMonoOn hf).monotoneOn (h.trans_lt hn) hn h #align nat.nth_le_nth_of_lt_card Nat.nth_le_nth_of_lt_card theorem lt_of_nth_lt_nth_of_lt_card (hf : (setOf p).Finite) {m n : β„•} (h : nth p m < nth p n) (hm : m < hf.toFinset.card) : m < n := not_le.1 fun hle => h.not_le <| nth_le_nth_of_lt_card hf hle hm #align nat.lt_of_nth_lt_nth_of_lt_card Nat.lt_of_nth_lt_nth_of_lt_card theorem le_of_nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : β„•} (h : nth p m ≀ nth p n) (hm : m < hf.toFinset.card) : m ≀ n := not_lt.1 fun hlt => h.not_lt <| nth_lt_nth_of_lt_card hf hlt hm #align nat.le_of_nth_le_nth_of_lt_card Nat.le_of_nth_le_nth_of_lt_card theorem nth_injOn (hf : (setOf p).Finite) : (Set.Iio hf.toFinset.card).InjOn (nth p) := (nth_strictMonoOn hf).injOn #align nat.nth_inj_on Nat.nth_injOn theorem range_nth_of_finite (hf : (setOf p).Finite) : Set.range (nth p) = insert 0 (setOf p) := by simpa only [← nth_eq_getD_sort hf, mem_sort, Set.Finite.mem_toFinset] using Set.range_list_getD (hf.toFinset.sort (Β· ≀ Β·)) 0 #align nat.range_nth_of_finite Nat.range_nth_of_finite @[simp] theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p := calc nth p '' Set.Iio hf.toFinset.card = Set.range (hf.toFinset.orderEmbOfFin rfl) := by ext x simp only [Set.mem_image, Set.mem_range, Fin.exists_iff, ← nth_eq_orderEmbOfFin hf, Set.mem_Iio, exists_prop] _ = setOf p := by rw [range_orderEmbOfFin, Set.Finite.coe_toFinset] #align nat.image_nth_Iio_card Nat.image_nth_Iio_card theorem nth_mem_of_lt_card {n : β„•} (hf : (setOf p).Finite) (hlt : n < hf.toFinset.card) : p (nth p n) := (image_nth_Iio_card hf).subset <| Set.mem_image_of_mem _ hlt #align nat.nth_mem_of_lt_card Nat.nth_mem_of_lt_card theorem exists_lt_card_finite_nth_eq (hf : (setOf p).Finite) {x} (h : p x) : βˆƒ n, n < hf.toFinset.card ∧ nth p n = x := by rwa [← @Set.mem_setOf_eq _ _ p, ← image_nth_Iio_card hf] at h #align nat.exists_lt_card_finite_nth_eq Nat.exists_lt_card_finite_nth_eq
Mathlib/Data/Nat/Nth.lean
137
138
theorem nth_apply_eq_orderIsoOfNat (hf : (setOf p).Infinite) (n : β„•) : nth p n = @Nat.Subtype.orderIsoOfNat (setOf p) hf.to_subtype n := by
rw [nth, dif_neg hf]
[ " β„•", " nth p n = 0", " (sort (fun x x_1 => x ≀ x_1) hf.toFinset).length ≀ n", " nth p n = (hf.toFinset.orderEmbOfFin β‹―) ⟨n, hn⟩", " StrictMonoOn (nth p) (Set.Iio hf.toFinset.card)", " nth p m < nth p n", " (β‹―.toFinset.orderEmbOfFin β‹―) ⟨m, β‹―βŸ© < (β‹―.toFinset.orderEmbOfFin β‹―) ⟨n, β‹―βŸ©", " Set.range (nth p)...
[ " β„•", " nth p n = 0", " (sort (fun x x_1 => x ≀ x_1) hf.toFinset).length ≀ n", " nth p n = (hf.toFinset.orderEmbOfFin β‹―) ⟨n, hn⟩", " StrictMonoOn (nth p) (Set.Iio hf.toFinset.card)", " nth p m < nth p n", " (β‹―.toFinset.orderEmbOfFin β‹―) ⟨m, β‹―βŸ© < (β‹―.toFinset.orderEmbOfFin β‹―) ⟨n, β‹―βŸ©", " Set.range (nth p)...
import Mathlib.Analysis.Calculus.ContDiff.RCLike import Mathlib.MeasureTheory.Measure.Hausdorff #align_import topology.metric_space.hausdorff_dimension from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" open scoped MeasureTheory ENNReal NNReal Topology open MeasureTheory MeasureTheory.Measure Set TopologicalSpace FiniteDimensional Filter variable {ΞΉ X Y : Type*} [EMetricSpace X] [EMetricSpace Y] @[irreducible] noncomputable def dimH (s : Set X) : ℝβ‰₯0∞ := by borelize X; exact ⨆ (d : ℝβ‰₯0) (_ : @hausdorffMeasure X _ _ ⟨rfl⟩ d s = ∞), d set_option linter.uppercaseLean3 false in #align dimH dimH section Measurable variable [MeasurableSpace X] [BorelSpace X] theorem dimH_def (s : Set X) : dimH s = ⨆ (d : ℝβ‰₯0) (_ : ΞΌH[d] s = ∞), (d : ℝβ‰₯0∞) := by borelize X; rw [dimH] set_option linter.uppercaseLean3 false in #align dimH_def dimH_def theorem hausdorffMeasure_of_lt_dimH {s : Set X} {d : ℝβ‰₯0} (h : ↑d < dimH s) : ΞΌH[d] s = ∞ := by simp only [dimH_def, lt_iSup_iff] at h rcases h with ⟨d', hsd', hdd'⟩ rw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at hdd' exact top_unique (hsd' β–Έ hausdorffMeasure_mono hdd'.le _) set_option linter.uppercaseLean3 false in #align hausdorff_measure_of_lt_dimH hausdorffMeasure_of_lt_dimH theorem dimH_le {s : Set X} {d : ℝβ‰₯0∞} (H : βˆ€ d' : ℝβ‰₯0, ΞΌH[d'] s = ∞ β†’ ↑d' ≀ d) : dimH s ≀ d := (dimH_def s).trans_le <| iSupβ‚‚_le H set_option linter.uppercaseLean3 false in #align dimH_le dimH_le theorem dimH_le_of_hausdorffMeasure_ne_top {s : Set X} {d : ℝβ‰₯0} (h : ΞΌH[d] s β‰  ∞) : dimH s ≀ d := le_of_not_lt <| mt hausdorffMeasure_of_lt_dimH h set_option linter.uppercaseLean3 false in #align dimH_le_of_hausdorff_measure_ne_top dimH_le_of_hausdorffMeasure_ne_top theorem le_dimH_of_hausdorffMeasure_eq_top {s : Set X} {d : ℝβ‰₯0} (h : ΞΌH[d] s = ∞) : ↑d ≀ dimH s := by rw [dimH_def]; exact le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) d h set_option linter.uppercaseLean3 false in #align le_dimH_of_hausdorff_measure_eq_top le_dimH_of_hausdorffMeasure_eq_top
Mathlib/Topology/MetricSpace/HausdorffDimension.lean
139
144
theorem hausdorffMeasure_of_dimH_lt {s : Set X} {d : ℝβ‰₯0} (h : dimH s < d) : ΞΌH[d] s = 0 := by
rw [dimH_def] at h rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with ⟨d', hsd', hd'd⟩ rw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at hd'd exact (hausdorffMeasure_zero_or_top hd'd s).resolve_right fun hβ‚‚ => hsd'.not_le <| le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) d' hβ‚‚
[ " ℝβ‰₯0∞", " dimH s = ⨆ d, ⨆ (_ : ΞΌH[↑d] s = ⊀), ↑d", " ΞΌH[↑d] s = ⊀", " ↑d ≀ dimH s", " ↑d ≀ ⨆ d, ⨆ (_ : ΞΌH[↑d] s = ⊀), ↑d", " ΞΌH[↑d] s = 0" ]
[ " ℝβ‰₯0∞", " dimH s = ⨆ d, ⨆ (_ : ΞΌH[↑d] s = ⊀), ↑d", " ΞΌH[↑d] s = ⊀", " ↑d ≀ dimH s", " ↑d ≀ ⨆ d, ⨆ (_ : ΞΌH[↑d] s = ⊀), ↑d" ]
import Mathlib.Algebra.Polynomial.DenomsClearable import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Data.Real.Irrational import Mathlib.Topology.Algebra.Polynomial #align_import number_theory.liouville.basic from "leanprover-community/mathlib"@"04e80bb7e8510958cd9aacd32fe2dc147af0b9f1" def Liouville (x : ℝ) := βˆ€ n : β„•, βˆƒ a b : β„€, 1 < b ∧ x β‰  a / b ∧ |x - a / b| < 1 / (b : ℝ) ^ n #align liouville Liouville namespace Liouville protected theorem irrational {x : ℝ} (h : Liouville x) : Irrational x := by -- By contradiction, `x = a / b`, with `a ∈ β„€`, `0 < b ∈ β„•` is a Liouville number, rintro ⟨⟨a, b, bN0, cop⟩, rfl⟩ -- clear up the mess of constructions of rationals rw [Rat.cast_mk'] at h -- Since `a / b` is a Liouville number, there are `p, q ∈ β„€`, with `q1 : 1 < q`,∈ -- `a0 : a / b β‰  p / q` and `a1 : |a / b - p / q| < 1 / q ^ (b + 1)` rcases h (b + 1) with ⟨p, q, q1, a0, a1⟩ -- A few useful inequalities have qR0 : (0 : ℝ) < q := Int.cast_pos.mpr (zero_lt_one.trans q1) have b0 : (b : ℝ) β‰  0 := Nat.cast_ne_zero.mpr bN0 have bq0 : (0 : ℝ) < b * q := mul_pos (Nat.cast_pos.mpr bN0.bot_lt) qR0 -- At a1, clear denominators... replace a1 : |a * q - b * p| * q ^ (b + 1) < b * q := by rw [div_sub_div _ _ b0 qR0.ne', abs_div, div_lt_div_iff (abs_pos.mpr bq0.ne') (pow_pos qR0 _), abs_of_pos bq0, one_mul] at a1 exact mod_cast a1 -- At a0, clear denominators... replace a0 : a * q - ↑b * p β‰  0 := by rw [Ne, div_eq_div_iff b0 qR0.ne', mul_comm (p : ℝ), ← sub_eq_zero] at a0 exact mod_cast a0 -- Actually, `q` is a natural number lift q to β„• using (zero_lt_one.trans q1).le -- Looks innocuous, but we now have an integer with non-zero absolute value: this is at -- least one away from zero. The gain here is what gets the proof going. have ap : 0 < |a * ↑q - ↑b * p| := abs_pos.mpr a0 -- Actually, the absolute value of an integer is a natural number -- FIXME: This `lift` call duplicates the hypotheses `a1` and `ap` lift |a * ↑q - ↑b * p| to β„• using abs_nonneg (a * ↑q - ↑b * p) with e he norm_cast at a1 ap q1 -- Recall this is by contradiction: we obtained the inequality `b * q ≀ x * q ^ (b + 1)`, so -- we are done. exact not_le.mpr a1 (Nat.mul_lt_mul_pow_succ ap q1).le #align liouville.irrational Liouville.irrational open Polynomial Metric Set Real RingHom open scoped Polynomial theorem exists_one_le_pow_mul_dist {Z N R : Type*} [PseudoMetricSpace R] {d : N β†’ ℝ} {j : Z β†’ N β†’ R} {f : R β†’ R} {Ξ± : R} {Ξ΅ M : ℝ} -- denominators are positive (d0 : βˆ€ a : N, 1 ≀ d a) (e0 : 0 < Ξ΅) -- function is Lipschitz at Ξ± (B : βˆ€ ⦃y : R⦄, y ∈ closedBall Ξ± Ξ΅ β†’ dist (f Ξ±) (f y) ≀ dist Ξ± y * M) -- clear denominators (L : βˆ€ ⦃z : Z⦄, βˆ€ ⦃a : N⦄, j z a ∈ closedBall Ξ± Ξ΅ β†’ 1 ≀ d a * dist (f Ξ±) (f (j z a))) : βˆƒ A : ℝ, 0 < A ∧ βˆ€ z : Z, βˆ€ a : N, 1 ≀ d a * (dist Ξ± (j z a) * A) := by -- A useful inequality to keep at hand have me0 : 0 < max (1 / Ξ΅) M := lt_max_iff.mpr (Or.inl (one_div_pos.mpr e0)) -- The maximum between `1 / Ξ΅` and `M` works refine ⟨max (1 / Ξ΅) M, me0, fun z a => ?_⟩ -- First, let's deal with the easy case in which we are far away from `Ξ±` by_cases dm1 : 1 ≀ dist Ξ± (j z a) * max (1 / Ξ΅) M Β· exact one_le_mul_of_one_le_of_one_le (d0 a) dm1 Β· -- `j z a = z / (a + 1)`: we prove that this ratio is close to `Ξ±` have : j z a ∈ closedBall Ξ± Ξ΅ := by refine mem_closedBall'.mp (le_trans ?_ ((one_div_le me0 e0).mpr (le_max_left _ _))) exact (le_div_iff me0).mpr (not_le.mp dm1).le -- use the "separation from `1`" (assumption `L`) for numerators, refine (L this).trans ?_ -- remove a common factor and use the Lipschitz assumption `B` refine mul_le_mul_of_nonneg_left ((B this).trans ?_) (zero_le_one.trans (d0 a)) exact mul_le_mul_of_nonneg_left (le_max_right _ M) dist_nonneg #align liouville.exists_one_le_pow_mul_dist Liouville.exists_one_le_pow_mul_dist
Mathlib/NumberTheory/Liouville/Basic.lean
123
173
theorem exists_pos_real_of_irrational_root {Ξ± : ℝ} (ha : Irrational Ξ±) {f : β„€[X]} (f0 : f β‰  0) (fa : eval Ξ± (map (algebraMap β„€ ℝ) f) = 0) : βˆƒ A : ℝ, 0 < A ∧ βˆ€ a : β„€, βˆ€ b : β„•, (1 : ℝ) ≀ ((b : ℝ) + 1) ^ f.natDegree * (|Ξ± - a / (b + 1)| * A) := by
-- `fR` is `f` viewed as a polynomial with `ℝ` coefficients. set fR : ℝ[X] := map (algebraMap β„€ ℝ) f -- `fR` is non-zero, since `f` is non-zero. obtain fR0 : fR β‰  0 := fun fR0 => (map_injective (algebraMap β„€ ℝ) fun _ _ A => Int.cast_inj.mp A).ne f0 (fR0.trans (Polynomial.map_zero _).symm) -- reformulating assumption `fa`: `Ξ±` is a root of `fR`. have ar : Ξ± ∈ (fR.roots.toFinset : Set ℝ) := Finset.mem_coe.mpr (Multiset.mem_toFinset.mpr ((mem_roots fR0).mpr (IsRoot.def.mpr fa))) -- Since the polynomial `fR` has finitely many roots, there is a closed interval centered at `Ξ±` -- such that `Ξ±` is the only root of `fR` in the interval. obtain ⟨΢, z0, U⟩ : βˆƒ ΞΆ > 0, closedBall Ξ± ΞΆ ∩ fR.roots.toFinset = {Ξ±} := @exists_closedBall_inter_eq_singleton_of_discrete _ _ _ discrete_of_t1_of_finite _ ar -- Since `fR` is continuous, it is bounded on the interval above. obtain ⟨xm, -, hM⟩ : βˆƒ xm : ℝ, xm ∈ Icc (Ξ± - ΞΆ) (Ξ± + ΞΆ) ∧ IsMaxOn (|fR.derivative.eval Β·|) (Icc (Ξ± - ΞΆ) (Ξ± + ΞΆ)) xm := IsCompact.exists_isMaxOn isCompact_Icc ⟨α, (sub_lt_self Ξ± z0).le, (lt_add_of_pos_right Ξ± z0).le⟩ (continuous_abs.comp fR.derivative.continuous_aeval).continuousOn -- Use the key lemma `exists_one_le_pow_mul_dist`: we are left to show that ... refine @exists_one_le_pow_mul_dist β„€ β„• ℝ _ _ _ (fun y => fR.eval y) Ξ± ΞΆ |fR.derivative.eval xm| ?_ z0 (fun y hy => ?_) fun z a hq => ?_ -- 1: the denominators are positive -- essentially by definition; Β· exact fun a => one_le_pow_of_one_le ((le_add_iff_nonneg_left 1).mpr a.cast_nonneg) _ -- 2: the polynomial `fR` is Lipschitz at `Ξ±` -- as its derivative continuous; Β· rw [mul_comm] rw [Real.closedBall_eq_Icc] at hy -- apply the Mean Value Theorem: the bound on the derivative comes from differentiability. refine Convex.norm_image_sub_le_of_norm_deriv_le (fun _ _ => fR.differentiableAt) (fun y h => by rw [fR.deriv]; exact hM h) (convex_Icc _ _) hy (mem_Icc_iff_abs_le.mp ?_) exact @mem_closedBall_self ℝ _ Ξ± ΞΆ (le_of_lt z0) -- 3: the weird inequality of Liouville type with powers of the denominators. Β· show 1 ≀ (a + 1 : ℝ) ^ f.natDegree * |eval Ξ± fR - eval ((z : ℝ) / (a + 1)) fR| rw [fa, zero_sub, abs_neg] rw [show (a + 1 : ℝ) = ((a + 1 : β„•) : β„€) by norm_cast] at hq ⊒ -- key observation: the right-hand side of the inequality is an *integer*. Therefore, -- if its absolute value is not at least one, then it vanishes. Proceed by contradiction refine one_le_pow_mul_abs_eval_div (Int.natCast_succ_pos a) fun hy => ?_ -- As the evaluation of the polynomial vanishes, we found a root of `fR` that is rational. -- We know that `Ξ±` is the only root of `fR` in our interval, and `Ξ±` is irrational: -- follow your nose. refine (irrational_iff_ne_rational Ξ±).mp ha z (a + 1) (mem_singleton_iff.mp ?_).symm refine U.subset ?_ refine ⟨hq, Finset.mem_coe.mp (Multiset.mem_toFinset.mpr ?_)⟩ exact (mem_roots fR0).mpr (IsRoot.def.mpr hy)
[ " Irrational x", " False", " |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q", " a * q - ↑b * p β‰  0", " βˆƒ A, 0 < A ∧ βˆ€ (z : Z) (a : N), 1 ≀ d a * (dist Ξ± (j z a) * A)", " 1 ≀ d a * (dist Ξ± (j z a) * max (1 / Ξ΅) M)", " j z a ∈ closedBall Ξ± Ξ΅", " dist Ξ± (j z a) ≀ 1 / max (1 / Ξ΅) M", " d a * dist (f Ξ±) (f (j z...
[ " Irrational x", " False", " |a * q - ↑b * p| * q ^ (b + 1) < ↑b * q", " a * q - ↑b * p β‰  0", " βˆƒ A, 0 < A ∧ βˆ€ (z : Z) (a : N), 1 ≀ d a * (dist Ξ± (j z a) * A)", " 1 ≀ d a * (dist Ξ± (j z a) * max (1 / Ξ΅) M)", " j z a ∈ closedBall Ξ± Ξ΅", " dist Ξ± (j z a) ≀ 1 / max (1 / Ξ΅) M", " d a * dist (f Ξ±) (f (j z...
import Mathlib.Algebra.Order.Ring.Abs #align_import data.int.order.units from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" namespace Int theorem isUnit_iff_abs_eq {x : β„€} : IsUnit x ↔ abs x = 1 := by rw [isUnit_iff_natAbs_eq, abs_eq_natAbs, ← Int.ofNat_one, natCast_inj] #align int.is_unit_iff_abs_eq Int.isUnit_iff_abs_eq theorem isUnit_sq {a : β„€} (ha : IsUnit a) : a ^ 2 = 1 := by rw [sq, isUnit_mul_self ha] #align int.is_unit_sq Int.isUnit_sq @[simp] theorem units_sq (u : β„€Λ£) : u ^ 2 = 1 := by rw [Units.ext_iff, Units.val_pow_eq_pow_val, Units.val_one, isUnit_sq u.isUnit] #align int.units_sq Int.units_sq alias units_pow_two := units_sq #align int.units_pow_two Int.units_pow_two @[simp] theorem units_mul_self (u : β„€Λ£) : u * u = 1 := by rw [← sq, units_sq] #align int.units_mul_self Int.units_mul_self @[simp] theorem units_inv_eq_self (u : β„€Λ£) : u⁻¹ = u := by rw [inv_eq_iff_mul_eq_one, units_mul_self] #align int.units_inv_eq_self Int.units_inv_eq_self theorem units_div_eq_mul (u₁ uβ‚‚ : β„€Λ£) : u₁ / uβ‚‚ = u₁ * uβ‚‚ := by rw [div_eq_mul_inv, units_inv_eq_self] -- `Units.val_mul` is a "wrong turn" for the simplifier, this undoes it and simplifies further @[simp] theorem units_coe_mul_self (u : β„€Λ£) : (u * u : β„€) = 1 := by rw [← Units.val_mul, units_mul_self, Units.val_one] #align int.units_coe_mul_self Int.units_coe_mul_self
Mathlib/Data/Int/Order/Units.lean
49
49
theorem neg_one_pow_ne_zero {n : β„•} : (-1 : β„€) ^ n β‰  0 := by
simp
[ " IsUnit x ↔ |x| = 1", " a ^ 2 = 1", " u ^ 2 = 1", " u * u = 1", " u⁻¹ = u", " u₁ / uβ‚‚ = u₁ * uβ‚‚", " ↑u * ↑u = 1", " (-1) ^ n β‰  0" ]
[ " IsUnit x ↔ |x| = 1", " a ^ 2 = 1", " u ^ 2 = 1", " u * u = 1", " u⁻¹ = u", " u₁ / uβ‚‚ = u₁ * uβ‚‚", " ↑u * ↑u = 1" ]
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Normed.Field.InfiniteSum import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Finset.NoncommProd import Mathlib.Topology.Algebra.Algebra #align_import analysis.normed_space.exponential from "leanprover-community/mathlib"@"62748956a1ece9b26b33243e2e3a2852176666f5" namespace NormedSpace open Filter RCLike ContinuousMultilinearMap NormedField Asymptotics open scoped Nat Topology ENNReal section TopologicalAlgebra variable (𝕂 𝔸 : Type*) [Field 𝕂] [Ring 𝔸] [Algebra 𝕂 𝔸] [TopologicalSpace 𝔸] [TopologicalRing 𝔸] def expSeries : FormalMultilinearSeries 𝕂 𝔸 𝔸 := fun n => (n !⁻¹ : 𝕂) β€’ ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸 #align exp_series NormedSpace.expSeries variable {𝔸} noncomputable def exp (x : 𝔸) : 𝔸 := (expSeries 𝕂 𝔸).sum x #align exp NormedSpace.exp variable {𝕂} theorem expSeries_apply_eq (x : 𝔸) (n : β„•) : (expSeries 𝕂 𝔸 n fun _ => x) = (n !⁻¹ : 𝕂) β€’ x ^ n := by simp [expSeries] #align exp_series_apply_eq NormedSpace.expSeries_apply_eq theorem expSeries_apply_eq' (x : 𝔸) : (fun n => expSeries 𝕂 𝔸 n fun _ => x) = fun n => (n !⁻¹ : 𝕂) β€’ x ^ n := funext (expSeries_apply_eq x) #align exp_series_apply_eq' NormedSpace.expSeries_apply_eq' theorem expSeries_sum_eq (x : 𝔸) : (expSeries 𝕂 𝔸).sum x = βˆ‘' n : β„•, (n !⁻¹ : 𝕂) β€’ x ^ n := tsum_congr fun n => expSeries_apply_eq x n #align exp_series_sum_eq NormedSpace.expSeries_sum_eq theorem exp_eq_tsum : exp 𝕂 = fun x : 𝔸 => βˆ‘' n : β„•, (n !⁻¹ : 𝕂) β€’ x ^ n := funext expSeries_sum_eq #align exp_eq_tsum NormedSpace.exp_eq_tsum theorem expSeries_apply_zero (n : β„•) : (expSeries 𝕂 𝔸 n fun _ => (0 : 𝔸)) = Pi.single (f := fun _ => 𝔸) 0 1 n := by rw [expSeries_apply_eq] cases' n with n Β· rw [pow_zero, Nat.factorial_zero, Nat.cast_one, inv_one, one_smul, Pi.single_eq_same] Β· rw [zero_pow (Nat.succ_ne_zero _), smul_zero, Pi.single_eq_of_ne n.succ_ne_zero] #align exp_series_apply_zero NormedSpace.expSeries_apply_zero @[simp] theorem exp_zero : exp 𝕂 (0 : 𝔸) = 1 := by simp_rw [exp_eq_tsum, ← expSeries_apply_eq, expSeries_apply_zero, tsum_pi_single] #align exp_zero NormedSpace.exp_zero @[simp] theorem exp_op [T2Space 𝔸] (x : 𝔸) : exp 𝕂 (MulOpposite.op x) = MulOpposite.op (exp 𝕂 x) := by simp_rw [exp, expSeries_sum_eq, ← MulOpposite.op_pow, ← MulOpposite.op_smul, tsum_op] #align exp_op NormedSpace.exp_op @[simp] theorem exp_unop [T2Space 𝔸] (x : 𝔸ᡐᡒᡖ) : exp 𝕂 (MulOpposite.unop x) = MulOpposite.unop (exp 𝕂 x) := by simp_rw [exp, expSeries_sum_eq, ← MulOpposite.unop_pow, ← MulOpposite.unop_smul, tsum_unop] #align exp_unop NormedSpace.exp_unop theorem star_exp [T2Space 𝔸] [StarRing 𝔸] [ContinuousStar 𝔸] (x : 𝔸) : star (exp 𝕂 x) = exp 𝕂 (star x) := by simp_rw [exp_eq_tsum, ← star_pow, ← star_inv_natCast_smul, ← tsum_star] #align star_exp NormedSpace.star_exp variable (𝕂) theorem _root_.IsSelfAdjoint.exp [T2Space 𝔸] [StarRing 𝔸] [ContinuousStar 𝔸] {x : 𝔸} (h : IsSelfAdjoint x) : IsSelfAdjoint (exp 𝕂 x) := (star_exp x).trans <| h.symm β–Έ rfl #align is_self_adjoint.exp IsSelfAdjoint.exp
Mathlib/Analysis/NormedSpace/Exponential.lean
172
175
theorem _root_.Commute.exp_right [T2Space 𝔸] {x y : 𝔸} (h : Commute x y) : Commute x (exp 𝕂 y) := by
rw [exp_eq_tsum] exact Commute.tsum_right x fun n => (h.pow_right n).smul_right _
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ β€’ x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ β€’ 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ β€’ 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ β€’ 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1", " exp 𝕂 (MulOpposite.op x) = MulOpposite...
[ " ((expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n !)⁻¹ β€’ x ^ n", " ((expSeries 𝕂 𝔸 n) fun x => 0) = Pi.single 0 1 n", " (↑n !)⁻¹ β€’ 0 ^ n = Pi.single 0 1 n", " (↑0!)⁻¹ β€’ 0 ^ 0 = Pi.single 0 1 0", " (↑(n + 1)!)⁻¹ β€’ 0 ^ (n + 1) = Pi.single 0 1 (n + 1)", " exp 𝕂 0 = 1", " exp 𝕂 (MulOpposite.op x) = MulOpposite...
import Mathlib.Algebra.CharP.ExpChar import Mathlib.GroupTheory.OrderOfElement #align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450" variable {R ΞΉ : Type*} namespace CharTwo section Semiring variable [Semiring R] [CharP R 2] theorem two_eq_zero : (2 : R) = 0 := by rw [← Nat.cast_two, CharP.cast_eq_zero] #align char_two.two_eq_zero CharTwo.two_eq_zero @[simp]
Mathlib/Algebra/CharP/Two.lean
33
33
theorem add_self_eq_zero (x : R) : x + x = 0 := by
rw [← two_smul R x, two_eq_zero, zero_smul]
[ " 2 = 0", " x + x = 0" ]
[ " 2 = 0" ]
import Mathlib.LinearAlgebra.Dual open Function Module variable (R M N : Type*) [CommRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] structure PerfectPairing := toLin : M β†’β‚—[R] N β†’β‚—[R] R bijectiveLeft : Bijective toLin bijectiveRight : Bijective toLin.flip attribute [nolint docBlame] PerfectPairing.toLin variable {R M N} namespace PerfectPairing instance instFunLike : FunLike (PerfectPairing R M N) M (N β†’β‚—[R] R) where coe f := f.toLin coe_injective' x y h := by cases x; cases y; simpa using h variable (p : PerfectPairing R M N) protected def flip : PerfectPairing R N M where toLin := p.toLin.flip bijectiveLeft := p.bijectiveRight bijectiveRight := p.bijectiveLeft @[simp] lemma flip_flip : p.flip.flip = p := rfl noncomputable def toDualLeft : M ≃ₗ[R] Dual R N := LinearEquiv.ofBijective p.toLin p.bijectiveLeft @[simp] theorem toDualLeft_apply (a : M) : p.toDualLeft a = p a := rfl @[simp]
Mathlib/LinearAlgebra/PerfectPairing.lean
71
74
theorem apply_toDualLeft_symm_apply (f : Dual R N) (x : N) : p (p.toDualLeft.symm f) x = f x := by
have h := LinearEquiv.apply_symm_apply p.toDualLeft f rw [toDualLeft_apply] at h exact congrFun (congrArg DFunLike.coe h) x
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }", " (p (p.toDual...
[ " x = y", " { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ } = y", " { toLin := toLin✝¹, bijectiveLeft := bijectiveLeft✝¹, bijectiveRight := bijectiveRight✝¹ } =\n { toLin := toLin✝, bijectiveLeft := bijectiveLeft✝, bijectiveRight := bijectiveRight✝ }" ]
import Mathlib.Topology.UniformSpace.CompactConvergence import Mathlib.Topology.UniformSpace.Equicontinuity import Mathlib.Topology.UniformSpace.Equiv open Set Filter Uniformity Topology Function UniformConvergence variable {ΞΉ X Y Ξ± Ξ² : Type*} [TopologicalSpace X] [UniformSpace Ξ±] [UniformSpace Ξ²] variable {F : ΞΉ β†’ X β†’ Ξ±} {G : ΞΉ β†’ Ξ² β†’ Ξ±}
Mathlib/Topology/UniformSpace/Ascoli.lean
85
125
theorem Equicontinuous.comap_uniformFun_eq [CompactSpace X] (F_eqcont : Equicontinuous F) : (UniformFun.uniformSpace X Ξ±).comap F = (Pi.uniformSpace _).comap F := by
-- The `≀` inequality is trivial refine le_antisymm (UniformSpace.comap_mono UniformFun.uniformContinuous_toFun) ?_ -- A bit of rewriting to get a nice intermediate statement. change comap _ _ ≀ comap _ _ simp_rw [Pi.uniformity, Filter.comap_iInf, comap_comap, Function.comp] refine ((UniformFun.hasBasis_uniformity X Ξ±).comap (Prod.map F F)).ge_iff.mpr ?_ -- Core of the proof: we need to show that, for any entourage `U` in `Ξ±`, -- the set `𝐓(U) := {(i,j) : ΞΉ Γ— ΞΉ | βˆ€ x : X, (F i x, F j x) ∈ U}` belongs to the filter -- `β¨… x, comap ((i,j) ↦ (F i x, F j x)) (𝓀 Ξ±)`. -- In other words, we have to show that it contains a finite intersection of -- sets of the form `𝐒(V, x) := {(i,j) : ΞΉ Γ— ΞΉ | (F i x, F j x) ∈ V}` for some -- `x : X` and `V ∈ 𝓀 Ξ±`. intro U hU -- We will do an `Ξ΅/3` argument, so we start by choosing a symmetric entourage `V ∈ 𝓀 Ξ±` -- such that `V β—‹ V β—‹ V βŠ† U`. rcases comp_comp_symm_mem_uniformity_sets hU with ⟨V, hV, Vsymm, hVU⟩ -- Set `Ξ© x := {y | βˆ€ i, (F i x, F i y) ∈ V}`. The equicontinuity of `F` guarantees that -- each `Ξ© x` is a neighborhood of `x`. let Ξ© x : Set X := {y | βˆ€ i, (F i x, F i y) ∈ V} -- Hence, by compactness of `X`, we can find some `A βŠ† X` finite such that the `Ξ© a`s for `a ∈ A` -- still cover `X`. rcases CompactSpace.elim_nhds_subcover Ξ© (fun x ↦ F_eqcont x V hV) with ⟨A, Acover⟩ -- We now claim that `β‹‚ a ∈ A, 𝐒(V, a) βŠ† 𝐓(U)`. have : (β‹‚ a ∈ A, {ij : ΞΉ Γ— ΞΉ | (F ij.1 a, F ij.2 a) ∈ V}) βŠ† (Prod.map F F) ⁻¹' UniformFun.gen X Ξ± U := by -- Given `(i, j) ∈ β‹‚ a ∈ A, 𝐒(V, a)` and `x : X`, we have to prove that `(F i x, F j x) ∈ U`. rintro ⟨i, j⟩ hij x rw [mem_iInterβ‚‚] at hij -- We know that `x ∈ Ξ© a` for some `a ∈ A`, so that both `(F i x, F i a)` and `(F j a, F j x)` -- are in `V`. rcases mem_iUnionβ‚‚.mp (Acover.symm.subset <| mem_univ x) with ⟨a, ha, hax⟩ -- Since `(i, j) ∈ 𝐒(V, a)` we also have `(F i a, F j a) ∈ V`, and finally we get -- `(F i x, F j x) ∈ V β—‹ V β—‹ V βŠ† U`. exact hVU (prod_mk_mem_compRel (prod_mk_mem_compRel (Vsymm.mk_mem_comm.mp (hax i)) (hij a ha)) (hax j)) -- This completes the proof. exact mem_of_superset (A.iInter_mem_sets.mpr fun x _ ↦ mem_iInf_of_mem x <| preimage_mem_comap hV) this
[ " UniformSpace.comap F (UniformFun.uniformSpace X Ξ±) = UniformSpace.comap F (Pi.uniformSpace fun i => Ξ±)", " UniformSpace.comap F (Pi.uniformSpace fun i => Ξ±) ≀ UniformSpace.comap F (UniformFun.uniformSpace X Ξ±)", " comap (fun p => (F p.1, F p.2)) (𝓀 (X β†’ Ξ±)) ≀ comap (fun p => (F p.1, F p.2)) (𝓀 (X β†’ Ξ±))", ...
[]
import Mathlib.Algebra.Polynomial.Mirror import Mathlib.Analysis.Complex.Polynomial #align_import data.polynomial.unit_trinomial from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" namespace Polynomial open scoped Polynomial open Finset section Semiring variable {R : Type*} [Semiring R] (k m n : β„•) (u v w : R) noncomputable def trinomial := C u * X ^ k + C v * X ^ m + C w * X ^ n #align polynomial.trinomial Polynomial.trinomial theorem trinomial_def : trinomial k m n u v w = C u * X ^ k + C v * X ^ m + C w * X ^ n := rfl #align polynomial.trinomial_def Polynomial.trinomial_def variable {k m n u v w} theorem trinomial_leading_coeff' (hkm : k < m) (hmn : m < n) : (trinomial k m n u v w).coeff n = w := by rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow, if_neg (hkm.trans hmn).ne', if_neg hmn.ne', if_pos rfl, zero_add, zero_add] #align polynomial.trinomial_leading_coeff' Polynomial.trinomial_leading_coeff' theorem trinomial_middle_coeff (hkm : k < m) (hmn : m < n) : (trinomial k m n u v w).coeff m = v := by rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow, if_neg hkm.ne', if_pos rfl, if_neg hmn.ne, zero_add, add_zero] #align polynomial.trinomial_middle_coeff Polynomial.trinomial_middle_coeff theorem trinomial_trailing_coeff' (hkm : k < m) (hmn : m < n) : (trinomial k m n u v w).coeff k = u := by rw [trinomial_def, coeff_add, coeff_add, coeff_C_mul_X_pow, coeff_C_mul_X_pow, coeff_C_mul_X_pow, if_pos rfl, if_neg hkm.ne, if_neg (hkm.trans hmn).ne, add_zero, add_zero] #align polynomial.trinomial_trailing_coeff' Polynomial.trinomial_trailing_coeff'
Mathlib/Algebra/Polynomial/UnitTrinomial.lean
67
78
theorem trinomial_natDegree (hkm : k < m) (hmn : m < n) (hw : w β‰  0) : (trinomial k m n u v w).natDegree = n := by
refine natDegree_eq_of_degree_eq_some ((Finset.sup_le fun i h => ?_).antisymm <| le_degree_of_ne_zero <| by rwa [trinomial_leading_coeff' hkm hmn]) replace h := support_trinomial' k m n u v w h rw [mem_insert, mem_insert, mem_singleton] at h rcases h with (rfl | rfl | rfl) Β· exact WithBot.coe_le_coe.mpr (hkm.trans hmn).le Β· exact WithBot.coe_le_coe.mpr hmn.le Β· exact le_rfl
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u", " (trinomial k m n u v w).natDegree = n", " (trinomial k m n u v w).coeff n β‰  0", " ↑i ≀ ↑n", " ↑i ≀ ↑i" ]
[ " (trinomial k m n u v w).coeff n = w", " (trinomial k m n u v w).coeff m = v", " (trinomial k m n u v w).coeff k = u" ]
import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic #align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904" open Function OrderDual variable {ΞΉ Ξ± Ξ² : Type*} {Ο€ : ΞΉ β†’ Type*} def symmDiff [Sup Ξ±] [SDiff Ξ±] (a b : Ξ±) : Ξ± := a \ b βŠ” b \ a #align symm_diff symmDiff def bihimp [Inf Ξ±] [HImp Ξ±] (a b : Ξ±) : Ξ± := (b ⇨ a) βŠ“ (a ⇨ b) #align bihimp bihimp scoped[symmDiff] infixl:100 " βˆ† " => symmDiff scoped[symmDiff] infixl:100 " ⇔ " => bihimp open scoped symmDiff theorem symmDiff_def [Sup Ξ±] [SDiff Ξ±] (a b : Ξ±) : a βˆ† b = a \ b βŠ” b \ a := rfl #align symm_diff_def symmDiff_def theorem bihimp_def [Inf Ξ±] [HImp Ξ±] (a b : Ξ±) : a ⇔ b = (b ⇨ a) βŠ“ (a ⇨ b) := rfl #align bihimp_def bihimp_def theorem symmDiff_eq_Xor' (p q : Prop) : p βˆ† q = Xor' p q := rfl #align symm_diff_eq_xor symmDiff_eq_Xor' @[simp] theorem bihimp_iff_iff {p q : Prop} : p ⇔ q ↔ (p ↔ q) := (iff_iff_implies_and_implies _ _).symm.trans Iff.comm #align bihimp_iff_iff bihimp_iff_iff @[simp]
Mathlib/Order/SymmDiff.lean
96
96
theorem Bool.symmDiff_eq_xor : βˆ€ p q : Bool, p βˆ† q = xor p q := by
decide
[ " βˆ€ (p q : Bool), p βˆ† q = xor p q" ]
[]
import Mathlib.Topology.Homeomorph import Mathlib.Topology.Order.LeftRightNhds #align_import topology.algebra.order.monotone_continuity from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Set Filter open Topology section LinearOrder variable {Ξ± Ξ² : Type*} [LinearOrder Ξ±] [TopologicalSpace Ξ±] [OrderTopology Ξ±] variable [LinearOrder Ξ²] [TopologicalSpace Ξ²] [OrderTopology Ξ²] theorem StrictMonoOn.continuousWithinAt_right_of_exists_between {f : Ξ± β†’ Ξ²} {s : Set Ξ±} {a : Ξ±} (h_mono : StrictMonoOn f s) (hs : s ∈ 𝓝[β‰₯] a) (hfs : βˆ€ b > f a, βˆƒ c ∈ s, f c ∈ Ioc (f a) b) : ContinuousWithinAt f (Ici a) a := by have ha : a ∈ Ici a := left_mem_Ici have has : a ∈ s := mem_of_mem_nhdsWithin ha hs refine tendsto_order.2 ⟨fun b hb => ?_, fun b hb => ?_⟩ Β· filter_upwards [hs, @self_mem_nhdsWithin _ _ a (Ici a)] with _ hxs hxa using hb.trans_le ((h_mono.le_iff_le has hxs).2 hxa) Β· rcases hfs b hb with ⟨c, hcs, hac, hcb⟩ rw [h_mono.lt_iff_lt has hcs] at hac filter_upwards [hs, Ico_mem_nhdsWithin_Ici (left_mem_Ico.2 hac)] rintro x hx ⟨_, hxc⟩ exact ((h_mono.lt_iff_lt hx hcs).2 hxc).trans_le hcb #align strict_mono_on.continuous_at_right_of_exists_between StrictMonoOn.continuousWithinAt_right_of_exists_between
Mathlib/Topology/Order/MonotoneContinuity.lean
63
75
theorem continuousWithinAt_right_of_monotoneOn_of_exists_between {f : Ξ± β†’ Ξ²} {s : Set Ξ±} {a : Ξ±} (h_mono : MonotoneOn f s) (hs : s ∈ 𝓝[β‰₯] a) (hfs : βˆ€ b > f a, βˆƒ c ∈ s, f c ∈ Ioo (f a) b) : ContinuousWithinAt f (Ici a) a := by
have ha : a ∈ Ici a := left_mem_Ici have has : a ∈ s := mem_of_mem_nhdsWithin ha hs refine tendsto_order.2 ⟨fun b hb => ?_, fun b hb => ?_⟩ · filter_upwards [hs, @self_mem_nhdsWithin _ _ a (Ici a)] with _ hxs hxa using hb.trans_le (h_mono has hxs hxa) · rcases hfs b hb with ⟨c, hcs, hac, hcb⟩ have : a < c := not_le.1 fun h => hac.not_le <| h_mono hcs has h filter_upwards [hs, Ico_mem_nhdsWithin_Ici (left_mem_Ico.2 this)] rintro x hx ⟨_, hxc⟩ exact (h_mono hx hcs hxc.le).trans_lt hcb
[ " ContinuousWithinAt f (Ici a) a", " βˆ€αΆ  (b_1 : Ξ±) in 𝓝[β‰₯] a, b < f b_1", " βˆ€αΆ  (b_1 : Ξ±) in 𝓝[β‰₯] a, f b_1 < b", " βˆ€ a_1 ∈ s, a_1 ∈ Ico a c β†’ f a_1 < b", " f x < b" ]
[ " ContinuousWithinAt f (Ici a) a", " βˆ€αΆ  (b_1 : Ξ±) in 𝓝[β‰₯] a, b < f b_1", " βˆ€αΆ  (b_1 : Ξ±) in 𝓝[β‰₯] a, f b_1 < b", " βˆ€ a_1 ∈ s, a_1 ∈ Ico a c β†’ f a_1 < b", " f x < b" ]
import Batteries.Data.List.Basic import Batteries.Data.List.Lemmas open Nat namespace List section countP variable (p q : Ξ± β†’ Bool) @[simp] theorem countP_nil : countP p [] = 0 := rfl protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by induction l generalizing n with | nil => rfl | cons head tail ih => unfold countP.go rw [ih (n := n + 1), ih (n := n), ih (n := 1)] if h : p head then simp [h, Nat.add_assoc] else simp [h] @[simp] theorem countP_cons_of_pos (l) (pa : p a) : countP p (a :: l) = countP p l + 1 := by have : countP.go p (a :: l) 0 = countP.go p l 1 := show cond .. = _ by rw [pa]; rfl unfold countP rw [this, Nat.add_comm, List.countP_go_eq_add] @[simp] theorem countP_cons_of_neg (l) (pa : Β¬p a) : countP p (a :: l) = countP p l := by simp [countP, countP.go, pa] theorem countP_cons (a : Ξ±) (l) : countP p (a :: l) = countP p l + if p a then 1 else 0 := by by_cases h : p a <;> simp [h] theorem length_eq_countP_add_countP (l) : length l = countP p l + countP (fun a => Β¬p a) l := by induction l with | nil => rfl | cons x h ih => if h : p x then rw [countP_cons_of_pos _ _ h, countP_cons_of_neg _ _ _, length, ih] Β· rw [Nat.add_assoc, Nat.add_comm _ 1, Nat.add_assoc] Β· simp only [h, not_true_eq_false, decide_False, not_false_eq_true] else rw [countP_cons_of_pos (fun a => Β¬p a) _ _, countP_cons_of_neg _ _ h, length, ih] Β· rfl Β· simp only [h, not_false_eq_true, decide_True] theorem countP_eq_length_filter (l) : countP p l = length (filter p l) := by induction l with | nil => rfl | cons x l ih => if h : p x then rw [countP_cons_of_pos p l h, ih, filter_cons_of_pos l h, length] else rw [countP_cons_of_neg p l h, ih, filter_cons_of_neg l h] theorem countP_le_length : countP p l ≀ l.length := by simp only [countP_eq_length_filter] apply length_filter_le @[simp] theorem countP_append (l₁ lβ‚‚) : countP p (l₁ ++ lβ‚‚) = countP p l₁ + countP p lβ‚‚ := by simp only [countP_eq_length_filter, filter_append, length_append] theorem countP_pos : 0 < countP p l ↔ βˆƒ a ∈ l, p a := by simp only [countP_eq_length_filter, length_pos_iff_exists_mem, mem_filter, exists_prop] theorem countP_eq_zero : countP p l = 0 ↔ βˆ€ a ∈ l, Β¬p a := by simp only [countP_eq_length_filter, length_eq_zero, filter_eq_nil]
.lake/packages/batteries/Batteries/Data/List/Count.lean
81
82
theorem countP_eq_length : countP p l = l.length ↔ βˆ€ a ∈ l, p a := by
rw [countP_eq_length_filter, filter_length_eq_length]
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Constructions.Prod.Integral import Mathlib.MeasureTheory.Function.LocallyIntegrable import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Group.Prod import Mathlib.MeasureTheory.Integral.IntervalIntegral #align_import analysis.convolution from "leanprover-community/mathlib"@"8905e5ed90859939681a725b00f6063e65096d95" open Set Function Filter MeasureTheory MeasureTheory.Measure TopologicalSpace open ContinuousLinearMap Metric Bornology open scoped Pointwise Topology NNReal Filter universe uπ•œ uG uE uE' uE'' uF uF' uF'' uP variable {π•œ : Type uπ•œ} {G : Type uG} {E : Type uE} {E' : Type uE'} {E'' : Type uE''} {F : Type uF} {F' : Type uF'} {F'' : Type uF''} {P : Type uP} variable [NormedAddCommGroup E] [NormedAddCommGroup E'] [NormedAddCommGroup E''] [NormedAddCommGroup F] {f f' : G β†’ E} {g g' : G β†’ E'} {x x' : G} {y y' : E} namespace MeasureTheory section NontriviallyNormedField variable [NontriviallyNormedField π•œ] variable [NormedSpace π•œ E] [NormedSpace π•œ E'] [NormedSpace π•œ E''] [NormedSpace π•œ F] variable (L : E β†’L[π•œ] E' β†’L[π•œ] F) section NoMeasurability variable [AddGroup G] [TopologicalSpace G]
Mathlib/Analysis/Convolution.lean
118
128
theorem convolution_integrand_bound_right_of_le_of_subset {C : ℝ} (hC : βˆ€ i, β€–g iβ€– ≀ C) {x t : G} {s u : Set G} (hx : x ∈ s) (hu : -tsupport g + s βŠ† u) : β€–L (f t) (g (x - t))β€– ≀ u.indicator (fun t => β€–Lβ€– * β€–f tβ€– * C) t := by
-- Porting note: had to add `f := _` refine le_indicator (f := fun t ↦ β€–L (f t) (g (x - t))β€–) (fun t _ => ?_) (fun t ht => ?_) t Β· apply_rules [L.le_of_opNormβ‚‚_le_of_le, le_rfl] Β· have : x - t βˆ‰ support g := by refine mt (fun hxt => hu ?_) ht refine ⟨_, Set.neg_mem_neg.mpr (subset_closure hxt), _, hx, ?_⟩ simp only [neg_sub, sub_add_cancel] simp only [nmem_support.mp this, (L _).map_zero, norm_zero, le_rfl]
[ " β€–(L (f t)) (g (x - t))β€– ≀ u.indicator (fun t => β€–Lβ€– * β€–f tβ€– * C) t", " (fun t => β€–(L (f t)) (g (x - t))β€–) t ≀ β€–Lβ€– * β€–f tβ€– * C", " (fun t => β€–(L (f t)) (g (x - t))β€–) t ≀ 0", " x - t βˆ‰ support g", " t ∈ -tsupport g + s", " (fun x x_1 => x + x_1) (-(x - t)) x = t" ]
[]
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.HasseDeriv #align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace Polynomial open Polynomial variable {R : Type*} [Semiring R] (r : R) (f : R[X]) def taylor (r : R) : R[X] β†’β‚—[R] R[X] where toFun f := f.comp (X + C r) map_add' f g := add_comp map_smul' c f := by simp only [smul_eq_C_mul, C_mul_comp, RingHom.id_apply] #align polynomial.taylor Polynomial.taylor theorem taylor_apply : taylor r f = f.comp (X + C r) := rfl #align polynomial.taylor_apply Polynomial.taylor_apply @[simp] theorem taylor_X : taylor r X = X + C r := by simp only [taylor_apply, X_comp] set_option linter.uppercaseLean3 false in #align polynomial.taylor_X Polynomial.taylor_X @[simp] theorem taylor_C (x : R) : taylor r (C x) = C x := by simp only [taylor_apply, C_comp] set_option linter.uppercaseLean3 false in #align polynomial.taylor_C Polynomial.taylor_C @[simp] theorem taylor_zero' : taylor (0 : R) = LinearMap.id := by ext simp only [taylor_apply, add_zero, comp_X, _root_.map_zero, LinearMap.id_comp, Function.comp_apply, LinearMap.coe_comp] #align polynomial.taylor_zero' Polynomial.taylor_zero' theorem taylor_zero (f : R[X]) : taylor 0 f = f := by rw [taylor_zero', LinearMap.id_apply] #align polynomial.taylor_zero Polynomial.taylor_zero @[simp] theorem taylor_one : taylor r (1 : R[X]) = C 1 := by rw [← C_1, taylor_C] #align polynomial.taylor_one Polynomial.taylor_one @[simp] theorem taylor_monomial (i : β„•) (k : R) : taylor r (monomial i k) = C k * (X + C r) ^ i := by simp [taylor_apply] #align polynomial.taylor_monomial Polynomial.taylor_monomial theorem taylor_coeff (n : β„•) : (taylor r f).coeff n = (hasseDeriv n f).eval r := show (lcoeff R n).comp (taylor r) f = (leval r).comp (hasseDeriv n) f by congr 1; clear! f; ext i simp only [leval_apply, mul_one, one_mul, eval_monomial, LinearMap.comp_apply, coeff_C_mul, hasseDeriv_monomial, taylor_apply, monomial_comp, C_1, (commute_X (C r)).add_pow i, map_sum] simp only [lcoeff_apply, ← C_eq_natCast, mul_assoc, ← C_pow, ← C_mul, coeff_mul_C, (Nat.cast_commute _ _).eq, coeff_X_pow, boole_mul, Finset.sum_ite_eq, Finset.mem_range] split_ifs with h; Β· rfl push_neg at h; rw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, mul_zero] #align polynomial.taylor_coeff Polynomial.taylor_coeff @[simp] theorem taylor_coeff_zero : (taylor r f).coeff 0 = f.eval r := by rw [taylor_coeff, hasseDeriv_zero, LinearMap.id_apply] #align polynomial.taylor_coeff_zero Polynomial.taylor_coeff_zero @[simp]
Mathlib/Algebra/Polynomial/Taylor.lean
93
94
theorem taylor_coeff_one : (taylor r f).coeff 1 = f.derivative.eval r := by
rw [taylor_coeff, hasseDeriv_one]
[ " { toFun := fun f => f.comp (X + C r), map_add' := β‹― }.toFun (c β€’ f) =\n (RingHom.id R) c β€’ { toFun := fun f => f.comp (X + C r), map_add' := β‹― }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 βˆ˜β‚— monomial n✝¹) 1).coeff n✝ = ((LinearMap.id βˆ˜β‚— mono...
[ " { toFun := fun f => f.comp (X + C r), map_add' := β‹― }.toFun (c β€’ f) =\n (RingHom.id R) c β€’ { toFun := fun f => f.comp (X + C r), map_add' := β‹― }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 βˆ˜β‚— monomial n✝¹) 1).coeff n✝ = ((LinearMap.id βˆ˜β‚— mono...
import Mathlib.RingTheory.Localization.Module import Mathlib.RingTheory.Norm import Mathlib.RingTheory.Discriminant #align_import ring_theory.localization.norm from "leanprover-community/mathlib"@"2e59a6de168f95d16b16d217b808a36290398c0a" open scoped nonZeroDivisors variable (R : Type*) {S : Type*} [CommRing R] [CommRing S] [Algebra R S] variable {Rβ‚˜ Sβ‚˜ : Type*} [CommRing Rβ‚˜] [Algebra R Rβ‚˜] [CommRing Sβ‚˜] [Algebra S Sβ‚˜] variable (M : Submonoid R) variable [IsLocalization M Rβ‚˜] [IsLocalization (Algebra.algebraMapSubmonoid S M) Sβ‚˜] variable [Algebra Rβ‚˜ Sβ‚˜] [Algebra R Sβ‚˜] [IsScalarTower R Rβ‚˜ Sβ‚˜] [IsScalarTower R S Sβ‚˜] open Algebra theorem Algebra.map_leftMulMatrix_localization {ΞΉ : Type*} [Fintype ΞΉ] [DecidableEq ΞΉ] (b : Basis ΞΉ R S) (a : S) : (algebraMap R Rβ‚˜).mapMatrix (leftMulMatrix b a) = leftMulMatrix (b.localizationLocalization Rβ‚˜ M Sβ‚˜) (algebraMap S Sβ‚˜ a) := by ext i j simp only [Matrix.map_apply, RingHom.mapMatrix_apply, leftMulMatrix_eq_repr_mul, ← map_mul, Basis.localizationLocalization_apply, Basis.localizationLocalization_repr_algebraMap]
Mathlib/RingTheory/Localization/NormTrace.lean
61
69
theorem Algebra.norm_localization [Module.Free R S] [Module.Finite R S] (a : S) : Algebra.norm Rβ‚˜ (algebraMap S Sβ‚˜ a) = algebraMap R Rβ‚˜ (Algebra.norm R a) := by
cases subsingleton_or_nontrivial R Β· haveI : Subsingleton Rβ‚˜ := Module.subsingleton R Rβ‚˜ simp [eq_iff_true_of_subsingleton] let b := Module.Free.chooseBasis R S letI := Classical.decEq (Module.Free.ChooseBasisIndex R S) rw [Algebra.norm_eq_matrix_det (b.localizationLocalization Rβ‚˜ M Sβ‚˜), Algebra.norm_eq_matrix_det b, RingHom.map_det, ← Algebra.map_leftMulMatrix_localization]
[ " (algebraMap R Rβ‚˜).mapMatrix ((leftMulMatrix b) a) =\n (leftMulMatrix (Basis.localizationLocalization Rβ‚˜ M Sβ‚˜ b)) ((algebraMap S Sβ‚˜) a)", " (algebraMap R Rβ‚˜).mapMatrix ((leftMulMatrix b) a) i j =\n (leftMulMatrix (Basis.localizationLocalization Rβ‚˜ M Sβ‚˜ b)) ((algebraMap S Sβ‚˜) a) i j", " (norm Rβ‚˜) ((algebr...
[ " (algebraMap R Rβ‚˜).mapMatrix ((leftMulMatrix b) a) =\n (leftMulMatrix (Basis.localizationLocalization Rβ‚˜ M Sβ‚˜ b)) ((algebraMap S Sβ‚˜) a)", " (algebraMap R Rβ‚˜).mapMatrix ((leftMulMatrix b) a) i j =\n (leftMulMatrix (Basis.localizationLocalization Rβ‚˜ M Sβ‚˜ b)) ((algebraMap S Sβ‚˜) a) i j" ]
import Mathlib.Algebra.MvPolynomial.Derivation import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.pderiv from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section universe u v namespace MvPolynomial open Set Function Finsupp variable {R : Type u} {Οƒ : Type v} {a a' a₁ aβ‚‚ : R} {s : Οƒ β†’β‚€ β„•} section PDeriv variable [CommSemiring R] def pderiv (i : Οƒ) : Derivation R (MvPolynomial Οƒ R) (MvPolynomial Οƒ R) := letI := Classical.decEq Οƒ mkDerivation R <| Pi.single i 1 #align mv_polynomial.pderiv MvPolynomial.pderiv theorem pderiv_def [DecidableEq Οƒ] (i : Οƒ) : pderiv i = mkDerivation R (Pi.single i 1) := by unfold pderiv; congr! #align mv_polynomial.pderiv_def MvPolynomial.pderiv_def @[simp] theorem pderiv_monomial {i : Οƒ} : pderiv i (monomial s a) = monomial (s - single i 1) (a * s i) := by classical simp only [pderiv_def, mkDerivation_monomial, Finsupp.smul_sum, smul_eq_mul, ← smul_mul_assoc, ← (monomial _).map_smul] refine (Finset.sum_eq_single i (fun j _ hne => ?_) fun hi => ?_).trans ?_ Β· simp [Pi.single_eq_of_ne hne] Β· rw [Finsupp.not_mem_support_iff] at hi; simp [hi] Β· simp #align mv_polynomial.pderiv_monomial MvPolynomial.pderiv_monomial theorem pderiv_C {i : Οƒ} : pderiv i (C a) = 0 := derivation_C _ _ set_option linter.uppercaseLean3 false in #align mv_polynomial.pderiv_C MvPolynomial.pderiv_C theorem pderiv_one {i : Οƒ} : pderiv i (1 : MvPolynomial Οƒ R) = 0 := pderiv_C #align mv_polynomial.pderiv_one MvPolynomial.pderiv_one @[simp]
Mathlib/Algebra/MvPolynomial/PDeriv.lean
89
91
theorem pderiv_X [DecidableEq Οƒ] (i j : Οƒ) : pderiv i (X j : MvPolynomial Οƒ R) = Pi.single (f := fun j => _) i 1 j := by
rw [pderiv_def, mkDerivation_X]
[ " pderiv i = mkDerivation R (Pi.single i 1)", " mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)", " (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))", " (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *...
[ " pderiv i = mkDerivation R (Pi.single i 1)", " mkDerivation R (Pi.single i 1) = mkDerivation R (Pi.single i 1)", " (pderiv i) ((monomial s) a) = (monomial (s - single i 1)) (a * ↑(s i))", " (s.sum fun a_1 b => (monomial (s - single a_1 1)) (a * ↑b) * Pi.single i 1 a_1) =\n (monomial (s - single i 1)) (a *...
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variable {ΞΉ Ξ± Ξ² Ξ³ : Type*} namespace Finset open Multiset variable [CancelCommMonoidWithZero Ξ±] [NormalizedGCDMonoid Ξ±] section gcd def gcd (s : Finset Ξ²) (f : Ξ² β†’ Ξ±) : Ξ± := s.fold GCDMonoid.gcd 0 f #align finset.gcd Finset.gcd variable {s s₁ sβ‚‚ : Finset Ξ²} {f : Ξ² β†’ Ξ±} theorem gcd_def : s.gcd f = (s.1.map f).gcd := rfl #align finset.gcd_def Finset.gcd_def @[simp] theorem gcd_empty : (βˆ… : Finset Ξ²).gcd f = 0 := fold_empty #align finset.gcd_empty Finset.gcd_empty theorem dvd_gcd_iff {a : Ξ±} : a ∣ s.gcd f ↔ βˆ€ b ∈ s, a ∣ f b := by apply Iff.trans Multiset.dvd_gcd simp only [Multiset.mem_map, and_imp, exists_imp] exact ⟨fun k b hb ↦ k _ _ hb rfl, fun k a' b hb h ↦ h β–Έ k _ hb⟩ #align finset.dvd_gcd_iff Finset.dvd_gcd_iff theorem gcd_dvd {b : Ξ²} (hb : b ∈ s) : s.gcd f ∣ f b := dvd_gcd_iff.1 dvd_rfl _ hb #align finset.gcd_dvd Finset.gcd_dvd theorem dvd_gcd {a : Ξ±} : (βˆ€ b ∈ s, a ∣ f b) β†’ a ∣ s.gcd f := dvd_gcd_iff.2 #align finset.dvd_gcd Finset.dvd_gcd @[simp] theorem gcd_insert [DecidableEq Ξ²] {b : Ξ²} : (insert b s : Finset Ξ²).gcd f = GCDMonoid.gcd (f b) (s.gcd f) := by by_cases h : b ∈ s Β· rw [insert_eq_of_mem h, (gcd_eq_right_iff (f b) (s.gcd f) (Multiset.normalize_gcd (s.1.map f))).2 (gcd_dvd h)] apply fold_insert h #align finset.gcd_insert Finset.gcd_insert @[simp] theorem gcd_singleton {b : Ξ²} : ({b} : Finset Ξ²).gcd f = normalize (f b) := Multiset.gcd_singleton #align finset.gcd_singleton Finset.gcd_singleton -- Porting note: Priority changed for `simpNF` @[simp 1100] theorem normalize_gcd : normalize (s.gcd f) = s.gcd f := by simp [gcd_def] #align finset.normalize_gcd Finset.normalize_gcd theorem gcd_union [DecidableEq Ξ²] : (s₁ βˆͺ sβ‚‚).gcd f = GCDMonoid.gcd (s₁.gcd f) (sβ‚‚.gcd f) := Finset.induction_on s₁ (by rw [empty_union, gcd_empty, gcd_zero_left, normalize_gcd]) fun a s _ ih ↦ by rw [insert_union, gcd_insert, gcd_insert, ih, gcd_assoc] #align finset.gcd_union Finset.gcd_union theorem gcd_congr {f g : Ξ² β†’ Ξ±} (hs : s₁ = sβ‚‚) (hfg : βˆ€ a ∈ sβ‚‚, f a = g a) : s₁.gcd f = sβ‚‚.gcd g := by subst hs exact Finset.fold_congr hfg #align finset.gcd_congr Finset.gcd_congr theorem gcd_mono_fun {g : Ξ² β†’ Ξ±} (h : βˆ€ b ∈ s, f b ∣ g b) : s.gcd f ∣ s.gcd g := dvd_gcd fun b hb ↦ (gcd_dvd hb).trans (h b hb) #align finset.gcd_mono_fun Finset.gcd_mono_fun theorem gcd_mono (h : s₁ βŠ† sβ‚‚) : sβ‚‚.gcd f ∣ s₁.gcd f := dvd_gcd fun _ hb ↦ gcd_dvd (h hb) #align finset.gcd_mono Finset.gcd_mono
Mathlib/Algebra/GCDMonoid/Finset.lean
203
205
theorem gcd_image [DecidableEq Ξ²] {g : Ξ³ β†’ Ξ²} (s : Finset Ξ³) : (s.image g).gcd f = s.gcd (f ∘ g) := by
classical induction' s using Finset.induction with c s _ ih <;> simp [*]
[ " a ∣ s.gcd f ↔ βˆ€ b ∈ s, a ∣ f b", " (βˆ€ b ∈ Multiset.map f s.val, a ∣ b) ↔ βˆ€ b ∈ s, a ∣ f b", " (βˆ€ (b : Ξ±), βˆ€ x ∈ s.val, f x = b β†’ a ∣ b) ↔ βˆ€ b ∈ s, a ∣ f b", " (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)", " normalize (s.gcd f) = s.gcd f", " (βˆ… βˆͺ sβ‚‚).gcd f = GCDMonoid.gcd (βˆ….gcd f) (sβ‚‚.gcd f)", ...
[ " a ∣ s.gcd f ↔ βˆ€ b ∈ s, a ∣ f b", " (βˆ€ b ∈ Multiset.map f s.val, a ∣ b) ↔ βˆ€ b ∈ s, a ∣ f b", " (βˆ€ (b : Ξ±), βˆ€ x ∈ s.val, f x = b β†’ a ∣ b) ↔ βˆ€ b ∈ s, a ∣ f b", " (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)", " normalize (s.gcd f) = s.gcd f", " (βˆ… βˆͺ sβ‚‚).gcd f = GCDMonoid.gcd (βˆ….gcd f) (sβ‚‚.gcd f)", ...
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.NormedSpace.RCLike import Mathlib.Order.Filter.Curry #align_import analysis.calculus.uniform_limits_deriv from "leanprover-community/mathlib"@"3f655f5297b030a87d641ad4e825af8d9679eb0b" open Filter open scoped uniformity Filter Topology section LimitsOfDerivatives variable {ΞΉ : Type*} {l : Filter ΞΉ} {E : Type*} [NormedAddCommGroup E] {π•œ : Type*} [RCLike π•œ] [NormedSpace π•œ E] {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {f : ΞΉ β†’ E β†’ G} {g : E β†’ G} {f' : ΞΉ β†’ E β†’ E β†’L[π•œ] G} {g' : E β†’ E β†’L[π•œ] G} {x : E}
Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
112
163
theorem uniformCauchySeqOnFilter_of_fderiv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x)) (hf : βˆ€αΆ  n : ΞΉ Γ— E in l Γ—Λ’ 𝓝 x, HasFDerivAt (f n.1) (f' n.1 n.2) n.2) (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x) := by
letI : NormedSpace ℝ E := NormedSpace.restrictScalars ℝ π•œ _ rw [SeminormedAddGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_zero] at hf' ⊒ suffices TendstoUniformlyOnFilter (fun (n : ΞΉ Γ— ΞΉ) (z : E) => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) 0 (l Γ—Λ’ l) (𝓝 x) ∧ TendstoUniformlyOnFilter (fun (n : ΞΉ Γ— ΞΉ) (_ : E) => f n.1 x - f n.2 x) 0 (l Γ—Λ’ l) (𝓝 x) by have := this.1.add this.2 rw [add_zero] at this exact this.congr (by simp) constructor Β· -- This inequality follows from the mean value theorem. To apply it, we will need to shrink our -- neighborhood to small enough ball rw [Metric.tendstoUniformlyOnFilter_iff] at hf' ⊒ intro Ξ΅ hΞ΅ have := (tendsto_swap4_prod.eventually (hf.prod_mk hf)).diag_of_prod_right obtain ⟨a, b, c, d, e⟩ := eventually_prod_iff.1 ((hf' Ξ΅ hΞ΅).and this) obtain ⟨R, hR, hR'⟩ := Metric.nhds_basis_ball.eventually_iff.mp d let r := min 1 R have hr : 0 < r := by simp [r, hR] have hr' : βˆ€ ⦃y : E⦄, y ∈ Metric.ball x r β†’ c y := fun y hy => hR' (lt_of_lt_of_le (Metric.mem_ball.mp hy) (min_le_right _ _)) have hxy : βˆ€ y : E, y ∈ Metric.ball x r β†’ β€–y - xβ€– < 1 := by intro y hy rw [Metric.mem_ball, dist_eq_norm] at hy exact lt_of_lt_of_le hy (min_le_left _ _) have hxyΞ΅ : βˆ€ y : E, y ∈ Metric.ball x r β†’ Ξ΅ * β€–y - xβ€– < Ξ΅ := by intro y hy exact (mul_lt_iff_lt_one_right hΞ΅.lt).mpr (hxy y hy) -- With a small ball in hand, apply the mean value theorem refine eventually_prod_iff.mpr ⟨_, b, fun e : E => Metric.ball x r e, eventually_mem_set.mpr (Metric.nhds_basis_ball.mem_of_mem hr), fun {n} hn {y} hy => ?_⟩ simp only [Pi.zero_apply, dist_zero_left] at e ⊒ refine lt_of_le_of_lt ?_ (hxyΞ΅ y hy) exact Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le (fun y hy => ((e hn (hr' hy)).2.1.sub (e hn (hr' hy)).2.2).hasFDerivWithinAt) (fun y hy => (e hn (hr' hy)).1.le) (convex_ball x r) (Metric.mem_ball_self hr) hy Β· -- This is just `hfg` run through `eventually_prod_iff` refine Metric.tendstoUniformlyOnFilter_iff.mpr fun Ξ΅ hΞ΅ => ?_ obtain ⟨t, ht, ht'⟩ := (Metric.cauchy_iff.mp hfg).2 Ξ΅ hΞ΅ exact eventually_prod_iff.mpr ⟨fun n : ΞΉ Γ— ΞΉ => f n.1 x ∈ t ∧ f n.2 x ∈ t, eventually_prod_iff.mpr ⟨_, ht, _, ht, fun {n} hn {n'} hn' => ⟨hn, hn'⟩⟩, fun _ => True, by simp, fun {n} hn {y} _ => by simpa [norm_sub_rev, dist_eq_norm] using ht' _ hn.1 _ hn.2⟩
[ " UniformCauchySeqOnFilter f l (𝓝 x)", " TendstoUniformlyOnFilter (fun n z => f n.1 z - f n.2 z) 0 (l Γ—Λ’ l) (𝓝 x)", " βˆ€αΆ  (n : (ΞΉ Γ— ΞΉ) Γ— E) in (l Γ—Λ’ l) Γ—Λ’ 𝓝 x,\n ((fun n z => f n.1 z - f n.2 z - (f n.1 x - f n.2 x)) + fun n x_1 => f n.1 x - f n.2 x) n.1 n.2 =\n f n.1.1 n.2 - f n.1.2 n.2", " TendstoU...
[]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Topology.Order.ProjIcc #align_import analysis.special_functions.trigonometric.inverse from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open Topology Filter open Set Filter open Real namespace Real variable {x y : ℝ} -- @[pp_nodot] Porting note: not implemented noncomputable def arcsin : ℝ β†’ ℝ := Subtype.val ∘ IccExtend (neg_le_self zero_le_one) sinOrderIso.symm #align real.arcsin Real.arcsin theorem arcsin_mem_Icc (x : ℝ) : arcsin x ∈ Icc (-(Ο€ / 2)) (Ο€ / 2) := Subtype.coe_prop _ #align real.arcsin_mem_Icc Real.arcsin_mem_Icc @[simp] theorem range_arcsin : range arcsin = Icc (-(Ο€ / 2)) (Ο€ / 2) := by rw [arcsin, range_comp Subtype.val] simp [Icc] #align real.range_arcsin Real.range_arcsin theorem arcsin_le_pi_div_two (x : ℝ) : arcsin x ≀ Ο€ / 2 := (arcsin_mem_Icc x).2 #align real.arcsin_le_pi_div_two Real.arcsin_le_pi_div_two theorem neg_pi_div_two_le_arcsin (x : ℝ) : -(Ο€ / 2) ≀ arcsin x := (arcsin_mem_Icc x).1 #align real.neg_pi_div_two_le_arcsin Real.neg_pi_div_two_le_arcsin theorem arcsin_projIcc (x : ℝ) : arcsin (projIcc (-1) 1 (neg_le_self zero_le_one) x) = arcsin x := by rw [arcsin, Function.comp_apply, IccExtend_val, Function.comp_apply, IccExtend, Function.comp_apply] #align real.arcsin_proj_Icc Real.arcsin_projIcc
Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
64
66
theorem sin_arcsin' {x : ℝ} (hx : x ∈ Icc (-1 : ℝ) 1) : sin (arcsin x) = x := by
simpa [arcsin, IccExtend_of_mem _ _ hx, -OrderIso.apply_symm_apply] using Subtype.ext_iff.1 (sinOrderIso.apply_symm_apply ⟨x, hx⟩)
[ " range arcsin = Icc (-(Ο€ / 2)) (Ο€ / 2)", " Subtype.val '' range (IccExtend arcsin.proof_2 ⇑sinOrderIso.symm) = Icc (-(Ο€ / 2)) (Ο€ / 2)", " (↑(projIcc (-1) 1 β‹― x)).arcsin = x.arcsin", " x.arcsin.sin = x" ]
[ " range arcsin = Icc (-(Ο€ / 2)) (Ο€ / 2)", " Subtype.val '' range (IccExtend arcsin.proof_2 ⇑sinOrderIso.symm) = Icc (-(Ο€ / 2)) (Ο€ / 2)", " (↑(projIcc (-1) 1 β‹― x)).arcsin = x.arcsin" ]
import Mathlib.Algebra.ContinuedFractions.Computation.Basic import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction open GeneralizedContinuedFraction (of) -- Fix a discrete linear ordered floor field and a value `v`. variable {K : Type*} [LinearOrderedField K] [FloorRing K] {v : K} namespace IntFractPair theorem stream_zero (v : K) : IntFractPair.stream v 0 = some (IntFractPair.of v) := rfl #align generalized_continued_fraction.int_fract_pair.stream_zero GeneralizedContinuedFraction.IntFractPair.stream_zero variable {n : β„•} theorem stream_eq_none_of_fr_eq_zero {ifp_n : IntFractPair K} (stream_nth_eq : IntFractPair.stream v n = some ifp_n) (nth_fr_eq_zero : ifp_n.fr = 0) : IntFractPair.stream v (n + 1) = none := by cases' ifp_n with _ fr change fr = 0 at nth_fr_eq_zero simp [IntFractPair.stream, stream_nth_eq, nth_fr_eq_zero] #align generalized_continued_fraction.int_fract_pair.stream_eq_none_of_fr_eq_zero GeneralizedContinuedFraction.IntFractPair.stream_eq_none_of_fr_eq_zero theorem succ_nth_stream_eq_none_iff : IntFractPair.stream v (n + 1) = none ↔ IntFractPair.stream v n = none ∨ βˆƒ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0 := by rw [IntFractPair.stream] cases IntFractPair.stream v n <;> simp [imp_false] #align generalized_continued_fraction.int_fract_pair.succ_nth_stream_eq_none_iff GeneralizedContinuedFraction.IntFractPair.succ_nth_stream_eq_none_iff theorem succ_nth_stream_eq_some_iff {ifp_succ_n : IntFractPair K} : IntFractPair.stream v (n + 1) = some ifp_succ_n ↔ βˆƒ ifp_n : IntFractPair K, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr β‰  0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n := by simp [IntFractPair.stream, ite_eq_iff, Option.bind_eq_some] #align generalized_continued_fraction.int_fract_pair.succ_nth_stream_eq_some_iff GeneralizedContinuedFraction.IntFractPair.succ_nth_stream_eq_some_iff theorem stream_succ_of_some {p : IntFractPair K} (h : IntFractPair.stream v n = some p) (h' : p.fr β‰  0) : IntFractPair.stream v (n + 1) = some (IntFractPair.of p.fr⁻¹) := succ_nth_stream_eq_some_iff.mpr ⟨p, h, h', rfl⟩ #align generalized_continued_fraction.int_fract_pair.stream_succ_of_some GeneralizedContinuedFraction.IntFractPair.stream_succ_of_some theorem stream_succ_of_int (a : β„€) (n : β„•) : IntFractPair.stream (a : K) (n + 1) = none := by induction' n with n ih Β· refine IntFractPair.stream_eq_none_of_fr_eq_zero (IntFractPair.stream_zero (a : K)) ?_ simp only [IntFractPair.of, Int.fract_intCast] Β· exact IntFractPair.succ_nth_stream_eq_none_iff.mpr (Or.inl ih) #align generalized_continued_fraction.int_fract_pair.stream_succ_of_int GeneralizedContinuedFraction.IntFractPair.stream_succ_of_int
Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
112
121
theorem exists_succ_nth_stream_of_fr_zero {ifp_succ_n : IntFractPair K} (stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n) (succ_nth_fr_eq_zero : ifp_succ_n.fr = 0) : βˆƒ ifp_n : IntFractPair K, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr⁻¹ = ⌊ifp_n.frβ»ΒΉβŒ‹ := by
-- get the witness from `succ_nth_stream_eq_some_iff` and prove that it has the additional -- properties rcases succ_nth_stream_eq_some_iff.mp stream_succ_nth_eq with ⟨ifp_n, seq_nth_eq, _, rfl⟩ refine ⟨ifp_n, seq_nth_eq, ?_⟩ simpa only [IntFractPair.of, Int.fract, sub_eq_zero] using succ_nth_fr_eq_zero
[ " IntFractPair.stream v (n + 1) = none", " IntFractPair.stream v (n + 1) = none ↔\n IntFractPair.stream v n = none ∨ βˆƒ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0", " ((IntFractPair.stream v n).bind fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n IntFractPai...
[ " IntFractPair.stream v (n + 1) = none", " IntFractPair.stream v (n + 1) = none ↔\n IntFractPair.stream v n = none ∨ βˆƒ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0", " ((IntFractPair.stream v n).bind fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)) = none ↔\n IntFractPai...
import Mathlib.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).countP p #align nat.count Nat.count @[simp] theorem count_zero : count p 0 = 0 := by rw [count, List.range_zero, List.countP, List.countP.go] #align nat.count_zero Nat.count_zero def CountSet.fintype (n : β„•) : Fintype { i // i < n ∧ p i } := by apply Fintype.ofFinset ((Finset.range n).filter p) intro x rw [mem_filter, mem_range] rfl #align nat.count_set.fintype Nat.CountSet.fintype scoped[Count] attribute [instance] Nat.CountSet.fintype open Count theorem count_eq_card_filter_range (n : β„•) : count p n = ((range n).filter p).card := by rw [count, List.countP_eq_length_filter] rfl #align nat.count_eq_card_filter_range Nat.count_eq_card_filter_range theorem count_eq_card_fintype (n : β„•) : count p n = Fintype.card { k : β„• // k < n ∧ p k } := by rw [count_eq_card_filter_range, ← Fintype.card_ofFinset, ← CountSet.fintype] rfl #align nat.count_eq_card_fintype Nat.count_eq_card_fintype theorem count_succ (n : β„•) : count p (n + 1) = count p n + if p n then 1 else 0 := by split_ifs with h <;> simp [count, List.range_succ, h] #align nat.count_succ Nat.count_succ @[mono] theorem count_monotone : Monotone (count p) := monotone_nat_of_le_succ fun n ↦ by by_cases h : p n <;> simp [count_succ, h] #align nat.count_monotone Nat.count_monotone theorem count_add (a b : β„•) : count p (a + b) = count p a + count (fun k ↦ p (a + k)) b := by have : Disjoint ((range a).filter p) (((range b).map <| addLeftEmbedding a).filter p) := by apply disjoint_filter_filter rw [Finset.disjoint_left] simp_rw [mem_map, mem_range, addLeftEmbedding_apply] rintro x hx ⟨c, _, rfl⟩ exact (self_le_add_right _ _).not_lt hx simp_rw [count_eq_card_filter_range, range_add, filter_union, card_union_of_disjoint this, filter_map, addLeftEmbedding, card_map] rfl #align nat.count_add Nat.count_add theorem count_add' (a b : β„•) : count p (a + b) = count (fun k ↦ p (k + b)) a + count p b := by rw [add_comm, count_add, add_comm] simp_rw [add_comm b] #align nat.count_add' Nat.count_add' theorem count_one : count p 1 = if p 0 then 1 else 0 := by simp [count_succ] #align nat.count_one Nat.count_one theorem count_succ' (n : β„•) : count p (n + 1) = count (fun k ↦ p (k + 1)) n + if p 0 then 1 else 0 := by rw [count_add', count_one] #align nat.count_succ' Nat.count_succ' variable {p} @[simp] theorem count_lt_count_succ_iff {n : β„•} : count p n < count p (n + 1) ↔ p n := by by_cases h : p n <;> simp [count_succ, h] #align nat.count_lt_count_succ_iff Nat.count_lt_count_succ_iff theorem count_succ_eq_succ_count_iff {n : β„•} : count p (n + 1) = count p n + 1 ↔ p n := by by_cases h : p n <;> simp [h, count_succ] #align nat.count_succ_eq_succ_count_iff Nat.count_succ_eq_succ_count_iff theorem count_succ_eq_count_iff {n : β„•} : count p (n + 1) = count p n ↔ Β¬p n := by by_cases h : p n <;> simp [h, count_succ] #align nat.count_succ_eq_count_iff Nat.count_succ_eq_count_iff alias ⟨_, count_succ_eq_succ_count⟩ := count_succ_eq_succ_count_iff #align nat.count_succ_eq_succ_count Nat.count_succ_eq_succ_count alias ⟨_, count_succ_eq_count⟩ := count_succ_eq_count_iff #align nat.count_succ_eq_count Nat.count_succ_eq_count
Mathlib/Data/Nat/Count.lean
120
122
theorem count_le_cardinal (n : β„•) : (count p n : Cardinal) ≀ Cardinal.mk { k | p k } := by
rw [count_eq_card_fintype, ← Cardinal.mk_fintype] exact Cardinal.mk_subtype_mono fun x hx ↦ hx.2
[ " 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", " count p n = (filter p (range n)).card", " (List.filter (fun b => decide (p b)) (List.rang...
import Mathlib.Data.Int.Order.Units import Mathlib.Data.ZMod.IntUnitsPower import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.LinearAlgebra.DirectSum.TensorProduct import Mathlib.Algebra.DirectSum.Algebra suppress_compilation open scoped TensorProduct DirectSum variable {R ΞΉ A B : Type*} namespace TensorProduct variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable (π’œ : ΞΉ β†’ Type*) (ℬ : ΞΉ β†’ Type*) variable [CommRing R] variable [βˆ€ i, AddCommGroup (π’œ i)] [βˆ€ i, AddCommGroup (ℬ i)] variable [βˆ€ i, Module R (π’œ i)] [βˆ€ i, Module R (ℬ i)] variable [DirectSum.GRing π’œ] [DirectSum.GRing ℬ] variable [DirectSum.GAlgebra R π’œ] [DirectSum.GAlgebra R ℬ] -- this helps with performance instance (i : ΞΉ Γ— ΞΉ) : Module R (π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) := TensorProduct.leftModule open DirectSum (lof) variable (R) section gradedComm local notation "π’œβ„¬" => (fun i : ΞΉ Γ— ΞΉ => π’œ (Prod.fst i) βŠ—[R] ℬ (Prod.snd i)) local notation "β„¬π’œ" => (fun i : ΞΉ Γ— ΞΉ => ℬ (Prod.fst i) βŠ—[R] π’œ (Prod.snd i)) def gradedCommAux : DirectSum _ π’œβ„¬ β†’β‚—[R] DirectSum _ β„¬π’œ := by refine DirectSum.toModule R _ _ fun i => ?_ have o := DirectSum.lof R _ β„¬π’œ i.swap have s : β„€Λ£ := ((-1 : β„€Λ£)^(i.1* i.2 : ΞΉ) : β„€Λ£) exact (s β€’ o) βˆ˜β‚— (TensorProduct.comm R _ _).toLinearMap @[simp] theorem gradedCommAux_lof_tmul (i j : ΞΉ) (a : π’œ i) (b : ℬ j) : gradedCommAux R π’œ ℬ (lof R _ π’œβ„¬ (i, j) (a βŠ—β‚œ b)) = (-1 : β„€Λ£)^(j * i) β€’ lof R _ β„¬π’œ (j, i) (b βŠ—β‚œ a) := by rw [gradedCommAux] dsimp simp [mul_comm i j] @[simp]
Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
93
98
theorem gradedCommAux_comp_gradedCommAux : gradedCommAux R π’œ ℬ βˆ˜β‚— gradedCommAux R ℬ π’œ = LinearMap.id := by
ext i a b dsimp rw [gradedCommAux_lof_tmul, LinearMap.map_smul_of_tower, gradedCommAux_lof_tmul, smul_smul, mul_comm i.2 i.1, Int.units_mul_self, one_smul]
[ " (⨁ (i : ΞΉ Γ— ΞΉ), π’œ i.1 βŠ—[R] ℬ i.2) β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " π’œ i.1 βŠ—[R] ℬ i.2 β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " (gradedCommAux R π’œ ℬ) ((lof R (ΞΉ Γ— ΞΉ) (fun i => π’œ i.1 βŠ—[R] ℬ i.2) (i, j)) (a βŠ—β‚œ[R] b)) =\n (-1) ^ (j * i) β€’ (lof R (ΞΉ Γ— ΞΉ) (fun i => ℬ i.1 βŠ—[R] π’œ i.2) (j, i)) (b βŠ—β‚œ[...
[ " (⨁ (i : ΞΉ Γ— ΞΉ), π’œ i.1 βŠ—[R] ℬ i.2) β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " π’œ i.1 βŠ—[R] ℬ i.2 β†’β‚—[R] ⨁ (i : ΞΉ Γ— ΞΉ), ℬ i.1 βŠ—[R] π’œ i.2", " (gradedCommAux R π’œ ℬ) ((lof R (ΞΉ Γ— ΞΉ) (fun i => π’œ i.1 βŠ—[R] ℬ i.2) (i, j)) (a βŠ—β‚œ[R] b)) =\n (-1) ^ (j * i) β€’ (lof R (ΞΉ Γ— ΞΉ) (fun i => ℬ i.1 βŠ—[R] π’œ i.2) (j, i)) (b βŠ—β‚œ[...
import Mathlib.Algebra.Group.Aut import Mathlib.Algebra.Group.Invertible.Basic import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.GroupTheory.GroupAction.Units #align_import group_theory.group_action.group from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f" universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} section MulAction section Group variable [Group Ξ±] [MulAction Ξ± Ξ²] @[to_additive (attr := simp)]
Mathlib/GroupTheory/GroupAction/Group.lean
30
30
theorem inv_smul_smul (c : Ξ±) (x : Ξ²) : c⁻¹ β€’ c β€’ x = x := by
rw [smul_smul, mul_left_inv, one_smul]
[ " c⁻¹ β€’ c β€’ x = x" ]
[]
import Mathlib.Geometry.Euclidean.Inversion.Basic import Mathlib.Geometry.Euclidean.PerpBisector open Metric Function AffineMap Set AffineSubspace open scoped Topology variable {V P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {c x y : P} {R : ℝ} namespace EuclideanGeometry theorem inversion_mem_perpBisector_inversion_iff (hR : R β‰  0) (hx : x β‰  c) (hy : y β‰  c) : inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c := by rw [mem_perpBisector_iff_dist_eq, dist_inversion_inversion hx hy, dist_inversion_center] have hx' := dist_ne_zero.2 hx have hy' := dist_ne_zero.2 hy field_simp [mul_assoc, mul_comm, hx, hx.symm, eq_comm] theorem inversion_mem_perpBisector_inversion_iff' (hR : R β‰  0) (hy : y β‰  c) : inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x β‰  c := by rcases eq_or_ne x c with rfl | hx Β· simp [*] Β· simp [inversion_mem_perpBisector_inversion_iff hR hx hy, hx] theorem preimage_inversion_perpBisector_inversion (hR : R β‰  0) (hy : y β‰  c) : inversion c R ⁻¹' perpBisector c (inversion c R y) = sphere y (dist y c) \ {c} := Set.ext fun _ ↦ inversion_mem_perpBisector_inversion_iff' hR hy theorem preimage_inversion_perpBisector (hR : R β‰  0) (hy : y β‰  c) : inversion c R ⁻¹' perpBisector c y = sphere (inversion c R y) (R ^ 2 / dist y c) \ {c} := by rw [← dist_inversion_center, ← preimage_inversion_perpBisector_inversion hR, inversion_inversion] <;> simp [*]
Mathlib/Geometry/Euclidean/Inversion/ImageHyperplane.lean
61
64
theorem image_inversion_perpBisector (hR : R β‰  0) (hy : y β‰  c) : inversion c R '' perpBisector c y = sphere (inversion c R y) (R ^ 2 / dist y c) \ {c} := by
rw [image_eq_preimage_of_inverse (inversion_involutive _ hR) (inversion_involutive _ hR), preimage_inversion_perpBisector hR hy]
[ " inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c", " R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c", " inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x β‰  c", " inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ...
[ " inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c", " R ^ 2 / dist x c = R ^ 2 / (dist x c * dist y c) * dist x y ↔ dist x y = dist y c", " inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x β‰  c", " inversion x R x ∈ perpBisector x (inversion x R y) ↔ dist x ...
import Mathlib.Order.Filter.Prod #align_import order.filter.n_ary from "leanprover-community/mathlib"@"78f647f8517f021d839a7553d5dc97e79b508dea" open Function Set open Filter namespace Filter variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' : Type*} {m : Ξ± β†’ Ξ² β†’ Ξ³} {f f₁ fβ‚‚ : Filter Ξ±} {g g₁ gβ‚‚ : Filter Ξ²} {h h₁ hβ‚‚ : Filter Ξ³} {s s₁ sβ‚‚ : Set Ξ±} {t t₁ tβ‚‚ : Set Ξ²} {u : Set Ξ³} {v : Set Ξ΄} {a : Ξ±} {b : Ξ²} {c : Ξ³} def mapβ‚‚ (m : Ξ± β†’ Ξ² β†’ Ξ³) (f : Filter Ξ±) (g : Filter Ξ²) : Filter Ξ³ := ((f Γ—Λ’ g).map (uncurry m)).copy { s | βˆƒ u ∈ f, βˆƒ v ∈ g, image2 m u v βŠ† s } fun _ ↦ by simp only [mem_map, mem_prod_iff, image2_subset_iff, prod_subset_iff]; rfl #align filter.mapβ‚‚ Filter.mapβ‚‚ @[simp 900] theorem mem_mapβ‚‚_iff : u ∈ mapβ‚‚ m f g ↔ βˆƒ s ∈ f, βˆƒ t ∈ g, image2 m s t βŠ† u := Iff.rfl #align filter.mem_mapβ‚‚_iff Filter.mem_mapβ‚‚_iff theorem image2_mem_mapβ‚‚ (hs : s ∈ f) (ht : t ∈ g) : image2 m s t ∈ mapβ‚‚ m f g := ⟨_, hs, _, ht, Subset.rfl⟩ #align filter.image2_mem_mapβ‚‚ Filter.image2_mem_mapβ‚‚ theorem map_prod_eq_mapβ‚‚ (m : Ξ± β†’ Ξ² β†’ Ξ³) (f : Filter Ξ±) (g : Filter Ξ²) : Filter.map (fun p : Ξ± Γ— Ξ² => m p.1 p.2) (f Γ—Λ’ g) = mapβ‚‚ m f g := by rw [mapβ‚‚, copy_eq, uncurry_def] #align filter.map_prod_eq_mapβ‚‚ Filter.map_prod_eq_mapβ‚‚ theorem map_prod_eq_mapβ‚‚' (m : Ξ± Γ— Ξ² β†’ Ξ³) (f : Filter Ξ±) (g : Filter Ξ²) : Filter.map m (f Γ—Λ’ g) = mapβ‚‚ (fun a b => m (a, b)) f g := map_prod_eq_mapβ‚‚ (curry m) f g #align filter.map_prod_eq_mapβ‚‚' Filter.map_prod_eq_mapβ‚‚' @[simp] theorem mapβ‚‚_mk_eq_prod (f : Filter Ξ±) (g : Filter Ξ²) : mapβ‚‚ Prod.mk f g = f Γ—Λ’ g := by simp only [← map_prod_eq_mapβ‚‚, map_id'] #align filter.mapβ‚‚_mk_eq_prod Filter.mapβ‚‚_mk_eq_prod -- lemma image2_mem_mapβ‚‚_iff (hm : injective2 m) : image2 m s t ∈ mapβ‚‚ m f g ↔ s ∈ f ∧ t ∈ g := -- ⟨by { rintro ⟨u, v, hu, hv, h⟩, rw image2_subset_image2_iff hm at h, -- exact ⟨mem_of_superset hu h.1, mem_of_superset hv h.2⟩ }, Ξ» h, image2_mem_mapβ‚‚ h.1 h.2⟩ theorem mapβ‚‚_mono (hf : f₁ ≀ fβ‚‚) (hg : g₁ ≀ gβ‚‚) : mapβ‚‚ m f₁ g₁ ≀ mapβ‚‚ m fβ‚‚ gβ‚‚ := fun _ ⟨s, hs, t, ht, hst⟩ => ⟨s, hf hs, t, hg ht, hst⟩ #align filter.mapβ‚‚_mono Filter.mapβ‚‚_mono theorem mapβ‚‚_mono_left (h : g₁ ≀ gβ‚‚) : mapβ‚‚ m f g₁ ≀ mapβ‚‚ m f gβ‚‚ := mapβ‚‚_mono Subset.rfl h #align filter.mapβ‚‚_mono_left Filter.mapβ‚‚_mono_left theorem mapβ‚‚_mono_right (h : f₁ ≀ fβ‚‚) : mapβ‚‚ m f₁ g ≀ mapβ‚‚ m fβ‚‚ g := mapβ‚‚_mono h Subset.rfl #align filter.mapβ‚‚_mono_right Filter.mapβ‚‚_mono_right @[simp] theorem le_mapβ‚‚_iff {h : Filter Ξ³} : h ≀ mapβ‚‚ m f g ↔ βˆ€ ⦃s⦄, s ∈ f β†’ βˆ€ ⦃t⦄, t ∈ g β†’ image2 m s t ∈ h := ⟨fun H _ hs _ ht => H <| image2_mem_mapβ‚‚ hs ht, fun H _ ⟨_, hs, _, ht, hu⟩ => mem_of_superset (H hs ht) hu⟩ #align filter.le_mapβ‚‚_iff Filter.le_mapβ‚‚_iff @[simp] theorem mapβ‚‚_eq_bot_iff : mapβ‚‚ m f g = βŠ₯ ↔ f = βŠ₯ ∨ g = βŠ₯ := by simp [← map_prod_eq_mapβ‚‚] #align filter.mapβ‚‚_eq_bot_iff Filter.mapβ‚‚_eq_bot_iff @[simp] theorem mapβ‚‚_bot_left : mapβ‚‚ m βŠ₯ g = βŠ₯ := mapβ‚‚_eq_bot_iff.2 <| .inl rfl #align filter.mapβ‚‚_bot_left Filter.mapβ‚‚_bot_left @[simp] theorem mapβ‚‚_bot_right : mapβ‚‚ m f βŠ₯ = βŠ₯ := mapβ‚‚_eq_bot_iff.2 <| .inr rfl #align filter.mapβ‚‚_bot_right Filter.mapβ‚‚_bot_right @[simp]
Mathlib/Order/Filter/NAry.lean
103
103
theorem mapβ‚‚_neBot_iff : (mapβ‚‚ m f g).NeBot ↔ f.NeBot ∧ g.NeBot := by
simp [neBot_iff, not_or]
[ " x✝ ∈ {s | βˆƒ u ∈ f, βˆƒ v ∈ g, image2 m u v βŠ† s} ↔ x✝ ∈ map (uncurry m) (f Γ—Λ’ g)", " x✝ ∈ {s | βˆƒ u ∈ f, βˆƒ v ∈ g, βˆ€ x ∈ u, βˆ€ y ∈ v, m x y ∈ s} ↔\n βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, βˆ€ x ∈ t₁, βˆ€ y ∈ tβ‚‚, (x, y) ∈ uncurry m ⁻¹' x✝", " map (fun p => m p.1 p.2) (f Γ—Λ’ g) = mapβ‚‚ m f g", " mapβ‚‚ Prod.mk f g = f Γ—Λ’ g", " mapβ‚‚ m f ...
[ " x✝ ∈ {s | βˆƒ u ∈ f, βˆƒ v ∈ g, image2 m u v βŠ† s} ↔ x✝ ∈ map (uncurry m) (f Γ—Λ’ g)", " x✝ ∈ {s | βˆƒ u ∈ f, βˆƒ v ∈ g, βˆ€ x ∈ u, βˆ€ y ∈ v, m x y ∈ s} ↔\n βˆƒ t₁ ∈ f, βˆƒ tβ‚‚ ∈ g, βˆ€ x ∈ t₁, βˆ€ y ∈ tβ‚‚, (x, y) ∈ uncurry m ⁻¹' x✝", " map (fun p => m p.1 p.2) (f Γ—Λ’ g) = mapβ‚‚ m f g", " mapβ‚‚ Prod.mk f g = f Γ—Λ’ g", " mapβ‚‚ m f ...
import Mathlib.Data.ZMod.Quotient import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.GroupTheory.OrderOfElement import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Tactic.ByContra import Mathlib.Tactic.Peel #align_import group_theory.exponent from "leanprover-community/mathlib"@"52fa514ec337dd970d71d8de8d0fd68b455a1e54" universe u variable {G : Type u} open scoped Classical namespace Monoid section Monoid variable (G) [Monoid G] @[to_additive "A predicate on an additive monoid saying that there is a positive integer `n` such\n that `n β€’ g = 0` for all `g`."] def ExponentExists := βˆƒ n, 0 < n ∧ βˆ€ g : G, g ^ n = 1 #align monoid.exponent_exists Monoid.ExponentExists #align add_monoid.exponent_exists AddMonoid.ExponentExists @[to_additive "The exponent of an additive group is the smallest positive integer `n` such that\n `n β€’ g = 0` for all `g ∈ G` if it exists, otherwise it is zero by convention."] noncomputable def exponent := if h : ExponentExists G then Nat.find h else 0 #align monoid.exponent Monoid.exponent #align add_monoid.exponent AddMonoid.exponent variable {G} @[simp] theorem _root_.AddMonoid.exponent_additive : AddMonoid.exponent (Additive G) = exponent G := rfl @[simp] theorem exponent_multiplicative {G : Type*} [AddMonoid G] : exponent (Multiplicative G) = AddMonoid.exponent G := rfl open MulOpposite in @[to_additive (attr := simp)] theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G := by simp only [Monoid.exponent, ExponentExists] congr! all_goals exact ⟨(op_injective <| Β· <| op Β·), (unop_injective <| Β· <| unop Β·)⟩ @[to_additive] theorem ExponentExists.isOfFinOrder (h : ExponentExists G) {g : G} : IsOfFinOrder g := isOfFinOrder_iff_pow_eq_one.mpr <| by peel 2 h; exact this g @[to_additive] theorem ExponentExists.orderOf_pos (h : ExponentExists G) (g : G) : 0 < orderOf g := h.isOfFinOrder.orderOf_pos @[to_additive] theorem exponent_ne_zero : exponent G β‰  0 ↔ ExponentExists G := by rw [exponent] split_ifs with h Β· simp [h, @not_lt_zero' β„•] --if this isn't done this way, `to_additive` freaks Β· tauto #align monoid.exponent_exists_iff_ne_zero Monoid.exponent_ne_zero #align add_monoid.exponent_exists_iff_ne_zero AddMonoid.exponent_ne_zero @[to_additive] protected alias ⟨_, ExponentExists.exponent_ne_zero⟩ := exponent_ne_zero @[to_additive (attr := deprecated (since := "2024-01-27"))] theorem exponentExists_iff_ne_zero : ExponentExists G ↔ exponent G β‰  0 := exponent_ne_zero.symm @[to_additive] theorem exponent_pos : 0 < exponent G ↔ ExponentExists G := pos_iff_ne_zero.trans exponent_ne_zero @[to_additive] protected alias ⟨_, ExponentExists.exponent_pos⟩ := exponent_pos @[to_additive] theorem exponent_eq_zero_iff : exponent G = 0 ↔ Β¬ExponentExists G := exponent_ne_zero.not_right #align monoid.exponent_eq_zero_iff Monoid.exponent_eq_zero_iff #align add_monoid.exponent_eq_zero_iff AddMonoid.exponent_eq_zero_iff @[to_additive exponent_eq_zero_addOrder_zero] theorem exponent_eq_zero_of_order_zero {g : G} (hg : orderOf g = 0) : exponent G = 0 := exponent_eq_zero_iff.mpr fun h ↦ h.orderOf_pos g |>.ne' hg #align monoid.exponent_eq_zero_of_order_zero Monoid.exponent_eq_zero_of_order_zero #align add_monoid.exponent_eq_zero_of_order_zero AddMonoid.exponent_eq_zero_addOrder_zero @[to_additive "The exponent is zero iff for all nonzero `n`, one can find a `g` such that `n β€’ g β‰  0`."] theorem exponent_eq_zero_iff_forall : exponent G = 0 ↔ βˆ€ n > 0, βˆƒ g : G, g ^ n β‰  1 := by rw [exponent_eq_zero_iff, ExponentExists] push_neg rfl @[to_additive exponent_nsmul_eq_zero] theorem pow_exponent_eq_one (g : G) : g ^ exponent G = 1 := by by_cases h : ExponentExists G Β· simp_rw [exponent, dif_pos h] exact (Nat.find_spec h).2 g Β· simp_rw [exponent, dif_neg h, pow_zero] #align monoid.pow_exponent_eq_one Monoid.pow_exponent_eq_one #align add_monoid.exponent_nsmul_eq_zero AddMonoid.exponent_nsmul_eq_zero @[to_additive]
Mathlib/GroupTheory/Exponent.lean
160
163
theorem pow_eq_mod_exponent {n : β„•} (g : G) : g ^ n = g ^ (n % exponent G) := calc g ^ n = g ^ (n % exponent G + exponent G * (n / exponent G)) := by
rw [Nat.mod_add_div] _ = g ^ (n % exponent G) := by simp [pow_add, pow_mul, pow_exponent_eq_one]
[ " Monoid.exponent Gᡐᡒᡖ = Monoid.exponent G", " (if h : βˆƒ n, 0 < n ∧ βˆ€ (g : Gᡐᡒᡖ), g ^ n = 1 then Nat.find h else 0) =\n if h : βˆƒ n, 0 < n ∧ βˆ€ (g : G), g ^ n = 1 then Nat.find h else 0", " (βˆ€ (g : Gᡐᡒᡖ), g ^ x✝ = 1) ↔ βˆ€ (g : G), g ^ x✝ = 1", " βˆƒ n, 0 < n ∧ g ^ n = 1", " g ^ n✝ = 1", " exponent G β‰  0 ↔ E...
[ " Monoid.exponent Gᡐᡒᡖ = Monoid.exponent G", " (if h : βˆƒ n, 0 < n ∧ βˆ€ (g : Gᡐᡒᡖ), g ^ n = 1 then Nat.find h else 0) =\n if h : βˆƒ n, 0 < n ∧ βˆ€ (g : G), g ^ n = 1 then Nat.find h else 0", " (βˆ€ (g : Gᡐᡒᡖ), g ^ x✝ = 1) ↔ βˆ€ (g : G), g ^ x✝ = 1", " βˆƒ n, 0 < n ∧ g ^ n = 1", " g ^ n✝ = 1", " exponent G β‰  0 ↔ E...
import Mathlib.RingTheory.RootsOfUnity.Basic universe u variable {L : Type u} [CommRing L] [IsDomain L] variable (n : β„•+) theorem rootsOfUnity.integer_power_of_ringEquiv (g : L ≃+* L) : βˆƒ m : β„€, βˆ€ t : rootsOfUnity n L, g (t : LΛ£) = (t ^ m : LΛ£) := by obtain ⟨m, hm⟩ := MonoidHom.map_cyclic ((g : L ≃* L).restrictRootsOfUnity n).toMonoidHom exact ⟨m, fun t ↦ Units.ext_iff.1 <| SetCoe.ext_iff.2 <| hm t⟩
Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean
77
79
theorem rootsOfUnity.integer_power_of_ringEquiv' (g : L ≃+* L) : βˆƒ m : β„€, βˆ€ t ∈ rootsOfUnity n L, g (t : LΛ£) = (t ^ m : LΛ£) := by
simpa using rootsOfUnity.integer_power_of_ringEquiv n g
[ " βˆƒ m, βˆ€ (t : β†₯(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)", " βˆƒ m, βˆ€ t ∈ rootsOfUnity n L, g ↑t = ↑(t ^ m)" ]
[ " βˆƒ m, βˆ€ (t : β†₯(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ m)" ]
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"@"2196ab363eb097c008d4497125e0dde23fb36db2" open Interval Pointwise variable {Ξ± : Type*} namespace Set section ContravariantLT variable [Mul Ξ±] [PartialOrder Ξ±] variable [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· < Β·)] [CovariantClass Ξ± Ξ± (Function.swap HMul.hMul) LT.lt] @[to_additive Icc_add_Ico_subset] theorem Icc_mul_Ico_subset' (a b c d : Ξ±) : Icc a b * Ico c d βŠ† Ico (a * c) (b * d) := by haveI := covariantClass_le_of_lt rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩ exact ⟨mul_le_mul' hya hzc, mul_lt_mul_of_le_of_lt hyb hzd⟩ @[to_additive Ico_add_Icc_subset] theorem Ico_mul_Icc_subset' (a b c d : Ξ±) : Ico a b * Icc c d βŠ† Ico (a * c) (b * d) := by haveI := covariantClass_le_of_lt rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩ exact ⟨mul_le_mul' hya hzc, mul_lt_mul_of_lt_of_le hyb hzd⟩ @[to_additive Ioc_add_Ico_subset] theorem Ioc_mul_Ico_subset' (a b c d : Ξ±) : Ioc a b * Ico c d βŠ† Ioo (a * c) (b * d) := by haveI := covariantClass_le_of_lt rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩ exact ⟨mul_lt_mul_of_lt_of_le hya hzc, mul_lt_mul_of_le_of_lt hyb hzd⟩ @[to_additive Ico_add_Ioc_subset] theorem Ico_mul_Ioc_subset' (a b c d : Ξ±) : Ico a b * Ioc c d βŠ† Ioo (a * c) (b * d) := by haveI := covariantClass_le_of_lt rintro x ⟨y, ⟨hya, hyb⟩, z, ⟨hzc, hzd⟩, rfl⟩ exact ⟨mul_lt_mul_of_le_of_lt hya hzc, mul_lt_mul_of_lt_of_le hyb hzd⟩ @[to_additive Iic_add_Iio_subset] theorem Iic_mul_Iio_subset' (a b : Ξ±) : Iic a * Iio b βŠ† Iio (a * b) := by haveI := covariantClass_le_of_lt rintro x ⟨y, hya, z, hzb, rfl⟩ exact mul_lt_mul_of_le_of_lt hya hzb @[to_additive Iio_add_Iic_subset]
Mathlib/Data/Set/Pointwise/Interval.lean
98
101
theorem Iio_mul_Iic_subset' (a b : Ξ±) : Iio a * Iic b βŠ† Iio (a * b) := by
haveI := covariantClass_le_of_lt rintro x ⟨y, hya, z, hzb, rfl⟩ exact mul_lt_mul_of_lt_of_le hya hzb
[ " Icc a b * Ico c d βŠ† Ico (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)", " Ico a b * Icc c d βŠ† Ico (a * c) (b * d)", " Ioc a b * Ico c d βŠ† Ioo (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)", " Ico a b * Ioc c d βŠ† Ioo (a * c) (b * d)", " Iic a * Iio b βŠ† Iio ...
[ " Icc a b * Ico c d βŠ† Ico (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Ico (a * c) (b * d)", " Ico a b * Icc c d βŠ† Ico (a * c) (b * d)", " Ioc a b * Ico c d βŠ† Ioo (a * c) (b * d)", " (fun x x_1 => x * x_1) y z ∈ Ioo (a * c) (b * d)", " Ico a b * Ioc c d βŠ† Ioo (a * c) (b * d)", " Iic a * Iio b βŠ† Iio ...
import 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 linter.uppercaseLean3 false structure DFA (Ξ± : Type u) (Οƒ : Type v) where step : Οƒ β†’ Ξ± β†’ Οƒ start : Οƒ accept : Set Οƒ #align DFA DFA namespace DFA variable {Ξ± : Type u} {Οƒ : Type v} (M : DFA Ξ± Οƒ) instance [Inhabited Οƒ] : Inhabited (DFA Ξ± Οƒ) := ⟨DFA.mk (fun _ _ => default) default βˆ…βŸ© def evalFrom (start : Οƒ) : List Ξ± β†’ Οƒ := List.foldl M.step start #align DFA.eval_from DFA.evalFrom @[simp] theorem evalFrom_nil (s : Οƒ) : M.evalFrom s [] = s := rfl #align DFA.eval_from_nil DFA.evalFrom_nil @[simp] theorem evalFrom_singleton (s : Οƒ) (a : Ξ±) : M.evalFrom s [a] = M.step s a := rfl #align DFA.eval_from_singleton DFA.evalFrom_singleton @[simp] theorem evalFrom_append_singleton (s : Οƒ) (x : List Ξ±) (a : Ξ±) : M.evalFrom s (x ++ [a]) = M.step (M.evalFrom s x) a := by simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil] #align DFA.eval_from_append_singleton DFA.evalFrom_append_singleton def eval : List Ξ± β†’ Οƒ := M.evalFrom M.start #align DFA.eval DFA.eval @[simp] theorem eval_nil : M.eval [] = M.start := rfl #align DFA.eval_nil DFA.eval_nil @[simp] theorem eval_singleton (a : Ξ±) : M.eval [a] = M.step M.start a := rfl #align DFA.eval_singleton DFA.eval_singleton @[simp] theorem eval_append_singleton (x : List Ξ±) (a : Ξ±) : M.eval (x ++ [a]) = M.step (M.eval x) a := evalFrom_append_singleton _ _ _ _ #align DFA.eval_append_singleton DFA.eval_append_singleton theorem evalFrom_of_append (start : Οƒ) (x y : List Ξ±) : M.evalFrom start (x ++ y) = M.evalFrom (M.evalFrom start x) y := x.foldl_append _ _ y #align DFA.eval_from_of_append DFA.evalFrom_of_append def accepts : Language Ξ± := {x | M.eval x ∈ M.accept} #align DFA.accepts DFA.accepts theorem mem_accepts (x : List Ξ±) : x ∈ M.accepts ↔ M.evalFrom M.start x ∈ M.accept := by rfl #align DFA.mem_accepts DFA.mem_accepts
Mathlib/Computability/DFA.lean
101
134
theorem evalFrom_split [Fintype Οƒ] {x : List Ξ±} {s t : Οƒ} (hlen : Fintype.card Οƒ ≀ x.length) (hx : M.evalFrom s x = t) : βˆƒ q a b c, x = a ++ b ++ c ∧ a.length + b.length ≀ Fintype.card Οƒ ∧ b β‰  [] ∧ M.evalFrom s a = q ∧ M.evalFrom q b = q ∧ M.evalFrom q c = t := by
obtain ⟨n, m, hneq, heq⟩ := Fintype.exists_ne_map_eq_of_card_lt (fun n : Fin (Fintype.card Οƒ + 1) => M.evalFrom s (x.take n)) (by norm_num) wlog hle : (n : β„•) ≀ m Β· exact this _ hlen hx _ _ hneq.symm heq.symm (le_of_not_le hle) have hm : (m : β„•) ≀ Fintype.card Οƒ := Fin.is_le m refine ⟨M.evalFrom s ((x.take m).take n), (x.take m).take n, (x.take m).drop n, x.drop m, ?_, ?_, ?_, by rfl, ?_⟩ Β· rw [List.take_append_drop, List.take_append_drop] Β· simp only [List.length_drop, List.length_take] rw [min_eq_left (hm.trans hlen), min_eq_left hle, add_tsub_cancel_of_le hle] exact hm Β· intro h have hlen' := congr_arg List.length h simp only [List.length_drop, List.length, List.length_take] at hlen' rw [min_eq_left, tsub_eq_zero_iff_le] at hlen' Β· apply hneq apply le_antisymm assumption' exact hm.trans hlen have hq : M.evalFrom (M.evalFrom s ((x.take m).take n)) ((x.take m).drop n) = M.evalFrom s ((x.take m).take n) := by rw [List.take_take, min_eq_left hle, ← evalFrom_of_append, heq, ← min_eq_left hle, ← List.take_take, min_eq_left hle, List.take_append_drop] use hq rwa [← hq, ← evalFrom_of_append, ← evalFrom_of_append, ← List.append_assoc, List.take_append_drop, List.take_append_drop]
[ " 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" ]
import Mathlib.CategoryTheory.Sites.Sheaf #align_import category_theory.sites.canonical from "leanprover-community/mathlib"@"9e7c80f638149bfb3504ba8ff48dfdbfc949fb1a" universe v u namespace CategoryTheory open scoped Classical open CategoryTheory Category Limits Sieve variable {C : Type u} [Category.{v} C] namespace Sheaf variable {P : Cα΅’α΅– β₯€ Type v} variable {X Y : C} {S : Sieve X} {R : Presieve X} variable (J Jβ‚‚ : GrothendieckTopology C)
Mathlib/CategoryTheory/Sites/Canonical.lean
61
113
theorem isSheafFor_bind (P : Cα΅’α΅– β₯€ Type v) (U : Sieve X) (B : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄, U f β†’ Sieve Y) (hU : Presieve.IsSheafFor P (U : Presieve X)) (hB : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (hf : U f), Presieve.IsSheafFor P (B hf : Presieve Y)) (hB' : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (h : U f) ⦃Z⦄ (g : Z ⟢ Y), Presieve.IsSeparatedFor P (((B h).pullback g) : Presieve Z)) : Presieve.IsSheafFor P (Sieve.bind (U : Presieve X) B : Presieve X) := by
intro s hs let y : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (hf : U f), Presieve.FamilyOfElements P (B hf : Presieve Y) := fun Y f hf Z g hg => s _ (Presieve.bind_comp _ _ hg) have hy : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (hf : U f), (y hf).Compatible := by intro Y f H Y₁ Yβ‚‚ Z g₁ gβ‚‚ f₁ fβ‚‚ hf₁ hfβ‚‚ comm apply hs apply reassoc_of% comm let t : Presieve.FamilyOfElements P (U : Presieve X) := fun Y f hf => (hB hf).amalgamate (y hf) (hy hf) have ht : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (hf : U f), (y hf).IsAmalgamation (t f hf) := fun Y f hf => (hB hf).isAmalgamation _ have hT : t.Compatible := by rw [Presieve.compatible_iff_sieveCompatible] intro Z W f h hf apply (hB (U.downward_closed hf h)).isSeparatedFor.ext intro Y l hl apply (hB' hf (l ≫ h)).ext intro M m hm have : bind U B (m ≫ l ≫ h ≫ f) := by -- Porting note: had to make explicit the parameter `((m ≫ l ≫ h) ≫ f)` and -- using `by exact` have : bind U B ((m ≫ l ≫ h) ≫ f) := by exact Presieve.bind_comp f hf hm simpa using this trans s (m ≫ l ≫ h ≫ f) this Β· have := ht (U.downward_closed hf h) _ ((B _).downward_closed hl m) rw [op_comp, FunctorToTypes.map_comp_apply] at this rw [this] change s _ _ = s _ _ -- Porting note: the proof was `by simp` congr 1 simp only [assoc] Β· have h : s _ _ = _ := (ht hf _ hm).symm -- Porting note: this was done by `simp only [assoc] at` conv_lhs at h => congr; rw [assoc, assoc] rw [h] simp only [op_comp, assoc, FunctorToTypes.map_comp_apply] refine ⟨hU.amalgamate t hT, ?_, ?_⟩ Β· rintro Z _ ⟨Y, f, g, hg, hf, rfl⟩ rw [op_comp, FunctorToTypes.map_comp_apply, Presieve.IsSheafFor.valid_glue _ _ _ hg] apply ht hg _ hf Β· intro y hy apply hU.isSeparatedFor.ext intro Y f hf apply (hB hf).isSeparatedFor.ext intro Z g hg rw [← FunctorToTypes.map_comp_apply, ← op_comp, hy _ (Presieve.bind_comp _ _ hg), hU.valid_glue _ _ hf, ht hf _ hg]
[ " Presieve.IsSheafFor P (Sieve.bind U.arrows B).arrows", " βˆƒ! t, s.IsAmalgamation t", " βˆ€ ⦃Y : C⦄ ⦃f : Y ⟢ X⦄ (hf : U.arrows f), (y hf).Compatible", " P.map g₁.op (y H f₁ hf₁) = P.map gβ‚‚.op (y H fβ‚‚ hfβ‚‚)", " g₁ ≫ f₁ ≫ f = gβ‚‚ ≫ fβ‚‚ ≫ f", " t.Compatible", " t.SieveCompatible", " t (h ≫ f) β‹― = P.map h.op (...
[]
import Mathlib.Analysis.BoxIntegral.Partition.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Topology.UniformSpace.Compact import Mathlib.Init.Data.Bool.Lemmas #align_import analysis.box_integral.basic from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical Topology NNReal Filter Uniformity BoxIntegral open Set Finset Function Filter Metric BoxIntegral.IntegrationParams noncomputable section namespace BoxIntegral universe u v w variable {ΞΉ : Type u} {E : Type v} {F : Type w} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {I J : Box ΞΉ} {Ο€ : TaggedPrepartition I} open TaggedPrepartition local notation "ℝⁿ" => ΞΉ β†’ ℝ def integralSum (f : ℝⁿ β†’ E) (vol : ΞΉ →ᡇᡃ E β†’L[ℝ] F) (Ο€ : TaggedPrepartition I) : F := βˆ‘ J ∈ Ο€.boxes, vol J (f (Ο€.tag J)) #align box_integral.integral_sum BoxIntegral.integralSum
Mathlib/Analysis/BoxIntegral/Basic.lean
83
87
theorem integralSum_biUnionTagged (f : ℝⁿ β†’ E) (vol : ΞΉ →ᡇᡃ E β†’L[ℝ] F) (Ο€ : Prepartition I) (Ο€i : βˆ€ J, TaggedPrepartition J) : integralSum f vol (Ο€.biUnionTagged Ο€i) = βˆ‘ J ∈ Ο€.boxes, integralSum f vol (Ο€i J) := by
refine (Ο€.sum_biUnion_boxes _ _).trans <| sum_congr rfl fun J hJ => sum_congr rfl fun J' hJ' => ?_ rw [Ο€.tag_biUnionTagged hJ hJ']
[ " integralSum f vol (Ο€.biUnionTagged Ο€i) = βˆ‘ J ∈ Ο€.boxes, integralSum f vol (Ο€i J)", " (vol J') (f ((Ο€.biUnionTagged Ο€i).tag J')) = (vol J') (f ((Ο€i J).tag J'))" ]
[]
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Finsupp #align_import algebra.big_operators.associated from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} -- the same local notation used in `Algebra.Associated` local infixl:50 " ~α΅€ " => Associated theorem Prod.associated_iff {M N : Type*} [Monoid M] [Monoid N] {x z : M Γ— N} : x ~α΅€ z ↔ x.1 ~α΅€ z.1 ∧ x.2 ~α΅€ z.2 := ⟨fun ⟨u, hu⟩ => ⟨⟨(MulEquiv.prodUnits.toFun u).1, (Prod.eq_iff_fst_eq_snd_eq.1 hu).1⟩, ⟨(MulEquiv.prodUnits.toFun u).2, (Prod.eq_iff_fst_eq_snd_eq.1 hu).2⟩⟩, fun ⟨⟨u₁, hβ‚βŸ©, ⟨uβ‚‚, hβ‚‚βŸ©βŸ© => ⟨MulEquiv.prodUnits.invFun (u₁, uβ‚‚), Prod.eq_iff_fst_eq_snd_eq.2 ⟨h₁, hβ‚‚βŸ©βŸ©βŸ©
Mathlib/Algebra/BigOperators/Associated.lean
58
69
theorem Associated.prod {M : Type*} [CommMonoid M] {ΞΉ : Type*} (s : Finset ΞΉ) (f : ΞΉ β†’ M) (g : ΞΉ β†’ M) (h : βˆ€ i, i ∈ s β†’ (f i) ~α΅€ (g i)) : (∏ i ∈ s, f i) ~α΅€ (∏ i ∈ s, g i) := by
induction s using Finset.induction with | empty => simp only [Finset.prod_empty] rfl | @insert j s hjs IH => classical convert_to (∏ i ∈ insert j s, f i) ~α΅€ (∏ i ∈ insert j s, g i) rw [Finset.prod_insert hjs, Finset.prod_insert hjs] exact Associated.mul_mul (h j (Finset.mem_insert_self j s)) (IH (fun i hi ↦ h i (Finset.mem_insert_of_mem hi)))
[ " ∏ i ∈ s, f i ~α΅€ ∏ i ∈ s, g i", " ∏ i ∈ βˆ…, f i ~α΅€ ∏ i ∈ βˆ…, g i", " 1 ~α΅€ 1", " ∏ i ∈ insert j s, f i ~α΅€ ∏ i ∈ insert j s, g i", " f j * ∏ x ∈ s, f x ~α΅€ g j * ∏ x ∈ s, g x" ]
[]
import Mathlib.CategoryTheory.Abelian.Opposite import Mathlib.CategoryTheory.Abelian.Homology import Mathlib.Algebra.Homology.Additive import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex #align_import algebra.homology.opposite from "leanprover-community/mathlib"@"8c75ef3517d4106e89fe524e6281d0b0545f47fc" noncomputable section open Opposite CategoryTheory CategoryTheory.Limits section variable {V : Type*} [Category V] [Abelian V]
Mathlib/Algebra/Homology/Opposite.lean
40
50
theorem imageToKernel_op {X Y Z : V} (f : X ⟢ Y) (g : Y ⟢ Z) (w : f ≫ g = 0) : imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) = (imageSubobjectIso _ β‰ͺ≫ (imageOpOp _).symm).hom ≫ (cokernel.desc f (factorThruImage g) (by rw [← cancel_mono (image.ΞΉ g), Category.assoc, image.fac, w, zero_comp])).op ≫ (kernelSubobjectIso _ β‰ͺ≫ kernelOpOp _).inv := by
ext simp only [Iso.trans_hom, Iso.symm_hom, Iso.trans_inv, kernelOpOp_inv, Category.assoc, imageToKernel_arrow, kernelSubobject_arrow', kernel.lift_ΞΉ, ← op_comp, cokernel.Ο€_desc, ← imageSubobject_arrow, ← imageUnopOp_inv_comp_op_factorThruImage g.op] rfl
[ " g.op ≫ f.op = 0", " f ≫ factorThruImage g = 0", " imageToKernel g.op f.op β‹― =\n (imageSubobjectIso g.op β‰ͺ≫ (imageOpOp g).symm).hom ≫\n (cokernel.desc f (factorThruImage g) β‹―).op ≫ (kernelSubobjectIso f.op β‰ͺ≫ kernelOpOp f).inv", " imageToKernel g.op f.op β‹― ≫ (kernelSubobject f.op).arrow =\n ((imag...
[]
import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Analysis.Fourier.PoissonSummation open Real Set MeasureTheory Filter Asymptotics intervalIntegral open scoped Real Topology FourierTransform RealInnerProductSpace open Complex hiding exp continuous_exp abs_of_nonneg sq_abs noncomputable section section GaussianPoisson variable {E : Type*} [NormedAddCommGroup E] lemma rexp_neg_quadratic_isLittleO_rpow_atTop {a : ℝ} (ha : a < 0) (b s : ℝ) : (fun x ↦ rexp (a * x ^ 2 + b * x)) =o[atTop] (Β· ^ s) := by suffices (fun x ↦ rexp (a * x ^ 2 + b * x)) =o[atTop] (fun x ↦ rexp (-x)) by refine this.trans ?_ simpa only [neg_one_mul] using isLittleO_exp_neg_mul_rpow_atTop zero_lt_one s rw [isLittleO_exp_comp_exp_comp] have : (fun x ↦ -x - (a * x ^ 2 + b * x)) = fun x ↦ x * (-a * x - (b + 1)) := by ext1 x; ring_nf rw [this] exact tendsto_id.atTop_mul_atTop <| Filter.tendsto_atTop_add_const_right _ _ <| tendsto_id.const_mul_atTop (neg_pos.mpr ha) lemma cexp_neg_quadratic_isLittleO_rpow_atTop {a : β„‚} (ha : a.re < 0) (b : β„‚) (s : ℝ) : (fun x : ℝ ↦ cexp (a * x ^ 2 + b * x)) =o[atTop] (Β· ^ s) := by apply Asymptotics.IsLittleO.of_norm_left convert rexp_neg_quadratic_isLittleO_rpow_atTop ha b.re s with x simp_rw [Complex.norm_eq_abs, Complex.abs_exp, add_re, ← ofReal_pow, mul_comm (_ : β„‚) ↑(_ : ℝ), re_ofReal_mul, mul_comm _ (re _)] lemma cexp_neg_quadratic_isLittleO_abs_rpow_cocompact {a : β„‚} (ha : a.re < 0) (b : β„‚) (s : ℝ) : (fun x : ℝ ↦ cexp (a * x ^ 2 + b * x)) =o[cocompact ℝ] (|Β·| ^ s) := by rw [cocompact_eq_atBot_atTop, isLittleO_sup] constructor Β· refine ((cexp_neg_quadratic_isLittleO_rpow_atTop ha (-b) s).comp_tendsto Filter.tendsto_neg_atBot_atTop).congr' (eventually_of_forall fun x ↦ ?_) ?_ Β· simp only [neg_mul, Function.comp_apply, ofReal_neg, neg_sq, mul_neg, neg_neg] Β· refine (eventually_lt_atBot 0).mp (eventually_of_forall fun x hx ↦ ?_) simp only [Function.comp_apply, abs_of_neg hx] Β· refine (cexp_neg_quadratic_isLittleO_rpow_atTop ha b s).congr' EventuallyEq.rfl ?_ refine (eventually_gt_atTop 0).mp (eventually_of_forall fun x hx ↦ ?_) simp_rw [abs_of_pos hx]
Mathlib/Analysis/SpecialFunctions/Gaussian/PoissonSummation.lean
68
76
theorem tendsto_rpow_abs_mul_exp_neg_mul_sq_cocompact {a : ℝ} (ha : 0 < a) (s : ℝ) : Tendsto (fun x : ℝ => |x| ^ s * rexp (-a * x ^ 2)) (cocompact ℝ) (𝓝 0) := by
conv in rexp _ => rw [← sq_abs] erw [cocompact_eq_atBot_atTop, ← comap_abs_atTop, @tendsto_comap'_iff _ _ _ (fun y => y ^ s * rexp (-a * y ^ 2)) _ _ _ (mem_atTop_sets.mpr ⟨0, fun b hb => ⟨b, abs_of_nonneg hb⟩⟩)] exact (rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg ha s).tendsto_zero_of_tendsto (tendsto_exp_atBot.comp <| tendsto_id.const_mul_atTop_of_neg (neg_lt_zero.mpr one_half_pos))
[ " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (-x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - (a * x ^ 2 + b * x)) atTop atTop", " (fun x => -x - (a * x ^ 2 + b * x)) = fun x => x * (-a * x - (...
[ " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (-x)) =o[atTop] fun x => x ^ s", " (fun x => rexp (a * x ^ 2 + b * x)) =o[atTop] fun x => rexp (-x)", " Tendsto (fun x => -x - (a * x ^ 2 + b * x)) atTop atTop", " (fun x => -x - (a * x ^ 2 + b * x)) = fun x => x * (-a * x - (...
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by simp only [AntilipschitzWith, edist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist alias ⟨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndist⟩ := antilipschitzWith_iff_le_mul_nndist #align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist #align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist theorem antilipschitzWith_iff_le_mul_dist : AntilipschitzWith K f ↔ βˆ€ x y, dist x y ≀ K * dist (f x) (f y) := by simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist alias ⟨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_dist⟩ := antilipschitzWith_iff_le_mul_dist #align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist #align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist namespace AntilipschitzWith variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} open EMetric -- uses neither `f` nor `hf` @[nolint unusedArguments] protected def k (_hf : AntilipschitzWith K f) : ℝβ‰₯0 := K set_option linter.uppercaseLean3 false in #align antilipschitz_with.K AntilipschitzWith.k protected theorem injective {Ξ± : Type*} {Ξ² : Type*} [EMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (hf : AntilipschitzWith K f) : Function.Injective f := fun x y h => by simpa only [h, edist_self, mul_zero, edist_le_zero] using hf x y #align antilipschitz_with.injective AntilipschitzWith.injective theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : Ξ±) : (K : ℝβ‰₯0∞)⁻¹ * edist x y ≀ edist (f x) (f y) := by rw [mul_comm, ← div_eq_mul_inv] exact ENNReal.div_le_of_le_mul' (hf x y) #align antilipschitz_with.mul_le_edist AntilipschitzWith.mul_le_edist theorem ediam_preimage_le (hf : AntilipschitzWith K f) (s : Set Ξ²) : diam (f ⁻¹' s) ≀ K * diam s := diam_le fun x hx y hy => (hf x y).trans <| mul_le_mul_left' (edist_le_diam_of_mem (mem_preimage.1 hx) hy) K #align antilipschitz_with.ediam_preimage_le AntilipschitzWith.ediam_preimage_le theorem le_mul_ediam_image (hf : AntilipschitzWith K f) (s : Set Ξ±) : diam s ≀ K * diam (f '' s) := (diam_mono (subset_preimage_image _ _)).trans (hf.ediam_preimage_le (f '' s)) #align antilipschitz_with.le_mul_ediam_image AntilipschitzWith.le_mul_ediam_image protected theorem id : AntilipschitzWith 1 (id : Ξ± β†’ Ξ±) := fun x y => by simp only [ENNReal.coe_one, one_mul, id, le_refl] #align antilipschitz_with.id AntilipschitzWith.id
Mathlib/Topology/MetricSpace/Antilipschitz.lean
129
134
theorem comp {Kg : ℝβ‰₯0} {g : Ξ² β†’ Ξ³} (hg : AntilipschitzWith Kg g) {Kf : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (hf : AntilipschitzWith Kf f) : AntilipschitzWith (Kf * Kg) (g ∘ f) := fun x y => calc edist x y ≀ Kf * edist (f x) (f y) := hf x y _ ≀ Kf * (Kg * edist (g (f x)) (g (f y))) := ENNReal.mul_left_mono (hg _ _) _ = _ := by
rw [ENNReal.coe_mul, mul_assoc]; rfl
[ " AntilipschitzWith K f ↔ βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) (f y)", " (βˆ€ (x y : Ξ±), ↑(nndist x y) ≀ ↑K * ↑(nndist (f x) (f y))) ↔ βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) (f y)", " AntilipschitzWith K f ↔ βˆ€ (x y : Ξ±), dist x y ≀ ↑K * dist (f x) (f y)", " (βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) ...
[ " AntilipschitzWith K f ↔ βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) (f y)", " (βˆ€ (x y : Ξ±), ↑(nndist x y) ≀ ↑K * ↑(nndist (f x) (f y))) ↔ βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) (f y)", " AntilipschitzWith K f ↔ βˆ€ (x y : Ξ±), dist x y ≀ ↑K * dist (f x) (f y)", " (βˆ€ (x y : Ξ±), nndist x y ≀ K * nndist (f x) ...
import Mathlib.Topology.Separation #align_import topology.sober from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" open Set variable {Ξ± Ξ² : Type*} [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section genericPoint def IsGenericPoint (x : Ξ±) (S : Set Ξ±) : Prop := closure ({x} : Set Ξ±) = S #align is_generic_point IsGenericPoint theorem isGenericPoint_def {x : Ξ±} {S : Set Ξ±} : IsGenericPoint x S ↔ closure ({x} : Set Ξ±) = S := Iff.rfl #align is_generic_point_def isGenericPoint_def theorem IsGenericPoint.def {x : Ξ±} {S : Set Ξ±} (h : IsGenericPoint x S) : closure ({x} : Set Ξ±) = S := h #align is_generic_point.def IsGenericPoint.def theorem isGenericPoint_closure {x : Ξ±} : IsGenericPoint x (closure ({x} : Set Ξ±)) := refl _ #align is_generic_point_closure isGenericPoint_closure variable {x y : Ξ±} {S U Z : Set Ξ±} theorem isGenericPoint_iff_specializes : IsGenericPoint x S ↔ βˆ€ y, x β€³ y ↔ y ∈ S := by simp only [specializes_iff_mem_closure, IsGenericPoint, Set.ext_iff] #align is_generic_point_iff_specializes isGenericPoint_iff_specializes section Sober @[mk_iff] class QuasiSober (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where sober : βˆ€ {S : Set Ξ±}, IsIrreducible S β†’ IsClosed S β†’ βˆƒ x, IsGenericPoint x S #align quasi_sober QuasiSober noncomputable def IsIrreducible.genericPoint [QuasiSober Ξ±] {S : Set Ξ±} (hS : IsIrreducible S) : Ξ± := (QuasiSober.sober hS.closure isClosed_closure).choose #align is_irreducible.generic_point IsIrreducible.genericPoint theorem IsIrreducible.genericPoint_spec [QuasiSober Ξ±] {S : Set Ξ±} (hS : IsIrreducible S) : IsGenericPoint hS.genericPoint (closure S) := (QuasiSober.sober hS.closure isClosed_closure).choose_spec #align is_irreducible.generic_point_spec IsIrreducible.genericPoint_spec @[simp] theorem IsIrreducible.genericPoint_closure_eq [QuasiSober Ξ±] {S : Set Ξ±} (hS : IsIrreducible S) : closure ({hS.genericPoint} : Set Ξ±) = closure S := hS.genericPoint_spec #align is_irreducible.generic_point_closure_eq IsIrreducible.genericPoint_closure_eq variable (Ξ±) noncomputable def genericPoint [QuasiSober Ξ±] [IrreducibleSpace Ξ±] : Ξ± := (IrreducibleSpace.isIrreducible_univ Ξ±).genericPoint #align generic_point genericPoint
Mathlib/Topology/Sober.lean
148
150
theorem genericPoint_spec [QuasiSober α] [IrreducibleSpace α] : IsGenericPoint (genericPoint α) ⊀ := by
simpa using (IrreducibleSpace.isIrreducible_univ Ξ±).genericPoint_spec
[ " IsGenericPoint x S ↔ βˆ€ (y : Ξ±), x β€³ y ↔ y ∈ S", " IsGenericPoint (genericPoint Ξ±) ⊀" ]
[ " IsGenericPoint x S ↔ βˆ€ (y : Ξ±), x β€³ y ↔ y ∈ S" ]
import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.FieldTheory.Minpoly.Basic import Mathlib.RingTheory.Algebraic #align_import field_theory.minpoly.field from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" open scoped Classical open Polynomial Set Function minpoly namespace minpoly variable {A B : Type*} variable (A) [Field A] section Ring variable [Ring B] [Algebra A B] (x : B) theorem degree_le_of_ne_zero {p : A[X]} (pnz : p β‰  0) (hp : Polynomial.aeval x p = 0) : degree (minpoly A x) ≀ degree p := calc degree (minpoly A x) ≀ degree (p * C (leadingCoeff p)⁻¹) := min A x (monic_mul_leadingCoeff_inv pnz) (by simp [hp]) _ = degree p := degree_mul_leadingCoeff_inv p pnz #align minpoly.degree_le_of_ne_zero minpoly.degree_le_of_ne_zero theorem ne_zero_of_finite (e : B) [FiniteDimensional A B] : minpoly A e β‰  0 := minpoly.ne_zero <| .of_finite A _ #align minpoly.ne_zero_of_finite_field_extension minpoly.ne_zero_of_finite theorem unique {p : A[X]} (pmonic : p.Monic) (hp : Polynomial.aeval x p = 0) (pmin : βˆ€ q : A[X], q.Monic β†’ Polynomial.aeval x q = 0 β†’ degree p ≀ degree q) : p = minpoly A x := by have hx : IsIntegral A x := ⟨p, pmonic, hp⟩ symm; apply eq_of_sub_eq_zero by_contra hnz apply degree_le_of_ne_zero A x hnz (by simp [hp]) |>.not_lt apply degree_sub_lt _ (minpoly.ne_zero hx) Β· rw [(monic hx).leadingCoeff, pmonic.leadingCoeff] Β· exact le_antisymm (min A x pmonic hp) (pmin (minpoly A x) (monic hx) (aeval A x)) #align minpoly.unique minpoly.unique theorem dvd {p : A[X]} (hp : Polynomial.aeval x p = 0) : minpoly A x ∣ p := by by_cases hp0 : p = 0 Β· simp only [hp0, dvd_zero] have hx : IsIntegral A x := IsAlgebraic.isIntegral ⟨p, hp0, hp⟩ rw [← modByMonic_eq_zero_iff_dvd (monic hx)] by_contra hnz apply degree_le_of_ne_zero A x hnz ((aeval_modByMonic_eq_self_of_root (monic hx) (aeval _ _)).trans hp) |>.not_lt exact degree_modByMonic_lt _ (monic hx) #align minpoly.dvd minpoly.dvd variable {A x} in lemma dvd_iff {p : A[X]} : minpoly A x ∣ p ↔ Polynomial.aeval x p = 0 := ⟨fun ⟨q, hq⟩ ↦ by rw [hq, map_mul, aeval, zero_mul], minpoly.dvd A x⟩ theorem isRadical [IsReduced B] : IsRadical (minpoly A x) := fun n p dvd ↦ by rw [dvd_iff] at dvd ⊒; rw [map_pow] at dvd; exact IsReduced.eq_zero _ ⟨n, dvd⟩ theorem dvd_map_of_isScalarTower (A K : Type*) {R : Type*} [CommRing A] [Field K] [CommRing R] [Algebra A K] [Algebra A R] [Algebra K R] [IsScalarTower A K R] (x : R) : minpoly K x ∣ (minpoly A x).map (algebraMap A K) := by refine minpoly.dvd K x ?_ rw [aeval_map_algebraMap, minpoly.aeval] #align minpoly.dvd_map_of_is_scalar_tower minpoly.dvd_map_of_isScalarTower
Mathlib/FieldTheory/Minpoly/Field.lean
93
99
theorem dvd_map_of_isScalarTower' (R : Type*) {S : Type*} (K L : Type*) [CommRing R] [CommRing S] [Field K] [CommRing L] [Algebra R S] [Algebra R K] [Algebra S L] [Algebra K L] [Algebra R L] [IsScalarTower R K L] [IsScalarTower R S L] (s : S) : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (minpoly R s) := by
apply minpoly.dvd K (algebraMap S L s) rw [← map_aeval_eq_aeval_map, minpoly.aeval, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq]
[ " (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0", " p = minpoly A x", " minpoly A x = p", " minpoly A x - p = 0", " False", " (Polynomial.aeval x) (minpoly A x - p) = 0", " (minpoly A x - p).degree < (minpoly A x).degree", " (minpoly A x).leadingCoeff = p.leadingCoeff", " (minpoly A x).degree = ...
[ " (Polynomial.aeval x) (p * C p.leadingCoeff⁻¹) = 0", " p = minpoly A x", " minpoly A x = p", " minpoly A x - p = 0", " False", " (Polynomial.aeval x) (minpoly A x - p) = 0", " (minpoly A x - p).degree < (minpoly A x).degree", " (minpoly A x).leadingCoeff = p.leadingCoeff", " (minpoly A x).degree = ...
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, then a lower bound for its period can be computed."] theorem le_period {m : M} {a : Ξ±} {n : β„•} (period_pos : 0 < period m a) (moved : βˆ€ k, 0 < k β†’ k < n β†’ m ^ k β€’ a β‰  a) : n ≀ period m a := le_of_not_gt fun period_lt_n => moved _ period_pos period_lt_n <| pow_period_smul m a @[to_additive "If for some `n`, `(n β€’ m) +α΅₯ a = a`, then `period m a ≀ n`."] theorem period_le_of_fixed {m : M} {a : Ξ±} {n : β„•} (n_pos : 0 < n) (fixed : m ^ n β€’ a = a) : period m a ≀ n := (isPeriodicPt_smul_iff.mpr fixed).minimalPeriod_le n_pos @[to_additive "If for some `n`, `(n β€’ m) +α΅₯ a = a`, then `0 < period m a`."] theorem period_pos_of_fixed {m : M} {a : Ξ±} {n : β„•} (n_pos : 0 < n) (fixed : m ^ n β€’ a = a) : 0 < period m a := (isPeriodicPt_smul_iff.mpr fixed).minimalPeriod_pos n_pos @[to_additive] theorem period_eq_one_iff {m : M} {a : Ξ±} : period m a = 1 ↔ m β€’ a = a := ⟨fun eq_one => pow_one m β–Έ eq_one β–Έ pow_period_smul m a, fun fixed => le_antisymm (period_le_of_fixed one_pos (by simpa)) (period_pos_of_fixed one_pos (by simpa))⟩ @[to_additive "For any non-zero `n` less than the period of `m` on `a`, `a` is moved by `n β€’ m`."] theorem pow_smul_ne_of_lt_period {m : M} {a : Ξ±} {n : β„•} (n_pos : 0 < n) (n_lt_period : n < period m a) : m ^ n β€’ a β‰  a := fun a_fixed => not_le_of_gt n_lt_period <| period_le_of_fixed n_pos a_fixed section Identities variable (M) in @[to_additive (attr := simp)] theorem period_one (a : Ξ±) : period (1 : M) a = 1 := period_eq_one_iff.mpr (one_smul M a) @[to_additive (attr := simp)]
Mathlib/GroupTheory/GroupAction/Period.lean
71
75
theorem period_inv (g : G) (a : α) : period g⁻¹ a = period g a := by
simp only [period_eq_minimalPeriod, Function.minimalPeriod_eq_minimalPeriod_iff, isPeriodicPt_smul_iff] intro n rw [smul_eq_iff_eq_inv_smul, eq_comm, ← zpow_natCast, inv_zpow, inv_inv, zpow_natCast]
[ " m ^ 1 β€’ a = a", " period g⁻¹ a = period g a", " βˆ€ (n : β„•), g⁻¹ ^ n β€’ a = a ↔ g ^ n β€’ a = a", " g⁻¹ ^ n β€’ a = a ↔ g ^ n β€’ a = a" ]
[ " m ^ 1 β€’ a = a" ]
import Mathlib.Data.Setoid.Partition import Mathlib.GroupTheory.GroupAction.Basic import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.GroupTheory.GroupAction.SubMulAction open scoped BigOperators Pointwise namespace MulAction section orbits variable {G : Type*} [Group G] {X : Type*} [MulAction G X] theorem orbit.eq_or_disjoint (a b : X) : orbit G a = orbit G b ∨ Disjoint (orbit G a) (orbit G b) := by apply (em (Disjoint (orbit G a) (orbit G b))).symm.imp _ id simp (config := { contextual := true }) only [Set.not_disjoint_iff, ← orbit_eq_iff, forall_exists_index, and_imp, eq_comm, implies_true]
Mathlib/GroupTheory/GroupAction/Blocks.lean
44
48
theorem orbit.pairwiseDisjoint : (Set.range fun x : X => orbit G x).PairwiseDisjoint id := by
rintro s ⟨x, rfl⟩ t ⟨y, rfl⟩ h contrapose! h exact (orbit.eq_or_disjoint x y).resolve_right h
[ " orbit G a = orbit G b ∨ Disjoint (orbit G a) (orbit G b)", " Β¬Disjoint (orbit G a) (orbit G b) β†’ orbit G a = orbit G b", " (Set.range fun x => orbit G x).PairwiseDisjoint id", " (Disjoint on id) ((fun x => orbit G x) x) ((fun x => orbit G x) y)", " orbit G x = orbit G y" ]
[ " orbit G a = orbit G b ∨ Disjoint (orbit G a) (orbit G b)", " Β¬Disjoint (orbit G a) (orbit G b) β†’ orbit G a = orbit G b" ]
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathlib.LinearAlgebra.Matrix.PosDef #align_import linear_algebra.matrix.schur_complement from "leanprover-community/mathlib"@"a176cb1219e300e85793d44583dede42377b51af" variable {l m n Ξ± : Type*} namespace Matrix open scoped Matrix section CommRing variable [Fintype l] [Fintype m] [Fintype n] variable [DecidableEq l] [DecidableEq m] [DecidableEq n] variable [CommRing Ξ±] theorem fromBlocks_eq_of_invertible₁₁ (A : Matrix m m Ξ±) (B : Matrix m n Ξ±) (C : Matrix l m Ξ±) (D : Matrix l n Ξ±) [Invertible A] : fromBlocks A B C D = fromBlocks 1 0 (C * β…Ÿ A) 1 * fromBlocks A 0 0 (D - C * β…Ÿ A * B) * fromBlocks 1 (β…Ÿ A * B) 0 1 := by simp only [fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, add_zero, zero_add, Matrix.one_mul, Matrix.mul_one, invOf_mul_self, Matrix.mul_invOf_self_assoc, Matrix.mul_invOf_mul_self_cancel, Matrix.mul_assoc, add_sub_cancel] #align matrix.from_blocks_eq_of_invertible₁₁ Matrix.fromBlocks_eq_of_invertible₁₁ theorem fromBlocks_eq_of_invertibleβ‚‚β‚‚ (A : Matrix l m Ξ±) (B : Matrix l n Ξ±) (C : Matrix n m Ξ±) (D : Matrix n n Ξ±) [Invertible D] : fromBlocks A B C D = fromBlocks 1 (B * β…Ÿ D) 0 1 * fromBlocks (A - B * β…Ÿ D * C) 0 0 D * fromBlocks 1 0 (β…Ÿ D * C) 1 := (Matrix.reindex (Equiv.sumComm _ _) (Equiv.sumComm _ _)).injective <| by simpa [reindex_apply, Equiv.sumComm_symm, ← submatrix_mul_equiv _ _ _ (Equiv.sumComm n m), ← submatrix_mul_equiv _ _ _ (Equiv.sumComm n l), Equiv.sumComm_apply, fromBlocks_submatrix_sum_swap_sum_swap] using fromBlocks_eq_of_invertible₁₁ D C B A #align matrix.from_blocks_eq_of_invertibleβ‚‚β‚‚ Matrix.fromBlocks_eq_of_invertibleβ‚‚β‚‚ section Det theorem det_fromBlocks₁₁ (A : Matrix m m Ξ±) (B : Matrix m n Ξ±) (C : Matrix n m Ξ±) (D : Matrix n n Ξ±) [Invertible A] : (Matrix.fromBlocks A B C D).det = det A * det (D - C * β…Ÿ A * B) := by rw [fromBlocks_eq_of_invertible₁₁ (A := A), det_mul, det_mul, det_fromBlocks_zero₂₁, det_fromBlocks_zero₂₁, det_fromBlocks_zero₁₂, det_one, det_one, one_mul, one_mul, mul_one] #align matrix.det_from_blocks₁₁ Matrix.det_fromBlocks₁₁ @[simp] theorem det_fromBlocks_one₁₁ (B : Matrix m n Ξ±) (C : Matrix n m Ξ±) (D : Matrix n n Ξ±) : (Matrix.fromBlocks 1 B C D).det = det (D - C * B) := by haveI : Invertible (1 : Matrix m m Ξ±) := invertibleOne rw [det_fromBlocks₁₁, invOf_one, Matrix.mul_one, det_one, one_mul] #align matrix.det_from_blocks_one₁₁ Matrix.det_fromBlocks_one₁₁ theorem det_fromBlocksβ‚‚β‚‚ (A : Matrix m m Ξ±) (B : Matrix m n Ξ±) (C : Matrix n m Ξ±) (D : Matrix n n Ξ±) [Invertible D] : (Matrix.fromBlocks A B C D).det = det D * det (A - B * β…Ÿ D * C) := by have : fromBlocks A B C D = (fromBlocks D C B A).submatrix (Equiv.sumComm _ _) (Equiv.sumComm _ _) := by ext (i j) cases i <;> cases j <;> rfl rw [this, det_submatrix_equiv_self, det_fromBlocks₁₁] #align matrix.det_from_blocksβ‚‚β‚‚ Matrix.det_fromBlocksβ‚‚β‚‚ @[simp] theorem det_fromBlocks_oneβ‚‚β‚‚ (A : Matrix m m Ξ±) (B : Matrix m n Ξ±) (C : Matrix n m Ξ±) : (Matrix.fromBlocks A B C 1).det = det (A - B * C) := by haveI : Invertible (1 : Matrix n n Ξ±) := invertibleOne rw [det_fromBlocksβ‚‚β‚‚, invOf_one, Matrix.mul_one, det_one, one_mul] #align matrix.det_from_blocks_oneβ‚‚β‚‚ Matrix.det_fromBlocks_oneβ‚‚β‚‚ theorem det_one_add_mul_comm (A : Matrix m n Ξ±) (B : Matrix n m Ξ±) : det (1 + A * B) = det (1 + B * A) := calc det (1 + A * B) = det (fromBlocks 1 (-A) B 1) := by rw [det_fromBlocks_oneβ‚‚β‚‚, Matrix.neg_mul, sub_neg_eq_add] _ = det (1 + B * A) := by rw [det_fromBlocks_one₁₁, Matrix.mul_neg, sub_neg_eq_add] #align matrix.det_one_add_mul_comm Matrix.det_one_add_mul_comm theorem det_mul_add_one_comm (A : Matrix m n Ξ±) (B : Matrix n m Ξ±) : det (A * B + 1) = det (B * A + 1) := by rw [add_comm, det_one_add_mul_comm, add_comm] #align matrix.det_mul_add_one_comm Matrix.det_mul_add_one_comm theorem det_one_sub_mul_comm (A : Matrix m n Ξ±) (B : Matrix n m Ξ±) : det (1 - A * B) = det (1 - B * A) := by rw [sub_eq_add_neg, ← Matrix.neg_mul, det_one_add_mul_comm, Matrix.mul_neg, ← sub_eq_add_neg] #align matrix.det_one_sub_mul_comm Matrix.det_one_sub_mul_comm theorem det_one_add_col_mul_row (u v : m β†’ Ξ±) : det (1 + col u * row v) = 1 + v ⬝α΅₯ u := by rw [det_one_add_mul_comm, det_unique, Pi.add_apply, Pi.add_apply, Matrix.one_apply_eq, Matrix.row_mul_col_apply] #align matrix.det_one_add_col_mul_row Matrix.det_one_add_col_mul_row
Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
454
459
theorem det_add_col_mul_row {A : Matrix m m Ξ±} (hA : IsUnit A.det) (u v : m β†’ Ξ±) : (A + col u * row v).det = A.det * (1 + row v * A⁻¹ * col u).det := by
nth_rewrite 1 [← Matrix.mul_one A] rwa [← Matrix.mul_nonsing_inv_cancel_left A (col u * row v), ← Matrix.mul_add, det_mul, ← Matrix.mul_assoc, det_one_add_mul_comm, ← Matrix.mul_assoc]
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * β…ŸA) 1 * A.fromBlocks 0 0 (D - C * β…ŸA * B) * fromBlocks 1 (β…ŸA * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * β…ŸD) 0 1 * (A - B * β…ŸD * C).fromBlocks 0 0 D...
[ " A.fromBlocks B C D = fromBlocks 1 0 (C * β…ŸA) 1 * A.fromBlocks 0 0 (D - C * β…ŸA * B) * fromBlocks 1 (β…ŸA * B) 0 1", " (reindex (Equiv.sumComm l n) (Equiv.sumComm m n)) (A.fromBlocks B C D) =\n (reindex (Equiv.sumComm l n) (Equiv.sumComm m n))\n (fromBlocks 1 (B * β…ŸD) 0 1 * (A - B * β…ŸD * C).fromBlocks 0 0 D...
import Mathlib.MeasureTheory.Measure.Sub import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Function.AEEqOfIntegral #align_import measure_theory.decomposition.lebesgue from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a89a999c2f" open scoped MeasureTheory NNReal ENNReal open Set namespace MeasureTheory namespace Measure variable {Ξ± Ξ² : Type*} {m : MeasurableSpace Ξ±} {ΞΌ Ξ½ : Measure Ξ±} class HaveLebesgueDecomposition (ΞΌ Ξ½ : Measure Ξ±) : Prop where lebesgue_decomposition : βˆƒ p : Measure Ξ± Γ— (Ξ± β†’ ℝβ‰₯0∞), Measurable p.2 ∧ p.1 βŸ‚β‚˜ Ξ½ ∧ ΞΌ = p.1 + Ξ½.withDensity p.2 #align measure_theory.measure.have_lebesgue_decomposition MeasureTheory.Measure.HaveLebesgueDecomposition #align measure_theory.measure.have_lebesgue_decomposition.lebesgue_decomposition MeasureTheory.Measure.HaveLebesgueDecomposition.lebesgue_decomposition open Classical in noncomputable irreducible_def singularPart (ΞΌ Ξ½ : Measure Ξ±) : Measure Ξ± := if h : HaveLebesgueDecomposition ΞΌ Ξ½ then (Classical.choose h.lebesgue_decomposition).1 else 0 #align measure_theory.measure.singular_part MeasureTheory.Measure.singularPart open Classical in noncomputable irreducible_def rnDeriv (ΞΌ Ξ½ : Measure Ξ±) : Ξ± β†’ ℝβ‰₯0∞ := if h : HaveLebesgueDecomposition ΞΌ Ξ½ then (Classical.choose h.lebesgue_decomposition).2 else 0 #align measure_theory.measure.rn_deriv MeasureTheory.Measure.rnDeriv section ByDefinition
Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
86
90
theorem haveLebesgueDecomposition_spec (ΞΌ Ξ½ : Measure Ξ±) [h : HaveLebesgueDecomposition ΞΌ Ξ½] : Measurable (ΞΌ.rnDeriv Ξ½) ∧ ΞΌ.singularPart Ξ½ βŸ‚β‚˜ Ξ½ ∧ ΞΌ = ΞΌ.singularPart Ξ½ + Ξ½.withDensity (ΞΌ.rnDeriv Ξ½) := by
rw [singularPart, rnDeriv, dif_pos h, dif_pos h] exact Classical.choose_spec h.lebesgue_decomposition
[ " Measurable (ΞΌ.rnDeriv Ξ½) ∧ ΞΌ.singularPart Ξ½ βŸ‚β‚˜ Ξ½ ∧ ΞΌ = ΞΌ.singularPart Ξ½ + Ξ½.withDensity (ΞΌ.rnDeriv Ξ½)", " Measurable (Classical.choose β‹―).2 ∧\n (Classical.choose β‹―).1 βŸ‚β‚˜ Ξ½ ∧ ΞΌ = (Classical.choose β‹―).1 + Ξ½.withDensity (Classical.choose β‹―).2" ]
[]
import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Common #align_import order.heyting.boundary from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" variable {Ξ± : Type*} namespace Coheyting variable [CoheytingAlgebra Ξ±] {a b : Ξ±} def boundary (a : Ξ±) : Ξ± := a βŠ“ οΏ’a #align coheyting.boundary Coheyting.boundary scoped[Heyting] prefix:120 "βˆ‚ " => Coheyting.boundary -- Porting note: Should the notation be automatically included in the current scope? open Heyting -- Porting note: Should hnot be named hNot? theorem inf_hnot_self (a : Ξ±) : a βŠ“ οΏ’a = βˆ‚ a := rfl #align coheyting.inf_hnot_self Coheyting.inf_hnot_self theorem boundary_le : βˆ‚ a ≀ a := inf_le_left #align coheyting.boundary_le Coheyting.boundary_le theorem boundary_le_hnot : βˆ‚ a ≀ οΏ’a := inf_le_right #align coheyting.boundary_le_hnot Coheyting.boundary_le_hnot @[simp] theorem boundary_bot : βˆ‚ (βŠ₯ : Ξ±) = βŠ₯ := bot_inf_eq _ #align coheyting.boundary_bot Coheyting.boundary_bot @[simp] theorem boundary_top : βˆ‚ (⊀ : Ξ±) = βŠ₯ := by rw [boundary, hnot_top, inf_bot_eq] #align coheyting.boundary_top Coheyting.boundary_top theorem boundary_hnot_le (a : Ξ±) : βˆ‚ (οΏ’a) ≀ βˆ‚ a := (inf_comm _ _).trans_le <| inf_le_inf_right _ hnot_hnot_le #align coheyting.boundary_hnot_le Coheyting.boundary_hnot_le @[simp]
Mathlib/Order/Heyting/Boundary.lean
71
72
theorem boundary_hnot_hnot (a : Ξ±) : βˆ‚ (οΏ’οΏ’a) = βˆ‚ (οΏ’a) := by
simp_rw [boundary, hnot_hnot_hnot, inf_comm]
[ " βˆ‚ ⊀ = βŠ₯", " βˆ‚ (οΏ’οΏ’a) = βˆ‚ (οΏ’a)" ]
[ " βˆ‚ ⊀ = βŠ₯" ]
import Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Sets.Opens import Mathlib.Data.Set.Subsingleton #align_import algebraic_geometry.projective_spectrum.topology from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section open DirectSum Pointwise SetLike TopCat TopologicalSpace CategoryTheory Opposite variable {R A : Type*} variable [CommSemiring R] [CommRing A] [Algebra R A] variable (π’œ : β„• β†’ Submodule R A) [GradedAlgebra π’œ] -- porting note (#5171): removed @[nolint has_nonempty_instance] @[ext] structure ProjectiveSpectrum where asHomogeneousIdeal : HomogeneousIdeal π’œ isPrime : asHomogeneousIdeal.toIdeal.IsPrime not_irrelevant_le : Β¬HomogeneousIdeal.irrelevant π’œ ≀ asHomogeneousIdeal #align projective_spectrum ProjectiveSpectrum attribute [instance] ProjectiveSpectrum.isPrime namespace ProjectiveSpectrum def zeroLocus (s : Set A) : Set (ProjectiveSpectrum π’œ) := { x | s βŠ† x.asHomogeneousIdeal } #align projective_spectrum.zero_locus ProjectiveSpectrum.zeroLocus @[simp] theorem mem_zeroLocus (x : ProjectiveSpectrum π’œ) (s : Set A) : x ∈ zeroLocus π’œ s ↔ s βŠ† x.asHomogeneousIdeal := Iff.rfl #align projective_spectrum.mem_zero_locus ProjectiveSpectrum.mem_zeroLocus @[simp] theorem zeroLocus_span (s : Set A) : zeroLocus π’œ (Ideal.span s) = zeroLocus π’œ s := by ext x exact (Submodule.gi _ _).gc s x.asHomogeneousIdeal.toIdeal #align projective_spectrum.zero_locus_span ProjectiveSpectrum.zeroLocus_span variable {π’œ} def vanishingIdeal (t : Set (ProjectiveSpectrum π’œ)) : HomogeneousIdeal π’œ := β¨… (x : ProjectiveSpectrum π’œ) (_ : x ∈ t), x.asHomogeneousIdeal #align projective_spectrum.vanishing_ideal ProjectiveSpectrum.vanishingIdeal theorem coe_vanishingIdeal (t : Set (ProjectiveSpectrum π’œ)) : (vanishingIdeal t : Set A) = { f | βˆ€ x : ProjectiveSpectrum π’œ, x ∈ t β†’ f ∈ x.asHomogeneousIdeal } := by ext f rw [vanishingIdeal, SetLike.mem_coe, ← HomogeneousIdeal.mem_iff, HomogeneousIdeal.toIdeal_iInf, Submodule.mem_iInf] refine forall_congr' fun x => ?_ rw [HomogeneousIdeal.toIdeal_iInf, Submodule.mem_iInf, HomogeneousIdeal.mem_iff] #align projective_spectrum.coe_vanishing_ideal ProjectiveSpectrum.coe_vanishingIdeal
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
109
111
theorem mem_vanishingIdeal (t : Set (ProjectiveSpectrum π’œ)) (f : A) : f ∈ vanishingIdeal t ↔ βˆ€ x : ProjectiveSpectrum π’œ, x ∈ t β†’ f ∈ x.asHomogeneousIdeal := by
rw [← SetLike.mem_coe, coe_vanishingIdeal, Set.mem_setOf_eq]
[ " zeroLocus π’œ ↑(Ideal.span s) = zeroLocus π’œ s", " x ∈ zeroLocus π’œ ↑(Ideal.span s) ↔ x ∈ zeroLocus π’œ s", " ↑(vanishingIdeal t) = {f | βˆ€ x ∈ t, f ∈ x.asHomogeneousIdeal}", " f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | βˆ€ x ∈ t, f ∈ x.asHomogeneousIdeal}", " (βˆ€ (i : ProjectiveSpectrum π’œ), f ∈ (β¨… (_ : i ∈ t), i.asHo...
[ " zeroLocus π’œ ↑(Ideal.span s) = zeroLocus π’œ s", " x ∈ zeroLocus π’œ ↑(Ideal.span s) ↔ x ∈ zeroLocus π’œ s", " ↑(vanishingIdeal t) = {f | βˆ€ x ∈ t, f ∈ x.asHomogeneousIdeal}", " f ∈ ↑(vanishingIdeal t) ↔ f ∈ {f | βˆ€ x ∈ t, f ∈ x.asHomogeneousIdeal}", " (βˆ€ (i : ProjectiveSpectrum π’œ), f ∈ (β¨… (_ : i ∈ t), i.asHo...
import Mathlib.Data.Set.Lattice #align_import data.set.accumulate from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" variable {Ξ± Ξ² Ξ³ : Type*} {s : Ξ± β†’ Set Ξ²} {t : Ξ± β†’ Set Ξ³} namespace Set def Accumulate [LE Ξ±] (s : Ξ± β†’ Set Ξ²) (x : Ξ±) : Set Ξ² := ⋃ y ≀ x, s y #align set.accumulate Set.Accumulate theorem accumulate_def [LE Ξ±] {x : Ξ±} : Accumulate s x = ⋃ y ≀ x, s y := rfl #align set.accumulate_def Set.accumulate_def @[simp]
Mathlib/Data/Set/Accumulate.lean
31
32
theorem mem_accumulate [LE Ξ±] {x : Ξ±} {z : Ξ²} : z ∈ Accumulate s x ↔ βˆƒ y ≀ x, z ∈ s y := by
simp_rw [accumulate_def, mem_iUnionβ‚‚, exists_prop]
[ " z ∈ Accumulate s x ↔ βˆƒ y ≀ x, z ∈ s y" ]
[]
import Mathlib.Init.Logic import Mathlib.Init.Function import Mathlib.Init.Algebra.Classes import Batteries.Util.LibraryNote import Batteries.Tactic.Lint.Basic #align_import logic.basic from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" #align_import init.ite_simp from "leanprover-community/lean"@"4a03bdeb31b3688c31d02d7ff8e0ff2e5d6174db" open Function attribute [local instance 10] Classical.propDecidable open Function alias Membership.mem.ne_of_not_mem := ne_of_mem_of_not_mem alias Membership.mem.ne_of_not_mem' := ne_of_mem_of_not_mem' #align has_mem.mem.ne_of_not_mem Membership.mem.ne_of_not_mem #align has_mem.mem.ne_of_not_mem' Membership.mem.ne_of_not_mem' section Quantifiers set_option autoImplicit true in -- @[elab_as_elim] -- FIXME noncomputable def Exists.classicalRecOn {p : Ξ± β†’ Prop} (h : βˆƒ a, p a) {C} (H : βˆ€ a, p a β†’ C) : C := H (Classical.choose h) (Classical.choose_spec h) #align exists.classical_rec_on Exists.classicalRecOn section BoundedQuantifiers variable {Ξ± : Sort*} {r p q : Ξ± β†’ Prop} {P Q : βˆ€ x, p x β†’ Prop} {b : Prop} theorem bex_def : (βˆƒ (x : _) (_ : p x), q x) ↔ βˆƒ x, p x ∧ q x := ⟨fun ⟨x, px, qx⟩ ↦ ⟨x, px, qx⟩, fun ⟨x, px, qx⟩ ↦ ⟨x, px, qx⟩⟩ #align bex_def bex_def theorem BEx.elim {b : Prop} : (βˆƒ x h, P x h) β†’ (βˆ€ a h, P a h β†’ b) β†’ b | ⟨a, h₁, hβ‚‚βŸ©, h' => h' a h₁ hβ‚‚ #align bex.elim BEx.elim theorem BEx.intro (a : Ξ±) (h₁ : p a) (hβ‚‚ : P a h₁) : βˆƒ (x : _) (h : p x), P x h := ⟨a, h₁, hβ‚‚βŸ© #align bex.intro BEx.intro #align ball_congr forallβ‚‚_congr #align bex_congr existsβ‚‚_congr @[deprecated exists_eq_left (since := "2024-04-06")]
Mathlib/Logic/Basic.lean
1,092
1,093
theorem bex_eq_left {a : Ξ±} : (βˆƒ (x : _) (_ : x = a), p x) ↔ p a := by
simp only [exists_prop, exists_eq_left]
[ " (βˆƒ x x_1, p x) ↔ p a" ]
[]
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.Algebra.Homology.ShortComplex.ModuleCat open CategoryTheory namespace ModuleCat variable {ΞΉ ΞΉ' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)} (hS : S.Exact) (hS' : S.ShortExact) {v : ΞΉ β†’ S.X₁} open CategoryTheory Submodule Set section LinearIndependent variable (hv : LinearIndependent R v) {u : ΞΉ βŠ• ΞΉ' β†’ S.Xβ‚‚} (hw : LinearIndependent R (S.g ∘ u ∘ Sum.inr)) (hm : Mono S.f) (huv : u ∘ Sum.inl = S.f ∘ v) theorem disjoint_span_sum : Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr))) := by rw [huv, disjoint_comm] refine Disjoint.mono_right (span_mono (range_comp_subset_range _ _)) ?_ rw [← LinearMap.range_coe, span_eq (LinearMap.range S.f), hS.moduleCat_range_eq_ker] exact range_ker_disjoint hw theorem linearIndependent_leftExact : LinearIndependent R u := by rw [linearIndependent_sum] refine ⟨?_, LinearIndependent.of_comp S.g hw, disjoint_span_sum hS hw huv⟩ rw [huv, LinearMap.linearIndependent_iff S.f]; swap Β· rw [LinearMap.ker_eq_bot, ← mono_iff_injective] infer_instance exact hv
Mathlib/Algebra/Category/ModuleCat/Free.lean
72
78
theorem linearIndependent_shortExact {w : ΞΉ' β†’ S.X₃} (hw : LinearIndependent R w) : LinearIndependent R (Sum.elim (S.f ∘ v) (S.g.toFun.invFun ∘ w)) := by
apply linearIndependent_leftExact hS'.exact hv _ hS'.mono_f rfl dsimp convert hw ext apply Function.rightInverse_invFun ((epi_iff_surjective _).mp hS'.epi_g)
[ " Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr)))", " Disjoint (span R (range (u ∘ Sum.inr))) (span R (range (⇑S.f ∘ v)))", " Disjoint (span R (range (u ∘ Sum.inr))) (span R (range ⇑S.f))", " Disjoint (span R (range (u ∘ Sum.inr))) (LinearMap.ker S.g)", " LinearIndependent R u", " L...
[ " Disjoint (span R (range (u ∘ Sum.inl))) (span R (range (u ∘ Sum.inr)))", " Disjoint (span R (range (u ∘ Sum.inr))) (span R (range (⇑S.f ∘ v)))", " Disjoint (span R (range (u ∘ Sum.inr))) (span R (range ⇑S.f))", " Disjoint (span R (range (u ∘ Sum.inr))) (LinearMap.ker S.g)", " LinearIndependent R u", " L...
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function OrderDual Set universe u variable {Ξ± Ξ² K : Type*} section DivisionSemiring variable [DivisionSemiring Ξ±] {a b c d : Ξ±}
Mathlib/Algebra/Field/Basic.lean
29
29
theorem add_div (a b c : Ξ±) : (a + b) / c = a / c + b / c := by
simp_rw [div_eq_mul_inv, add_mul]
[ " (a + b) / c = a / c + b / c" ]
[]
import Mathlib.MeasureTheory.Measure.MeasureSpace import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.measure.open_pos from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Topology ENNReal MeasureTheory open Set Function Filter namespace MeasureTheory namespace Measure section Basic variable {X Y : Type*} [TopologicalSpace X] {m : MeasurableSpace X} [TopologicalSpace Y] [T2Space Y] (ΞΌ Ξ½ : Measure X) class IsOpenPosMeasure : Prop where open_pos : βˆ€ U : Set X, IsOpen U β†’ U.Nonempty β†’ ΞΌ U β‰  0 #align measure_theory.measure.is_open_pos_measure MeasureTheory.Measure.IsOpenPosMeasure variable [IsOpenPosMeasure ΞΌ] {s U F : Set X} {x : X} theorem _root_.IsOpen.measure_ne_zero (hU : IsOpen U) (hne : U.Nonempty) : ΞΌ U β‰  0 := IsOpenPosMeasure.open_pos U hU hne #align is_open.measure_ne_zero IsOpen.measure_ne_zero theorem _root_.IsOpen.measure_pos (hU : IsOpen U) (hne : U.Nonempty) : 0 < ΞΌ U := (hU.measure_ne_zero ΞΌ hne).bot_lt #align is_open.measure_pos IsOpen.measure_pos instance (priority := 100) [Nonempty X] : NeZero ΞΌ := ⟨measure_univ_pos.mp <| isOpen_univ.measure_pos ΞΌ univ_nonempty⟩ theorem _root_.IsOpen.measure_pos_iff (hU : IsOpen U) : 0 < ΞΌ U ↔ U.Nonempty := ⟨fun h => nonempty_iff_ne_empty.2 fun he => h.ne' <| he.symm β–Έ measure_empty, hU.measure_pos μ⟩ #align is_open.measure_pos_iff IsOpen.measure_pos_iff theorem _root_.IsOpen.measure_eq_zero_iff (hU : IsOpen U) : ΞΌ U = 0 ↔ U = βˆ… := by simpa only [not_lt, nonpos_iff_eq_zero, not_nonempty_iff_eq_empty] using not_congr (hU.measure_pos_iff ΞΌ) #align is_open.measure_eq_zero_iff IsOpen.measure_eq_zero_iff theorem measure_pos_of_nonempty_interior (h : (interior s).Nonempty) : 0 < ΞΌ s := (isOpen_interior.measure_pos ΞΌ h).trans_le (measure_mono interior_subset) #align measure_theory.measure.measure_pos_of_nonempty_interior MeasureTheory.Measure.measure_pos_of_nonempty_interior theorem measure_pos_of_mem_nhds (h : s ∈ 𝓝 x) : 0 < ΞΌ s := measure_pos_of_nonempty_interior _ ⟨x, mem_interior_iff_mem_nhds.2 h⟩ #align measure_theory.measure.measure_pos_of_mem_nhds MeasureTheory.Measure.measure_pos_of_mem_nhds theorem isOpenPosMeasure_smul {c : ℝβ‰₯0∞} (h : c β‰  0) : IsOpenPosMeasure (c β€’ ΞΌ) := ⟨fun _U Uo Une => mul_ne_zero h (Uo.measure_ne_zero ΞΌ Une)⟩ #align measure_theory.measure.is_open_pos_measure_smul MeasureTheory.Measure.isOpenPosMeasure_smul variable {ΞΌ Ξ½} protected theorem AbsolutelyContinuous.isOpenPosMeasure (h : ΞΌ β‰ͺ Ξ½) : IsOpenPosMeasure Ξ½ := ⟨fun _U ho hne hβ‚€ => ho.measure_ne_zero ΞΌ hne (h hβ‚€)⟩ #align measure_theory.measure.absolutely_continuous.is_open_pos_measure MeasureTheory.Measure.AbsolutelyContinuous.isOpenPosMeasure theorem _root_.LE.le.isOpenPosMeasure (h : ΞΌ ≀ Ξ½) : IsOpenPosMeasure Ξ½ := h.absolutelyContinuous.isOpenPosMeasure #align has_le.le.is_open_pos_measure LE.le.isOpenPosMeasure theorem _root_.IsOpen.measure_zero_iff_eq_empty (hU : IsOpen U) : ΞΌ U = 0 ↔ U = βˆ… := ⟨fun h ↦ (hU.measure_eq_zero_iff ΞΌ).mp h, fun h ↦ by simp [h]⟩ theorem _root_.IsOpen.ae_eq_empty_iff_eq (hU : IsOpen U) : U =ᡐ[ΞΌ] (βˆ… : Set X) ↔ U = βˆ… := by rw [ae_eq_empty, hU.measure_zero_iff_eq_empty] theorem _root_.IsOpen.eq_empty_of_measure_zero (hU : IsOpen U) (hβ‚€ : ΞΌ U = 0) : U = βˆ… := (hU.measure_eq_zero_iff ΞΌ).mp hβ‚€ #align is_open.eq_empty_of_measure_zero IsOpen.eq_empty_of_measure_zero theorem _root_.IsClosed.ae_eq_univ_iff_eq (hF : IsClosed F) : F =ᡐ[ΞΌ] univ ↔ F = univ := by refine ⟨fun h ↦ ?_, fun h ↦ by rw [h]⟩ rwa [ae_eq_univ, hF.isOpen_compl.measure_eq_zero_iff ΞΌ, compl_empty_iff] at h theorem _root_.IsClosed.measure_eq_univ_iff_eq [OpensMeasurableSpace X] [IsFiniteMeasure ΞΌ] (hF : IsClosed F) : ΞΌ F = ΞΌ univ ↔ F = univ := by rw [← ae_eq_univ_iff_measure_eq hF.measurableSet.nullMeasurableSet, hF.ae_eq_univ_iff_eq]
Mathlib/MeasureTheory/Measure/OpenPos.lean
107
110
theorem _root_.IsClosed.measure_eq_one_iff_eq_univ [OpensMeasurableSpace X] [IsProbabilityMeasure ΞΌ] (hF : IsClosed F) : ΞΌ F = 1 ↔ F = univ := by
rw [← measure_univ (ΞΌ := ΞΌ), hF.measure_eq_univ_iff_eq]
[ " ΞΌ U = 0 ↔ U = βˆ…", " ΞΌ U = 0", " U =αΆ [ae ΞΌ] βˆ… ↔ U = βˆ…", " F =αΆ [ae ΞΌ] univ ↔ F = univ", " F =αΆ [ae ΞΌ] univ", " F = univ", " ΞΌ F = ΞΌ univ ↔ F = univ", " ΞΌ F = 1 ↔ F = univ" ]
[ " ΞΌ U = 0 ↔ U = βˆ…", " ΞΌ U = 0", " U =αΆ [ae ΞΌ] βˆ… ↔ U = βˆ…", " F =αΆ [ae ΞΌ] univ ↔ F = univ", " F =αΆ [ae ΞΌ] univ", " F = univ", " ΞΌ F = ΞΌ univ ↔ F = univ" ]
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.Block #align_import analysis.inner_product_space.gram_schmidt_ortho from "leanprover-community/mathlib"@"1a4df69ca1a9a0e5e26bfe12e2b92814216016d0" open Finset Submodule FiniteDimensional variable (π•œ : Type*) {E : Type*} [RCLike π•œ] [NormedAddCommGroup E] [InnerProductSpace π•œ E] variable {ΞΉ : Type*} [LinearOrder ΞΉ] [LocallyFiniteOrderBot ΞΉ] [IsWellOrder ΞΉ (Β· < Β·)] attribute [local instance] IsWellOrder.toHasWellFounded local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y noncomputable def gramSchmidt [IsWellOrder ΞΉ (Β· < Β·)] (f : ΞΉ β†’ E) (n : ΞΉ) : E := f n - βˆ‘ i : Iio n, orthogonalProjection (π•œ βˆ™ gramSchmidt f i) (f n) termination_by n decreasing_by exact mem_Iio.1 i.2 #align gram_schmidt gramSchmidt theorem gramSchmidt_def (f : ΞΉ β†’ E) (n : ΞΉ) : gramSchmidt π•œ f n = f n - βˆ‘ i ∈ Iio n, orthogonalProjection (π•œ βˆ™ gramSchmidt π•œ f i) (f n) := by rw [← sum_attach, attach_eq_univ, gramSchmidt] #align gram_schmidt_def gramSchmidt_def theorem gramSchmidt_def' (f : ΞΉ β†’ E) (n : ΞΉ) : f n = gramSchmidt π•œ f n + βˆ‘ i ∈ Iio n, orthogonalProjection (π•œ βˆ™ gramSchmidt π•œ f i) (f n) := by rw [gramSchmidt_def, sub_add_cancel] #align gram_schmidt_def' gramSchmidt_def' theorem gramSchmidt_def'' (f : ΞΉ β†’ E) (n : ΞΉ) : f n = gramSchmidt π•œ f n + βˆ‘ i ∈ Iio n, (βŸͺgramSchmidt π•œ f i, f n⟫ / (β€–gramSchmidt π•œ f iβ€– : π•œ) ^ 2) β€’ gramSchmidt π•œ f i := by convert gramSchmidt_def' π•œ f n rw [orthogonalProjection_singleton, RCLike.ofReal_pow] #align gram_schmidt_def'' gramSchmidt_def'' @[simp] theorem gramSchmidt_zero {ΞΉ : Type*} [LinearOrder ΞΉ] [LocallyFiniteOrder ΞΉ] [OrderBot ΞΉ] [IsWellOrder ΞΉ (Β· < Β·)] (f : ΞΉ β†’ E) : gramSchmidt π•œ f βŠ₯ = f βŠ₯ := by rw [gramSchmidt_def, Iio_eq_Ico, Finset.Ico_self, Finset.sum_empty, sub_zero] #align gram_schmidt_zero gramSchmidt_zero theorem gramSchmidt_orthogonal (f : ΞΉ β†’ E) {a b : ΞΉ} (hβ‚€ : a β‰  b) : βŸͺgramSchmidt π•œ f a, gramSchmidt π•œ f b⟫ = 0 := by suffices βˆ€ a b : ΞΉ, a < b β†’ βŸͺgramSchmidt π•œ f a, gramSchmidt π•œ f b⟫ = 0 by cases' hβ‚€.lt_or_lt with ha hb Β· exact this _ _ ha Β· rw [inner_eq_zero_symm] exact this _ _ hb clear hβ‚€ a b intro a b hβ‚€ revert a apply wellFounded_lt.induction b intro b ih a hβ‚€ simp only [gramSchmidt_def π•œ f b, inner_sub_right, inner_sum, orthogonalProjection_singleton, inner_smul_right] rw [Finset.sum_eq_single_of_mem a (Finset.mem_Iio.mpr hβ‚€)] Β· by_cases h : gramSchmidt π•œ f a = 0 Β· simp only [h, inner_zero_left, zero_div, zero_mul, sub_zero] Β· rw [RCLike.ofReal_pow, ← inner_self_eq_norm_sq_to_K, div_mul_cancelβ‚€, sub_self] rwa [inner_self_ne_zero] intro i hi hia simp only [mul_eq_zero, div_eq_zero_iff, inner_self_eq_zero] right cases' hia.lt_or_lt with hia₁ hiaβ‚‚ Β· rw [inner_eq_zero_symm] exact ih a hβ‚€ i hia₁ Β· exact ih i (mem_Iio.1 hi) a hiaβ‚‚ #align gram_schmidt_orthogonal gramSchmidt_orthogonal theorem gramSchmidt_pairwise_orthogonal (f : ΞΉ β†’ E) : Pairwise fun a b => βŸͺgramSchmidt π•œ f a, gramSchmidt π•œ f b⟫ = 0 := fun _ _ => gramSchmidt_orthogonal π•œ f #align gram_schmidt_pairwise_orthogonal gramSchmidt_pairwise_orthogonal theorem gramSchmidt_inv_triangular (v : ΞΉ β†’ E) {i j : ΞΉ} (hij : i < j) : βŸͺgramSchmidt π•œ v j, v i⟫ = 0 := by rw [gramSchmidt_def'' π•œ v] simp only [inner_add_right, inner_sum, inner_smul_right] set b : ΞΉ β†’ E := gramSchmidt π•œ v convert zero_add (0 : π•œ) Β· exact gramSchmidt_orthogonal π•œ v hij.ne' apply Finset.sum_eq_zero rintro k hki' have hki : k < i := by simpa using hki' have : βŸͺb j, b k⟫ = 0 := gramSchmidt_orthogonal π•œ v (hki.trans hij).ne' simp [this] #align gram_schmidt_inv_triangular gramSchmidt_inv_triangular open Submodule Set Order theorem mem_span_gramSchmidt (f : ΞΉ β†’ E) {i j : ΞΉ} (hij : i ≀ j) : f i ∈ span π•œ (gramSchmidt π•œ f '' Set.Iic j) := by rw [gramSchmidt_def' π•œ f i] simp_rw [orthogonalProjection_singleton] exact Submodule.add_mem _ (subset_span <| mem_image_of_mem _ hij) (Submodule.sum_mem _ fun k hk => smul_mem (span π•œ (gramSchmidt π•œ f '' Set.Iic j)) _ <| subset_span <| mem_image_of_mem (gramSchmidt π•œ f) <| (Finset.mem_Iio.1 hk).le.trans hij) #align mem_span_gram_schmidt mem_span_gramSchmidt
Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
142
152
theorem gramSchmidt_mem_span (f : ΞΉ β†’ E) : βˆ€ {j i}, i ≀ j β†’ gramSchmidt π•œ f i ∈ span π•œ (f '' Set.Iic j) := by
intro j i hij rw [gramSchmidt_def π•œ f i] simp_rw [orthogonalProjection_singleton] refine Submodule.sub_mem _ (subset_span (mem_image_of_mem _ hij)) (Submodule.sum_mem _ fun k hk => ?_) let hkj : k < j := (Finset.mem_Iio.1 hk).trans_le hij exact smul_mem _ _ (span_mono (image_subset f <| Iic_subset_Iic.2 hkj.le) <| gramSchmidt_mem_span _ le_rfl) termination_by j => j
[ " (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n", " gramSchmidt π•œ f n = f n - βˆ‘ i ∈ Iio n, ↑((orthogonalProjection (span π•œ {gramSchmidt π•œ f i})) (f n))", " f n = gramSchmidt π•œ f n + βˆ‘ i ∈ Iio n, ↑((orthogonalProjection (span π•œ {gramSchmidt π•œ f i})) (f n))", " f n = gramSchmidt π•œ f n + βˆ‘...
[ " (invImage (fun x => x) IsWellOrder.toHasWellFounded).1 (↑i) n", " gramSchmidt π•œ f n = f n - βˆ‘ i ∈ Iio n, ↑((orthogonalProjection (span π•œ {gramSchmidt π•œ f i})) (f n))", " f n = gramSchmidt π•œ f n + βˆ‘ i ∈ Iio n, ↑((orthogonalProjection (span π•œ {gramSchmidt π•œ f i})) (f n))", " f n = gramSchmidt π•œ f n + βˆ‘...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by classical convert Multiset.support_sum_subset s.1; simp #align finset.support_sum_subset Finset.support_sum_subset theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… ↔ βˆƒ f ∈ l, x ∈ f.support := by simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop] induction' l with hd tl IH Β· simp Β· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons, exists_eq_or_imp] #align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ (s.map Finsupp.support).sup ↔ βˆƒ f ∈ s, x ∈ f.support := Quot.inductionOn s fun _ ↦ by simpa only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.mem_foldr_sup_support_iff #align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ s.sup Finsupp.support ↔ βˆƒ f ∈ s, x ∈ f.support := Multiset.mem_sup_map_support_iff #align finset.mem_sup_support_iff Finset.mem_sup_support_iff theorem List.support_sum_eq [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) (hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) : l.sum.support = l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.pairwise_cons] at hl simp only [List.sum_cons, List.foldr_cons, Function.comp_apply] rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union] suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x βŠ” y)) βˆ…) by exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset, Finset.disjoint_sup_right] intro f hf simp only [List.mem_toFinset, List.mem_map] at hf obtain ⟨f, hf, rfl⟩ := hf exact hl.left _ hf #align list.support_sum_eq List.support_sum_eq theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) : s.sum.support = (s.map Finsupp.support).sup := by induction' s using Quot.inductionOn with a obtain ⟨l, hl, hd⟩ := hs suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by convert List.support_sum_eq a this Β· simp only [Multiset.quot_mk_to_coe'', Multiset.sum_coe] Β· dsimp only [Function.comp_def] simp only [quot_mk_to_coe'', map_coe, sup_coe, ge_iff_le, Finset.le_eq_subset, Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map] simp only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.coe_eq_coe] at hl exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h #align multiset.support_sum_eq Multiset.support_sum_eq
Mathlib/Data/Finsupp/BigOperators.lean
114
128
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) (hs : (s : Set (ΞΉ β†’β‚€ M)).PairwiseDisjoint Finsupp.support) : (s.sum id).support = Finset.sup s Finsupp.support := by
classical suffices s.1.Pairwise (_root_.Disjoint on Finsupp.support) by convert Multiset.support_sum_eq s.1 this exact (Finset.sum_val _).symm obtain ⟨l, hl, hn⟩ : βˆƒ l : List (ΞΉ β†’β‚€ M), l.toFinset = s ∧ l.Nodup := by refine ⟨s.toList, ?_, Finset.nodup_toList _⟩ simp subst hl rwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ← List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn] intro x y hxy exact symmetric_disjoint hxy
[ " l.sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… l", " [].sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… []", " (hd :: tl).sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… (hd :: tl)", " (hd + tl.sum).support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… (hd :: tl)", " hd.support βŠ† hd.support",...
[ " l.sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… l", " [].sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… []", " (hd :: tl).sum.support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… (hd :: tl)", " (hd + tl.sum).support βŠ† foldr (fun x x_1 => x.support βŠ” x_1) βˆ… (hd :: tl)", " hd.support βŠ† hd.support",...