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
num_lines
int64
1
150
complexity_score
float64
2.72
139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B
diff_level
int64
0
2
file_diff_level
float64
0
2
theorem_same_file
int64
1
32
rank_file
int64
0
2.51k
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open FiniteDimensional Complex open scoped Affine EuclideanGeometry Real RealInnerProductSpace ComplexConjugate namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [hd2 : Fact (finrank ℝ V = 2)] [Module.Oriented ℝ V (Fin 2)] abbrev o := @Module.Oriented.positiveOrientation def oangle (p₁ p₂ p₃ : P) : Real.Angle := o.oangle (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) #align euclidean_geometry.oangle EuclideanGeometry.oangle @[inherit_doc] scoped notation "∡" => EuclideanGeometry.oangle theorem continuousAt_oangle {x : P × P × P} (hx12 : x.1 ≠ x.2.1) (hx32 : x.2.2 ≠ x.2.1) : ContinuousAt (fun y : P × P × P => ∡ y.1 y.2.1 y.2.2) x := by let f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1) have hf1 : (f x).1 ≠ 0 := by simp [hx12] have hf2 : (f x).2 ≠ 0 := by simp [hx32] exact (o.continuousAt_oangle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt #align euclidean_geometry.continuous_at_oangle EuclideanGeometry.continuousAt_oangle @[simp] theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_left EuclideanGeometry.oangle_self_left @[simp]
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
65
65
theorem oangle_self_right (p₁ p₂ : P) : ∡ p₁ p₂ p₂ = 0 := by
simp [oangle]
1
2.718282
0
0.333333
6
356
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open FiniteDimensional Complex open scoped Affine EuclideanGeometry Real RealInnerProductSpace ComplexConjugate namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [hd2 : Fact (finrank ℝ V = 2)] [Module.Oriented ℝ V (Fin 2)] abbrev o := @Module.Oriented.positiveOrientation def oangle (p₁ p₂ p₃ : P) : Real.Angle := o.oangle (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) #align euclidean_geometry.oangle EuclideanGeometry.oangle @[inherit_doc] scoped notation "∡" => EuclideanGeometry.oangle theorem continuousAt_oangle {x : P × P × P} (hx12 : x.1 ≠ x.2.1) (hx32 : x.2.2 ≠ x.2.1) : ContinuousAt (fun y : P × P × P => ∡ y.1 y.2.1 y.2.2) x := by let f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1) have hf1 : (f x).1 ≠ 0 := by simp [hx12] have hf2 : (f x).2 ≠ 0 := by simp [hx32] exact (o.continuousAt_oangle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt #align euclidean_geometry.continuous_at_oangle EuclideanGeometry.continuousAt_oangle @[simp] theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_left EuclideanGeometry.oangle_self_left @[simp] theorem oangle_self_right (p₁ p₂ : P) : ∡ p₁ p₂ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_right EuclideanGeometry.oangle_self_right @[simp] theorem oangle_self_left_right (p₁ p₂ : P) : ∡ p₁ p₂ p₁ = 0 := o.oangle_self _ #align euclidean_geometry.oangle_self_left_right EuclideanGeometry.oangle_self_left_right
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
75
76
theorem left_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₁ ≠ p₂ := by
rw [← @vsub_ne_zero V]; exact o.left_ne_zero_of_oangle_ne_zero h
1
2.718282
0
0.333333
6
356
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open FiniteDimensional Complex open scoped Affine EuclideanGeometry Real RealInnerProductSpace ComplexConjugate namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [hd2 : Fact (finrank ℝ V = 2)] [Module.Oriented ℝ V (Fin 2)] abbrev o := @Module.Oriented.positiveOrientation def oangle (p₁ p₂ p₃ : P) : Real.Angle := o.oangle (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) #align euclidean_geometry.oangle EuclideanGeometry.oangle @[inherit_doc] scoped notation "∡" => EuclideanGeometry.oangle theorem continuousAt_oangle {x : P × P × P} (hx12 : x.1 ≠ x.2.1) (hx32 : x.2.2 ≠ x.2.1) : ContinuousAt (fun y : P × P × P => ∡ y.1 y.2.1 y.2.2) x := by let f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1) have hf1 : (f x).1 ≠ 0 := by simp [hx12] have hf2 : (f x).2 ≠ 0 := by simp [hx32] exact (o.continuousAt_oangle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt #align euclidean_geometry.continuous_at_oangle EuclideanGeometry.continuousAt_oangle @[simp] theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_left EuclideanGeometry.oangle_self_left @[simp] theorem oangle_self_right (p₁ p₂ : P) : ∡ p₁ p₂ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_right EuclideanGeometry.oangle_self_right @[simp] theorem oangle_self_left_right (p₁ p₂ : P) : ∡ p₁ p₂ p₁ = 0 := o.oangle_self _ #align euclidean_geometry.oangle_self_left_right EuclideanGeometry.oangle_self_left_right theorem left_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₁ ≠ p₂ := by rw [← @vsub_ne_zero V]; exact o.left_ne_zero_of_oangle_ne_zero h #align euclidean_geometry.left_ne_of_oangle_ne_zero EuclideanGeometry.left_ne_of_oangle_ne_zero
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
80
81
theorem right_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₃ ≠ p₂ := by
rw [← @vsub_ne_zero V]; exact o.right_ne_zero_of_oangle_ne_zero h
1
2.718282
0
0.333333
6
356
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open FiniteDimensional Complex open scoped Affine EuclideanGeometry Real RealInnerProductSpace ComplexConjugate namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [hd2 : Fact (finrank ℝ V = 2)] [Module.Oriented ℝ V (Fin 2)] abbrev o := @Module.Oriented.positiveOrientation def oangle (p₁ p₂ p₃ : P) : Real.Angle := o.oangle (p₁ -ᵥ p₂) (p₃ -ᵥ p₂) #align euclidean_geometry.oangle EuclideanGeometry.oangle @[inherit_doc] scoped notation "∡" => EuclideanGeometry.oangle theorem continuousAt_oangle {x : P × P × P} (hx12 : x.1 ≠ x.2.1) (hx32 : x.2.2 ≠ x.2.1) : ContinuousAt (fun y : P × P × P => ∡ y.1 y.2.1 y.2.2) x := by let f : P × P × P → V × V := fun y => (y.1 -ᵥ y.2.1, y.2.2 -ᵥ y.2.1) have hf1 : (f x).1 ≠ 0 := by simp [hx12] have hf2 : (f x).2 ≠ 0 := by simp [hx32] exact (o.continuousAt_oangle hf1 hf2).comp ((continuous_fst.vsub continuous_snd.fst).prod_mk (continuous_snd.snd.vsub continuous_snd.fst)).continuousAt #align euclidean_geometry.continuous_at_oangle EuclideanGeometry.continuousAt_oangle @[simp] theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_left EuclideanGeometry.oangle_self_left @[simp] theorem oangle_self_right (p₁ p₂ : P) : ∡ p₁ p₂ p₂ = 0 := by simp [oangle] #align euclidean_geometry.oangle_self_right EuclideanGeometry.oangle_self_right @[simp] theorem oangle_self_left_right (p₁ p₂ : P) : ∡ p₁ p₂ p₁ = 0 := o.oangle_self _ #align euclidean_geometry.oangle_self_left_right EuclideanGeometry.oangle_self_left_right theorem left_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₁ ≠ p₂ := by rw [← @vsub_ne_zero V]; exact o.left_ne_zero_of_oangle_ne_zero h #align euclidean_geometry.left_ne_of_oangle_ne_zero EuclideanGeometry.left_ne_of_oangle_ne_zero theorem right_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₃ ≠ p₂ := by rw [← @vsub_ne_zero V]; exact o.right_ne_zero_of_oangle_ne_zero h #align euclidean_geometry.right_ne_of_oangle_ne_zero EuclideanGeometry.right_ne_of_oangle_ne_zero
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
85
86
theorem left_ne_right_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₁ ≠ p₃ := by
rw [← (vsub_left_injective p₂).ne_iff]; exact o.ne_of_oangle_ne_zero h
1
2.718282
0
0.333333
6
356
import Mathlib.Algebra.Group.Hom.End import Mathlib.Algebra.Ring.Invertible import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Int.Cast.Lemmas import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" assert_not_exists Multiset assert_not_exists Set.indicator assert_not_exists Pi.single_smul₀ open Function Set universe u v variable {α R k S M M₂ M₃ ι : Type*} @[ext] class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends DistribMulAction R M where protected add_smul : ∀ (r s : R) (x : M), (r + s) • x = r • x + s • x protected zero_smul : ∀ x : M, (0 : R) • x = 0 #align module Module #align module.ext Module.ext #align module.ext_iff Module.ext_iff section AddCommMonoid variable [Semiring R] [AddCommMonoid M] [Module R M] (r s : R) (x y : M) -- see Note [lower instance priority] instance (priority := 100) Module.toMulActionWithZero : MulActionWithZero R M := { (inferInstance : MulAction R M) with smul_zero := smul_zero zero_smul := Module.zero_smul } #align module.to_mul_action_with_zero Module.toMulActionWithZero instance AddCommMonoid.natModule : Module ℕ M where one_smul := one_nsmul mul_smul m n a := mul_nsmul' a m n smul_add n a b := nsmul_add a b n smul_zero := nsmul_zero zero_smul := zero_nsmul add_smul r s x := add_nsmul x r s #align add_comm_monoid.nat_module AddCommMonoid.natModule theorem AddMonoid.End.natCast_def (n : ℕ) : (↑n : AddMonoid.End M) = DistribMulAction.toAddMonoidEnd ℕ M n := rfl #align add_monoid.End.nat_cast_def AddMonoid.End.natCast_def theorem add_smul : (r + s) • x = r • x + s • x := Module.add_smul r s x #align add_smul add_smul
Mathlib/Algebra/Module/Defs.lean
97
98
theorem Convex.combo_self {a b : R} (h : a + b = 1) (x : M) : a • x + b • x = x := by
rw [← add_smul, h, one_smul]
1
2.718282
0
0.333333
3
357
import Mathlib.Algebra.Group.Hom.End import Mathlib.Algebra.Ring.Invertible import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Int.Cast.Lemmas import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" assert_not_exists Multiset assert_not_exists Set.indicator assert_not_exists Pi.single_smul₀ open Function Set universe u v variable {α R k S M M₂ M₃ ι : Type*} @[ext] class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends DistribMulAction R M where protected add_smul : ∀ (r s : R) (x : M), (r + s) • x = r • x + s • x protected zero_smul : ∀ x : M, (0 : R) • x = 0 #align module Module #align module.ext Module.ext #align module.ext_iff Module.ext_iff section AddCommMonoid variable [Semiring R] [AddCommMonoid M] [Module R M] (r s : R) (x y : M) -- see Note [lower instance priority] instance (priority := 100) Module.toMulActionWithZero : MulActionWithZero R M := { (inferInstance : MulAction R M) with smul_zero := smul_zero zero_smul := Module.zero_smul } #align module.to_mul_action_with_zero Module.toMulActionWithZero instance AddCommMonoid.natModule : Module ℕ M where one_smul := one_nsmul mul_smul m n a := mul_nsmul' a m n smul_add n a b := nsmul_add a b n smul_zero := nsmul_zero zero_smul := zero_nsmul add_smul r s x := add_nsmul x r s #align add_comm_monoid.nat_module AddCommMonoid.natModule theorem AddMonoid.End.natCast_def (n : ℕ) : (↑n : AddMonoid.End M) = DistribMulAction.toAddMonoidEnd ℕ M n := rfl #align add_monoid.End.nat_cast_def AddMonoid.End.natCast_def theorem add_smul : (r + s) • x = r • x + s • x := Module.add_smul r s x #align add_smul add_smul theorem Convex.combo_self {a b : R} (h : a + b = 1) (x : M) : a • x + b • x = x := by rw [← add_smul, h, one_smul] #align convex.combo_self Convex.combo_self variable (R) -- Porting note: this is the letter of the mathlib3 version, but not really the spirit
Mathlib/Algebra/Module/Defs.lean
104
104
theorem two_smul : (2 : R) • x = x + x := by
rw [← one_add_one_eq_two, add_smul, one_smul]
1
2.718282
0
0.333333
3
357
import Mathlib.Algebra.Group.Hom.End import Mathlib.Algebra.Ring.Invertible import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Int.Cast.Lemmas import Mathlib.GroupTheory.GroupAction.Units #align_import algebra.module.basic from "leanprover-community/mathlib"@"30413fc89f202a090a54d78e540963ed3de0056e" assert_not_exists Multiset assert_not_exists Set.indicator assert_not_exists Pi.single_smul₀ open Function Set universe u v variable {α R k S M M₂ M₃ ι : Type*} @[ext] class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends DistribMulAction R M where protected add_smul : ∀ (r s : R) (x : M), (r + s) • x = r • x + s • x protected zero_smul : ∀ x : M, (0 : R) • x = 0 #align module Module #align module.ext Module.ext #align module.ext_iff Module.ext_iff -- We'll later use this to show `Module ℕ M` and `Module ℤ M` are subsingletons.
Mathlib/Algebra/Module/Defs.lean
241
245
theorem Module.ext' {R : Type*} [Semiring R] {M : Type*} [AddCommMonoid M] (P Q : Module R M) (w : ∀ (r : R) (m : M), (haveI := P; r • m) = (haveI := Q; r • m)) : P = Q := by
ext exact w _ _
2
7.389056
1
0.333333
3
357
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α]
Mathlib/Algebra/GeomSum.lean
46
48
theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by
simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero]
1
2.718282
0
0.333333
6
358
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α] theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero] #align geom_sum_succ geom_sum_succ theorem geom_sum_succ' {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = x ^ n + ∑ i ∈ range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _) #align geom_sum_succ' geom_sum_succ' theorem geom_sum_zero (x : α) : ∑ i ∈ range 0, x ^ i = 0 := rfl #align geom_sum_zero geom_sum_zero
Mathlib/Algebra/GeomSum.lean
60
60
theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by
simp [geom_sum_succ']
1
2.718282
0
0.333333
6
358
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α] theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero] #align geom_sum_succ geom_sum_succ theorem geom_sum_succ' {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = x ^ n + ∑ i ∈ range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _) #align geom_sum_succ' geom_sum_succ' theorem geom_sum_zero (x : α) : ∑ i ∈ range 0, x ^ i = 0 := rfl #align geom_sum_zero geom_sum_zero theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by simp [geom_sum_succ'] #align geom_sum_one geom_sum_one @[simp]
Mathlib/Algebra/GeomSum.lean
64
64
theorem geom_sum_two {x : α} : ∑ i ∈ range 2, x ^ i = x + 1 := by
simp [geom_sum_succ']
1
2.718282
0
0.333333
6
358
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α] theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero] #align geom_sum_succ geom_sum_succ theorem geom_sum_succ' {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = x ^ n + ∑ i ∈ range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _) #align geom_sum_succ' geom_sum_succ' theorem geom_sum_zero (x : α) : ∑ i ∈ range 0, x ^ i = 0 := rfl #align geom_sum_zero geom_sum_zero theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by simp [geom_sum_succ'] #align geom_sum_one geom_sum_one @[simp] theorem geom_sum_two {x : α} : ∑ i ∈ range 2, x ^ i = x + 1 := by simp [geom_sum_succ'] #align geom_sum_two geom_sum_two @[simp] theorem zero_geom_sum : ∀ {n}, ∑ i ∈ range n, (0 : α) ^ i = if n = 0 then 0 else 1 | 0 => by simp | 1 => by simp | n + 2 => by rw [geom_sum_succ'] simp [zero_geom_sum] #align zero_geom_sum zero_geom_sum
Mathlib/Algebra/GeomSum.lean
76
76
theorem one_geom_sum (n : ℕ) : ∑ i ∈ range n, (1 : α) ^ i = n := by
simp
1
2.718282
0
0.333333
6
358
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α] theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero] #align geom_sum_succ geom_sum_succ theorem geom_sum_succ' {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = x ^ n + ∑ i ∈ range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _) #align geom_sum_succ' geom_sum_succ' theorem geom_sum_zero (x : α) : ∑ i ∈ range 0, x ^ i = 0 := rfl #align geom_sum_zero geom_sum_zero theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by simp [geom_sum_succ'] #align geom_sum_one geom_sum_one @[simp] theorem geom_sum_two {x : α} : ∑ i ∈ range 2, x ^ i = x + 1 := by simp [geom_sum_succ'] #align geom_sum_two geom_sum_two @[simp] theorem zero_geom_sum : ∀ {n}, ∑ i ∈ range n, (0 : α) ^ i = if n = 0 then 0 else 1 | 0 => by simp | 1 => by simp | n + 2 => by rw [geom_sum_succ'] simp [zero_geom_sum] #align zero_geom_sum zero_geom_sum theorem one_geom_sum (n : ℕ) : ∑ i ∈ range n, (1 : α) ^ i = n := by simp #align one_geom_sum one_geom_sum -- porting note (#10618): simp can prove this -- @[simp]
Mathlib/Algebra/GeomSum.lean
81
82
theorem op_geom_sum (x : α) (n : ℕ) : op (∑ i ∈ range n, x ^ i) = ∑ i ∈ range n, op x ^ i := by
simp
1
2.718282
0
0.333333
6
358
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Ring.Opposite import Mathlib.Tactic.Abel #align_import algebra.geom_sum from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" -- Porting note: corrected type in the description of `geom_sum₂_Ico` (in the doc string only). universe u variable {α : Type u} open Finset MulOpposite section Semiring variable [Semiring α] theorem geom_sum_succ {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = (x * ∑ i ∈ range n, x ^ i) + 1 := by simp only [mul_sum, ← pow_succ', sum_range_succ', pow_zero] #align geom_sum_succ geom_sum_succ theorem geom_sum_succ' {x : α} {n : ℕ} : ∑ i ∈ range (n + 1), x ^ i = x ^ n + ∑ i ∈ range n, x ^ i := (sum_range_succ _ _).trans (add_comm _ _) #align geom_sum_succ' geom_sum_succ' theorem geom_sum_zero (x : α) : ∑ i ∈ range 0, x ^ i = 0 := rfl #align geom_sum_zero geom_sum_zero theorem geom_sum_one (x : α) : ∑ i ∈ range 1, x ^ i = 1 := by simp [geom_sum_succ'] #align geom_sum_one geom_sum_one @[simp] theorem geom_sum_two {x : α} : ∑ i ∈ range 2, x ^ i = x + 1 := by simp [geom_sum_succ'] #align geom_sum_two geom_sum_two @[simp] theorem zero_geom_sum : ∀ {n}, ∑ i ∈ range n, (0 : α) ^ i = if n = 0 then 0 else 1 | 0 => by simp | 1 => by simp | n + 2 => by rw [geom_sum_succ'] simp [zero_geom_sum] #align zero_geom_sum zero_geom_sum theorem one_geom_sum (n : ℕ) : ∑ i ∈ range n, (1 : α) ^ i = n := by simp #align one_geom_sum one_geom_sum -- porting note (#10618): simp can prove this -- @[simp] theorem op_geom_sum (x : α) (n : ℕ) : op (∑ i ∈ range n, x ^ i) = ∑ i ∈ range n, op x ^ i := by simp #align op_geom_sum op_geom_sum -- Porting note: linter suggested to change left hand side @[simp]
Mathlib/Algebra/GeomSum.lean
87
94
theorem op_geom_sum₂ (x y : α) (n : ℕ) : ∑ i ∈ range n, op y ^ (n - 1 - i) * op x ^ i = ∑ i ∈ range n, op y ^ i * op x ^ (n - 1 - i) := by
rw [← sum_range_reflect] refine sum_congr rfl fun j j_in => ?_ rw [mem_range, Nat.lt_iff_add_one_le] at j_in congr apply tsub_tsub_cancel_of_le exact le_tsub_of_add_le_right j_in
6
403.428793
2
0.333333
6
358
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] section Module variable (𝕜) variable {E : Type*} [AddCommGroup E] [Module 𝕜 E] def HasLineDerivWithinAt (f : E → F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t • v)) f' ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def HasLineDerivAt (f : E → F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t • v)) f' (0 : 𝕜) def LineDifferentiableWithinAt (f : E → F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt 𝕜 (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def LineDifferentiableAt (f : E → F) (x : E) (v : E) : Prop := DifferentiableAt 𝕜 (fun t ↦ f (x + t • v)) (0 : 𝕜) def lineDerivWithin (f : E → F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def lineDeriv (f : E → F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t • v)) (0 : 𝕜) variable {𝕜} variable {f f₁ : E → F} {f' f₀' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt 𝕜 f f' s x v) (hst : t ⊆ s) : HasLineDerivWithinAt 𝕜 f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt 𝕜 f f' x v) (s : Set E) : HasLineDerivWithinAt 𝕜 f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt 𝕜 f f' s x v) : LineDifferentiableWithinAt 𝕜 f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt 𝕜 f f' x v) : LineDifferentiableAt 𝕜 f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt 𝕜 f s x v) : HasLineDerivWithinAt 𝕜 f (lineDerivWithin 𝕜 f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt 𝕜 f x v) : HasLineDerivAt 𝕜 f (lineDeriv 𝕜 f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt 𝕜 f f' univ x v ↔ HasLineDerivAt 𝕜 f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : ¬LineDifferentiableWithinAt 𝕜 f s x v) : lineDerivWithin 𝕜 f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : ¬LineDifferentiableAt 𝕜 f x v) : lineDeriv 𝕜 f x v = 0 := deriv_zero_of_not_differentiableAt h
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
147
150
theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt 𝕜 f f' x v ↔ (fun t : 𝕜 => f (x + t • v) - f x - t • f') =o[𝓝 0] fun t => t := by
simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero]
1
2.718282
0
0.333333
3
359
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] section Module variable (𝕜) variable {E : Type*} [AddCommGroup E] [Module 𝕜 E] def HasLineDerivWithinAt (f : E → F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t • v)) f' ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def HasLineDerivAt (f : E → F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t • v)) f' (0 : 𝕜) def LineDifferentiableWithinAt (f : E → F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt 𝕜 (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def LineDifferentiableAt (f : E → F) (x : E) (v : E) : Prop := DifferentiableAt 𝕜 (fun t ↦ f (x + t • v)) (0 : 𝕜) def lineDerivWithin (f : E → F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def lineDeriv (f : E → F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t • v)) (0 : 𝕜) variable {𝕜} variable {f f₁ : E → F} {f' f₀' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt 𝕜 f f' s x v) (hst : t ⊆ s) : HasLineDerivWithinAt 𝕜 f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt 𝕜 f f' x v) (s : Set E) : HasLineDerivWithinAt 𝕜 f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt 𝕜 f f' s x v) : LineDifferentiableWithinAt 𝕜 f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt 𝕜 f f' x v) : LineDifferentiableAt 𝕜 f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt 𝕜 f s x v) : HasLineDerivWithinAt 𝕜 f (lineDerivWithin 𝕜 f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt 𝕜 f x v) : HasLineDerivAt 𝕜 f (lineDeriv 𝕜 f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt 𝕜 f f' univ x v ↔ HasLineDerivAt 𝕜 f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : ¬LineDifferentiableWithinAt 𝕜 f s x v) : lineDerivWithin 𝕜 f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : ¬LineDifferentiableAt 𝕜 f x v) : lineDeriv 𝕜 f x v = 0 := deriv_zero_of_not_differentiableAt h theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt 𝕜 f f' x v ↔ (fun t : 𝕜 => f (x + t • v) - f x - t • f') =o[𝓝 0] fun t => t := by simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero] theorem HasLineDerivAt.unique (h₀ : HasLineDerivAt 𝕜 f f₀' x v) (h₁ : HasLineDerivAt 𝕜 f f₁' x v) : f₀' = f₁' := HasDerivAt.unique h₀ h₁ protected theorem HasLineDerivAt.lineDeriv (h : HasLineDerivAt 𝕜 f f' x v) : lineDeriv 𝕜 f x v = f' := by rw [h.unique h.lineDifferentiableAt.hasLineDerivAt]
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
160
163
theorem lineDifferentiableWithinAt_univ : LineDifferentiableWithinAt 𝕜 f univ x v ↔ LineDifferentiableAt 𝕜 f x v := by
simp only [LineDifferentiableWithinAt, LineDifferentiableAt, preimage_univ, differentiableWithinAt_univ]
2
7.389056
1
0.333333
3
359
import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Slope noncomputable section open scoped Topology Filter ENNReal NNReal open Filter Asymptotics Set variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] section Module variable (𝕜) variable {E : Type*} [AddCommGroup E] [Module 𝕜 E] def HasLineDerivWithinAt (f : E → F) (f' : F) (s : Set E) (x : E) (v : E) := HasDerivWithinAt (fun t ↦ f (x + t • v)) f' ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def HasLineDerivAt (f : E → F) (f' : F) (x : E) (v : E) := HasDerivAt (fun t ↦ f (x + t • v)) f' (0 : 𝕜) def LineDifferentiableWithinAt (f : E → F) (s : Set E) (x : E) (v : E) : Prop := DifferentiableWithinAt 𝕜 (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def LineDifferentiableAt (f : E → F) (x : E) (v : E) : Prop := DifferentiableAt 𝕜 (fun t ↦ f (x + t • v)) (0 : 𝕜) def lineDerivWithin (f : E → F) (s : Set E) (x : E) (v : E) : F := derivWithin (fun t ↦ f (x + t • v)) ((fun t ↦ x + t • v) ⁻¹' s) (0 : 𝕜) def lineDeriv (f : E → F) (x : E) (v : E) : F := deriv (fun t ↦ f (x + t • v)) (0 : 𝕜) variable {𝕜} variable {f f₁ : E → F} {f' f₀' f₁' : F} {s t : Set E} {x v : E} lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt 𝕜 f f' s x v) (hst : t ⊆ s) : HasLineDerivWithinAt 𝕜 f f' t x v := HasDerivWithinAt.mono hf (preimage_mono hst) lemma HasLineDerivAt.hasLineDerivWithinAt (hf : HasLineDerivAt 𝕜 f f' x v) (s : Set E) : HasLineDerivWithinAt 𝕜 f f' s x v := HasDerivAt.hasDerivWithinAt hf lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt 𝕜 f f' s x v) : LineDifferentiableWithinAt 𝕜 f s x v := HasDerivWithinAt.differentiableWithinAt hf theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt 𝕜 f f' x v) : LineDifferentiableAt 𝕜 f x v := HasDerivAt.differentiableAt hf theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt 𝕜 f s x v) : HasLineDerivWithinAt 𝕜 f (lineDerivWithin 𝕜 f s x v) s x v := DifferentiableWithinAt.hasDerivWithinAt h theorem LineDifferentiableAt.hasLineDerivAt (h : LineDifferentiableAt 𝕜 f x v) : HasLineDerivAt 𝕜 f (lineDeriv 𝕜 f x v) x v := DifferentiableAt.hasDerivAt h @[simp] lemma hasLineDerivWithinAt_univ : HasLineDerivWithinAt 𝕜 f f' univ x v ↔ HasLineDerivAt 𝕜 f f' x v := by simp only [HasLineDerivWithinAt, HasLineDerivAt, preimage_univ, hasDerivWithinAt_univ] theorem lineDerivWithin_zero_of_not_lineDifferentiableWithinAt (h : ¬LineDifferentiableWithinAt 𝕜 f s x v) : lineDerivWithin 𝕜 f s x v = 0 := derivWithin_zero_of_not_differentiableWithinAt h theorem lineDeriv_zero_of_not_lineDifferentiableAt (h : ¬LineDifferentiableAt 𝕜 f x v) : lineDeriv 𝕜 f x v = 0 := deriv_zero_of_not_differentiableAt h theorem hasLineDerivAt_iff_isLittleO_nhds_zero : HasLineDerivAt 𝕜 f f' x v ↔ (fun t : 𝕜 => f (x + t • v) - f x - t • f') =o[𝓝 0] fun t => t := by simp only [HasLineDerivAt, hasDerivAt_iff_isLittleO_nhds_zero, zero_add, zero_smul, add_zero] theorem HasLineDerivAt.unique (h₀ : HasLineDerivAt 𝕜 f f₀' x v) (h₁ : HasLineDerivAt 𝕜 f f₁' x v) : f₀' = f₁' := HasDerivAt.unique h₀ h₁ protected theorem HasLineDerivAt.lineDeriv (h : HasLineDerivAt 𝕜 f f' x v) : lineDeriv 𝕜 f x v = f' := by rw [h.unique h.lineDifferentiableAt.hasLineDerivAt] theorem lineDifferentiableWithinAt_univ : LineDifferentiableWithinAt 𝕜 f univ x v ↔ LineDifferentiableAt 𝕜 f x v := by simp only [LineDifferentiableWithinAt, LineDifferentiableAt, preimage_univ, differentiableWithinAt_univ] theorem LineDifferentiableAt.lineDifferentiableWithinAt (h : LineDifferentiableAt 𝕜 f x v) : LineDifferentiableWithinAt 𝕜 f s x v := (differentiableWithinAt_univ.2 h).mono (subset_univ _) @[simp]
Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
170
171
theorem lineDerivWithin_univ : lineDerivWithin 𝕜 f univ x v = lineDeriv 𝕜 f x v := by
simp [lineDerivWithin, lineDeriv]
1
2.718282
0
0.333333
3
359
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace JordanDecomposition open Measure VectorMeasure variable (j : JordanDecomposition α) instance instZero : Zero (JordanDecomposition α) where zero := ⟨0, 0, MutuallySingular.zero_right⟩ #align measure_theory.jordan_decomposition.has_zero MeasureTheory.JordanDecomposition.instZero instance instInhabited : Inhabited (JordanDecomposition α) where default := 0 #align measure_theory.jordan_decomposition.inhabited MeasureTheory.JordanDecomposition.instInhabited instance instInvolutiveNeg : InvolutiveNeg (JordanDecomposition α) where neg j := ⟨j.negPart, j.posPart, j.mutuallySingular.symm⟩ neg_neg _ := JordanDecomposition.ext _ _ rfl rfl #align measure_theory.jordan_decomposition.has_involutive_neg MeasureTheory.JordanDecomposition.instInvolutiveNeg instance instSMul : SMul ℝ≥0 (JordanDecomposition α) where smul r j := ⟨r • j.posPart, r • j.negPart, MutuallySingular.smul _ (MutuallySingular.smul _ j.mutuallySingular.symm).symm⟩ #align measure_theory.jordan_decomposition.has_smul MeasureTheory.JordanDecomposition.instSMul instance instSMulReal : SMul ℝ (JordanDecomposition α) where smul r j := if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) #align measure_theory.jordan_decomposition.has_smul_real MeasureTheory.JordanDecomposition.instSMulReal @[simp] theorem zero_posPart : (0 : JordanDecomposition α).posPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_pos_part MeasureTheory.JordanDecomposition.zero_posPart @[simp] theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_neg_part MeasureTheory.JordanDecomposition.zero_negPart @[simp] theorem neg_posPart : (-j).posPart = j.negPart := rfl #align measure_theory.jordan_decomposition.neg_pos_part MeasureTheory.JordanDecomposition.neg_posPart @[simp] theorem neg_negPart : (-j).negPart = j.posPart := rfl #align measure_theory.jordan_decomposition.neg_neg_part MeasureTheory.JordanDecomposition.neg_negPart @[simp] theorem smul_posPart (r : ℝ≥0) : (r • j).posPart = r • j.posPart := rfl #align measure_theory.jordan_decomposition.smul_pos_part MeasureTheory.JordanDecomposition.smul_posPart @[simp] theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart := rfl #align measure_theory.jordan_decomposition.smul_neg_part MeasureTheory.JordanDecomposition.smul_negPart theorem real_smul_def (r : ℝ) (j : JordanDecomposition α) : r • j = if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) := rfl #align measure_theory.jordan_decomposition.real_smul_def MeasureTheory.JordanDecomposition.real_smul_def @[simp]
Mathlib/MeasureTheory/Decomposition/Jordan.lean
135
137
theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by
-- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe]
2
7.389056
1
0.333333
6
360
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace JordanDecomposition open Measure VectorMeasure variable (j : JordanDecomposition α) instance instZero : Zero (JordanDecomposition α) where zero := ⟨0, 0, MutuallySingular.zero_right⟩ #align measure_theory.jordan_decomposition.has_zero MeasureTheory.JordanDecomposition.instZero instance instInhabited : Inhabited (JordanDecomposition α) where default := 0 #align measure_theory.jordan_decomposition.inhabited MeasureTheory.JordanDecomposition.instInhabited instance instInvolutiveNeg : InvolutiveNeg (JordanDecomposition α) where neg j := ⟨j.negPart, j.posPart, j.mutuallySingular.symm⟩ neg_neg _ := JordanDecomposition.ext _ _ rfl rfl #align measure_theory.jordan_decomposition.has_involutive_neg MeasureTheory.JordanDecomposition.instInvolutiveNeg instance instSMul : SMul ℝ≥0 (JordanDecomposition α) where smul r j := ⟨r • j.posPart, r • j.negPart, MutuallySingular.smul _ (MutuallySingular.smul _ j.mutuallySingular.symm).symm⟩ #align measure_theory.jordan_decomposition.has_smul MeasureTheory.JordanDecomposition.instSMul instance instSMulReal : SMul ℝ (JordanDecomposition α) where smul r j := if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) #align measure_theory.jordan_decomposition.has_smul_real MeasureTheory.JordanDecomposition.instSMulReal @[simp] theorem zero_posPart : (0 : JordanDecomposition α).posPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_pos_part MeasureTheory.JordanDecomposition.zero_posPart @[simp] theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_neg_part MeasureTheory.JordanDecomposition.zero_negPart @[simp] theorem neg_posPart : (-j).posPart = j.negPart := rfl #align measure_theory.jordan_decomposition.neg_pos_part MeasureTheory.JordanDecomposition.neg_posPart @[simp] theorem neg_negPart : (-j).negPart = j.posPart := rfl #align measure_theory.jordan_decomposition.neg_neg_part MeasureTheory.JordanDecomposition.neg_negPart @[simp] theorem smul_posPart (r : ℝ≥0) : (r • j).posPart = r • j.posPart := rfl #align measure_theory.jordan_decomposition.smul_pos_part MeasureTheory.JordanDecomposition.smul_posPart @[simp] theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart := rfl #align measure_theory.jordan_decomposition.smul_neg_part MeasureTheory.JordanDecomposition.smul_negPart theorem real_smul_def (r : ℝ) (j : JordanDecomposition α) : r • j = if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) := rfl #align measure_theory.jordan_decomposition.real_smul_def MeasureTheory.JordanDecomposition.real_smul_def @[simp] theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by -- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe] #align measure_theory.jordan_decomposition.coe_smul MeasureTheory.JordanDecomposition.coe_smul theorem real_smul_nonneg (r : ℝ) (hr : 0 ≤ r) : r • j = r.toNNReal • j := dif_pos hr #align measure_theory.jordan_decomposition.real_smul_nonneg MeasureTheory.JordanDecomposition.real_smul_nonneg theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j) := dif_neg (not_le.2 hr) #align measure_theory.jordan_decomposition.real_smul_neg MeasureTheory.JordanDecomposition.real_smul_neg
Mathlib/MeasureTheory/Decomposition/Jordan.lean
148
150
theorem real_smul_posPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).posPart = r.toNNReal • j.posPart := by
rw [real_smul_def, ← smul_posPart, if_pos hr]
1
2.718282
0
0.333333
6
360
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace JordanDecomposition open Measure VectorMeasure variable (j : JordanDecomposition α) instance instZero : Zero (JordanDecomposition α) where zero := ⟨0, 0, MutuallySingular.zero_right⟩ #align measure_theory.jordan_decomposition.has_zero MeasureTheory.JordanDecomposition.instZero instance instInhabited : Inhabited (JordanDecomposition α) where default := 0 #align measure_theory.jordan_decomposition.inhabited MeasureTheory.JordanDecomposition.instInhabited instance instInvolutiveNeg : InvolutiveNeg (JordanDecomposition α) where neg j := ⟨j.negPart, j.posPart, j.mutuallySingular.symm⟩ neg_neg _ := JordanDecomposition.ext _ _ rfl rfl #align measure_theory.jordan_decomposition.has_involutive_neg MeasureTheory.JordanDecomposition.instInvolutiveNeg instance instSMul : SMul ℝ≥0 (JordanDecomposition α) where smul r j := ⟨r • j.posPart, r • j.negPart, MutuallySingular.smul _ (MutuallySingular.smul _ j.mutuallySingular.symm).symm⟩ #align measure_theory.jordan_decomposition.has_smul MeasureTheory.JordanDecomposition.instSMul instance instSMulReal : SMul ℝ (JordanDecomposition α) where smul r j := if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) #align measure_theory.jordan_decomposition.has_smul_real MeasureTheory.JordanDecomposition.instSMulReal @[simp] theorem zero_posPart : (0 : JordanDecomposition α).posPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_pos_part MeasureTheory.JordanDecomposition.zero_posPart @[simp] theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_neg_part MeasureTheory.JordanDecomposition.zero_negPart @[simp] theorem neg_posPart : (-j).posPart = j.negPart := rfl #align measure_theory.jordan_decomposition.neg_pos_part MeasureTheory.JordanDecomposition.neg_posPart @[simp] theorem neg_negPart : (-j).negPart = j.posPart := rfl #align measure_theory.jordan_decomposition.neg_neg_part MeasureTheory.JordanDecomposition.neg_negPart @[simp] theorem smul_posPart (r : ℝ≥0) : (r • j).posPart = r • j.posPart := rfl #align measure_theory.jordan_decomposition.smul_pos_part MeasureTheory.JordanDecomposition.smul_posPart @[simp] theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart := rfl #align measure_theory.jordan_decomposition.smul_neg_part MeasureTheory.JordanDecomposition.smul_negPart theorem real_smul_def (r : ℝ) (j : JordanDecomposition α) : r • j = if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) := rfl #align measure_theory.jordan_decomposition.real_smul_def MeasureTheory.JordanDecomposition.real_smul_def @[simp] theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by -- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe] #align measure_theory.jordan_decomposition.coe_smul MeasureTheory.JordanDecomposition.coe_smul theorem real_smul_nonneg (r : ℝ) (hr : 0 ≤ r) : r • j = r.toNNReal • j := dif_pos hr #align measure_theory.jordan_decomposition.real_smul_nonneg MeasureTheory.JordanDecomposition.real_smul_nonneg theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j) := dif_neg (not_le.2 hr) #align measure_theory.jordan_decomposition.real_smul_neg MeasureTheory.JordanDecomposition.real_smul_neg theorem real_smul_posPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).posPart = r.toNNReal • j.posPart := by rw [real_smul_def, ← smul_posPart, if_pos hr] #align measure_theory.jordan_decomposition.real_smul_pos_part_nonneg MeasureTheory.JordanDecomposition.real_smul_posPart_nonneg
Mathlib/MeasureTheory/Decomposition/Jordan.lean
153
155
theorem real_smul_negPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).negPart = r.toNNReal • j.negPart := by
rw [real_smul_def, ← smul_negPart, if_pos hr]
1
2.718282
0
0.333333
6
360
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace JordanDecomposition open Measure VectorMeasure variable (j : JordanDecomposition α) instance instZero : Zero (JordanDecomposition α) where zero := ⟨0, 0, MutuallySingular.zero_right⟩ #align measure_theory.jordan_decomposition.has_zero MeasureTheory.JordanDecomposition.instZero instance instInhabited : Inhabited (JordanDecomposition α) where default := 0 #align measure_theory.jordan_decomposition.inhabited MeasureTheory.JordanDecomposition.instInhabited instance instInvolutiveNeg : InvolutiveNeg (JordanDecomposition α) where neg j := ⟨j.negPart, j.posPart, j.mutuallySingular.symm⟩ neg_neg _ := JordanDecomposition.ext _ _ rfl rfl #align measure_theory.jordan_decomposition.has_involutive_neg MeasureTheory.JordanDecomposition.instInvolutiveNeg instance instSMul : SMul ℝ≥0 (JordanDecomposition α) where smul r j := ⟨r • j.posPart, r • j.negPart, MutuallySingular.smul _ (MutuallySingular.smul _ j.mutuallySingular.symm).symm⟩ #align measure_theory.jordan_decomposition.has_smul MeasureTheory.JordanDecomposition.instSMul instance instSMulReal : SMul ℝ (JordanDecomposition α) where smul r j := if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) #align measure_theory.jordan_decomposition.has_smul_real MeasureTheory.JordanDecomposition.instSMulReal @[simp] theorem zero_posPart : (0 : JordanDecomposition α).posPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_pos_part MeasureTheory.JordanDecomposition.zero_posPart @[simp] theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_neg_part MeasureTheory.JordanDecomposition.zero_negPart @[simp] theorem neg_posPart : (-j).posPart = j.negPart := rfl #align measure_theory.jordan_decomposition.neg_pos_part MeasureTheory.JordanDecomposition.neg_posPart @[simp] theorem neg_negPart : (-j).negPart = j.posPart := rfl #align measure_theory.jordan_decomposition.neg_neg_part MeasureTheory.JordanDecomposition.neg_negPart @[simp] theorem smul_posPart (r : ℝ≥0) : (r • j).posPart = r • j.posPart := rfl #align measure_theory.jordan_decomposition.smul_pos_part MeasureTheory.JordanDecomposition.smul_posPart @[simp] theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart := rfl #align measure_theory.jordan_decomposition.smul_neg_part MeasureTheory.JordanDecomposition.smul_negPart theorem real_smul_def (r : ℝ) (j : JordanDecomposition α) : r • j = if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) := rfl #align measure_theory.jordan_decomposition.real_smul_def MeasureTheory.JordanDecomposition.real_smul_def @[simp] theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by -- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe] #align measure_theory.jordan_decomposition.coe_smul MeasureTheory.JordanDecomposition.coe_smul theorem real_smul_nonneg (r : ℝ) (hr : 0 ≤ r) : r • j = r.toNNReal • j := dif_pos hr #align measure_theory.jordan_decomposition.real_smul_nonneg MeasureTheory.JordanDecomposition.real_smul_nonneg theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j) := dif_neg (not_le.2 hr) #align measure_theory.jordan_decomposition.real_smul_neg MeasureTheory.JordanDecomposition.real_smul_neg theorem real_smul_posPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).posPart = r.toNNReal • j.posPart := by rw [real_smul_def, ← smul_posPart, if_pos hr] #align measure_theory.jordan_decomposition.real_smul_pos_part_nonneg MeasureTheory.JordanDecomposition.real_smul_posPart_nonneg theorem real_smul_negPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).negPart = r.toNNReal • j.negPart := by rw [real_smul_def, ← smul_negPart, if_pos hr] #align measure_theory.jordan_decomposition.real_smul_neg_part_nonneg MeasureTheory.JordanDecomposition.real_smul_negPart_nonneg
Mathlib/MeasureTheory/Decomposition/Jordan.lean
158
160
theorem real_smul_posPart_neg (r : ℝ) (hr : r < 0) : (r • j).posPart = (-r).toNNReal • j.negPart := by
rw [real_smul_def, ← smul_negPart, if_neg (not_le.2 hr), neg_posPart]
1
2.718282
0
0.333333
6
360
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace JordanDecomposition open Measure VectorMeasure variable (j : JordanDecomposition α) instance instZero : Zero (JordanDecomposition α) where zero := ⟨0, 0, MutuallySingular.zero_right⟩ #align measure_theory.jordan_decomposition.has_zero MeasureTheory.JordanDecomposition.instZero instance instInhabited : Inhabited (JordanDecomposition α) where default := 0 #align measure_theory.jordan_decomposition.inhabited MeasureTheory.JordanDecomposition.instInhabited instance instInvolutiveNeg : InvolutiveNeg (JordanDecomposition α) where neg j := ⟨j.negPart, j.posPart, j.mutuallySingular.symm⟩ neg_neg _ := JordanDecomposition.ext _ _ rfl rfl #align measure_theory.jordan_decomposition.has_involutive_neg MeasureTheory.JordanDecomposition.instInvolutiveNeg instance instSMul : SMul ℝ≥0 (JordanDecomposition α) where smul r j := ⟨r • j.posPart, r • j.negPart, MutuallySingular.smul _ (MutuallySingular.smul _ j.mutuallySingular.symm).symm⟩ #align measure_theory.jordan_decomposition.has_smul MeasureTheory.JordanDecomposition.instSMul instance instSMulReal : SMul ℝ (JordanDecomposition α) where smul r j := if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) #align measure_theory.jordan_decomposition.has_smul_real MeasureTheory.JordanDecomposition.instSMulReal @[simp] theorem zero_posPart : (0 : JordanDecomposition α).posPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_pos_part MeasureTheory.JordanDecomposition.zero_posPart @[simp] theorem zero_negPart : (0 : JordanDecomposition α).negPart = 0 := rfl #align measure_theory.jordan_decomposition.zero_neg_part MeasureTheory.JordanDecomposition.zero_negPart @[simp] theorem neg_posPart : (-j).posPart = j.negPart := rfl #align measure_theory.jordan_decomposition.neg_pos_part MeasureTheory.JordanDecomposition.neg_posPart @[simp] theorem neg_negPart : (-j).negPart = j.posPart := rfl #align measure_theory.jordan_decomposition.neg_neg_part MeasureTheory.JordanDecomposition.neg_negPart @[simp] theorem smul_posPart (r : ℝ≥0) : (r • j).posPart = r • j.posPart := rfl #align measure_theory.jordan_decomposition.smul_pos_part MeasureTheory.JordanDecomposition.smul_posPart @[simp] theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart := rfl #align measure_theory.jordan_decomposition.smul_neg_part MeasureTheory.JordanDecomposition.smul_negPart theorem real_smul_def (r : ℝ) (j : JordanDecomposition α) : r • j = if 0 ≤ r then r.toNNReal • j else -((-r).toNNReal • j) := rfl #align measure_theory.jordan_decomposition.real_smul_def MeasureTheory.JordanDecomposition.real_smul_def @[simp] theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j := by -- Porting note: replaced `show` rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe] #align measure_theory.jordan_decomposition.coe_smul MeasureTheory.JordanDecomposition.coe_smul theorem real_smul_nonneg (r : ℝ) (hr : 0 ≤ r) : r • j = r.toNNReal • j := dif_pos hr #align measure_theory.jordan_decomposition.real_smul_nonneg MeasureTheory.JordanDecomposition.real_smul_nonneg theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j) := dif_neg (not_le.2 hr) #align measure_theory.jordan_decomposition.real_smul_neg MeasureTheory.JordanDecomposition.real_smul_neg theorem real_smul_posPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).posPart = r.toNNReal • j.posPart := by rw [real_smul_def, ← smul_posPart, if_pos hr] #align measure_theory.jordan_decomposition.real_smul_pos_part_nonneg MeasureTheory.JordanDecomposition.real_smul_posPart_nonneg theorem real_smul_negPart_nonneg (r : ℝ) (hr : 0 ≤ r) : (r • j).negPart = r.toNNReal • j.negPart := by rw [real_smul_def, ← smul_negPart, if_pos hr] #align measure_theory.jordan_decomposition.real_smul_neg_part_nonneg MeasureTheory.JordanDecomposition.real_smul_negPart_nonneg theorem real_smul_posPart_neg (r : ℝ) (hr : r < 0) : (r • j).posPart = (-r).toNNReal • j.negPart := by rw [real_smul_def, ← smul_negPart, if_neg (not_le.2 hr), neg_posPart] #align measure_theory.jordan_decomposition.real_smul_pos_part_neg MeasureTheory.JordanDecomposition.real_smul_posPart_neg
Mathlib/MeasureTheory/Decomposition/Jordan.lean
163
165
theorem real_smul_negPart_neg (r : ℝ) (hr : r < 0) : (r • j).negPart = (-r).toNNReal • j.posPart := by
rw [real_smul_def, ← smul_posPart, if_neg (not_le.2 hr), neg_negPart]
1
2.718282
0
0.333333
6
360
import Mathlib.MeasureTheory.Decomposition.SignedHahn import Mathlib.MeasureTheory.Measure.MutuallySingular #align_import measure_theory.decomposition.jordan from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" noncomputable section open scoped Classical MeasureTheory ENNReal NNReal variable {α β : Type*} [MeasurableSpace α] namespace MeasureTheory @[ext] structure JordanDecomposition (α : Type*) [MeasurableSpace α] where (posPart negPart : Measure α) [posPart_finite : IsFiniteMeasure posPart] [negPart_finite : IsFiniteMeasure negPart] mutuallySingular : posPart ⟂ₘ negPart #align measure_theory.jordan_decomposition MeasureTheory.JordanDecomposition #align measure_theory.jordan_decomposition.pos_part MeasureTheory.JordanDecomposition.posPart #align measure_theory.jordan_decomposition.neg_part MeasureTheory.JordanDecomposition.negPart #align measure_theory.jordan_decomposition.pos_part_finite MeasureTheory.JordanDecomposition.posPart_finite #align measure_theory.jordan_decomposition.neg_part_finite MeasureTheory.JordanDecomposition.negPart_finite #align measure_theory.jordan_decomposition.mutually_singular MeasureTheory.JordanDecomposition.mutuallySingular attribute [instance] JordanDecomposition.posPart_finite attribute [instance] JordanDecomposition.negPart_finite namespace SignedMeasure open scoped Classical open JordanDecomposition Measure Set VectorMeasure variable {s : SignedMeasure α} {μ ν : Measure α} [IsFiniteMeasure μ] [IsFiniteMeasure ν] def toJordanDecomposition (s : SignedMeasure α) : JordanDecomposition α := let i := s.exists_compl_positive_negative.choose let hi := s.exists_compl_positive_negative.choose_spec { posPart := s.toMeasureOfZeroLE i hi.1 hi.2.1 negPart := s.toMeasureOfLEZero iᶜ hi.1.compl hi.2.2 posPart_finite := inferInstance negPart_finite := inferInstance mutuallySingular := by refine ⟨iᶜ, hi.1.compl, ?_, ?_⟩ -- Porting note: added `← NNReal.eq_iff` · rw [toMeasureOfZeroLE_apply _ _ hi.1 hi.1.compl]; simp [← NNReal.eq_iff] · rw [toMeasureOfLEZero_apply _ _ hi.1.compl hi.1.compl.compl]; simp [← NNReal.eq_iff] } #align measure_theory.signed_measure.to_jordan_decomposition MeasureTheory.SignedMeasure.toJordanDecomposition
Mathlib/MeasureTheory/Decomposition/Jordan.lean
242
248
theorem toJordanDecomposition_spec (s : SignedMeasure α) : ∃ (i : Set α) (hi₁ : MeasurableSet i) (hi₂ : 0 ≤[i] s) (hi₃ : s ≤[iᶜ] 0), s.toJordanDecomposition.posPart = s.toMeasureOfZeroLE i hi₁ hi₂ ∧ s.toJordanDecomposition.negPart = s.toMeasureOfLEZero iᶜ hi₁.compl hi₃ := by
set i := s.exists_compl_positive_negative.choose obtain ⟨hi₁, hi₂, hi₃⟩ := s.exists_compl_positive_negative.choose_spec exact ⟨i, hi₁, hi₂, hi₃, rfl, rfl⟩
3
20.085537
1
0.333333
6
360
import Mathlib.Control.Monad.Basic import Mathlib.Control.Monad.Writer import Mathlib.Init.Control.Lawful #align_import control.monad.cont from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" universe u v w u₀ u₁ v₀ v₁ structure MonadCont.Label (α : Type w) (m : Type u → Type v) (β : Type u) where apply : α → m β #align monad_cont.label MonadCont.Label def MonadCont.goto {α β} {m : Type u → Type v} (f : MonadCont.Label α m β) (x : α) := f.apply x #align monad_cont.goto MonadCont.goto class MonadCont (m : Type u → Type v) where callCC : ∀ {α β}, (MonadCont.Label α m β → m α) → m α #align monad_cont MonadCont open MonadCont class LawfulMonadCont (m : Type u → Type v) [Monad m] [MonadCont m] extends LawfulMonad m : Prop where callCC_bind_right {α ω γ} (cmd : m α) (next : Label ω m γ → α → m ω) : (callCC fun f => cmd >>= next f) = cmd >>= fun x => callCC fun f => next f x callCC_bind_left {α} (β) (x : α) (dead : Label α m β → β → m α) : (callCC fun f : Label α m β => goto f x >>= dead f) = pure x callCC_dummy {α β} (dummy : m α) : (callCC fun _ : Label α m β => dummy) = dummy #align is_lawful_monad_cont LawfulMonadCont export LawfulMonadCont (callCC_bind_right callCC_bind_left callCC_dummy) def ContT (r : Type u) (m : Type u → Type v) (α : Type w) := (α → m r) → m r #align cont_t ContT abbrev Cont (r : Type u) (α : Type w) := ContT r id α #align cont Cont namespace ContT export MonadCont (Label goto) variable {r : Type u} {m : Type u → Type v} {α β γ ω : Type w} def run : ContT r m α → (α → m r) → m r := id #align cont_t.run ContT.run def map (f : m r → m r) (x : ContT r m α) : ContT r m α := f ∘ x #align cont_t.map ContT.map theorem run_contT_map_contT (f : m r → m r) (x : ContT r m α) : run (map f x) = f ∘ run x := rfl #align cont_t.run_cont_t_map_cont_t ContT.run_contT_map_contT def withContT (f : (β → m r) → α → m r) (x : ContT r m α) : ContT r m β := fun g => x <| f g #align cont_t.with_cont_t ContT.withContT theorem run_withContT (f : (β → m r) → α → m r) (x : ContT r m α) : run (withContT f x) = run x ∘ f := rfl #align cont_t.run_with_cont_t ContT.run_withContT @[ext] protected theorem ext {x y : ContT r m α} (h : ∀ f, x.run f = y.run f) : x = y := by unfold ContT; ext; apply h #align cont_t.ext ContT.ext instance : Monad (ContT r m) where pure x f := f x bind x f g := x fun i => f i g instance : LawfulMonad (ContT r m) := LawfulMonad.mk' (id_map := by intros; rfl) (pure_bind := by intros; ext; rfl) (bind_assoc := by intros; ext; rfl) def monadLift [Monad m] {α} : m α → ContT r m α := fun x f => x >>= f #align cont_t.monad_lift ContT.monadLift instance [Monad m] : MonadLift m (ContT r m) where monadLift := ContT.monadLift
Mathlib/Control/Monad/Cont.lean
101
105
theorem monadLift_bind [Monad m] [LawfulMonad m] {α β} (x : m α) (f : α → m β) : (monadLift (x >>= f) : ContT r m β) = monadLift x >>= monadLift ∘ f := by
ext simp only [monadLift, MonadLift.monadLift, (· ∘ ·), (· >>= ·), bind_assoc, id, run, ContT.monadLift]
3
20.085537
1
0.333333
3
361
import Mathlib.Control.Monad.Basic import Mathlib.Control.Monad.Writer import Mathlib.Init.Control.Lawful #align_import control.monad.cont from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" universe u v w u₀ u₁ v₀ v₁ structure MonadCont.Label (α : Type w) (m : Type u → Type v) (β : Type u) where apply : α → m β #align monad_cont.label MonadCont.Label def MonadCont.goto {α β} {m : Type u → Type v} (f : MonadCont.Label α m β) (x : α) := f.apply x #align monad_cont.goto MonadCont.goto class MonadCont (m : Type u → Type v) where callCC : ∀ {α β}, (MonadCont.Label α m β → m α) → m α #align monad_cont MonadCont open MonadCont class LawfulMonadCont (m : Type u → Type v) [Monad m] [MonadCont m] extends LawfulMonad m : Prop where callCC_bind_right {α ω γ} (cmd : m α) (next : Label ω m γ → α → m ω) : (callCC fun f => cmd >>= next f) = cmd >>= fun x => callCC fun f => next f x callCC_bind_left {α} (β) (x : α) (dead : Label α m β → β → m α) : (callCC fun f : Label α m β => goto f x >>= dead f) = pure x callCC_dummy {α β} (dummy : m α) : (callCC fun _ : Label α m β => dummy) = dummy #align is_lawful_monad_cont LawfulMonadCont export LawfulMonadCont (callCC_bind_right callCC_bind_left callCC_dummy) def ContT (r : Type u) (m : Type u → Type v) (α : Type w) := (α → m r) → m r #align cont_t ContT abbrev Cont (r : Type u) (α : Type w) := ContT r id α #align cont Cont variable {m : Type u → Type v} [Monad m] def ExceptT.mkLabel {α β ε} : Label (Except.{u, u} ε α) m β → Label α (ExceptT ε m) β | ⟨f⟩ => ⟨fun a => monadLift <| f (Except.ok a)⟩ #align except_t.mk_label ExceptTₓ.mkLabel
Mathlib/Control/Monad/Cont.lean
128
130
theorem ExceptT.goto_mkLabel {α β ε : Type _} (x : Label (Except.{u, u} ε α) m β) (i : α) : goto (ExceptT.mkLabel x) i = ExceptT.mk (Except.ok <$> goto x (Except.ok i)) := by
cases x; rfl
1
2.718282
0
0.333333
3
361
import Mathlib.Control.Monad.Basic import Mathlib.Control.Monad.Writer import Mathlib.Init.Control.Lawful #align_import control.monad.cont from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" universe u v w u₀ u₁ v₀ v₁ structure MonadCont.Label (α : Type w) (m : Type u → Type v) (β : Type u) where apply : α → m β #align monad_cont.label MonadCont.Label def MonadCont.goto {α β} {m : Type u → Type v} (f : MonadCont.Label α m β) (x : α) := f.apply x #align monad_cont.goto MonadCont.goto class MonadCont (m : Type u → Type v) where callCC : ∀ {α β}, (MonadCont.Label α m β → m α) → m α #align monad_cont MonadCont open MonadCont class LawfulMonadCont (m : Type u → Type v) [Monad m] [MonadCont m] extends LawfulMonad m : Prop where callCC_bind_right {α ω γ} (cmd : m α) (next : Label ω m γ → α → m ω) : (callCC fun f => cmd >>= next f) = cmd >>= fun x => callCC fun f => next f x callCC_bind_left {α} (β) (x : α) (dead : Label α m β → β → m α) : (callCC fun f : Label α m β => goto f x >>= dead f) = pure x callCC_dummy {α β} (dummy : m α) : (callCC fun _ : Label α m β => dummy) = dummy #align is_lawful_monad_cont LawfulMonadCont export LawfulMonadCont (callCC_bind_right callCC_bind_left callCC_dummy) def ContT (r : Type u) (m : Type u → Type v) (α : Type w) := (α → m r) → m r #align cont_t ContT abbrev Cont (r : Type u) (α : Type w) := ContT r id α #align cont Cont variable {m : Type u → Type v} [Monad m] def ExceptT.mkLabel {α β ε} : Label (Except.{u, u} ε α) m β → Label α (ExceptT ε m) β | ⟨f⟩ => ⟨fun a => monadLift <| f (Except.ok a)⟩ #align except_t.mk_label ExceptTₓ.mkLabel theorem ExceptT.goto_mkLabel {α β ε : Type _} (x : Label (Except.{u, u} ε α) m β) (i : α) : goto (ExceptT.mkLabel x) i = ExceptT.mk (Except.ok <$> goto x (Except.ok i)) := by cases x; rfl #align except_t.goto_mk_label ExceptTₓ.goto_mkLabel nonrec def ExceptT.callCC {ε} [MonadCont m] {α β : Type _} (f : Label α (ExceptT ε m) β → ExceptT ε m α) : ExceptT ε m α := ExceptT.mk (callCC fun x : Label _ m β => ExceptT.run <| f (ExceptT.mkLabel x)) #align except_t.call_cc ExceptTₓ.callCC instance {ε} [MonadCont m] : MonadCont (ExceptT ε m) where callCC := ExceptT.callCC instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where callCC_bind_right := by intros; simp only [callCC, ExceptT.callCC, ExceptT.run_bind, callCC_bind_right]; ext dsimp congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _] callCC_bind_left := by intros simp only [callCC, ExceptT.callCC, ExceptT.goto_mkLabel, map_eq_bind_pure_comp, Function.comp, ExceptT.run_bind, ExceptT.run_mk, bind_assoc, pure_bind, @callCC_bind_left m _] ext; rfl callCC_dummy := by intros; simp only [callCC, ExceptT.callCC, @callCC_dummy m _]; ext; rfl def OptionT.mkLabel {α β} : Label (Option.{u} α) m β → Label α (OptionT m) β | ⟨f⟩ => ⟨fun a => monadLift <| f (some a)⟩ #align option_t.mk_label OptionTₓ.mkLabel theorem OptionT.goto_mkLabel {α β : Type _} (x : Label (Option.{u} α) m β) (i : α) : goto (OptionT.mkLabel x) i = OptionT.mk (goto x (some i) >>= fun a => pure (some a)) := rfl #align option_t.goto_mk_label OptionTₓ.goto_mkLabel nonrec def OptionT.callCC [MonadCont m] {α β : Type _} (f : Label α (OptionT m) β → OptionT m α) : OptionT m α := OptionT.mk (callCC fun x : Label _ m β => OptionT.run <| f (OptionT.mkLabel x) : m (Option α)) #align option_t.call_cc OptionTₓ.callCC instance [MonadCont m] : MonadCont (OptionT m) where callCC := OptionT.callCC instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where callCC_bind_right := by intros; simp only [callCC, OptionT.callCC, OptionT.run_bind, callCC_bind_right]; ext dsimp congr with ⟨⟩ <;> simp [@callCC_dummy m _] callCC_bind_left := by intros; simp only [callCC, OptionT.callCC, OptionT.goto_mkLabel, OptionT.run_bind, OptionT.run_mk, bind_assoc, pure_bind, @callCC_bind_left m _] ext; rfl callCC_dummy := by intros; simp only [callCC, OptionT.callCC, @callCC_dummy m _]; ext; rfl def WriterT.mkLabel {α β ω} [EmptyCollection ω] : Label (α × ω) m β → Label α (WriterT ω m) β | ⟨f⟩ => ⟨fun a => monadLift <| f (a, ∅)⟩ def WriterT.mkLabel' {α β ω} [Monoid ω] : Label (α × ω) m β → Label α (WriterT ω m) β | ⟨f⟩ => ⟨fun a => monadLift <| f (a, 1)⟩ #align writer_t.mk_label WriterTₓ.mkLabel'
Mathlib/Control/Monad/Cont.lean
193
194
theorem WriterT.goto_mkLabel {α β ω : Type _} [EmptyCollection ω] (x : Label (α × ω) m β) (i : α) : goto (WriterT.mkLabel x) i = monadLift (goto x (i, ∅)) := by
cases x; rfl
1
2.718282
0
0.333333
3
361
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp]
Mathlib/Data/Multiset/NatAntidiagonal.lean
36
37
theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by
rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal]
1
2.718282
0
0.333333
6
362
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp] theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal] #align multiset.nat.mem_antidiagonal Multiset.Nat.mem_antidiagonal @[simp]
Mathlib/Data/Multiset/NatAntidiagonal.lean
42
43
theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 := by
rw [antidiagonal, coe_card, List.Nat.length_antidiagonal]
1
2.718282
0
0.333333
6
362
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp] theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal] #align multiset.nat.mem_antidiagonal Multiset.Nat.mem_antidiagonal @[simp] theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 := by rw [antidiagonal, coe_card, List.Nat.length_antidiagonal] #align multiset.nat.card_antidiagonal Multiset.Nat.card_antidiagonal @[simp] theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} := rfl #align multiset.nat.antidiagonal_zero Multiset.Nat.antidiagonal_zero @[simp] theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) := coe_nodup.2 <| List.Nat.nodup_antidiagonal n #align multiset.nat.nodup_antidiagonal Multiset.Nat.nodup_antidiagonal @[simp]
Mathlib/Data/Multiset/NatAntidiagonal.lean
59
61
theorem antidiagonal_succ {n : ℕ} : antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) := by
simp only [antidiagonal, List.Nat.antidiagonal_succ, map_coe, cons_coe]
1
2.718282
0
0.333333
6
362
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp] theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal] #align multiset.nat.mem_antidiagonal Multiset.Nat.mem_antidiagonal @[simp] theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 := by rw [antidiagonal, coe_card, List.Nat.length_antidiagonal] #align multiset.nat.card_antidiagonal Multiset.Nat.card_antidiagonal @[simp] theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} := rfl #align multiset.nat.antidiagonal_zero Multiset.Nat.antidiagonal_zero @[simp] theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) := coe_nodup.2 <| List.Nat.nodup_antidiagonal n #align multiset.nat.nodup_antidiagonal Multiset.Nat.nodup_antidiagonal @[simp] theorem antidiagonal_succ {n : ℕ} : antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) := by simp only [antidiagonal, List.Nat.antidiagonal_succ, map_coe, cons_coe] #align multiset.nat.antidiagonal_succ Multiset.Nat.antidiagonal_succ
Mathlib/Data/Multiset/NatAntidiagonal.lean
64
67
theorem antidiagonal_succ' {n : ℕ} : antidiagonal (n + 1) = (n + 1, 0) ::ₘ (antidiagonal n).map (Prod.map id Nat.succ) := by
rw [antidiagonal, List.Nat.antidiagonal_succ', ← coe_add, add_comm, antidiagonal, map_coe, coe_add, List.singleton_append, cons_coe]
2
7.389056
1
0.333333
6
362
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp] theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal] #align multiset.nat.mem_antidiagonal Multiset.Nat.mem_antidiagonal @[simp] theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 := by rw [antidiagonal, coe_card, List.Nat.length_antidiagonal] #align multiset.nat.card_antidiagonal Multiset.Nat.card_antidiagonal @[simp] theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} := rfl #align multiset.nat.antidiagonal_zero Multiset.Nat.antidiagonal_zero @[simp] theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) := coe_nodup.2 <| List.Nat.nodup_antidiagonal n #align multiset.nat.nodup_antidiagonal Multiset.Nat.nodup_antidiagonal @[simp] theorem antidiagonal_succ {n : ℕ} : antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) := by simp only [antidiagonal, List.Nat.antidiagonal_succ, map_coe, cons_coe] #align multiset.nat.antidiagonal_succ Multiset.Nat.antidiagonal_succ theorem antidiagonal_succ' {n : ℕ} : antidiagonal (n + 1) = (n + 1, 0) ::ₘ (antidiagonal n).map (Prod.map id Nat.succ) := by rw [antidiagonal, List.Nat.antidiagonal_succ', ← coe_add, add_comm, antidiagonal, map_coe, coe_add, List.singleton_append, cons_coe] #align multiset.nat.antidiagonal_succ' Multiset.Nat.antidiagonal_succ'
Mathlib/Data/Multiset/NatAntidiagonal.lean
70
74
theorem antidiagonal_succ_succ' {n : ℕ} : antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ (antidiagonal n).map (Prod.map Nat.succ Nat.succ) := by
rw [antidiagonal_succ, antidiagonal_succ', map_cons, map_map, Prod.map_apply] rfl
2
7.389056
1
0.333333
6
362
import Mathlib.Data.Multiset.Nodup import Mathlib.Data.List.NatAntidiagonal #align_import data.multiset.nat_antidiagonal from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Multiset namespace Nat def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) := List.Nat.antidiagonal n #align multiset.nat.antidiagonal Multiset.Nat.antidiagonal @[simp] theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n := by rw [antidiagonal, mem_coe, List.Nat.mem_antidiagonal] #align multiset.nat.mem_antidiagonal Multiset.Nat.mem_antidiagonal @[simp] theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 := by rw [antidiagonal, coe_card, List.Nat.length_antidiagonal] #align multiset.nat.card_antidiagonal Multiset.Nat.card_antidiagonal @[simp] theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} := rfl #align multiset.nat.antidiagonal_zero Multiset.Nat.antidiagonal_zero @[simp] theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) := coe_nodup.2 <| List.Nat.nodup_antidiagonal n #align multiset.nat.nodup_antidiagonal Multiset.Nat.nodup_antidiagonal @[simp] theorem antidiagonal_succ {n : ℕ} : antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) := by simp only [antidiagonal, List.Nat.antidiagonal_succ, map_coe, cons_coe] #align multiset.nat.antidiagonal_succ Multiset.Nat.antidiagonal_succ theorem antidiagonal_succ' {n : ℕ} : antidiagonal (n + 1) = (n + 1, 0) ::ₘ (antidiagonal n).map (Prod.map id Nat.succ) := by rw [antidiagonal, List.Nat.antidiagonal_succ', ← coe_add, add_comm, antidiagonal, map_coe, coe_add, List.singleton_append, cons_coe] #align multiset.nat.antidiagonal_succ' Multiset.Nat.antidiagonal_succ' theorem antidiagonal_succ_succ' {n : ℕ} : antidiagonal (n + 2) = (0, n + 2) ::ₘ (n + 2, 0) ::ₘ (antidiagonal n).map (Prod.map Nat.succ Nat.succ) := by rw [antidiagonal_succ, antidiagonal_succ', map_cons, map_map, Prod.map_apply] rfl #align multiset.nat.antidiagonal_succ_succ' Multiset.Nat.antidiagonal_succ_succ'
Mathlib/Data/Multiset/NatAntidiagonal.lean
77
78
theorem map_swap_antidiagonal {n : ℕ} : (antidiagonal n).map Prod.swap = antidiagonal n := by
rw [antidiagonal, map_coe, List.Nat.map_swap_antidiagonal, coe_reverse]
1
2.718282
0
0.333333
6
362
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Congruence import Mathlib.RingTheory.Ideal.Basic import Mathlib.Tactic.FinCases #align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" universe u v w namespace Ideal open Set variable {R : Type u} [CommRing R] (I : Ideal R) {a b : R} variable {S : Type v} -- Note that at present `Ideal` means a left-ideal, -- so this quotient is only useful in a commutative ring. -- We should develop quotients by two-sided ideals as well. @[instance] abbrev instHasQuotient : HasQuotient R (Ideal R) := Submodule.hasQuotient namespace Quotient variable {I} {x y : R} instance one (I : Ideal R) : One (R ⧸ I) := ⟨Submodule.Quotient.mk 1⟩ #align ideal.quotient.has_one Ideal.Quotient.one protected def ringCon (I : Ideal R) : RingCon R := { QuotientAddGroup.con I.toAddSubgroup with mul' := fun {a₁ b₁ a₂ b₂} h₁ h₂ => by rw [Submodule.quotientRel_r_def] at h₁ h₂ ⊢ have F := I.add_mem (I.mul_mem_left a₂ h₁) (I.mul_mem_right b₁ h₂) have : a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁ := by rw [mul_sub, sub_mul, sub_add_sub_cancel, mul_comm, mul_comm b₁] rwa [← this] at F } #align ideal.quotient.ring_con Ideal.Quotient.ringCon instance commRing (I : Ideal R) : CommRing (R ⧸ I) := inferInstanceAs (CommRing (Quotient.ringCon I).Quotient) #align ideal.quotient.comm_ring Ideal.Quotient.commRing -- Sanity test to make sure no diamonds have emerged in `commRing` example : (commRing I).toAddCommGroup = Submodule.Quotient.addCommGroup I := rfl -- this instance is harder to find than the one via `Algebra α (R ⧸ I)`, so use a lower priority instance (priority := 100) isScalarTower_right {α} [SMul α R] [IsScalarTower α R R] : IsScalarTower α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).isScalarTower_right #align ideal.quotient.is_scalar_tower_right Ideal.Quotient.isScalarTower_right instance smulCommClass {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass α R R] : SMulCommClass α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).smulCommClass #align ideal.quotient.smul_comm_class Ideal.Quotient.smulCommClass instance smulCommClass' {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass R α R] : SMulCommClass (R ⧸ I) α (R ⧸ I) := (Quotient.ringCon I).smulCommClass' #align ideal.quotient.smul_comm_class' Ideal.Quotient.smulCommClass' def mk (I : Ideal R) : R →+* R ⧸ I where toFun a := Submodule.Quotient.mk a map_zero' := rfl map_one' := rfl map_mul' _ _ := rfl map_add' _ _ := rfl #align ideal.quotient.mk Ideal.Quotient.mk instance {I : Ideal R} : Coe R (R ⧸ I) := ⟨Ideal.Quotient.mk I⟩ @[ext 1100] theorem ringHom_ext [NonAssocSemiring S] ⦃f g : R ⧸ I →+* S⦄ (h : f.comp (mk I) = g.comp (mk I)) : f = g := RingHom.ext fun x => Quotient.inductionOn' x <| (RingHom.congr_fun h : _) #align ideal.quotient.ring_hom_ext Ideal.Quotient.ringHom_ext instance inhabited : Inhabited (R ⧸ I) := ⟨mk I 37⟩ #align ideal.quotient.inhabited Ideal.Quotient.inhabited protected theorem eq : mk I x = mk I y ↔ x - y ∈ I := Submodule.Quotient.eq I #align ideal.quotient.eq Ideal.Quotient.eq @[simp] theorem mk_eq_mk (x : R) : (Submodule.Quotient.mk x : R ⧸ I) = mk I x := rfl #align ideal.quotient.mk_eq_mk Ideal.Quotient.mk_eq_mk theorem eq_zero_iff_mem {I : Ideal R} : mk I a = 0 ↔ a ∈ I := Submodule.Quotient.mk_eq_zero _ #align ideal.quotient.eq_zero_iff_mem Ideal.Quotient.eq_zero_iff_mem
Mathlib/RingTheory/Ideal/Quotient.lean
129
130
theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y := by
rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton]
1
2.718282
0
0.333333
3
363
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Congruence import Mathlib.RingTheory.Ideal.Basic import Mathlib.Tactic.FinCases #align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" universe u v w namespace Ideal open Set variable {R : Type u} [CommRing R] (I : Ideal R) {a b : R} variable {S : Type v} -- Note that at present `Ideal` means a left-ideal, -- so this quotient is only useful in a commutative ring. -- We should develop quotients by two-sided ideals as well. @[instance] abbrev instHasQuotient : HasQuotient R (Ideal R) := Submodule.hasQuotient namespace Quotient variable {I} {x y : R} instance one (I : Ideal R) : One (R ⧸ I) := ⟨Submodule.Quotient.mk 1⟩ #align ideal.quotient.has_one Ideal.Quotient.one protected def ringCon (I : Ideal R) : RingCon R := { QuotientAddGroup.con I.toAddSubgroup with mul' := fun {a₁ b₁ a₂ b₂} h₁ h₂ => by rw [Submodule.quotientRel_r_def] at h₁ h₂ ⊢ have F := I.add_mem (I.mul_mem_left a₂ h₁) (I.mul_mem_right b₁ h₂) have : a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁ := by rw [mul_sub, sub_mul, sub_add_sub_cancel, mul_comm, mul_comm b₁] rwa [← this] at F } #align ideal.quotient.ring_con Ideal.Quotient.ringCon instance commRing (I : Ideal R) : CommRing (R ⧸ I) := inferInstanceAs (CommRing (Quotient.ringCon I).Quotient) #align ideal.quotient.comm_ring Ideal.Quotient.commRing -- Sanity test to make sure no diamonds have emerged in `commRing` example : (commRing I).toAddCommGroup = Submodule.Quotient.addCommGroup I := rfl -- this instance is harder to find than the one via `Algebra α (R ⧸ I)`, so use a lower priority instance (priority := 100) isScalarTower_right {α} [SMul α R] [IsScalarTower α R R] : IsScalarTower α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).isScalarTower_right #align ideal.quotient.is_scalar_tower_right Ideal.Quotient.isScalarTower_right instance smulCommClass {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass α R R] : SMulCommClass α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).smulCommClass #align ideal.quotient.smul_comm_class Ideal.Quotient.smulCommClass instance smulCommClass' {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass R α R] : SMulCommClass (R ⧸ I) α (R ⧸ I) := (Quotient.ringCon I).smulCommClass' #align ideal.quotient.smul_comm_class' Ideal.Quotient.smulCommClass' def mk (I : Ideal R) : R →+* R ⧸ I where toFun a := Submodule.Quotient.mk a map_zero' := rfl map_one' := rfl map_mul' _ _ := rfl map_add' _ _ := rfl #align ideal.quotient.mk Ideal.Quotient.mk instance {I : Ideal R} : Coe R (R ⧸ I) := ⟨Ideal.Quotient.mk I⟩ @[ext 1100] theorem ringHom_ext [NonAssocSemiring S] ⦃f g : R ⧸ I →+* S⦄ (h : f.comp (mk I) = g.comp (mk I)) : f = g := RingHom.ext fun x => Quotient.inductionOn' x <| (RingHom.congr_fun h : _) #align ideal.quotient.ring_hom_ext Ideal.Quotient.ringHom_ext instance inhabited : Inhabited (R ⧸ I) := ⟨mk I 37⟩ #align ideal.quotient.inhabited Ideal.Quotient.inhabited protected theorem eq : mk I x = mk I y ↔ x - y ∈ I := Submodule.Quotient.eq I #align ideal.quotient.eq Ideal.Quotient.eq @[simp] theorem mk_eq_mk (x : R) : (Submodule.Quotient.mk x : R ⧸ I) = mk I x := rfl #align ideal.quotient.mk_eq_mk Ideal.Quotient.mk_eq_mk theorem eq_zero_iff_mem {I : Ideal R} : mk I a = 0 ↔ a ∈ I := Submodule.Quotient.mk_eq_zero _ #align ideal.quotient.eq_zero_iff_mem Ideal.Quotient.eq_zero_iff_mem theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y := by rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton] @[simp] lemma mk_singleton_self (x : R) : mk (Ideal.span {x}) x = 0 := by rw [eq_zero_iff_dvd] -- Porting note (#10756): new theorem
Mathlib/RingTheory/Ideal/Quotient.lean
137
138
theorem mk_eq_mk_iff_sub_mem (x y : R) : mk I x = mk I y ↔ x - y ∈ I := by
rw [← eq_zero_iff_mem, map_sub, sub_eq_zero]
1
2.718282
0
0.333333
3
363
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Congruence import Mathlib.RingTheory.Ideal.Basic import Mathlib.Tactic.FinCases #align_import ring_theory.ideal.quotient from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" universe u v w namespace Ideal open Set variable {R : Type u} [CommRing R] (I : Ideal R) {a b : R} variable {S : Type v} -- Note that at present `Ideal` means a left-ideal, -- so this quotient is only useful in a commutative ring. -- We should develop quotients by two-sided ideals as well. @[instance] abbrev instHasQuotient : HasQuotient R (Ideal R) := Submodule.hasQuotient namespace Quotient variable {I} {x y : R} instance one (I : Ideal R) : One (R ⧸ I) := ⟨Submodule.Quotient.mk 1⟩ #align ideal.quotient.has_one Ideal.Quotient.one protected def ringCon (I : Ideal R) : RingCon R := { QuotientAddGroup.con I.toAddSubgroup with mul' := fun {a₁ b₁ a₂ b₂} h₁ h₂ => by rw [Submodule.quotientRel_r_def] at h₁ h₂ ⊢ have F := I.add_mem (I.mul_mem_left a₂ h₁) (I.mul_mem_right b₁ h₂) have : a₁ * a₂ - b₁ * b₂ = a₂ * (a₁ - b₁) + (a₂ - b₂) * b₁ := by rw [mul_sub, sub_mul, sub_add_sub_cancel, mul_comm, mul_comm b₁] rwa [← this] at F } #align ideal.quotient.ring_con Ideal.Quotient.ringCon instance commRing (I : Ideal R) : CommRing (R ⧸ I) := inferInstanceAs (CommRing (Quotient.ringCon I).Quotient) #align ideal.quotient.comm_ring Ideal.Quotient.commRing -- Sanity test to make sure no diamonds have emerged in `commRing` example : (commRing I).toAddCommGroup = Submodule.Quotient.addCommGroup I := rfl -- this instance is harder to find than the one via `Algebra α (R ⧸ I)`, so use a lower priority instance (priority := 100) isScalarTower_right {α} [SMul α R] [IsScalarTower α R R] : IsScalarTower α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).isScalarTower_right #align ideal.quotient.is_scalar_tower_right Ideal.Quotient.isScalarTower_right instance smulCommClass {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass α R R] : SMulCommClass α (R ⧸ I) (R ⧸ I) := (Quotient.ringCon I).smulCommClass #align ideal.quotient.smul_comm_class Ideal.Quotient.smulCommClass instance smulCommClass' {α} [SMul α R] [IsScalarTower α R R] [SMulCommClass R α R] : SMulCommClass (R ⧸ I) α (R ⧸ I) := (Quotient.ringCon I).smulCommClass' #align ideal.quotient.smul_comm_class' Ideal.Quotient.smulCommClass' def mk (I : Ideal R) : R →+* R ⧸ I where toFun a := Submodule.Quotient.mk a map_zero' := rfl map_one' := rfl map_mul' _ _ := rfl map_add' _ _ := rfl #align ideal.quotient.mk Ideal.Quotient.mk instance {I : Ideal R} : Coe R (R ⧸ I) := ⟨Ideal.Quotient.mk I⟩ @[ext 1100] theorem ringHom_ext [NonAssocSemiring S] ⦃f g : R ⧸ I →+* S⦄ (h : f.comp (mk I) = g.comp (mk I)) : f = g := RingHom.ext fun x => Quotient.inductionOn' x <| (RingHom.congr_fun h : _) #align ideal.quotient.ring_hom_ext Ideal.Quotient.ringHom_ext instance inhabited : Inhabited (R ⧸ I) := ⟨mk I 37⟩ #align ideal.quotient.inhabited Ideal.Quotient.inhabited protected theorem eq : mk I x = mk I y ↔ x - y ∈ I := Submodule.Quotient.eq I #align ideal.quotient.eq Ideal.Quotient.eq @[simp] theorem mk_eq_mk (x : R) : (Submodule.Quotient.mk x : R ⧸ I) = mk I x := rfl #align ideal.quotient.mk_eq_mk Ideal.Quotient.mk_eq_mk theorem eq_zero_iff_mem {I : Ideal R} : mk I a = 0 ↔ a ∈ I := Submodule.Quotient.mk_eq_zero _ #align ideal.quotient.eq_zero_iff_mem Ideal.Quotient.eq_zero_iff_mem theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y := by rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton] @[simp] lemma mk_singleton_self (x : R) : mk (Ideal.span {x}) x = 0 := by rw [eq_zero_iff_dvd] -- Porting note (#10756): new theorem theorem mk_eq_mk_iff_sub_mem (x y : R) : mk I x = mk I y ↔ x - y ∈ I := by rw [← eq_zero_iff_mem, map_sub, sub_eq_zero] theorem zero_eq_one_iff {I : Ideal R} : (0 : R ⧸ I) = 1 ↔ I = ⊤ := eq_comm.trans <| eq_zero_iff_mem.trans (eq_top_iff_one _).symm #align ideal.quotient.zero_eq_one_iff Ideal.Quotient.zero_eq_one_iff theorem zero_ne_one_iff {I : Ideal R} : (0 : R ⧸ I) ≠ 1 ↔ I ≠ ⊤ := not_congr zero_eq_one_iff #align ideal.quotient.zero_ne_one_iff Ideal.Quotient.zero_ne_one_iff protected theorem nontrivial {I : Ideal R} (hI : I ≠ ⊤) : Nontrivial (R ⧸ I) := ⟨⟨0, 1, zero_ne_one_iff.2 hI⟩⟩ #align ideal.quotient.nontrivial Ideal.Quotient.nontrivial
Mathlib/RingTheory/Ideal/Quotient.lean
152
154
theorem subsingleton_iff {I : Ideal R} : Subsingleton (R ⧸ I) ↔ I = ⊤ := by
rw [eq_top_iff_one, ← subsingleton_iff_zero_eq_one, eq_comm, ← (mk I).map_one, Quotient.eq_zero_iff_mem]
2
7.389056
1
0.333333
3
363
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
60
61
theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by
rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
87
88
theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by
simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
92
93
theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by
simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
97
98
theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by
simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp] theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Icc_left Set.iUnion_Icc_left @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
102
103
theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b := by
simp only [← Ici_inter_Iio, ← iUnion_inter, iUnion_Ici, univ_inter]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp] theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Icc_left Set.iUnion_Icc_left @[simp] theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b := by simp only [← Ici_inter_Iio, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Ico_left Set.iUnion_Ico_left @[simp] theorem iUnion_Iio [NoMaxOrder α] : ⋃ a : α, Iio a = univ := iUnion_eq_univ_iff.2 exists_gt #align set.Union_Iio Set.iUnion_Iio @[simp] theorem iUnion_Ioi [NoMinOrder α] : ⋃ a : α, Ioi a = univ := iUnion_eq_univ_iff.2 exists_lt #align set.Union_Ioi Set.iUnion_Ioi @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
117
118
theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a := by
simp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp] theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Icc_left Set.iUnion_Icc_left @[simp] theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b := by simp only [← Ici_inter_Iio, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Ico_left Set.iUnion_Ico_left @[simp] theorem iUnion_Iio [NoMaxOrder α] : ⋃ a : α, Iio a = univ := iUnion_eq_univ_iff.2 exists_gt #align set.Union_Iio Set.iUnion_Iio @[simp] theorem iUnion_Ioi [NoMinOrder α] : ⋃ a : α, Ioi a = univ := iUnion_eq_univ_iff.2 exists_lt #align set.Union_Ioi Set.iUnion_Ioi @[simp] theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a := by simp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ] #align set.Union_Ico_right Set.iUnion_Ico_right @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
122
123
theorem iUnion_Ioo_right [NoMaxOrder α] (a : α) : ⋃ b, Ioo a b = Ioi a := by
simp only [← Ioi_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp] theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Icc_left Set.iUnion_Icc_left @[simp] theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b := by simp only [← Ici_inter_Iio, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Ico_left Set.iUnion_Ico_left @[simp] theorem iUnion_Iio [NoMaxOrder α] : ⋃ a : α, Iio a = univ := iUnion_eq_univ_iff.2 exists_gt #align set.Union_Iio Set.iUnion_Iio @[simp] theorem iUnion_Ioi [NoMinOrder α] : ⋃ a : α, Ioi a = univ := iUnion_eq_univ_iff.2 exists_lt #align set.Union_Ioi Set.iUnion_Ioi @[simp] theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a := by simp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ] #align set.Union_Ico_right Set.iUnion_Ico_right @[simp] theorem iUnion_Ioo_right [NoMaxOrder α] (a : α) : ⋃ b, Ioo a b = Ioi a := by simp only [← Ioi_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ] #align set.Union_Ioo_right Set.iUnion_Ioo_right @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
127
128
theorem iUnion_Ioc_left [NoMinOrder α] (b : α) : ⋃ a, Ioc a b = Iic b := by
simp only [← Ioi_inter_Iic, ← iUnion_inter, iUnion_Ioi, univ_inter]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section Preorder variable [Preorder α] {a b c : α} @[simp] theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt hb).not_le ha #align set.Iic_disjoint_Ioi Set.Iic_disjoint_Ioi @[simp] theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b) := disjoint_left.mpr fun _ ha hb => (h.trans_lt' ha).not_le hb @[simp] theorem Iic_disjoint_Ioc (h : a ≤ b) : Disjoint (Iic a) (Ioc b c) := (Iic_disjoint_Ioi h).mono le_rfl Ioc_subset_Ioi_self #align set.Iic_disjoint_Ioc Set.Iic_disjoint_Ioc @[simp] theorem Ioc_disjoint_Ioc_same : Disjoint (Ioc a b) (Ioc b c) := (Iic_disjoint_Ioc le_rfl).mono Ioc_subset_Iic_self le_rfl #align set.Ioc_disjoint_Ioc_same Set.Ioc_disjoint_Ioc_same @[simp] theorem Ico_disjoint_Ico_same : Disjoint (Ico a b) (Ico b c) := disjoint_left.mpr fun _ hab hbc => hab.2.not_le hbc.1 #align set.Ico_disjoint_Ico_same Set.Ico_disjoint_Ico_same @[simp] theorem Ici_disjoint_Iic : Disjoint (Ici a) (Iic b) ↔ ¬a ≤ b := by rw [Set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff] #align set.Ici_disjoint_Iic Set.Ici_disjoint_Iic @[simp] theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a := disjoint_comm.trans Ici_disjoint_Iic #align set.Iic_disjoint_Ici Set.Iic_disjoint_Ici @[simp] theorem Ioc_disjoint_Ioi (h : b ≤ c) : Disjoint (Ioc a b) (Ioi c) := disjoint_left.mpr (fun _ hx hy ↦ (hx.2.trans h).not_lt hy) theorem Ioc_disjoint_Ioi_same : Disjoint (Ioc a b) (Ioi b) := Ioc_disjoint_Ioi le_rfl @[simp] theorem iUnion_Iic : ⋃ a : α, Iic a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, right_mem_Iic⟩ #align set.Union_Iic Set.iUnion_Iic @[simp] theorem iUnion_Ici : ⋃ a : α, Ici a = univ := iUnion_eq_univ_iff.2 fun x => ⟨x, left_mem_Ici⟩ #align set.Union_Ici Set.iUnion_Ici @[simp] theorem iUnion_Icc_right (a : α) : ⋃ b, Icc a b = Ici a := by simp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Icc_right Set.iUnion_Icc_right @[simp] theorem iUnion_Ioc_right (a : α) : ⋃ b, Ioc a b = Ioi a := by simp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic, inter_univ] #align set.Union_Ioc_right Set.iUnion_Ioc_right @[simp] theorem iUnion_Icc_left (b : α) : ⋃ a, Icc a b = Iic b := by simp only [← Ici_inter_Iic, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Icc_left Set.iUnion_Icc_left @[simp] theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b := by simp only [← Ici_inter_Iio, ← iUnion_inter, iUnion_Ici, univ_inter] #align set.Union_Ico_left Set.iUnion_Ico_left @[simp] theorem iUnion_Iio [NoMaxOrder α] : ⋃ a : α, Iio a = univ := iUnion_eq_univ_iff.2 exists_gt #align set.Union_Iio Set.iUnion_Iio @[simp] theorem iUnion_Ioi [NoMinOrder α] : ⋃ a : α, Ioi a = univ := iUnion_eq_univ_iff.2 exists_lt #align set.Union_Ioi Set.iUnion_Ioi @[simp] theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a := by simp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ] #align set.Union_Ico_right Set.iUnion_Ico_right @[simp] theorem iUnion_Ioo_right [NoMaxOrder α] (a : α) : ⋃ b, Ioo a b = Ioi a := by simp only [← Ioi_inter_Iio, ← inter_iUnion, iUnion_Iio, inter_univ] #align set.Union_Ioo_right Set.iUnion_Ioo_right @[simp] theorem iUnion_Ioc_left [NoMinOrder α] (b : α) : ⋃ a, Ioc a b = Iic b := by simp only [← Ioi_inter_Iic, ← iUnion_inter, iUnion_Ioi, univ_inter] #align set.Union_Ioc_left Set.iUnion_Ioc_left @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
132
133
theorem iUnion_Ioo_left [NoMinOrder α] (b : α) : ⋃ a, Ioo a b = Iio b := by
simp only [← Ioi_inter_Iio, ← iUnion_inter, iUnion_Ioi, univ_inter]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
143
145
theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by
simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt]
2
7.389056
1
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
149
151
theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by
have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h
2
7.389056
1
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
155
158
theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by
simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt]
2
7.389056
1
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp] theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt]
Mathlib/Order/Interval/Set/Disjoint.lean
162
166
theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by
rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h apply le_antisymm h2.1 exact h.elim (fun h => absurd hx (not_lt_of_le h)) id
3
20.085537
1
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp] theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h apply le_antisymm h2.1 exact h.elim (fun h => absurd hx (not_lt_of_le h)) id #align set.eq_of_Ico_disjoint Set.eq_of_Ico_disjoint @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
170
172
theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} : ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by
simp [← Ici_inter_Iio, ← iUnion_inter, subset_def]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp] theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h apply le_antisymm h2.1 exact h.elim (fun h => absurd hx (not_lt_of_le h)) id #align set.eq_of_Ico_disjoint Set.eq_of_Ico_disjoint @[simp] theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} : ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by simp [← Ici_inter_Iio, ← iUnion_inter, subset_def] #align set.Union_Ico_eq_Iio_self_iff Set.iUnion_Ico_eq_Iio_self_iff @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
176
178
theorem iUnion_Ioc_eq_Ioi_self_iff {f : ι → α} {a : α} : ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ x, a < x → ∃ i, x ≤ f i := by
simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp] theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h apply le_antisymm h2.1 exact h.elim (fun h => absurd hx (not_lt_of_le h)) id #align set.eq_of_Ico_disjoint Set.eq_of_Ico_disjoint @[simp] theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} : ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by simp [← Ici_inter_Iio, ← iUnion_inter, subset_def] #align set.Union_Ico_eq_Iio_self_iff Set.iUnion_Ico_eq_Iio_self_iff @[simp] theorem iUnion_Ioc_eq_Ioi_self_iff {f : ι → α} {a : α} : ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ x, a < x → ∃ i, x ≤ f i := by simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def] #align set.Union_Ioc_eq_Ioi_self_iff Set.iUnion_Ioc_eq_Ioi_self_iff @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
182
184
theorem biUnion_Ico_eq_Iio_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} : ⋃ (i) (hi : p i), Ico (f i hi) a = Iio a ↔ ∀ x < a, ∃ i hi, f i hi ≤ x := by
simp [← Ici_inter_Iio, ← iUnion_inter, subset_def]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section LinearOrder variable [LinearOrder α] {a₁ a₂ b₁ b₂ : α} @[simp] theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ico_inter_Ico, Ico_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] #align set.Ico_disjoint_Ico Set.Ico_disjoint_Ico @[simp] theorem Ioc_disjoint_Ioc : Disjoint (Ioc a₁ a₂) (Ioc b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by have h : _ ↔ min (toDual a₁) (toDual b₁) ≤ max (toDual a₂) (toDual b₂) := Ico_disjoint_Ico simpa only [dual_Ico] using h #align set.Ioc_disjoint_Ioc Set.Ioc_disjoint_Ioc @[simp] theorem Ioo_disjoint_Ioo [DenselyOrdered α] : Disjoint (Set.Ioo a₁ a₂) (Set.Ioo b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁ := by simp_rw [Set.disjoint_iff_inter_eq_empty, Ioo_inter_Ioo, Ioo_eq_empty_iff, inf_eq_min, sup_eq_max, not_lt] theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h apply le_antisymm h2.1 exact h.elim (fun h => absurd hx (not_lt_of_le h)) id #align set.eq_of_Ico_disjoint Set.eq_of_Ico_disjoint @[simp] theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} : ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x := by simp [← Ici_inter_Iio, ← iUnion_inter, subset_def] #align set.Union_Ico_eq_Iio_self_iff Set.iUnion_Ico_eq_Iio_self_iff @[simp] theorem iUnion_Ioc_eq_Ioi_self_iff {f : ι → α} {a : α} : ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ x, a < x → ∃ i, x ≤ f i := by simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def] #align set.Union_Ioc_eq_Ioi_self_iff Set.iUnion_Ioc_eq_Ioi_self_iff @[simp] theorem biUnion_Ico_eq_Iio_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} : ⋃ (i) (hi : p i), Ico (f i hi) a = Iio a ↔ ∀ x < a, ∃ i hi, f i hi ≤ x := by simp [← Ici_inter_Iio, ← iUnion_inter, subset_def] #align set.bUnion_Ico_eq_Iio_self_iff Set.biUnion_Ico_eq_Iio_self_iff @[simp]
Mathlib/Order/Interval/Set/Disjoint.lean
188
190
theorem biUnion_Ioc_eq_Ioi_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} : ⋃ (i) (hi : p i), Ioc a (f i hi) = Ioi a ↔ ∀ x, a < x → ∃ i hi, x ≤ f i hi := by
simp [← Ioi_inter_Iic, ← inter_iUnion, subset_def]
1
2.718282
0
0.333333
18
364
import Mathlib.Data.Set.Lattice #align_import data.set.intervals.disjoint from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" universe u v w variable {ι : Sort u} {α : Type v} {β : Type w} open Set open OrderDual (toDual) namespace Set section UnionIxx variable [LinearOrder α] {s : Set α} {a : α} {f : ι → α}
Mathlib/Order/Interval/Set/Disjoint.lean
201
205
theorem IsGLB.biUnion_Ioi_eq (h : IsGLB s a) : ⋃ x ∈ s, Ioi x = Ioi a := by
refine (iUnion₂_subset fun x hx => ?_).antisymm fun x hx => ?_ · exact Ioi_subset_Ioi (h.1 hx) · rcases h.exists_between hx with ⟨y, hys, _, hyx⟩ exact mem_biUnion hys hyx
4
54.59815
2
0.333333
18
364
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet
Mathlib/Computability/NFA.lean
53
54
theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by
simp [stepSet]
1
2.718282
0
0.333333
6
365
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by simp [stepSet] #align NFA.mem_step_set NFA.mem_stepSet @[simp]
Mathlib/Computability/NFA.lean
58
58
theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by
simp [stepSet]
1
2.718282
0
0.333333
6
365
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by simp [stepSet] #align NFA.mem_step_set NFA.mem_stepSet @[simp] theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by simp [stepSet] #align NFA.step_set_empty NFA.stepSet_empty def evalFrom (start : Set σ) : List α → Set σ := List.foldl M.stepSet start #align NFA.eval_from NFA.evalFrom @[simp] theorem evalFrom_nil (S : Set σ) : M.evalFrom S [] = S := rfl #align NFA.eval_from_nil NFA.evalFrom_nil @[simp] theorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet S a := rfl #align NFA.eval_from_singleton NFA.evalFrom_singleton @[simp]
Mathlib/Computability/NFA.lean
78
80
theorem evalFrom_append_singleton (S : Set σ) (x : List α) (a : α) : M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a := by
simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil]
1
2.718282
0
0.333333
6
365
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by simp [stepSet] #align NFA.mem_step_set NFA.mem_stepSet @[simp] theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by simp [stepSet] #align NFA.step_set_empty NFA.stepSet_empty def evalFrom (start : Set σ) : List α → Set σ := List.foldl M.stepSet start #align NFA.eval_from NFA.evalFrom @[simp] theorem evalFrom_nil (S : Set σ) : M.evalFrom S [] = S := rfl #align NFA.eval_from_nil NFA.evalFrom_nil @[simp] theorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet S a := rfl #align NFA.eval_from_singleton NFA.evalFrom_singleton @[simp] theorem evalFrom_append_singleton (S : Set σ) (x : List α) (a : α) : M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a := by simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil] #align NFA.eval_from_append_singleton NFA.evalFrom_append_singleton def eval : List α → Set σ := M.evalFrom M.start #align NFA.eval NFA.eval @[simp] theorem eval_nil : M.eval [] = M.start := rfl #align NFA.eval_nil NFA.eval_nil @[simp] theorem eval_singleton (a : α) : M.eval [a] = M.stepSet M.start a := rfl #align NFA.eval_singleton NFA.eval_singleton @[simp] theorem eval_append_singleton (x : List α) (a : α) : M.eval (x ++ [a]) = M.stepSet (M.eval x) a := evalFrom_append_singleton _ _ _ _ #align NFA.eval_append_singleton NFA.eval_append_singleton def accepts : Language α := {x | ∃ S ∈ M.accept, S ∈ M.eval x} #align NFA.accepts NFA.accepts
Mathlib/Computability/NFA.lean
108
109
theorem mem_accepts {x : List α} : x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x := by
rfl
1
2.718282
0
0.333333
6
365
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by simp [stepSet] #align NFA.mem_step_set NFA.mem_stepSet @[simp] theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by simp [stepSet] #align NFA.step_set_empty NFA.stepSet_empty def evalFrom (start : Set σ) : List α → Set σ := List.foldl M.stepSet start #align NFA.eval_from NFA.evalFrom @[simp] theorem evalFrom_nil (S : Set σ) : M.evalFrom S [] = S := rfl #align NFA.eval_from_nil NFA.evalFrom_nil @[simp] theorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet S a := rfl #align NFA.eval_from_singleton NFA.evalFrom_singleton @[simp] theorem evalFrom_append_singleton (S : Set σ) (x : List α) (a : α) : M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a := by simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil] #align NFA.eval_from_append_singleton NFA.evalFrom_append_singleton def eval : List α → Set σ := M.evalFrom M.start #align NFA.eval NFA.eval @[simp] theorem eval_nil : M.eval [] = M.start := rfl #align NFA.eval_nil NFA.eval_nil @[simp] theorem eval_singleton (a : α) : M.eval [a] = M.stepSet M.start a := rfl #align NFA.eval_singleton NFA.eval_singleton @[simp] theorem eval_append_singleton (x : List α) (a : α) : M.eval (x ++ [a]) = M.stepSet (M.eval x) a := evalFrom_append_singleton _ _ _ _ #align NFA.eval_append_singleton NFA.eval_append_singleton def accepts : Language α := {x | ∃ S ∈ M.accept, S ∈ M.eval x} #align NFA.accepts NFA.accepts theorem mem_accepts {x : List α} : x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x := by rfl def toDFA : DFA α (Set σ) where step := M.stepSet start := M.start accept := { S | ∃ s ∈ S, s ∈ M.accept } #align NFA.to_DFA NFA.toDFA @[simp]
Mathlib/Computability/NFA.lean
120
123
theorem toDFA_correct : M.toDFA.accepts = M.accepts := by
ext x rw [mem_accepts, DFA.mem_accepts] constructor <;> · exact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩
3
20.085537
1
0.333333
6
365
import Mathlib.Computability.DFA import Mathlib.Data.Fintype.Powerset #align_import computability.NFA from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" open Set open Computability universe u v -- Porting note: Required as `NFA` is used in mathlib3 set_option linter.uppercaseLean3 false structure NFA (α : Type u) (σ : Type v) where step : σ → α → Set σ start : Set σ accept : Set σ #align NFA NFA variable {α : Type u} {σ σ' : Type v} (M : NFA α σ) namespace NFA instance : Inhabited (NFA α σ) := ⟨NFA.mk (fun _ _ => ∅) ∅ ∅⟩ def stepSet (S : Set σ) (a : α) : Set σ := ⋃ s ∈ S, M.step s a #align NFA.step_set NFA.stepSet theorem mem_stepSet (s : σ) (S : Set σ) (a : α) : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.step t a := by simp [stepSet] #align NFA.mem_step_set NFA.mem_stepSet @[simp] theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅ := by simp [stepSet] #align NFA.step_set_empty NFA.stepSet_empty def evalFrom (start : Set σ) : List α → Set σ := List.foldl M.stepSet start #align NFA.eval_from NFA.evalFrom @[simp] theorem evalFrom_nil (S : Set σ) : M.evalFrom S [] = S := rfl #align NFA.eval_from_nil NFA.evalFrom_nil @[simp] theorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet S a := rfl #align NFA.eval_from_singleton NFA.evalFrom_singleton @[simp] theorem evalFrom_append_singleton (S : Set σ) (x : List α) (a : α) : M.evalFrom S (x ++ [a]) = M.stepSet (M.evalFrom S x) a := by simp only [evalFrom, List.foldl_append, List.foldl_cons, List.foldl_nil] #align NFA.eval_from_append_singleton NFA.evalFrom_append_singleton def eval : List α → Set σ := M.evalFrom M.start #align NFA.eval NFA.eval @[simp] theorem eval_nil : M.eval [] = M.start := rfl #align NFA.eval_nil NFA.eval_nil @[simp] theorem eval_singleton (a : α) : M.eval [a] = M.stepSet M.start a := rfl #align NFA.eval_singleton NFA.eval_singleton @[simp] theorem eval_append_singleton (x : List α) (a : α) : M.eval (x ++ [a]) = M.stepSet (M.eval x) a := evalFrom_append_singleton _ _ _ _ #align NFA.eval_append_singleton NFA.eval_append_singleton def accepts : Language α := {x | ∃ S ∈ M.accept, S ∈ M.eval x} #align NFA.accepts NFA.accepts theorem mem_accepts {x : List α} : x ∈ M.accepts ↔ ∃ S ∈ M.accept, S ∈ M.evalFrom M.start x := by rfl def toDFA : DFA α (Set σ) where step := M.stepSet start := M.start accept := { S | ∃ s ∈ S, s ∈ M.accept } #align NFA.to_DFA NFA.toDFA @[simp] theorem toDFA_correct : M.toDFA.accepts = M.accepts := by ext x rw [mem_accepts, DFA.mem_accepts] constructor <;> · exact fun ⟨w, h2, h3⟩ => ⟨w, h3, h2⟩ #align NFA.to_DFA_correct NFA.toDFA_correct
Mathlib/Computability/NFA.lean
126
132
theorem pumping_lemma [Fintype σ] {x : List α} (hx : x ∈ M.accepts) (hlen : Fintype.card (Set σ) ≤ List.length x) : ∃ a b c, x = a ++ b ++ c ∧ a.length + b.length ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ M.accepts := by
rw [← toDFA_correct] at hx ⊢ exact M.toDFA.pumping_lemma hx hlen
2
7.389056
1
0.333333
6
365
import Lean.Elab.Tactic.Location import Mathlib.Logic.Basic import Mathlib.Init.Order.Defs import Mathlib.Tactic.Conv import Mathlib.Init.Set import Lean.Elab.Tactic.Location set_option autoImplicit true namespace Mathlib.Tactic.PushNeg open Lean Meta Elab.Tactic Parser.Tactic variable (p q : Prop) (s : α → Prop) theorem not_not_eq : (¬ ¬ p) = p := propext not_not theorem not_and_eq : (¬ (p ∧ q)) = (p → ¬ q) := propext not_and theorem not_and_or_eq : (¬ (p ∧ q)) = (¬ p ∨ ¬ q) := propext not_and_or theorem not_or_eq : (¬ (p ∨ q)) = (¬ p ∧ ¬ q) := propext not_or theorem not_forall_eq : (¬ ∀ x, s x) = (∃ x, ¬ s x) := propext not_forall theorem not_exists_eq : (¬ ∃ x, s x) = (∀ x, ¬ s x) := propext not_exists theorem not_implies_eq : (¬ (p → q)) = (p ∧ ¬ q) := propext Classical.not_imp theorem not_ne_eq (x y : α) : (¬ (x ≠ y)) = (x = y) := ne_eq x y ▸ not_not_eq _ theorem not_iff : (¬ (p ↔ q)) = ((p ∧ ¬ q) ∨ (¬ p ∧ q)) := propext <| _root_.not_iff.trans <| iff_iff_and_or_not_and_not.trans <| by rw [not_not, or_comm] variable {β : Type u} [LinearOrder β] theorem not_le_eq (a b : β) : (¬ (a ≤ b)) = (b < a) := propext not_le theorem not_lt_eq (a b : β) : (¬ (a < b)) = (b ≤ a) := propext not_lt theorem not_ge_eq (a b : β) : (¬ (a ≥ b)) = (a < b) := propext not_le theorem not_gt_eq (a b : β) : (¬ (a > b)) = (a ≤ b) := propext not_lt
Mathlib/Tactic/PushNeg.lean
39
42
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id simp only [Set.Nonempty, not_exists, eq_iff_iff] exact ⟨fun h ↦ Set.ext (fun x ↦ by simp only [h x, false_iff, A]), fun h ↦ by rwa [h]⟩
3
20.085537
1
0.333333
3
366
import Lean.Elab.Tactic.Location import Mathlib.Logic.Basic import Mathlib.Init.Order.Defs import Mathlib.Tactic.Conv import Mathlib.Init.Set import Lean.Elab.Tactic.Location set_option autoImplicit true namespace Mathlib.Tactic.PushNeg open Lean Meta Elab.Tactic Parser.Tactic variable (p q : Prop) (s : α → Prop) theorem not_not_eq : (¬ ¬ p) = p := propext not_not theorem not_and_eq : (¬ (p ∧ q)) = (p → ¬ q) := propext not_and theorem not_and_or_eq : (¬ (p ∧ q)) = (¬ p ∨ ¬ q) := propext not_and_or theorem not_or_eq : (¬ (p ∨ q)) = (¬ p ∧ ¬ q) := propext not_or theorem not_forall_eq : (¬ ∀ x, s x) = (∃ x, ¬ s x) := propext not_forall theorem not_exists_eq : (¬ ∃ x, s x) = (∀ x, ¬ s x) := propext not_exists theorem not_implies_eq : (¬ (p → q)) = (p ∧ ¬ q) := propext Classical.not_imp theorem not_ne_eq (x y : α) : (¬ (x ≠ y)) = (x = y) := ne_eq x y ▸ not_not_eq _ theorem not_iff : (¬ (p ↔ q)) = ((p ∧ ¬ q) ∨ (¬ p ∧ q)) := propext <| _root_.not_iff.trans <| iff_iff_and_or_not_and_not.trans <| by rw [not_not, or_comm] variable {β : Type u} [LinearOrder β] theorem not_le_eq (a b : β) : (¬ (a ≤ b)) = (b < a) := propext not_le theorem not_lt_eq (a b : β) : (¬ (a < b)) = (b ≤ a) := propext not_lt theorem not_ge_eq (a b : β) : (¬ (a ≥ b)) = (a < b) := propext not_le theorem not_gt_eq (a b : β) : (¬ (a > b)) = (a ≤ b) := propext not_lt theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id simp only [Set.Nonempty, not_exists, eq_iff_iff] exact ⟨fun h ↦ Set.ext (fun x ↦ by simp only [h x, false_iff, A]), fun h ↦ by rwa [h]⟩
Mathlib/Tactic/PushNeg.lean
44
45
theorem ne_empty_eq_nonempty (s : Set γ) : (s ≠ ∅) = s.Nonempty := by
rw [ne_eq, ← not_nonempty_eq s, not_not]
1
2.718282
0
0.333333
3
366
import Lean.Elab.Tactic.Location import Mathlib.Logic.Basic import Mathlib.Init.Order.Defs import Mathlib.Tactic.Conv import Mathlib.Init.Set import Lean.Elab.Tactic.Location set_option autoImplicit true namespace Mathlib.Tactic.PushNeg open Lean Meta Elab.Tactic Parser.Tactic variable (p q : Prop) (s : α → Prop) theorem not_not_eq : (¬ ¬ p) = p := propext not_not theorem not_and_eq : (¬ (p ∧ q)) = (p → ¬ q) := propext not_and theorem not_and_or_eq : (¬ (p ∧ q)) = (¬ p ∨ ¬ q) := propext not_and_or theorem not_or_eq : (¬ (p ∨ q)) = (¬ p ∧ ¬ q) := propext not_or theorem not_forall_eq : (¬ ∀ x, s x) = (∃ x, ¬ s x) := propext not_forall theorem not_exists_eq : (¬ ∃ x, s x) = (∀ x, ¬ s x) := propext not_exists theorem not_implies_eq : (¬ (p → q)) = (p ∧ ¬ q) := propext Classical.not_imp theorem not_ne_eq (x y : α) : (¬ (x ≠ y)) = (x = y) := ne_eq x y ▸ not_not_eq _ theorem not_iff : (¬ (p ↔ q)) = ((p ∧ ¬ q) ∨ (¬ p ∧ q)) := propext <| _root_.not_iff.trans <| iff_iff_and_or_not_and_not.trans <| by rw [not_not, or_comm] variable {β : Type u} [LinearOrder β] theorem not_le_eq (a b : β) : (¬ (a ≤ b)) = (b < a) := propext not_le theorem not_lt_eq (a b : β) : (¬ (a < b)) = (b ≤ a) := propext not_lt theorem not_ge_eq (a b : β) : (¬ (a ≥ b)) = (a < b) := propext not_le theorem not_gt_eq (a b : β) : (¬ (a > b)) = (a ≤ b) := propext not_lt theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id simp only [Set.Nonempty, not_exists, eq_iff_iff] exact ⟨fun h ↦ Set.ext (fun x ↦ by simp only [h x, false_iff, A]), fun h ↦ by rwa [h]⟩ theorem ne_empty_eq_nonempty (s : Set γ) : (s ≠ ∅) = s.Nonempty := by rw [ne_eq, ← not_nonempty_eq s, not_not]
Mathlib/Tactic/PushNeg.lean
47
48
theorem empty_ne_eq_nonempty (s : Set γ) : (∅ ≠ s) = s.Nonempty := by
rw [ne_comm, ne_empty_eq_nonempty]
1
2.718282
0
0.333333
3
366
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*} section Semigroup variable [Semigroup α] @[to_additive] instance Semigroup.to_isAssociative : Std.Associative (α := α) (· * ·) := ⟨mul_assoc⟩ #align semigroup.to_is_associative Semigroup.to_isAssociative #align add_semigroup.to_is_associative AddSemigroup.to_isAssociative @[to_additive (attr := simp) "Composing two additions on the left by `y` then `x` is equal to an addition on the left by `x + y`."]
Mathlib/Algebra/Group/Basic.lean
117
119
theorem comp_mul_left (x y : α) : (x * ·) ∘ (y * ·) = (x * y * ·) := by
ext z simp [mul_assoc]
2
7.389056
1
0.333333
18
367
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*} section Semigroup variable [Semigroup α] @[to_additive] instance Semigroup.to_isAssociative : Std.Associative (α := α) (· * ·) := ⟨mul_assoc⟩ #align semigroup.to_is_associative Semigroup.to_isAssociative #align add_semigroup.to_is_associative AddSemigroup.to_isAssociative @[to_additive (attr := simp) "Composing two additions on the left by `y` then `x` is equal to an addition on the left by `x + y`."] theorem comp_mul_left (x y : α) : (x * ·) ∘ (y * ·) = (x * y * ·) := by ext z simp [mul_assoc] #align comp_mul_left comp_mul_left #align comp_add_left comp_add_left @[to_additive (attr := simp) "Composing two additions on the right by `y` and `x` is equal to an addition on the right by `y + x`."]
Mathlib/Algebra/Group/Basic.lean
128
130
theorem comp_mul_right (x y : α) : (· * x) ∘ (· * y) = (· * (y * x)) := by
ext z simp [mul_assoc]
2
7.389056
1
0.333333
18
367
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 section MulOneClass variable {M : Type u} [MulOneClass M] @[to_additive]
Mathlib/Algebra/Group/Basic.lean
146
148
theorem ite_mul_one {P : Prop} [Decidable P] {a b : M} : ite P (a * b) 1 = ite P a 1 * ite P b 1 := by
by_cases h:P <;> simp [h]
1
2.718282
0
0.333333
18
367
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 section MulOneClass variable {M : Type u} [MulOneClass M] @[to_additive] theorem ite_mul_one {P : Prop} [Decidable P] {a b : M} : ite P (a * b) 1 = ite P a 1 * ite P b 1 := by by_cases h:P <;> simp [h] #align ite_mul_one ite_mul_one #align ite_add_zero ite_add_zero @[to_additive]
Mathlib/Algebra/Group/Basic.lean
153
155
theorem ite_one_mul {P : Prop} [Decidable P] {a b : M} : ite P 1 (a * b) = ite P 1 a * ite P 1 b := by
by_cases h:P <;> simp [h]
1
2.718282
0
0.333333
18
367
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 section MulOneClass variable {M : Type u} [MulOneClass M] @[to_additive] theorem ite_mul_one {P : Prop} [Decidable P] {a b : M} : ite P (a * b) 1 = ite P a 1 * ite P b 1 := by by_cases h:P <;> simp [h] #align ite_mul_one ite_mul_one #align ite_add_zero ite_add_zero @[to_additive] theorem ite_one_mul {P : Prop} [Decidable P] {a b : M} : ite P 1 (a * b) = ite P 1 a * ite P 1 b := by by_cases h:P <;> simp [h] #align ite_one_mul ite_one_mul #align ite_zero_add ite_zero_add @[to_additive]
Mathlib/Algebra/Group/Basic.lean
160
161
theorem eq_one_iff_eq_one_of_mul_eq_one {a b : M} (h : a * b = 1) : a = 1 ↔ b = 1 := by
constructor <;> (rintro rfl; simpa using h)
1
2.718282
0
0.333333
18
367
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 section CommSemigroup variable [CommSemigroup G] @[to_additive] theorem mul_left_comm : ∀ a b c : G, a * (b * c) = b * (a * c) := left_comm Mul.mul mul_comm mul_assoc #align mul_left_comm mul_left_comm #align add_left_comm add_left_comm @[to_additive] theorem mul_right_comm : ∀ a b c : G, a * b * c = a * c * b := right_comm Mul.mul mul_comm mul_assoc #align mul_right_comm mul_right_comm #align add_right_comm add_right_comm @[to_additive]
Mathlib/Algebra/Group/Basic.lean
196
197
theorem mul_mul_mul_comm (a b c d : G) : a * b * (c * d) = a * c * (b * d) := by
simp only [mul_left_comm, mul_assoc]
1
2.718282
0
0.333333
18
367
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 section CommSemigroup variable [CommSemigroup G] @[to_additive] theorem mul_left_comm : ∀ a b c : G, a * (b * c) = b * (a * c) := left_comm Mul.mul mul_comm mul_assoc #align mul_left_comm mul_left_comm #align add_left_comm add_left_comm @[to_additive] theorem mul_right_comm : ∀ a b c : G, a * b * c = a * c * b := right_comm Mul.mul mul_comm mul_assoc #align mul_right_comm mul_right_comm #align add_right_comm add_right_comm @[to_additive] theorem mul_mul_mul_comm (a b c d : G) : a * b * (c * d) = a * c * (b * d) := by simp only [mul_left_comm, mul_assoc] #align mul_mul_mul_comm mul_mul_mul_comm #align add_add_add_comm add_add_add_comm @[to_additive]
Mathlib/Algebra/Group/Basic.lean
202
203
theorem mul_rotate (a b c : G) : a * b * c = b * c * a := by
simp only [mul_left_comm, mul_comm]
1
2.718282
0
0.333333
18
367
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 section CommSemigroup variable [CommSemigroup G] @[to_additive] theorem mul_left_comm : ∀ a b c : G, a * (b * c) = b * (a * c) := left_comm Mul.mul mul_comm mul_assoc #align mul_left_comm mul_left_comm #align add_left_comm add_left_comm @[to_additive] theorem mul_right_comm : ∀ a b c : G, a * b * c = a * c * b := right_comm Mul.mul mul_comm mul_assoc #align mul_right_comm mul_right_comm #align add_right_comm add_right_comm @[to_additive] theorem mul_mul_mul_comm (a b c d : G) : a * b * (c * d) = a * c * (b * d) := by simp only [mul_left_comm, mul_assoc] #align mul_mul_mul_comm mul_mul_mul_comm #align add_add_add_comm add_add_add_comm @[to_additive] theorem mul_rotate (a b c : G) : a * b * c = b * c * a := by simp only [mul_left_comm, mul_comm] #align mul_rotate mul_rotate #align add_rotate add_rotate @[to_additive]
Mathlib/Algebra/Group/Basic.lean
208
209
theorem mul_rotate' (a b c : G) : a * (b * c) = b * (c * a) := by
simp only [mul_left_comm, mul_comm]
1
2.718282
0
0.333333
18
367
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 section AddMonoid set_option linter.deprecated false variable {M : Type u} [AddMonoid M] {a b c : M} @[simp] theorem bit0_zero : bit0 (0 : M) = 0 := add_zero _ #align bit0_zero bit0_zero @[simp]
Mathlib/Algebra/Group/Basic.lean
245
245
theorem bit1_zero [One M] : bit1 (0 : M) = 1 := by
rw [bit1, bit0_zero, zero_add]
1
2.718282
0
0.333333
18
367
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 LeftCancelMonoid variable {M : Type u} [LeftCancelMonoid M] {a b : M} @[to_additive (attr := simp)]
Mathlib/Algebra/Group/Basic.lean
323
325
theorem mul_right_eq_self : a * b = a ↔ b = 1 := calc a * b = a ↔ a * b = a * 1 := by
rw [mul_one] _ ↔ b = 1 := mul_left_cancel_iff
2
7.389056
1
0.333333
18
367
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 RightCancelMonoid variable {M : Type u} [RightCancelMonoid M] {a b : M} @[to_additive (attr := simp)]
Mathlib/Algebra/Group/Basic.lean
352
354
theorem mul_left_eq_self : a * b = b ↔ a = 1 := calc a * b = b ↔ a * b = 1 * b := by
rw [one_mul] _ ↔ a = 1 := mul_right_cancel_iff
2
7.389056
1
0.333333
18
367
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
Mathlib/Algebra/Group/Basic.lean
445
445
theorem inv_eq_one_div (x : G) : x⁻¹ = 1 / x := by
rw [div_eq_mul_inv, one_mul]
1
2.718282
0
0.333333
18
367
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]
Mathlib/Algebra/Group/Basic.lean
450
451
theorem mul_one_div (x y : G) : x * (1 / y) = x / y := by
rw [div_eq_mul_inv, one_mul, div_eq_mul_inv]
1
2.718282
0
0.333333
18
367
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]
Mathlib/Algebra/Group/Basic.lean
456
457
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 _ _ _]
1
2.718282
0
0.333333
18
367
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]
1
2.718282
0
0.333333
18
367
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] theorem mul_div (a b c : G) : a * (b / c) = a * b / c := by simp only [mul_assoc, div_eq_mul_inv] #align mul_div mul_div #align add_sub add_sub @[to_additive]
Mathlib/Algebra/Group/Basic.lean
479
479
theorem div_eq_mul_one_div (a b : G) : a / b = a * (1 / b) := by
rw [div_eq_mul_inv, one_div]
1
2.718282
0
0.333333
18
367
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 DivInvOneMonoid variable [DivInvOneMonoid G] @[to_additive (attr := simp)]
Mathlib/Algebra/Group/Basic.lean
490
490
theorem div_one (a : G) : a / 1 = a := by
simp [div_eq_mul_inv]
1
2.718282
0
0.333333
18
367
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 multiplicative variable [Monoid β] (p r : α → α → Prop) [IsTotal α r] (f : α → α → β) @[to_additive additive_of_symmetric_of_isTotal] lemma multiplicative_of_symmetric_of_isTotal (hsymm : Symmetric p) (hf_swap : ∀ {a b}, p a b → f a b * f b a = 1) (hmul : ∀ {a b c}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c) {a b c : α} (pab : p a b) (pbc : p b c) (pac : p a c) : f a c = f a b * f b c := by have hmul' : ∀ {b c}, r b c → p a b → p b c → p a c → f a c = f a b * f b c := by intros b c rbc pab pbc pac obtain rab | rba := total_of r a b · exact hmul rab rbc pab pbc pac rw [← one_mul (f a c), ← hf_swap pab, mul_assoc] obtain rac | rca := total_of r a c · rw [hmul rba rac (hsymm pab) pac pbc] · rw [hmul rbc rca pbc (hsymm pac) (hsymm pab), mul_assoc, hf_swap (hsymm pac), mul_one] obtain rbc | rcb := total_of r b c · exact hmul' rbc pab pbc pac · rw [hmul' rcb pac (hsymm pbc) pab, mul_assoc, hf_swap (hsymm pbc), mul_one] #align multiplicative_of_symmetric_of_is_total multiplicative_of_symmetric_of_isTotal #align additive_of_symmetric_of_is_total additive_of_symmetric_of_isTotal @[to_additive additive_of_isTotal "If a binary function from a type equipped with a total relation `r` to an additive monoid is anti-symmetric (i.e. satisfies `f a b + f b a = 0`), in order to show it is additive (i.e. satisfies `f a c = f a b + f b c`), we may assume `r a b` and `r b c` are satisfied. We allow restricting to a subset specified by a predicate `p`."]
Mathlib/Algebra/Group/Basic.lean
1,426
1,432
theorem multiplicative_of_isTotal (p : α → Prop) (hswap : ∀ {a b}, p a → p b → f a b * f b a = 1) (hmul : ∀ {a b c}, r a b → r b c → p a → p b → p c → f a c = f a b * f b c) {a b c : α} (pa : p a) (pb : p b) (pc : p c) : f a c = f a b * f b c := by
apply multiplicative_of_symmetric_of_isTotal (fun a b => p a ∧ p b) r f fun _ _ => And.symm · simp_rw [and_imp]; exact @hswap · exact fun rab rbc pab _pbc pac => hmul rab rbc pab.1 pab.2 pac.2 exacts [⟨pa, pb⟩, ⟨pb, pc⟩, ⟨pa, pc⟩]
4
54.59815
2
0.333333
18
367
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x)
Mathlib/Algebra/Polynomial/Smeval.lean
54
54
theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by
rw [smeval_def]
1
2.718282
0
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
57
58
theorem smeval_C : (C r).smeval x = r • x ^ 0 := by
simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index]
1
2.718282
0
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
61
63
theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by
simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index]
1
2.718282
0
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index]
Mathlib/Algebra/Polynomial/Smeval.lean
65
67
theorem eval_eq_smeval : p.eval r = p.smeval r := by
rw [eval_eq_sum, smeval_eq_sum] rfl
2
7.389056
1
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index] theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl
Mathlib/Algebra/Polynomial/Smeval.lean
69
74
theorem eval₂_eq_smeval (R : Type*) [Semiring R] {S : Type*} [Semiring S] (f : R →+* S) (p : R[X]) (x: S) : letI : Module R S := RingHom.toModule f p.eval₂ f x = p.smeval x := by
letI : Module R S := RingHom.toModule f rw [smeval_eq_sum, eval₂_eq_sum] rfl
3
20.085537
1
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index] theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl theorem eval₂_eq_smeval (R : Type*) [Semiring R] {S : Type*} [Semiring S] (f : R →+* S) (p : R[X]) (x: S) : letI : Module R S := RingHom.toModule f p.eval₂ f x = p.smeval x := by letI : Module R S := RingHom.toModule f rw [smeval_eq_sum, eval₂_eq_sum] rfl variable (R) @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
79
80
theorem smeval_zero : (0 : R[X]).smeval x = 0 := by
simp only [smeval_eq_sum, smul_pow, sum_zero_index]
1
2.718282
0
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index] theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl theorem eval₂_eq_smeval (R : Type*) [Semiring R] {S : Type*} [Semiring S] (f : R →+* S) (p : R[X]) (x: S) : letI : Module R S := RingHom.toModule f p.eval₂ f x = p.smeval x := by letI : Module R S := RingHom.toModule f rw [smeval_eq_sum, eval₂_eq_sum] rfl variable (R) @[simp] theorem smeval_zero : (0 : R[X]).smeval x = 0 := by simp only [smeval_eq_sum, smul_pow, sum_zero_index] @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
83
85
theorem smeval_one : (1 : R[X]).smeval x = 1 • x ^ 0 := by
rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul]
2
7.389056
1
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index] theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl theorem eval₂_eq_smeval (R : Type*) [Semiring R] {S : Type*} [Semiring S] (f : R →+* S) (p : R[X]) (x: S) : letI : Module R S := RingHom.toModule f p.eval₂ f x = p.smeval x := by letI : Module R S := RingHom.toModule f rw [smeval_eq_sum, eval₂_eq_sum] rfl variable (R) @[simp] theorem smeval_zero : (0 : R[X]).smeval x = 0 := by simp only [smeval_eq_sum, smul_pow, sum_zero_index] @[simp] theorem smeval_one : (1 : R[X]).smeval x = 1 • x ^ 0 := by rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul] @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
88
90
theorem smeval_X : (X : R[X]).smeval x = x ^ 1 := by
simp only [smeval_eq_sum, smul_pow, zero_smul, sum_X_index, one_smul]
1
2.718282
0
0.333333
9
368
import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Induction import Mathlib.Algebra.Polynomial.Eval namespace Polynomial section MulActionWithZero variable {R : Type*} [Semiring R] (r : R) (p : R[X]) {S : Type*} [AddCommMonoid S] [Pow S ℕ] [MulActionWithZero R S] (x : S) def smul_pow : ℕ → R → S := fun n r => r • x^n irreducible_def smeval : S := p.sum (smul_pow x) theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x) := by rw [smeval_def] @[simp] theorem smeval_C : (C r).smeval x = r • x ^ 0 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_C_index] @[simp] theorem smeval_monomial (n : ℕ) : (monomial n r).smeval x = r • x ^ n := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index] theorem eval_eq_smeval : p.eval r = p.smeval r := by rw [eval_eq_sum, smeval_eq_sum] rfl theorem eval₂_eq_smeval (R : Type*) [Semiring R] {S : Type*} [Semiring S] (f : R →+* S) (p : R[X]) (x: S) : letI : Module R S := RingHom.toModule f p.eval₂ f x = p.smeval x := by letI : Module R S := RingHom.toModule f rw [smeval_eq_sum, eval₂_eq_sum] rfl variable (R) @[simp] theorem smeval_zero : (0 : R[X]).smeval x = 0 := by simp only [smeval_eq_sum, smul_pow, sum_zero_index] @[simp] theorem smeval_one : (1 : R[X]).smeval x = 1 • x ^ 0 := by rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul] @[simp] theorem smeval_X : (X : R[X]).smeval x = x ^ 1 := by simp only [smeval_eq_sum, smul_pow, zero_smul, sum_X_index, one_smul] @[simp]
Mathlib/Algebra/Polynomial/Smeval.lean
93
95
theorem smeval_X_pow {n : ℕ} : (X ^ n : R[X]).smeval x = x ^ n := by
simp only [smeval_eq_sum, smul_pow, X_pow_eq_monomial, zero_smul, sum_monomial_index, one_smul]
1
2.718282
0
0.333333
9
368
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp]
Mathlib/MeasureTheory/Integral/Average.lean
108
108
theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by
rw [laverage, lintegral_zero]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp]
Mathlib/MeasureTheory/Integral/Average.lean
112
112
theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by
simp [laverage]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq'
Mathlib/MeasureTheory/Integral/Average.lean
118
119
theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by
rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq
Mathlib/MeasureTheory/Integral/Average.lean
122
123
theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by
rw [laverage, measure_univ, inv_one, one_smul]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp]
Mathlib/MeasureTheory/Integral/Average.lean
127
131
theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by
rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)]
3
20.085537
1
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage
Mathlib/MeasureTheory/Integral/Average.lean
134
135
theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by
rw [laverage_eq, restrict_apply_univ]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq
Mathlib/MeasureTheory/Integral/Average.lean
138
140
theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by
simp only [laverage_eq', restrict_apply_univ]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by simp only [laverage_eq', restrict_apply_univ] #align measure_theory.set_laverage_eq' MeasureTheory.setLaverage_eq' variable {μ}
Mathlib/MeasureTheory/Integral/Average.lean
145
146
theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by
simp only [laverage_eq, lintegral_congr_ae h]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by simp only [laverage_eq', restrict_apply_univ] #align measure_theory.set_laverage_eq' MeasureTheory.setLaverage_eq' variable {μ} theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by simp only [laverage_eq, lintegral_congr_ae h] #align measure_theory.laverage_congr MeasureTheory.laverage_congr
Mathlib/MeasureTheory/Integral/Average.lean
149
150
theorem setLaverage_congr (h : s =ᵐ[μ] t) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in t, f x ∂μ := by
simp only [setLaverage_eq, set_lintegral_congr h, measure_congr h]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by simp only [laverage_eq', restrict_apply_univ] #align measure_theory.set_laverage_eq' MeasureTheory.setLaverage_eq' variable {μ} theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by simp only [laverage_eq, lintegral_congr_ae h] #align measure_theory.laverage_congr MeasureTheory.laverage_congr theorem setLaverage_congr (h : s =ᵐ[μ] t) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in t, f x ∂μ := by simp only [setLaverage_eq, set_lintegral_congr h, measure_congr h] #align measure_theory.set_laverage_congr MeasureTheory.setLaverage_congr
Mathlib/MeasureTheory/Integral/Average.lean
153
155
theorem setLaverage_congr_fun (hs : MeasurableSet s) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in s, g x ∂μ := by
simp only [laverage_eq, set_lintegral_congr_fun hs h]
1
2.718282
0
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by simp only [laverage_eq', restrict_apply_univ] #align measure_theory.set_laverage_eq' MeasureTheory.setLaverage_eq' variable {μ} theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by simp only [laverage_eq, lintegral_congr_ae h] #align measure_theory.laverage_congr MeasureTheory.laverage_congr theorem setLaverage_congr (h : s =ᵐ[μ] t) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in t, f x ∂μ := by simp only [setLaverage_eq, set_lintegral_congr h, measure_congr h] #align measure_theory.set_laverage_congr MeasureTheory.setLaverage_congr theorem setLaverage_congr_fun (hs : MeasurableSet s) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in s, g x ∂μ := by simp only [laverage_eq, set_lintegral_congr_fun hs h] #align measure_theory.set_laverage_congr_fun MeasureTheory.setLaverage_congr_fun
Mathlib/MeasureTheory/Integral/Average.lean
158
162
theorem laverage_lt_top (hf : ∫⁻ x, f x ∂μ ≠ ∞) : ⨍⁻ x, f x ∂μ < ∞ := by
obtain rfl | hμ := eq_or_ne μ 0 · simp · rw [laverage_eq] exact div_lt_top hf (measure_univ_ne_zero.2 hμ)
4
54.59815
2
0.347826
23
374
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable {α E F : Type*} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] {μ ν : Measure α} {s t : Set α} namespace MeasureTheory section ENNReal variable (μ) {f g : α → ℝ≥0∞} noncomputable def laverage (f : α → ℝ≥0∞) := ∫⁻ x, f x ∂(μ univ)⁻¹ • μ #align measure_theory.laverage MeasureTheory.laverage notation3 "⨍⁻ "(...)", "r:60:(scoped f => f)" ∂"μ:70 => laverage μ r notation3 "⨍⁻ "(...)", "r:60:(scoped f => laverage volume f) => r notation3 "⨍⁻ "(...)" in "s", "r:60:(scoped f => f)" ∂"μ:70 => laverage (Measure.restrict μ s) r notation3 (prettyPrint := false) "⨍⁻ "(...)" in "s", "r:60:(scoped f => laverage Measure.restrict volume s f) => r @[simp] theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0 := by rw [laverage, lintegral_zero] #align measure_theory.laverage_zero MeasureTheory.laverage_zero @[simp] theorem laverage_zero_measure (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂(0 : Measure α) = 0 := by simp [laverage] #align measure_theory.laverage_zero_measure MeasureTheory.laverage_zero_measure theorem laverage_eq' (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂(μ univ)⁻¹ • μ := rfl #align measure_theory.laverage_eq' MeasureTheory.laverage_eq' theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ := by rw [laverage_eq', lintegral_smul_measure, ENNReal.div_eq_inv_mul] #align measure_theory.laverage_eq MeasureTheory.laverage_eq theorem laverage_eq_lintegral [IsProbabilityMeasure μ] (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rw [laverage, measure_univ, inv_one, one_smul] #align measure_theory.laverage_eq_lintegral MeasureTheory.laverage_eq_lintegral @[simp] theorem measure_mul_laverage [IsFiniteMeasure μ] (f : α → ℝ≥0∞) : μ univ * ⨍⁻ x, f x ∂μ = ∫⁻ x, f x ∂μ := by rcases eq_or_ne μ 0 with hμ | hμ · rw [hμ, lintegral_zero_measure, laverage_zero_measure, mul_zero] · rw [laverage_eq, ENNReal.mul_div_cancel' (measure_univ_ne_zero.2 hμ) (measure_ne_top _ _)] #align measure_theory.measure_mul_laverage MeasureTheory.measure_mul_laverage theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s := by rw [laverage_eq, restrict_apply_univ] #align measure_theory.set_laverage_eq MeasureTheory.setLaverage_eq theorem setLaverage_eq' (f : α → ℝ≥0∞) (s : Set α) : ⨍⁻ x in s, f x ∂μ = ∫⁻ x, f x ∂(μ s)⁻¹ • μ.restrict s := by simp only [laverage_eq', restrict_apply_univ] #align measure_theory.set_laverage_eq' MeasureTheory.setLaverage_eq' variable {μ} theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by simp only [laverage_eq, lintegral_congr_ae h] #align measure_theory.laverage_congr MeasureTheory.laverage_congr theorem setLaverage_congr (h : s =ᵐ[μ] t) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in t, f x ∂μ := by simp only [setLaverage_eq, set_lintegral_congr h, measure_congr h] #align measure_theory.set_laverage_congr MeasureTheory.setLaverage_congr theorem setLaverage_congr_fun (hs : MeasurableSet s) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) : ⨍⁻ x in s, f x ∂μ = ⨍⁻ x in s, g x ∂μ := by simp only [laverage_eq, set_lintegral_congr_fun hs h] #align measure_theory.set_laverage_congr_fun MeasureTheory.setLaverage_congr_fun theorem laverage_lt_top (hf : ∫⁻ x, f x ∂μ ≠ ∞) : ⨍⁻ x, f x ∂μ < ∞ := by obtain rfl | hμ := eq_or_ne μ 0 · simp · rw [laverage_eq] exact div_lt_top hf (measure_univ_ne_zero.2 hμ) #align measure_theory.laverage_lt_top MeasureTheory.laverage_lt_top theorem setLaverage_lt_top : ∫⁻ x in s, f x ∂μ ≠ ∞ → ⨍⁻ x in s, f x ∂μ < ∞ := laverage_lt_top #align measure_theory.set_laverage_lt_top MeasureTheory.setLaverage_lt_top
Mathlib/MeasureTheory/Integral/Average.lean
169
180
theorem laverage_add_measure : ⨍⁻ x, f x ∂(μ + ν) = μ univ / (μ univ + ν univ) * ⨍⁻ x, f x ∂μ + ν univ / (μ univ + ν univ) * ⨍⁻ x, f x ∂ν := by
by_cases hμ : IsFiniteMeasure μ; swap · rw [not_isFiniteMeasure_iff] at hμ simp [laverage_eq, hμ] by_cases hν : IsFiniteMeasure ν; swap · rw [not_isFiniteMeasure_iff] at hν simp [laverage_eq, hν] haveI := hμ; haveI := hν simp only [← ENNReal.mul_div_right_comm, measure_mul_laverage, ← ENNReal.add_div, ← lintegral_add_measure, ← Measure.add_apply, ← laverage_eq]
9
8,103.083928
2
0.347826
23
374