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.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
| Mathlib/MeasureTheory/Function/L1Space.lean | 75 | 80 | theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by |
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
| 3 | 20.085537 | 1 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
| Mathlib/MeasureTheory/Function/L1Space.lean | 83 | 83 | theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by | simp
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
| Mathlib/MeasureTheory/Function/L1Space.lean | 96 | 97 | theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by |
simp only [Pi.neg_apply, nnnorm_neg]
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by
simp only [Pi.neg_apply, nnnorm_neg]
#align measure_theory.lintegral_nnnorm_neg MeasureTheory.lintegral_nnnorm_neg
def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α := by volume_tac) : Prop :=
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl
| Mathlib/MeasureTheory/Function/L1Space.lean | 113 | 115 | theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by |
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by
simp only [Pi.neg_apply, nnnorm_neg]
#align measure_theory.lintegral_nnnorm_neg MeasureTheory.lintegral_nnnorm_neg
def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α := by volume_tac) : Prop :=
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl
theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
#align measure_theory.has_finite_integral_iff_norm MeasureTheory.hasFiniteIntegral_iff_norm
| Mathlib/MeasureTheory/Function/L1Space.lean | 118 | 120 | theorem hasFiniteIntegral_iff_edist (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞ := by |
simp only [hasFiniteIntegral_iff_norm, edist_dist, dist_zero_right]
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by
simp only [Pi.neg_apply, nnnorm_neg]
#align measure_theory.lintegral_nnnorm_neg MeasureTheory.lintegral_nnnorm_neg
def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α := by volume_tac) : Prop :=
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl
theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
#align measure_theory.has_finite_integral_iff_norm MeasureTheory.hasFiniteIntegral_iff_norm
theorem hasFiniteIntegral_iff_edist (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞ := by
simp only [hasFiniteIntegral_iff_norm, edist_dist, dist_zero_right]
#align measure_theory.has_finite_integral_iff_edist MeasureTheory.hasFiniteIntegral_iff_edist
| Mathlib/MeasureTheory/Function/L1Space.lean | 123 | 125 | theorem hasFiniteIntegral_iff_ofReal {f : α → ℝ} (h : 0 ≤ᵐ[μ] f) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal (f a) ∂μ) < ∞ := by |
rw [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by
simp only [Pi.neg_apply, nnnorm_neg]
#align measure_theory.lintegral_nnnorm_neg MeasureTheory.lintegral_nnnorm_neg
def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α := by volume_tac) : Prop :=
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl
theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
#align measure_theory.has_finite_integral_iff_norm MeasureTheory.hasFiniteIntegral_iff_norm
theorem hasFiniteIntegral_iff_edist (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞ := by
simp only [hasFiniteIntegral_iff_norm, edist_dist, dist_zero_right]
#align measure_theory.has_finite_integral_iff_edist MeasureTheory.hasFiniteIntegral_iff_edist
theorem hasFiniteIntegral_iff_ofReal {f : α → ℝ} (h : 0 ≤ᵐ[μ] f) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal (f a) ∂μ) < ∞ := by
rw [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]
#align measure_theory.has_finite_integral_iff_of_real MeasureTheory.hasFiniteIntegral_iff_ofReal
| Mathlib/MeasureTheory/Function/L1Space.lean | 128 | 130 | theorem hasFiniteIntegral_iff_ofNNReal {f : α → ℝ≥0} :
HasFiniteIntegral (fun x => (f x : ℝ)) μ ↔ (∫⁻ a, f a ∂μ) < ∞ := by |
simp [hasFiniteIntegral_iff_norm]
| 1 | 2.718282 | 0 | 0.3 | 10 | 320 |
import Mathlib.MeasureTheory.Function.LpOrder
#align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f"
noncomputable section
open scoped Classical
open Topology ENNReal MeasureTheory NNReal
open Set Filter TopologicalSpace ENNReal EMetric MeasureTheory
variable {α β γ δ : Type*} {m : MeasurableSpace α} {μ ν : Measure α} [MeasurableSpace δ]
variable [NormedAddCommGroup β]
variable [NormedAddCommGroup γ]
namespace MeasureTheory
theorem lintegral_nnnorm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ‖f a‖₊ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by simp only [edist_eq_coe_nnnorm]
#align measure_theory.lintegral_nnnorm_eq_lintegral_edist MeasureTheory.lintegral_nnnorm_eq_lintegral_edist
theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ := by
simp only [ofReal_norm_eq_coe_nnnorm, edist_eq_coe_nnnorm]
#align measure_theory.lintegral_norm_eq_lintegral_edist MeasureTheory.lintegral_norm_eq_lintegral_edist
theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
(hh : AEStronglyMeasurable h μ) :
(∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ := by
rw [← lintegral_add_left' (hf.edist hh)]
refine lintegral_mono fun a => ?_
apply edist_triangle_right
#align measure_theory.lintegral_edist_triangle MeasureTheory.lintegral_edist_triangle
theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0 := by simp
#align measure_theory.lintegral_nnnorm_zero MeasureTheory.lintegral_nnnorm_zero
theorem lintegral_nnnorm_add_left {f : α → β} (hf : AEStronglyMeasurable f μ) (g : α → γ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_left' hf.ennnorm _
#align measure_theory.lintegral_nnnorm_add_left MeasureTheory.lintegral_nnnorm_add_left
theorem lintegral_nnnorm_add_right (f : α → β) {g : α → γ} (hg : AEStronglyMeasurable g μ) :
∫⁻ a, ‖f a‖₊ + ‖g a‖₊ ∂μ = (∫⁻ a, ‖f a‖₊ ∂μ) + ∫⁻ a, ‖g a‖₊ ∂μ :=
lintegral_add_right' _ hg.ennnorm
#align measure_theory.lintegral_nnnorm_add_right MeasureTheory.lintegral_nnnorm_add_right
theorem lintegral_nnnorm_neg {f : α → β} : (∫⁻ a, ‖(-f) a‖₊ ∂μ) = ∫⁻ a, ‖f a‖₊ ∂μ := by
simp only [Pi.neg_apply, nnnorm_neg]
#align measure_theory.lintegral_nnnorm_neg MeasureTheory.lintegral_nnnorm_neg
def HasFiniteIntegral {_ : MeasurableSpace α} (f : α → β) (μ : Measure α := by volume_tac) : Prop :=
(∫⁻ a, ‖f a‖₊ ∂μ) < ∞
#align measure_theory.has_finite_integral MeasureTheory.HasFiniteIntegral
theorem hasFiniteIntegral_def {_ : MeasurableSpace α} (f : α → β) (μ : Measure α) :
HasFiniteIntegral f μ ↔ ((∫⁻ a, ‖f a‖₊ ∂μ) < ∞) :=
Iff.rfl
theorem hasFiniteIntegral_iff_norm (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) < ∞ := by
simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
#align measure_theory.has_finite_integral_iff_norm MeasureTheory.hasFiniteIntegral_iff_norm
theorem hasFiniteIntegral_iff_edist (f : α → β) :
HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞ := by
simp only [hasFiniteIntegral_iff_norm, edist_dist, dist_zero_right]
#align measure_theory.has_finite_integral_iff_edist MeasureTheory.hasFiniteIntegral_iff_edist
theorem hasFiniteIntegral_iff_ofReal {f : α → ℝ} (h : 0 ≤ᵐ[μ] f) :
HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal (f a) ∂μ) < ∞ := by
rw [HasFiniteIntegral, lintegral_nnnorm_eq_of_ae_nonneg h]
#align measure_theory.has_finite_integral_iff_of_real MeasureTheory.hasFiniteIntegral_iff_ofReal
theorem hasFiniteIntegral_iff_ofNNReal {f : α → ℝ≥0} :
HasFiniteIntegral (fun x => (f x : ℝ)) μ ↔ (∫⁻ a, f a ∂μ) < ∞ := by
simp [hasFiniteIntegral_iff_norm]
#align measure_theory.has_finite_integral_iff_of_nnreal MeasureTheory.hasFiniteIntegral_iff_ofNNReal
| Mathlib/MeasureTheory/Function/L1Space.lean | 133 | 139 | theorem HasFiniteIntegral.mono {f : α → β} {g : α → γ} (hg : HasFiniteIntegral g μ)
(h : ∀ᵐ a ∂μ, ‖f a‖ ≤ ‖g a‖) : HasFiniteIntegral f μ := by |
simp only [hasFiniteIntegral_iff_norm] at *
calc
(∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ) ≤ ∫⁻ a : α, ENNReal.ofReal ‖g a‖ ∂μ :=
lintegral_mono_ae (h.mono fun a h => ofReal_le_ofReal h)
_ < ∞ := hg
| 5 | 148.413159 | 2 | 0.3 | 10 | 320 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
| Mathlib/Algebra/Field/Basic.lean | 29 | 29 | theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by | simp_rw [div_eq_mul_inv, add_mul]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by simp_rw [div_eq_mul_inv, add_mul]
#align add_div add_div
@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c :=
(add_div _ _ _).symm
#align div_add_div_same div_add_div_same
| Mathlib/Algebra/Field/Basic.lean | 37 | 37 | theorem same_add_div (h : b ≠ 0) : (b + a) / b = 1 + a / b := by | rw [← div_self h, add_div]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by simp_rw [div_eq_mul_inv, add_mul]
#align add_div add_div
@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c :=
(add_div _ _ _).symm
#align div_add_div_same div_add_div_same
theorem same_add_div (h : b ≠ 0) : (b + a) / b = 1 + a / b := by rw [← div_self h, add_div]
#align same_add_div same_add_div
| Mathlib/Algebra/Field/Basic.lean | 40 | 40 | theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1 := by | rw [← div_self h, add_div]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by simp_rw [div_eq_mul_inv, add_mul]
#align add_div add_div
@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c :=
(add_div _ _ _).symm
#align div_add_div_same div_add_div_same
theorem same_add_div (h : b ≠ 0) : (b + a) / b = 1 + a / b := by rw [← div_self h, add_div]
#align same_add_div same_add_div
theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1 := by rw [← div_self h, add_div]
#align div_add_same div_add_same
theorem one_add_div (h : b ≠ 0) : 1 + a / b = (b + a) / b :=
(same_add_div h).symm
#align one_add_div one_add_div
theorem div_add_one (h : b ≠ 0) : a / b + 1 = (a + b) / b :=
(div_add_same h).symm
#align div_add_one div_add_one
theorem inv_add_inv' (ha : a ≠ 0) (hb : b ≠ 0) :
a⁻¹ + b⁻¹ = a⁻¹ * (a + b) * b⁻¹ :=
let _ := invertibleOfNonzero ha; let _ := invertibleOfNonzero hb; invOf_add_invOf a b
| Mathlib/Algebra/Field/Basic.lean | 56 | 58 | theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) :
1 / a * (a + b) * (1 / b) = 1 / a + 1 / b := by |
simpa only [one_div] using (inv_add_inv' ha hb).symm
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by simp_rw [div_eq_mul_inv, add_mul]
#align add_div add_div
@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c :=
(add_div _ _ _).symm
#align div_add_div_same div_add_div_same
theorem same_add_div (h : b ≠ 0) : (b + a) / b = 1 + a / b := by rw [← div_self h, add_div]
#align same_add_div same_add_div
theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1 := by rw [← div_self h, add_div]
#align div_add_same div_add_same
theorem one_add_div (h : b ≠ 0) : 1 + a / b = (b + a) / b :=
(same_add_div h).symm
#align one_add_div one_add_div
theorem div_add_one (h : b ≠ 0) : a / b + 1 = (a + b) / b :=
(div_add_same h).symm
#align div_add_one div_add_one
theorem inv_add_inv' (ha : a ≠ 0) (hb : b ≠ 0) :
a⁻¹ + b⁻¹ = a⁻¹ * (a + b) * b⁻¹ :=
let _ := invertibleOfNonzero ha; let _ := invertibleOfNonzero hb; invOf_add_invOf a b
theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) :
1 / a * (a + b) * (1 / b) = 1 / a + 1 / b := by
simpa only [one_div] using (inv_add_inv' ha hb).symm
#align one_div_mul_add_mul_one_div_eq_one_div_add_one_div one_div_mul_add_mul_one_div_eq_one_div_add_one_div
theorem add_div_eq_mul_add_div (a b : α) (hc : c ≠ 0) : a + b / c = (a * c + b) / c :=
(eq_div_iff_mul_eq hc).2 <| by rw [right_distrib, div_mul_cancel₀ _ hc]
#align add_div_eq_mul_add_div add_div_eq_mul_add_div
@[field_simps]
| Mathlib/Algebra/Field/Basic.lean | 66 | 67 | theorem add_div' (a b c : α) (hc : c ≠ 0) : b + a / c = (b * c + a) / c := by |
rw [add_div, mul_div_cancel_right₀ _ hc]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionSemiring
variable [DivisionSemiring α] {a b c d : α}
theorem add_div (a b c : α) : (a + b) / c = a / c + b / c := by simp_rw [div_eq_mul_inv, add_mul]
#align add_div add_div
@[field_simps]
theorem div_add_div_same (a b c : α) : a / c + b / c = (a + b) / c :=
(add_div _ _ _).symm
#align div_add_div_same div_add_div_same
theorem same_add_div (h : b ≠ 0) : (b + a) / b = 1 + a / b := by rw [← div_self h, add_div]
#align same_add_div same_add_div
theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1 := by rw [← div_self h, add_div]
#align div_add_same div_add_same
theorem one_add_div (h : b ≠ 0) : 1 + a / b = (b + a) / b :=
(same_add_div h).symm
#align one_add_div one_add_div
theorem div_add_one (h : b ≠ 0) : a / b + 1 = (a + b) / b :=
(div_add_same h).symm
#align div_add_one div_add_one
theorem inv_add_inv' (ha : a ≠ 0) (hb : b ≠ 0) :
a⁻¹ + b⁻¹ = a⁻¹ * (a + b) * b⁻¹ :=
let _ := invertibleOfNonzero ha; let _ := invertibleOfNonzero hb; invOf_add_invOf a b
theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) :
1 / a * (a + b) * (1 / b) = 1 / a + 1 / b := by
simpa only [one_div] using (inv_add_inv' ha hb).symm
#align one_div_mul_add_mul_one_div_eq_one_div_add_one_div one_div_mul_add_mul_one_div_eq_one_div_add_one_div
theorem add_div_eq_mul_add_div (a b : α) (hc : c ≠ 0) : a + b / c = (a * c + b) / c :=
(eq_div_iff_mul_eq hc).2 <| by rw [right_distrib, div_mul_cancel₀ _ hc]
#align add_div_eq_mul_add_div add_div_eq_mul_add_div
@[field_simps]
theorem add_div' (a b c : α) (hc : c ≠ 0) : b + a / c = (b * c + a) / c := by
rw [add_div, mul_div_cancel_right₀ _ hc]
#align add_div' add_div'
@[field_simps]
| Mathlib/Algebra/Field/Basic.lean | 71 | 72 | theorem div_add' (a b c : α) (hc : c ≠ 0) : a / c + b = (a + b * c) / c := by |
rwa [add_comm, add_div', add_comm]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
| Mathlib/Algebra/Field/Basic.lean | 96 | 98 | theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by | rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
| 2 | 7.389056 | 1 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
| Mathlib/Algebra/Field/Basic.lean | 101 | 106 | theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by | rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
| 4 | 54.59815 | 2 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
| Mathlib/Algebra/Field/Basic.lean | 109 | 114 | theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by | rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
| 4 | 54.59815 | 2 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
| Mathlib/Algebra/Field/Basic.lean | 117 | 118 | theorem neg_div (a b : K) : -b / a = -(b / a) := by |
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
| Mathlib/Algebra/Field/Basic.lean | 122 | 122 | theorem neg_div' (a b : K) : -(b / a) = -b / a := by | simp [neg_div]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'
@[simp]
| Mathlib/Algebra/Field/Basic.lean | 126 | 126 | theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by | rw [div_neg_eq_neg_div, neg_div, neg_neg]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'
@[simp]
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by rw [div_neg_eq_neg_div, neg_div, neg_neg]
#align neg_div_neg_eq neg_div_neg_eq
| Mathlib/Algebra/Field/Basic.lean | 129 | 129 | theorem neg_inv : -a⁻¹ = (-a)⁻¹ := by | rw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'
@[simp]
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by rw [div_neg_eq_neg_div, neg_div, neg_neg]
#align neg_div_neg_eq neg_div_neg_eq
theorem neg_inv : -a⁻¹ = (-a)⁻¹ := by rw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
#align neg_inv neg_inv
| Mathlib/Algebra/Field/Basic.lean | 132 | 132 | theorem div_neg (a : K) : a / -b = -(a / b) := by | rw [← div_neg_eq_neg_div]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'
@[simp]
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by rw [div_neg_eq_neg_div, neg_div, neg_neg]
#align neg_div_neg_eq neg_div_neg_eq
theorem neg_inv : -a⁻¹ = (-a)⁻¹ := by rw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
#align neg_inv neg_inv
theorem div_neg (a : K) : a / -b = -(a / b) := by rw [← div_neg_eq_neg_div]
#align div_neg div_neg
| Mathlib/Algebra/Field/Basic.lean | 135 | 135 | theorem inv_neg : (-a)⁻¹ = -a⁻¹ := by | rw [neg_inv]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.GroupWithZero.Units.Lemmas
import Mathlib.Algebra.Ring.Commute
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Order.Synonym
#align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102"
open Function OrderDual Set
universe u
variable {α β K : Type*}
section DivisionMonoid
variable [DivisionMonoid K] [HasDistribNeg K] {a b : K}
theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1 :=
have : -1 * -1 = (1 : K) := by rw [neg_mul_neg, one_mul]
Eq.symm (eq_one_div_of_mul_eq_one_right this)
#align one_div_neg_one_eq_neg_one one_div_neg_one_eq_neg_one
theorem one_div_neg_eq_neg_one_div (a : K) : 1 / -a = -(1 / a) :=
calc
1 / -a = 1 / (-1 * a) := by rw [neg_eq_neg_one_mul]
_ = 1 / a * (1 / -1) := by rw [one_div_mul_one_div_rev]
_ = 1 / a * -1 := by rw [one_div_neg_one_eq_neg_one]
_ = -(1 / a) := by rw [mul_neg, mul_one]
#align one_div_neg_eq_neg_one_div one_div_neg_eq_neg_one_div
theorem div_neg_eq_neg_div (a b : K) : b / -a = -(b / a) :=
calc
b / -a = b * (1 / -a) := by rw [← inv_eq_one_div, division_def]
_ = b * -(1 / a) := by rw [one_div_neg_eq_neg_one_div]
_ = -(b * (1 / a)) := by rw [neg_mul_eq_mul_neg]
_ = -(b / a) := by rw [mul_one_div]
#align div_neg_eq_neg_div div_neg_eq_neg_div
theorem neg_div (a b : K) : -b / a = -(b / a) := by
rw [neg_eq_neg_one_mul, mul_div_assoc, ← neg_eq_neg_one_mul]
#align neg_div neg_div
@[field_simps]
theorem neg_div' (a b : K) : -(b / a) = -b / a := by simp [neg_div]
#align neg_div' neg_div'
@[simp]
theorem neg_div_neg_eq (a b : K) : -a / -b = a / b := by rw [div_neg_eq_neg_div, neg_div, neg_neg]
#align neg_div_neg_eq neg_div_neg_eq
theorem neg_inv : -a⁻¹ = (-a)⁻¹ := by rw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
#align neg_inv neg_inv
theorem div_neg (a : K) : a / -b = -(a / b) := by rw [← div_neg_eq_neg_div]
#align div_neg div_neg
theorem inv_neg : (-a)⁻¹ = -a⁻¹ := by rw [neg_inv]
#align inv_neg inv_neg
| Mathlib/Algebra/Field/Basic.lean | 138 | 138 | theorem inv_neg_one : (-1 : K)⁻¹ = -1 := by | rw [← neg_inv, inv_one]
| 1 | 2.718282 | 0 | 0.3125 | 16 | 321 |
import Mathlib.Data.List.Nodup
#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open List Function
universe u v
variable {ι : Type u} {α : ι → Type v} {i j : ι} {l : List ι} {f : ∀ i, α i}
namespace List
variable (α)
abbrev TProd (l : List ι) : Type v :=
l.foldr (fun i β => α i × β) PUnit
#align list.tprod List.TProd
variable {α}
namespace TProd
open List
protected def mk : ∀ (l : List ι) (_f : ∀ i, α i), TProd α l
| [] => fun _ => PUnit.unit
| i :: is => fun f => (f i, TProd.mk is f)
#align list.tprod.mk List.TProd.mk
instance [∀ i, Inhabited (α i)] : Inhabited (TProd α l) :=
⟨TProd.mk l default⟩
@[simp]
theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i :=
rfl
#align list.tprod.fst_mk List.TProd.fst_mk
@[simp]
theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) :
(TProd.mk.{u,v} (i :: l) f).2 = TProd.mk.{u,v} l f :=
rfl
#align list.tprod.snd_mk List.TProd.snd_mk
variable [DecidableEq ι]
protected def elim : ∀ {l : List ι} (_ : TProd α l) {i : ι} (_ : i ∈ l), α i
| i :: is, v, j, hj =>
if hji : j = i then by
subst hji
exact v.1
else TProd.elim v.2 ((List.mem_cons.mp hj).resolve_left hji)
#align list.tprod.elim List.TProd.elim
@[simp]
| Mathlib/Data/Prod/TProd.lean | 90 | 90 | theorem elim_self (v : TProd α (i :: l)) : v.elim (l.mem_cons_self i) = v.1 := by | simp [TProd.elim]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 322 |
import Mathlib.Data.List.Nodup
#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open List Function
universe u v
variable {ι : Type u} {α : ι → Type v} {i j : ι} {l : List ι} {f : ∀ i, α i}
namespace List
variable (α)
abbrev TProd (l : List ι) : Type v :=
l.foldr (fun i β => α i × β) PUnit
#align list.tprod List.TProd
variable {α}
namespace TProd
open List
protected def mk : ∀ (l : List ι) (_f : ∀ i, α i), TProd α l
| [] => fun _ => PUnit.unit
| i :: is => fun f => (f i, TProd.mk is f)
#align list.tprod.mk List.TProd.mk
instance [∀ i, Inhabited (α i)] : Inhabited (TProd α l) :=
⟨TProd.mk l default⟩
@[simp]
theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i :=
rfl
#align list.tprod.fst_mk List.TProd.fst_mk
@[simp]
theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) :
(TProd.mk.{u,v} (i :: l) f).2 = TProd.mk.{u,v} l f :=
rfl
#align list.tprod.snd_mk List.TProd.snd_mk
variable [DecidableEq ι]
protected def elim : ∀ {l : List ι} (_ : TProd α l) {i : ι} (_ : i ∈ l), α i
| i :: is, v, j, hj =>
if hji : j = i then by
subst hji
exact v.1
else TProd.elim v.2 ((List.mem_cons.mp hj).resolve_left hji)
#align list.tprod.elim List.TProd.elim
@[simp]
theorem elim_self (v : TProd α (i :: l)) : v.elim (l.mem_cons_self i) = v.1 := by simp [TProd.elim]
#align list.tprod.elim_self List.TProd.elim_self
@[simp]
| Mathlib/Data/Prod/TProd.lean | 94 | 95 | theorem elim_of_ne (hj : j ∈ i :: l) (hji : j ≠ i) (v : TProd α (i :: l)) :
v.elim hj = TProd.elim v.2 ((List.mem_cons.mp hj).resolve_left hji) := by | simp [TProd.elim, hji]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 322 |
import Mathlib.Data.List.Nodup
#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
open List Function
universe u v
variable {ι : Type u} {α : ι → Type v} {i j : ι} {l : List ι} {f : ∀ i, α i}
namespace List
variable (α)
abbrev TProd (l : List ι) : Type v :=
l.foldr (fun i β => α i × β) PUnit
#align list.tprod List.TProd
variable {α}
namespace TProd
open List
protected def mk : ∀ (l : List ι) (_f : ∀ i, α i), TProd α l
| [] => fun _ => PUnit.unit
| i :: is => fun f => (f i, TProd.mk is f)
#align list.tprod.mk List.TProd.mk
instance [∀ i, Inhabited (α i)] : Inhabited (TProd α l) :=
⟨TProd.mk l default⟩
@[simp]
theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i :=
rfl
#align list.tprod.fst_mk List.TProd.fst_mk
@[simp]
theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) :
(TProd.mk.{u,v} (i :: l) f).2 = TProd.mk.{u,v} l f :=
rfl
#align list.tprod.snd_mk List.TProd.snd_mk
variable [DecidableEq ι]
protected def elim : ∀ {l : List ι} (_ : TProd α l) {i : ι} (_ : i ∈ l), α i
| i :: is, v, j, hj =>
if hji : j = i then by
subst hji
exact v.1
else TProd.elim v.2 ((List.mem_cons.mp hj).resolve_left hji)
#align list.tprod.elim List.TProd.elim
@[simp]
theorem elim_self (v : TProd α (i :: l)) : v.elim (l.mem_cons_self i) = v.1 := by simp [TProd.elim]
#align list.tprod.elim_self List.TProd.elim_self
@[simp]
theorem elim_of_ne (hj : j ∈ i :: l) (hji : j ≠ i) (v : TProd α (i :: l)) :
v.elim hj = TProd.elim v.2 ((List.mem_cons.mp hj).resolve_left hji) := by simp [TProd.elim, hji]
#align list.tprod.elim_of_ne List.TProd.elim_of_ne
@[simp]
| Mathlib/Data/Prod/TProd.lean | 99 | 103 | theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by |
apply elim_of_ne
rintro rfl
exact hl.not_mem hj
| 3 | 20.085537 | 1 | 0.333333 | 3 | 322 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.MvPowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def PowerSeries (R : Type*) :=
MvPowerSeries Unit R
#align power_series PowerSeries
namespace PowerSeries
open Finsupp (single)
variable {R : Type*}
section
-- Porting note: not available in Lean 4
-- local reducible PowerSeries
scoped notation:9000 R "⟦X⟧" => PowerSeries R
instance [Inhabited R] : Inhabited R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Zero R] : Zero R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddMonoid R] : AddMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddGroup R] : AddGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommMonoid R] : AddCommMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommGroup R] : AddCommGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Semiring R] : Semiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommSemiring R] : CommSemiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Ring R] : Ring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommRing R] : CommRing R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Nontrivial R] : Nontrivial R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S A⟦X⟧ :=
Pi.isScalarTower
instance {A} [Semiring A] [CommSemiring R] [Algebra R A] : Algebra R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
end
section Semiring
variable (R) [Semiring R]
def coeff (n : ℕ) : R⟦X⟧ →ₗ[R] R :=
MvPowerSeries.coeff R (single () n)
#align power_series.coeff PowerSeries.coeff
def monomial (n : ℕ) : R →ₗ[R] R⟦X⟧ :=
MvPowerSeries.monomial R (single () n)
#align power_series.monomial PowerSeries.monomial
variable {R}
| Mathlib/RingTheory/PowerSeries/Basic.lean | 150 | 151 | theorem coeff_def {s : Unit →₀ ℕ} {n : ℕ} (h : s () = n) : coeff R n = MvPowerSeries.coeff R s := by |
erw [coeff, ← h, ← Finsupp.unique_single s]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 323 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.MvPowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def PowerSeries (R : Type*) :=
MvPowerSeries Unit R
#align power_series PowerSeries
namespace PowerSeries
open Finsupp (single)
variable {R : Type*}
section
-- Porting note: not available in Lean 4
-- local reducible PowerSeries
scoped notation:9000 R "⟦X⟧" => PowerSeries R
instance [Inhabited R] : Inhabited R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Zero R] : Zero R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddMonoid R] : AddMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddGroup R] : AddGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommMonoid R] : AddCommMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommGroup R] : AddCommGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Semiring R] : Semiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommSemiring R] : CommSemiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Ring R] : Ring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommRing R] : CommRing R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Nontrivial R] : Nontrivial R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S A⟦X⟧ :=
Pi.isScalarTower
instance {A} [Semiring A] [CommSemiring R] [Algebra R A] : Algebra R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
end
section Semiring
variable (R) [Semiring R]
def coeff (n : ℕ) : R⟦X⟧ →ₗ[R] R :=
MvPowerSeries.coeff R (single () n)
#align power_series.coeff PowerSeries.coeff
def monomial (n : ℕ) : R →ₗ[R] R⟦X⟧ :=
MvPowerSeries.monomial R (single () n)
#align power_series.monomial PowerSeries.monomial
variable {R}
theorem coeff_def {s : Unit →₀ ℕ} {n : ℕ} (h : s () = n) : coeff R n = MvPowerSeries.coeff R s := by
erw [coeff, ← h, ← Finsupp.unique_single s]
#align power_series.coeff_def PowerSeries.coeff_def
@[ext]
theorem ext {φ ψ : R⟦X⟧} (h : ∀ n, coeff R n φ = coeff R n ψ) : φ = ψ :=
MvPowerSeries.ext fun n => by
rw [← coeff_def]
· apply h
rfl
#align power_series.ext PowerSeries.ext
theorem ext_iff {φ ψ : R⟦X⟧} : φ = ψ ↔ ∀ n, coeff R n φ = coeff R n ψ :=
⟨fun h n => congr_arg (coeff R n) h, ext⟩
#align power_series.ext_iff PowerSeries.ext_iff
instance [Subsingleton R] : Subsingleton R⟦X⟧ := by
simp only [subsingleton_iff, ext_iff]
exact fun _ _ _ ↦ (subsingleton_iff).mp (by infer_instance) _ _
def mk {R} (f : ℕ → R) : R⟦X⟧ := fun s => f (s ())
#align power_series.mk PowerSeries.mk
@[simp]
theorem coeff_mk (n : ℕ) (f : ℕ → R) : coeff R n (mk f) = f n :=
congr_arg f Finsupp.single_eq_same
#align power_series.coeff_mk PowerSeries.coeff_mk
| Mathlib/RingTheory/PowerSeries/Basic.lean | 181 | 184 | theorem coeff_monomial (m n : ℕ) (a : R) : coeff R m (monomial R n a) = if m = n then a else 0 :=
calc
coeff R m (monomial R n a) = _ := MvPowerSeries.coeff_monomial _ _ _
_ = if m = n then a else 0 := by | simp only [Finsupp.unique_single_eq_iff]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 323 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Basic
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.MvPowerSeries.Basic
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
def PowerSeries (R : Type*) :=
MvPowerSeries Unit R
#align power_series PowerSeries
namespace PowerSeries
open Finsupp (single)
variable {R : Type*}
section
-- Porting note: not available in Lean 4
-- local reducible PowerSeries
scoped notation:9000 R "⟦X⟧" => PowerSeries R
instance [Inhabited R] : Inhabited R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Zero R] : Zero R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddMonoid R] : AddMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddGroup R] : AddGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommMonoid R] : AddCommMonoid R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [AddCommGroup R] : AddCommGroup R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Semiring R] : Semiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommSemiring R] : CommSemiring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Ring R] : Ring R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [CommRing R] : CommRing R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance [Nontrivial R] : Nontrivial R⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A} [Semiring R] [AddCommMonoid A] [Module R A] : Module R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
instance {A S} [Semiring R] [Semiring S] [AddCommMonoid A] [Module R A] [Module S A] [SMul R S]
[IsScalarTower R S A] : IsScalarTower R S A⟦X⟧ :=
Pi.isScalarTower
instance {A} [Semiring A] [CommSemiring R] [Algebra R A] : Algebra R A⟦X⟧ := by
dsimp only [PowerSeries]
infer_instance
end
section Semiring
variable (R) [Semiring R]
def coeff (n : ℕ) : R⟦X⟧ →ₗ[R] R :=
MvPowerSeries.coeff R (single () n)
#align power_series.coeff PowerSeries.coeff
def monomial (n : ℕ) : R →ₗ[R] R⟦X⟧ :=
MvPowerSeries.monomial R (single () n)
#align power_series.monomial PowerSeries.monomial
variable {R}
theorem coeff_def {s : Unit →₀ ℕ} {n : ℕ} (h : s () = n) : coeff R n = MvPowerSeries.coeff R s := by
erw [coeff, ← h, ← Finsupp.unique_single s]
#align power_series.coeff_def PowerSeries.coeff_def
@[ext]
theorem ext {φ ψ : R⟦X⟧} (h : ∀ n, coeff R n φ = coeff R n ψ) : φ = ψ :=
MvPowerSeries.ext fun n => by
rw [← coeff_def]
· apply h
rfl
#align power_series.ext PowerSeries.ext
theorem ext_iff {φ ψ : R⟦X⟧} : φ = ψ ↔ ∀ n, coeff R n φ = coeff R n ψ :=
⟨fun h n => congr_arg (coeff R n) h, ext⟩
#align power_series.ext_iff PowerSeries.ext_iff
instance [Subsingleton R] : Subsingleton R⟦X⟧ := by
simp only [subsingleton_iff, ext_iff]
exact fun _ _ _ ↦ (subsingleton_iff).mp (by infer_instance) _ _
def mk {R} (f : ℕ → R) : R⟦X⟧ := fun s => f (s ())
#align power_series.mk PowerSeries.mk
@[simp]
theorem coeff_mk (n : ℕ) (f : ℕ → R) : coeff R n (mk f) = f n :=
congr_arg f Finsupp.single_eq_same
#align power_series.coeff_mk PowerSeries.coeff_mk
theorem coeff_monomial (m n : ℕ) (a : R) : coeff R m (monomial R n a) = if m = n then a else 0 :=
calc
coeff R m (monomial R n a) = _ := MvPowerSeries.coeff_monomial _ _ _
_ = if m = n then a else 0 := by simp only [Finsupp.unique_single_eq_iff]
#align power_series.coeff_monomial PowerSeries.coeff_monomial
theorem monomial_eq_mk (n : ℕ) (a : R) : monomial R n a = mk fun m => if m = n then a else 0 :=
ext fun m => by rw [coeff_monomial, coeff_mk]
#align power_series.monomial_eq_mk PowerSeries.monomial_eq_mk
@[simp]
theorem coeff_monomial_same (n : ℕ) (a : R) : coeff R n (monomial R n a) = a :=
MvPowerSeries.coeff_monomial_same _ _
#align power_series.coeff_monomial_same PowerSeries.coeff_monomial_same
@[simp]
theorem coeff_comp_monomial (n : ℕ) : (coeff R n).comp (monomial R n) = LinearMap.id :=
LinearMap.ext <| coeff_monomial_same n
#align power_series.coeff_comp_monomial PowerSeries.coeff_comp_monomial
variable (R)
def constantCoeff : R⟦X⟧ →+* R :=
MvPowerSeries.constantCoeff Unit R
#align power_series.constant_coeff PowerSeries.constantCoeff
def C : R →+* R⟦X⟧ :=
MvPowerSeries.C Unit R
set_option linter.uppercaseLean3 false in
#align power_series.C PowerSeries.C
variable {R}
def X : R⟦X⟧ :=
MvPowerSeries.X ()
set_option linter.uppercaseLean3 false in
#align power_series.X PowerSeries.X
theorem commute_X (φ : R⟦X⟧) : Commute φ X :=
MvPowerSeries.commute_X _ _
set_option linter.uppercaseLean3 false in
#align power_series.commute_X PowerSeries.commute_X
@[simp]
| Mathlib/RingTheory/PowerSeries/Basic.lean | 229 | 231 | theorem coeff_zero_eq_constantCoeff : ⇑(coeff R 0) = constantCoeff R := by |
rw [coeff, Finsupp.single_zero]
rfl
| 2 | 7.389056 | 1 | 0.333333 | 3 | 323 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
| Mathlib/RingTheory/IsAdjoinRoot.lean | 127 | 128 | theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by | rw [h.algebraMap_eq, RingHom.comp_apply]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
| Mathlib/RingTheory/IsAdjoinRoot.lean | 132 | 133 | theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by |
rw [h.ker_map, Ideal.mem_span_singleton]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
| Mathlib/RingTheory/IsAdjoinRoot.lean | 136 | 137 | theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by |
rw [← h.mem_ker_map, RingHom.mem_ker]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
| Mathlib/RingTheory/IsAdjoinRoot.lean | 158 | 158 | theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by | rw [aeval_eq, map_self]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self]
#align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root
def repr (h : IsAdjoinRoot S f) (x : S) : R[X] :=
(h.map_surjective x).choose
#align is_adjoin_root.repr IsAdjoinRoot.repr
theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x :=
(h.map_surjective x).choose_spec
#align is_adjoin_root.map_repr IsAdjoinRoot.map_repr
| Mathlib/RingTheory/IsAdjoinRoot.lean | 174 | 175 | theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by |
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self]
#align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root
def repr (h : IsAdjoinRoot S f) (x : S) : R[X] :=
(h.map_surjective x).choose
#align is_adjoin_root.repr IsAdjoinRoot.repr
theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x :=
(h.map_surjective x).choose_spec
#align is_adjoin_root.map_repr IsAdjoinRoot.map_repr
theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
#align is_adjoin_root.repr_zero_mem_span IsAdjoinRoot.repr_zero_mem_span
| Mathlib/RingTheory/IsAdjoinRoot.lean | 179 | 181 | theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) :
h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by |
rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]
| 1 | 2.718282 | 0 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self]
#align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root
def repr (h : IsAdjoinRoot S f) (x : S) : R[X] :=
(h.map_surjective x).choose
#align is_adjoin_root.repr IsAdjoinRoot.repr
theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x :=
(h.map_surjective x).choose_spec
#align is_adjoin_root.map_repr IsAdjoinRoot.map_repr
theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
#align is_adjoin_root.repr_zero_mem_span IsAdjoinRoot.repr_zero_mem_span
theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) :
h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]
#align is_adjoin_root.repr_add_sub_repr_add_repr_mem_span IsAdjoinRoot.repr_add_sub_repr_add_repr_mem_span
| Mathlib/RingTheory/IsAdjoinRoot.lean | 186 | 188 | theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h' := by |
cases h; cases h'; congr
exact RingHom.ext eq
| 2 | 7.389056 | 1 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self]
#align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root
def repr (h : IsAdjoinRoot S f) (x : S) : R[X] :=
(h.map_surjective x).choose
#align is_adjoin_root.repr IsAdjoinRoot.repr
theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x :=
(h.map_surjective x).choose_spec
#align is_adjoin_root.map_repr IsAdjoinRoot.map_repr
theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
#align is_adjoin_root.repr_zero_mem_span IsAdjoinRoot.repr_zero_mem_span
theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) :
h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]
#align is_adjoin_root.repr_add_sub_repr_add_repr_mem_span IsAdjoinRoot.repr_add_sub_repr_add_repr_mem_span
theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h' := by
cases h; cases h'; congr
exact RingHom.ext eq
#align is_adjoin_root.ext_map IsAdjoinRoot.ext_map
@[ext]
theorem ext (h h' : IsAdjoinRoot S f) (eq : h.root = h'.root) : h = h' :=
h.ext_map h' fun x => by rw [← h.aeval_eq, ← h'.aeval_eq, eq]
#align is_adjoin_root.ext IsAdjoinRoot.ext
section lift
variable {T : Type*} [CommRing T] {i : R →+* T} {x : T} (hx : f.eval₂ i x = 0)
| Mathlib/RingTheory/IsAdjoinRoot.lean | 203 | 207 | theorem eval₂_repr_eq_eval₂_of_map_eq (h : IsAdjoinRoot S f) (z : S) (w : R[X])
(hzw : h.map w = z) : (h.repr z).eval₂ i x = w.eval₂ i x := by |
rw [eq_comm, ← sub_eq_zero, ← h.map_repr z, ← map_sub, h.map_eq_zero_iff] at hzw
obtain ⟨y, hy⟩ := hzw
rw [← sub_eq_zero, ← eval₂_sub, hy, eval₂_mul, hx, zero_mul]
| 3 | 20.085537 | 1 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed
import Mathlib.RingTheory.PowerBasis
#align_import ring_theory.is_adjoin_root from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
open scoped Polynomial
open Polynomial
noncomputable section
universe u v
-- Porting note: this looks like something that should not be here
-- -- This class doesn't really make sense on a predicate
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) : Type max u v where
map : R[X] →+* S
map_surjective : Function.Surjective map
ker_map : RingHom.ker map = Ideal.span {f}
algebraMap_eq : algebraMap R S = map.comp Polynomial.C
#align is_adjoin_root IsAdjoinRoot
-- This class doesn't really make sense on a predicate
-- @[nolint has_nonempty_instance] -- Porting note: This linter does not exist yet.
structure IsAdjoinRootMonic {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
(f : R[X]) extends IsAdjoinRoot S f where
Monic : Monic f
#align is_adjoin_root_monic IsAdjoinRootMonic
section Ring
variable {R : Type u} {S : Type v} [CommRing R] [Ring S] {f : R[X]} [Algebra R S]
namespace IsAdjoinRoot
def root (h : IsAdjoinRoot S f) : S :=
h.map X
#align is_adjoin_root.root IsAdjoinRoot.root
theorem subsingleton (h : IsAdjoinRoot S f) [Subsingleton R] : Subsingleton S :=
h.map_surjective.subsingleton
#align is_adjoin_root.subsingleton IsAdjoinRoot.subsingleton
theorem algebraMap_apply (h : IsAdjoinRoot S f) (x : R) :
algebraMap R S x = h.map (Polynomial.C x) := by rw [h.algebraMap_eq, RingHom.comp_apply]
#align is_adjoin_root.algebra_map_apply IsAdjoinRoot.algebraMap_apply
@[simp]
theorem mem_ker_map (h : IsAdjoinRoot S f) {p} : p ∈ RingHom.ker h.map ↔ f ∣ p := by
rw [h.ker_map, Ideal.mem_span_singleton]
#align is_adjoin_root.mem_ker_map IsAdjoinRoot.mem_ker_map
theorem map_eq_zero_iff (h : IsAdjoinRoot S f) {p} : h.map p = 0 ↔ f ∣ p := by
rw [← h.mem_ker_map, RingHom.mem_ker]
#align is_adjoin_root.map_eq_zero_iff IsAdjoinRoot.map_eq_zero_iff
@[simp]
theorem map_X (h : IsAdjoinRoot S f) : h.map X = h.root := rfl
set_option linter.uppercaseLean3 false in
#align is_adjoin_root.map_X IsAdjoinRoot.map_X
@[simp]
theorem map_self (h : IsAdjoinRoot S f) : h.map f = 0 := h.map_eq_zero_iff.mpr dvd_rfl
#align is_adjoin_root.map_self IsAdjoinRoot.map_self
@[simp]
theorem aeval_eq (h : IsAdjoinRoot S f) (p : R[X]) : aeval h.root p = h.map p :=
Polynomial.induction_on p (fun x => by rw [aeval_C, h.algebraMap_apply])
(fun p q ihp ihq => by rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]) fun n x _ => by
rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, ← h.algebraMap_apply,
RingHom.map_pow, map_X]
#align is_adjoin_root.aeval_eq IsAdjoinRoot.aeval_eq
-- @[simp] -- Porting note (#10618): simp can prove this
theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0 := by rw [aeval_eq, map_self]
#align is_adjoin_root.aeval_root IsAdjoinRoot.aeval_root
def repr (h : IsAdjoinRoot S f) (x : S) : R[X] :=
(h.map_surjective x).choose
#align is_adjoin_root.repr IsAdjoinRoot.repr
theorem map_repr (h : IsAdjoinRoot S f) (x : S) : h.map (h.repr x) = x :=
(h.map_surjective x).choose_spec
#align is_adjoin_root.map_repr IsAdjoinRoot.map_repr
theorem repr_zero_mem_span (h : IsAdjoinRoot S f) : h.repr 0 ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, h.map_repr]
#align is_adjoin_root.repr_zero_mem_span IsAdjoinRoot.repr_zero_mem_span
theorem repr_add_sub_repr_add_repr_mem_span (h : IsAdjoinRoot S f) (x y : S) :
h.repr (x + y) - (h.repr x + h.repr y) ∈ Ideal.span ({f} : Set R[X]) := by
rw [← h.ker_map, RingHom.mem_ker, map_sub, h.map_repr, map_add, h.map_repr, h.map_repr, sub_self]
#align is_adjoin_root.repr_add_sub_repr_add_repr_mem_span IsAdjoinRoot.repr_add_sub_repr_add_repr_mem_span
theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h' := by
cases h; cases h'; congr
exact RingHom.ext eq
#align is_adjoin_root.ext_map IsAdjoinRoot.ext_map
@[ext]
theorem ext (h h' : IsAdjoinRoot S f) (eq : h.root = h'.root) : h = h' :=
h.ext_map h' fun x => by rw [← h.aeval_eq, ← h'.aeval_eq, eq]
#align is_adjoin_root.ext IsAdjoinRoot.ext
namespace IsAdjoinRootMonic
open IsAdjoinRoot
| Mathlib/RingTheory/IsAdjoinRoot.lean | 356 | 359 | theorem map_modByMonic (h : IsAdjoinRootMonic S f) (g : R[X]) : h.map (g %ₘ f) = h.map g := by |
rw [← RingHom.sub_mem_ker_iff, mem_ker_map, modByMonic_eq_sub_mul_div _ h.Monic, sub_right_comm,
sub_self, zero_sub, dvd_neg]
exact ⟨_, rfl⟩
| 3 | 20.085537 | 1 | 0.333333 | 9 | 324 |
import Mathlib.Algebra.EuclideanDomain.Instances
import Mathlib.RingTheory.Ideal.Colon
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
universe u v
variable {R : Type u} {M : Type v}
open Set Function
open Submodule
section
variable [Ring R] [AddCommGroup M] [Module R M]
instance bot_isPrincipal : (⊥ : Submodule R M).IsPrincipal :=
⟨⟨0, by simp⟩⟩
#align bot_is_principal bot_isPrincipal
instance top_isPrincipal : (⊤ : Submodule R R).IsPrincipal :=
⟨⟨1, Ideal.span_singleton_one.symm⟩⟩
#align top_is_principal top_isPrincipal
variable (R)
class IsBezout : Prop where
isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal
#align is_bezout IsBezout
instance (priority := 100) IsBezout.of_isPrincipalIdealRing [IsPrincipalIdealRing R] : IsBezout R :=
⟨fun I _ => IsPrincipalIdealRing.principal I⟩
#align is_bezout.of_is_principal_ideal_ring IsBezout.of_isPrincipalIdealRing
instance (priority := 100) DivisionRing.isPrincipalIdealRing (K : Type u) [DivisionRing K] :
IsPrincipalIdealRing K where
principal S := by
rcases Ideal.eq_bot_or_top S with (rfl | rfl)
· apply bot_isPrincipal
· apply top_isPrincipal
#align division_ring.is_principal_ideal_ring DivisionRing.isPrincipalIdealRing
end
namespace Submodule.IsPrincipal
variable [AddCommGroup M]
section Ring
variable [Ring R] [Module R M]
noncomputable def generator (S : Submodule R M) [S.IsPrincipal] : M :=
Classical.choose (principal S)
#align submodule.is_principal.generator Submodule.IsPrincipal.generator
theorem span_singleton_generator (S : Submodule R M) [S.IsPrincipal] : span R {generator S} = S :=
Eq.symm (Classical.choose_spec (principal S))
#align submodule.is_principal.span_singleton_generator Submodule.IsPrincipal.span_singleton_generator
@[simp]
theorem _root_.Ideal.span_singleton_generator (I : Ideal R) [I.IsPrincipal] :
Ideal.span ({generator I} : Set R) = I :=
Eq.symm (Classical.choose_spec (principal I))
#align ideal.span_singleton_generator Ideal.span_singleton_generator
@[simp]
| Mathlib/RingTheory/PrincipalIdealDomain.lean | 104 | 106 | theorem generator_mem (S : Submodule R M) [S.IsPrincipal] : generator S ∈ S := by |
conv_rhs => rw [← span_singleton_generator S]
exact subset_span (mem_singleton _)
| 2 | 7.389056 | 1 | 0.333333 | 3 | 325 |
import Mathlib.Algebra.EuclideanDomain.Instances
import Mathlib.RingTheory.Ideal.Colon
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
universe u v
variable {R : Type u} {M : Type v}
open Set Function
open Submodule
section
variable [Ring R] [AddCommGroup M] [Module R M]
instance bot_isPrincipal : (⊥ : Submodule R M).IsPrincipal :=
⟨⟨0, by simp⟩⟩
#align bot_is_principal bot_isPrincipal
instance top_isPrincipal : (⊤ : Submodule R R).IsPrincipal :=
⟨⟨1, Ideal.span_singleton_one.symm⟩⟩
#align top_is_principal top_isPrincipal
variable (R)
class IsBezout : Prop where
isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal
#align is_bezout IsBezout
instance (priority := 100) IsBezout.of_isPrincipalIdealRing [IsPrincipalIdealRing R] : IsBezout R :=
⟨fun I _ => IsPrincipalIdealRing.principal I⟩
#align is_bezout.of_is_principal_ideal_ring IsBezout.of_isPrincipalIdealRing
instance (priority := 100) DivisionRing.isPrincipalIdealRing (K : Type u) [DivisionRing K] :
IsPrincipalIdealRing K where
principal S := by
rcases Ideal.eq_bot_or_top S with (rfl | rfl)
· apply bot_isPrincipal
· apply top_isPrincipal
#align division_ring.is_principal_ideal_ring DivisionRing.isPrincipalIdealRing
end
namespace Submodule.IsPrincipal
variable [AddCommGroup M]
section Ring
variable [Ring R] [Module R M]
noncomputable def generator (S : Submodule R M) [S.IsPrincipal] : M :=
Classical.choose (principal S)
#align submodule.is_principal.generator Submodule.IsPrincipal.generator
theorem span_singleton_generator (S : Submodule R M) [S.IsPrincipal] : span R {generator S} = S :=
Eq.symm (Classical.choose_spec (principal S))
#align submodule.is_principal.span_singleton_generator Submodule.IsPrincipal.span_singleton_generator
@[simp]
theorem _root_.Ideal.span_singleton_generator (I : Ideal R) [I.IsPrincipal] :
Ideal.span ({generator I} : Set R) = I :=
Eq.symm (Classical.choose_spec (principal I))
#align ideal.span_singleton_generator Ideal.span_singleton_generator
@[simp]
theorem generator_mem (S : Submodule R M) [S.IsPrincipal] : generator S ∈ S := by
conv_rhs => rw [← span_singleton_generator S]
exact subset_span (mem_singleton _)
#align submodule.is_principal.generator_mem Submodule.IsPrincipal.generator_mem
| Mathlib/RingTheory/PrincipalIdealDomain.lean | 109 | 111 | theorem mem_iff_eq_smul_generator (S : Submodule R M) [S.IsPrincipal] {x : M} :
x ∈ S ↔ ∃ s : R, x = s • generator S := by |
simp_rw [@eq_comm _ x, ← mem_span_singleton, span_singleton_generator]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 325 |
import Mathlib.Algebra.EuclideanDomain.Instances
import Mathlib.RingTheory.Ideal.Colon
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
universe u v
variable {R : Type u} {M : Type v}
open Set Function
open Submodule
section
variable [Ring R] [AddCommGroup M] [Module R M]
instance bot_isPrincipal : (⊥ : Submodule R M).IsPrincipal :=
⟨⟨0, by simp⟩⟩
#align bot_is_principal bot_isPrincipal
instance top_isPrincipal : (⊤ : Submodule R R).IsPrincipal :=
⟨⟨1, Ideal.span_singleton_one.symm⟩⟩
#align top_is_principal top_isPrincipal
variable (R)
class IsBezout : Prop where
isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal
#align is_bezout IsBezout
instance (priority := 100) IsBezout.of_isPrincipalIdealRing [IsPrincipalIdealRing R] : IsBezout R :=
⟨fun I _ => IsPrincipalIdealRing.principal I⟩
#align is_bezout.of_is_principal_ideal_ring IsBezout.of_isPrincipalIdealRing
instance (priority := 100) DivisionRing.isPrincipalIdealRing (K : Type u) [DivisionRing K] :
IsPrincipalIdealRing K where
principal S := by
rcases Ideal.eq_bot_or_top S with (rfl | rfl)
· apply bot_isPrincipal
· apply top_isPrincipal
#align division_ring.is_principal_ideal_ring DivisionRing.isPrincipalIdealRing
end
namespace Submodule.IsPrincipal
variable [AddCommGroup M]
section Ring
variable [Ring R] [Module R M]
noncomputable def generator (S : Submodule R M) [S.IsPrincipal] : M :=
Classical.choose (principal S)
#align submodule.is_principal.generator Submodule.IsPrincipal.generator
theorem span_singleton_generator (S : Submodule R M) [S.IsPrincipal] : span R {generator S} = S :=
Eq.symm (Classical.choose_spec (principal S))
#align submodule.is_principal.span_singleton_generator Submodule.IsPrincipal.span_singleton_generator
@[simp]
theorem _root_.Ideal.span_singleton_generator (I : Ideal R) [I.IsPrincipal] :
Ideal.span ({generator I} : Set R) = I :=
Eq.symm (Classical.choose_spec (principal I))
#align ideal.span_singleton_generator Ideal.span_singleton_generator
@[simp]
theorem generator_mem (S : Submodule R M) [S.IsPrincipal] : generator S ∈ S := by
conv_rhs => rw [← span_singleton_generator S]
exact subset_span (mem_singleton _)
#align submodule.is_principal.generator_mem Submodule.IsPrincipal.generator_mem
theorem mem_iff_eq_smul_generator (S : Submodule R M) [S.IsPrincipal] {x : M} :
x ∈ S ↔ ∃ s : R, x = s • generator S := by
simp_rw [@eq_comm _ x, ← mem_span_singleton, span_singleton_generator]
#align submodule.is_principal.mem_iff_eq_smul_generator Submodule.IsPrincipal.mem_iff_eq_smul_generator
| Mathlib/RingTheory/PrincipalIdealDomain.lean | 114 | 115 | theorem eq_bot_iff_generator_eq_zero (S : Submodule R M) [S.IsPrincipal] :
S = ⊥ ↔ generator S = 0 := by | rw [← @span_singleton_eq_bot R M, span_singleton_generator]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 325 |
import Mathlib.Logic.Pairwise
import Mathlib.Order.CompleteBooleanAlgebra
import Mathlib.Order.Directed
import Mathlib.Order.GaloisConnection
#align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd"
open Function Set
universe u
variable {α β γ : Type*} {ι ι' ι₂ : Sort*} {κ κ₁ κ₂ : ι → Sort*} {κ' : ι' → Sort*}
namespace Set
| Mathlib/Data/Set/Lattice.lean | 67 | 68 | theorem mem_iUnion₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋃ (i) (j), s i j) ↔ ∃ i j, x ∈ s i j := by |
simp_rw [mem_iUnion]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 326 |
import Mathlib.Logic.Pairwise
import Mathlib.Order.CompleteBooleanAlgebra
import Mathlib.Order.Directed
import Mathlib.Order.GaloisConnection
#align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd"
open Function Set
universe u
variable {α β γ : Type*} {ι ι' ι₂ : Sort*} {κ κ₁ κ₂ : ι → Sort*} {κ' : ι' → Sort*}
namespace Set
theorem mem_iUnion₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋃ (i) (j), s i j) ↔ ∃ i j, x ∈ s i j := by
simp_rw [mem_iUnion]
#align set.mem_Union₂ Set.mem_iUnion₂
| Mathlib/Data/Set/Lattice.lean | 72 | 73 | theorem mem_iInter₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋂ (i) (j), s i j) ↔ ∀ i j, x ∈ s i j := by |
simp_rw [mem_iInter]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 326 |
import Mathlib.Logic.Pairwise
import Mathlib.Order.CompleteBooleanAlgebra
import Mathlib.Order.Directed
import Mathlib.Order.GaloisConnection
#align_import data.set.lattice from "leanprover-community/mathlib"@"b86832321b586c6ac23ef8cdef6a7a27e42b13bd"
open Function Set
universe u
variable {α β γ : Type*} {ι ι' ι₂ : Sort*} {κ κ₁ κ₂ : ι → Sort*} {κ' : ι' → Sort*}
namespace Set
theorem mem_iUnion₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋃ (i) (j), s i j) ↔ ∃ i j, x ∈ s i j := by
simp_rw [mem_iUnion]
#align set.mem_Union₂ Set.mem_iUnion₂
theorem mem_iInter₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋂ (i) (j), s i j) ↔ ∀ i j, x ∈ s i j := by
simp_rw [mem_iInter]
#align set.mem_Inter₂ Set.mem_iInter₂
theorem mem_iUnion_of_mem {s : ι → Set α} {a : α} (i : ι) (ha : a ∈ s i) : a ∈ ⋃ i, s i :=
mem_iUnion.2 ⟨i, ha⟩
#align set.mem_Union_of_mem Set.mem_iUnion_of_mem
theorem mem_iUnion₂_of_mem {s : ∀ i, κ i → Set α} {a : α} {i : ι} (j : κ i) (ha : a ∈ s i j) :
a ∈ ⋃ (i) (j), s i j :=
mem_iUnion₂.2 ⟨i, j, ha⟩
#align set.mem_Union₂_of_mem Set.mem_iUnion₂_of_mem
theorem mem_iInter_of_mem {s : ι → Set α} {a : α} (h : ∀ i, a ∈ s i) : a ∈ ⋂ i, s i :=
mem_iInter.2 h
#align set.mem_Inter_of_mem Set.mem_iInter_of_mem
theorem mem_iInter₂_of_mem {s : ∀ i, κ i → Set α} {a : α} (h : ∀ i j, a ∈ s i j) :
a ∈ ⋂ (i) (j), s i j :=
mem_iInter₂.2 h
#align set.mem_Inter₂_of_mem Set.mem_iInter₂_of_mem
instance completeAtomicBooleanAlgebra : CompleteAtomicBooleanAlgebra (Set α) :=
{ instBooleanAlgebraSet with
le_sSup := fun s t t_in a a_in => ⟨t, t_in, a_in⟩
sSup_le := fun s t h a ⟨t', ⟨t'_in, a_in⟩⟩ => h t' t'_in a_in
le_sInf := fun s t h a a_in t' t'_in => h t' t'_in a_in
sInf_le := fun s t t_in a h => h _ t_in
iInf_iSup_eq := by intros; ext; simp [Classical.skolem] }
instance : OrderTop (Set α) where
top := univ
le_top := by simp
@[congr]
theorem iUnion_congr_Prop {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q)
(f : ∀ x, f₁ (pq.mpr x) = f₂ x) : iUnion f₁ = iUnion f₂ :=
iSup_congr_Prop pq f
#align set.Union_congr_Prop Set.iUnion_congr_Prop
@[congr]
theorem iInter_congr_Prop {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q)
(f : ∀ x, f₁ (pq.mpr x) = f₂ x) : iInter f₁ = iInter f₂ :=
iInf_congr_Prop pq f
#align set.Inter_congr_Prop Set.iInter_congr_Prop
theorem iUnion_plift_up (f : PLift ι → Set α) : ⋃ i, f (PLift.up i) = ⋃ i, f i :=
iSup_plift_up _
#align set.Union_plift_up Set.iUnion_plift_up
theorem iUnion_plift_down (f : ι → Set α) : ⋃ i, f (PLift.down i) = ⋃ i, f i :=
iSup_plift_down _
#align set.Union_plift_down Set.iUnion_plift_down
theorem iInter_plift_up (f : PLift ι → Set α) : ⋂ i, f (PLift.up i) = ⋂ i, f i :=
iInf_plift_up _
#align set.Inter_plift_up Set.iInter_plift_up
theorem iInter_plift_down (f : ι → Set α) : ⋂ i, f (PLift.down i) = ⋂ i, f i :=
iInf_plift_down _
#align set.Inter_plift_down Set.iInter_plift_down
theorem iUnion_eq_if {p : Prop} [Decidable p] (s : Set α) : ⋃ _ : p, s = if p then s else ∅ :=
iSup_eq_if _
#align set.Union_eq_if Set.iUnion_eq_if
theorem iUnion_eq_dif {p : Prop} [Decidable p] (s : p → Set α) :
⋃ h : p, s h = if h : p then s h else ∅ :=
iSup_eq_dif _
#align set.Union_eq_dif Set.iUnion_eq_dif
theorem iInter_eq_if {p : Prop} [Decidable p] (s : Set α) : ⋂ _ : p, s = if p then s else univ :=
iInf_eq_if _
#align set.Inter_eq_if Set.iInter_eq_if
theorem iInf_eq_dif {p : Prop} [Decidable p] (s : p → Set α) :
⋂ h : p, s h = if h : p then s h else univ :=
_root_.iInf_eq_dif _
#align set.Infi_eq_dif Set.iInf_eq_dif
| Mathlib/Data/Set/Lattice.lean | 207 | 211 | theorem exists_set_mem_of_union_eq_top {ι : Type*} (t : Set ι) (s : ι → Set β)
(w : ⋃ i ∈ t, s i = ⊤) (x : β) : ∃ i ∈ t, x ∈ s i := by |
have p : x ∈ ⊤ := Set.mem_univ x
rw [← w, Set.mem_iUnion] at p
simpa using p
| 3 | 20.085537 | 1 | 0.333333 | 3 | 326 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
| Mathlib/Topology/Instances/Int.lean | 34 | 34 | theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by | rw [dist_eq]; norm_cast
| 1 | 2.718282 | 0 | 0.333333 | 6 | 327 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; norm_cast
@[norm_cast, simp]
theorem dist_cast_real (x y : ℤ) : dist (x : ℝ) y = dist x y :=
rfl
#align int.dist_cast_real Int.dist_cast_real
| Mathlib/Topology/Instances/Int.lean | 41 | 43 | theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by |
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
| 2 | 7.389056 | 1 | 0.333333 | 6 | 327 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; norm_cast
@[norm_cast, simp]
theorem dist_cast_real (x y : ℤ) : dist (x : ℝ) y = dist x y :=
rfl
#align int.dist_cast_real Int.dist_cast_real
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
#align int.pairwise_one_le_dist Int.pairwise_one_le_dist
theorem uniformEmbedding_coe_real : UniformEmbedding ((↑) : ℤ → ℝ) :=
uniformEmbedding_bot_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.uniform_embedding_coe_real Int.uniformEmbedding_coe_real
theorem closedEmbedding_coe_real : ClosedEmbedding ((↑) : ℤ → ℝ) :=
closedEmbedding_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.closed_embedding_coe_real Int.closedEmbedding_coe_real
instance : MetricSpace ℤ := Int.uniformEmbedding_coe_real.comapMetricSpace _
theorem preimage_ball (x : ℤ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r := rfl
#align int.preimage_ball Int.preimage_ball
theorem preimage_closedBall (x : ℤ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r := rfl
#align int.preimage_closed_ball Int.preimage_closedBall
| Mathlib/Topology/Instances/Int.lean | 62 | 63 | theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by |
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 327 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; norm_cast
@[norm_cast, simp]
theorem dist_cast_real (x y : ℤ) : dist (x : ℝ) y = dist x y :=
rfl
#align int.dist_cast_real Int.dist_cast_real
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
#align int.pairwise_one_le_dist Int.pairwise_one_le_dist
theorem uniformEmbedding_coe_real : UniformEmbedding ((↑) : ℤ → ℝ) :=
uniformEmbedding_bot_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.uniform_embedding_coe_real Int.uniformEmbedding_coe_real
theorem closedEmbedding_coe_real : ClosedEmbedding ((↑) : ℤ → ℝ) :=
closedEmbedding_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.closed_embedding_coe_real Int.closedEmbedding_coe_real
instance : MetricSpace ℤ := Int.uniformEmbedding_coe_real.comapMetricSpace _
theorem preimage_ball (x : ℤ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r := rfl
#align int.preimage_ball Int.preimage_ball
theorem preimage_closedBall (x : ℤ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r := rfl
#align int.preimage_closed_ball Int.preimage_closedBall
theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
#align int.ball_eq_Ioo Int.ball_eq_Ioo
| Mathlib/Topology/Instances/Int.lean | 66 | 67 | theorem closedBall_eq_Icc (x : ℤ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋ := by |
rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 327 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; norm_cast
@[norm_cast, simp]
theorem dist_cast_real (x y : ℤ) : dist (x : ℝ) y = dist x y :=
rfl
#align int.dist_cast_real Int.dist_cast_real
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
#align int.pairwise_one_le_dist Int.pairwise_one_le_dist
theorem uniformEmbedding_coe_real : UniformEmbedding ((↑) : ℤ → ℝ) :=
uniformEmbedding_bot_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.uniform_embedding_coe_real Int.uniformEmbedding_coe_real
theorem closedEmbedding_coe_real : ClosedEmbedding ((↑) : ℤ → ℝ) :=
closedEmbedding_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.closed_embedding_coe_real Int.closedEmbedding_coe_real
instance : MetricSpace ℤ := Int.uniformEmbedding_coe_real.comapMetricSpace _
theorem preimage_ball (x : ℤ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r := rfl
#align int.preimage_ball Int.preimage_ball
theorem preimage_closedBall (x : ℤ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r := rfl
#align int.preimage_closed_ball Int.preimage_closedBall
theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
#align int.ball_eq_Ioo Int.ball_eq_Ioo
theorem closedBall_eq_Icc (x : ℤ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋ := by
rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
#align int.closed_ball_eq_Icc Int.closedBall_eq_Icc
instance : ProperSpace ℤ :=
⟨fun x r => by
rw [closedBall_eq_Icc]
exact (Set.finite_Icc _ _).isCompact⟩
@[simp]
| Mathlib/Topology/Instances/Int.lean | 76 | 78 | theorem cobounded_eq : Bornology.cobounded ℤ = atBot ⊔ atTop := by |
simp_rw [← comap_dist_right_atTop (0 : ℤ), dist_eq', sub_zero,
← comap_abs_atTop, ← @Int.comap_cast_atTop ℝ, comap_comap]; rfl
| 2 | 7.389056 | 1 | 0.333333 | 6 | 327 |
import Mathlib.Data.Int.Interval
import Mathlib.Data.Int.SuccPred
import Mathlib.Data.Int.ConditionallyCompleteOrder
import Mathlib.Topology.Instances.Discrete
import Mathlib.Topology.MetricSpace.Bounded
import Mathlib.Order.Filter.Archimedean
#align_import topology.instances.int from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
open Metric Set Filter
namespace Int
instance : Dist ℤ :=
⟨fun x y => dist (x : ℝ) y⟩
theorem dist_eq (x y : ℤ) : dist x y = |(x : ℝ) - y| := rfl
#align int.dist_eq Int.dist_eq
theorem dist_eq' (m n : ℤ) : dist m n = |m - n| := by rw [dist_eq]; norm_cast
@[norm_cast, simp]
theorem dist_cast_real (x y : ℤ) : dist (x : ℝ) y = dist x y :=
rfl
#align int.dist_cast_real Int.dist_cast_real
theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n := by
intro m n hne
rw [dist_eq]; norm_cast; rwa [← zero_add (1 : ℤ), Int.add_one_le_iff, abs_pos, sub_ne_zero]
#align int.pairwise_one_le_dist Int.pairwise_one_le_dist
theorem uniformEmbedding_coe_real : UniformEmbedding ((↑) : ℤ → ℝ) :=
uniformEmbedding_bot_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.uniform_embedding_coe_real Int.uniformEmbedding_coe_real
theorem closedEmbedding_coe_real : ClosedEmbedding ((↑) : ℤ → ℝ) :=
closedEmbedding_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
#align int.closed_embedding_coe_real Int.closedEmbedding_coe_real
instance : MetricSpace ℤ := Int.uniformEmbedding_coe_real.comapMetricSpace _
theorem preimage_ball (x : ℤ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r := rfl
#align int.preimage_ball Int.preimage_ball
theorem preimage_closedBall (x : ℤ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r := rfl
#align int.preimage_closed_ball Int.preimage_closedBall
theorem ball_eq_Ioo (x : ℤ) (r : ℝ) : ball x r = Ioo ⌊↑x - r⌋ ⌈↑x + r⌉ := by
rw [← preimage_ball, Real.ball_eq_Ioo, preimage_Ioo]
#align int.ball_eq_Ioo Int.ball_eq_Ioo
theorem closedBall_eq_Icc (x : ℤ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋ := by
rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
#align int.closed_ball_eq_Icc Int.closedBall_eq_Icc
instance : ProperSpace ℤ :=
⟨fun x r => by
rw [closedBall_eq_Icc]
exact (Set.finite_Icc _ _).isCompact⟩
@[simp]
theorem cobounded_eq : Bornology.cobounded ℤ = atBot ⊔ atTop := by
simp_rw [← comap_dist_right_atTop (0 : ℤ), dist_eq', sub_zero,
← comap_abs_atTop, ← @Int.comap_cast_atTop ℝ, comap_comap]; rfl
@[deprecated (since := "2024-02-07")] alias cocompact_eq := cocompact_eq_atBot_atTop
#align int.cocompact_eq Int.cocompact_eq
@[simp]
| Mathlib/Topology/Instances/Int.lean | 84 | 85 | theorem cofinite_eq : (cofinite : Filter ℤ) = atBot ⊔ atTop := by |
rw [← cocompact_eq_cofinite, cocompact_eq_atBot_atTop]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 327 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Topology.EMetricSpace.Basic
import Mathlib.Tactic.GCongr
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
def LocallyLipschitz [PseudoEMetricSpace α] [PseudoEMetricSpace β] (f : α → β) : Prop :=
∀ x : α, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun _ => False.elim
#align lipschitz_on_with_empty lipschitzOnWith_empty
theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun _x x_in _y y_in => hf (h x_in) (h y_in)
#align lipschitz_on_with.mono LipschitzOnWith.mono
@[simp]
| Mathlib/Topology/EMetricSpace/Lipschitz.lean | 82 | 83 | theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by | simp [LipschitzOnWith, LipschitzWith]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 328 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Topology.EMetricSpace.Basic
import Mathlib.Tactic.GCongr
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
def LocallyLipschitz [PseudoEMetricSpace α] [PseudoEMetricSpace β] (f : α → β) : Prop :=
∀ x : α, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun _ => False.elim
#align lipschitz_on_with_empty lipschitzOnWith_empty
theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun _x x_in _y y_in => hf (h x_in) (h y_in)
#align lipschitz_on_with.mono LipschitzOnWith.mono
@[simp]
theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
#align lipschitz_on_univ lipschitzOn_univ
| Mathlib/Topology/EMetricSpace/Lipschitz.lean | 86 | 88 | theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by |
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 328 |
import Mathlib.Logic.Function.Iterate
import Mathlib.Topology.EMetricSpace.Basic
import Mathlib.Tactic.GCongr
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
def LocallyLipschitz [PseudoEMetricSpace α] [PseudoEMetricSpace β] (f : α → β) : Prop :=
∀ x : α, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun _ => False.elim
#align lipschitz_on_with_empty lipschitzOnWith_empty
theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun _x x_in _y y_in => hf (h x_in) (h y_in)
#align lipschitz_on_with.mono LipschitzOnWith.mono
@[simp]
theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
#align lipschitz_on_univ lipschitzOn_univ
theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
alias ⟨LipschitzOnWith.to_restrict, _⟩ := lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t) :
LipschitzOnWith K f s ↔ LipschitzWith K (h.restrict f s t) :=
_root_.lipschitzOnWith_iff_restrict
#align maps_to.lipschitz_on_with_iff_restrict MapsTo.lipschitzOnWith_iff_restrict
alias ⟨LipschitzOnWith.to_restrict_mapsTo, _⟩ := MapsTo.lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict_maps_to LipschitzOnWith.to_restrict_mapsTo
namespace LipschitzWith
open EMetric
variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
variable {K : ℝ≥0} {f : α → β} {x y : α} {r : ℝ≥0∞}
protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : LipschitzOnWith K f s :=
fun x _ y _ => h x y
#align lipschitz_with.lipschitz_on_with LipschitzWith.lipschitzOnWith
theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y :=
h x y
#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mul
theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
(h x y).trans <| ENNReal.mul_left_mono hr
#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
edist (f x) (f y) < K * r :=
(h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
MapsTo f (closedBall x r) (closedBall (f x) (K * r)) := fun _y hy => h.edist_le_mul_of_le hy
#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBall
theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
MapsTo f (ball x r) (ball (f x) (K * r)) := fun _y hy => h.edist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ball
theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
edist (f x) (f y) < ⊤ :=
(hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
| Mathlib/Topology/EMetricSpace/Lipschitz.lean | 141 | 144 | theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
(K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y := by |
rw [mul_comm, ← div_eq_mul_inv]
exact ENNReal.div_le_of_le_mul' (h x y)
| 2 | 7.389056 | 1 | 0.333333 | 3 | 328 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 51 | 55 | theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by |
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
| 3 | 20.085537 | 1 | 0.333333 | 3 | 329 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
#align cont_mdiff_within_at_iff_cont_diff_within_at contMDiffWithinAt_iff_contDiffWithinAt
alias ⟨ContMDiffWithinAt.contDiffWithinAt, ContDiffWithinAt.contMDiffWithinAt⟩ :=
contMDiffWithinAt_iff_contDiffWithinAt
#align cont_mdiff_within_at.cont_diff_within_at ContMDiffWithinAt.contDiffWithinAt
#align cont_diff_within_at.cont_mdiff_within_at ContDiffWithinAt.contMDiffWithinAt
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 63 | 65 | theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x := by |
rw [← contMDiffWithinAt_univ, contMDiffWithinAt_iff_contDiffWithinAt, contDiffWithinAt_univ]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 329 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
#align cont_mdiff_within_at_iff_cont_diff_within_at contMDiffWithinAt_iff_contDiffWithinAt
alias ⟨ContMDiffWithinAt.contDiffWithinAt, ContDiffWithinAt.contMDiffWithinAt⟩ :=
contMDiffWithinAt_iff_contDiffWithinAt
#align cont_mdiff_within_at.cont_diff_within_at ContMDiffWithinAt.contDiffWithinAt
#align cont_diff_within_at.cont_mdiff_within_at ContDiffWithinAt.contMDiffWithinAt
theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x := by
rw [← contMDiffWithinAt_univ, contMDiffWithinAt_iff_contDiffWithinAt, contDiffWithinAt_univ]
#align cont_mdiff_at_iff_cont_diff_at contMDiffAt_iff_contDiffAt
alias ⟨ContMDiffAt.contDiffAt, ContDiffAt.contMDiffAt⟩ := contMDiffAt_iff_contDiffAt
#align cont_mdiff_at.cont_diff_at ContMDiffAt.contDiffAt
#align cont_diff_at.cont_mdiff_at ContDiffAt.contMDiffAt
theorem contMDiffOn_iff_contDiffOn {f : E → E'} {s : Set E} :
ContMDiffOn 𝓘(𝕜, E) 𝓘(𝕜, E') n f s ↔ ContDiffOn 𝕜 n f s :=
forall_congr' <| by simp [contMDiffWithinAt_iff_contDiffWithinAt]
#align cont_mdiff_on_iff_cont_diff_on contMDiffOn_iff_contDiffOn
alias ⟨ContMDiffOn.contDiffOn, ContDiffOn.contMDiffOn⟩ := contMDiffOn_iff_contDiffOn
#align cont_mdiff_on.cont_diff_on ContMDiffOn.contDiffOn
#align cont_diff_on.cont_mdiff_on ContDiffOn.contMDiffOn
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 81 | 82 | theorem contMDiff_iff_contDiff {f : E → E'} : ContMDiff 𝓘(𝕜, E) 𝓘(𝕜, E') n f ↔ ContDiff 𝕜 n f := by |
rw [← contDiffOn_univ, ← contMDiffOn_univ, contMDiffOn_iff_contDiffOn]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 329 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b : ℕ) :=
a % n = b % n
#align nat.modeq Nat.ModEq
@[inherit_doc]
notation:50 a " ≡ " b " [MOD " n "]" => ModEq n a b
variable {m n a b c d : ℕ}
-- Porting note: This instance should be derivable automatically
instance : Decidable (ModEq n a b) := decEq (a % n) (b % n)
| Mathlib/Data/Nat/ModEq.lean | 78 | 78 | theorem modEq_zero_iff_dvd : a ≡ 0 [MOD n] ↔ n ∣ a := by | rw [ModEq, zero_mod, dvd_iff_mod_eq_zero]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 330 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b : ℕ) :=
a % n = b % n
#align nat.modeq Nat.ModEq
@[inherit_doc]
notation:50 a " ≡ " b " [MOD " n "]" => ModEq n a b
variable {m n a b c d : ℕ}
-- Porting note: This instance should be derivable automatically
instance : Decidable (ModEq n a b) := decEq (a % n) (b % n)
theorem modEq_zero_iff_dvd : a ≡ 0 [MOD n] ↔ n ∣ a := by rw [ModEq, zero_mod, dvd_iff_mod_eq_zero]
#align nat.modeq_zero_iff_dvd Nat.modEq_zero_iff_dvd
theorem _root_.Dvd.dvd.modEq_zero_nat (h : n ∣ a) : a ≡ 0 [MOD n] :=
modEq_zero_iff_dvd.2 h
#align has_dvd.dvd.modeq_zero_nat Dvd.dvd.modEq_zero_nat
theorem _root_.Dvd.dvd.zero_modEq_nat (h : n ∣ a) : 0 ≡ a [MOD n] :=
h.modEq_zero_nat.symm
#align has_dvd.dvd.zero_modeq_nat Dvd.dvd.zero_modEq_nat
| Mathlib/Data/Nat/ModEq.lean | 89 | 91 | theorem modEq_iff_dvd : a ≡ b [MOD n] ↔ (n : ℤ) ∣ b - a := by |
rw [ModEq, eq_comm, ← Int.natCast_inj, Int.natCast_mod, Int.natCast_mod,
Int.emod_eq_emod_iff_emod_sub_eq_zero, Int.dvd_iff_emod_eq_zero]
| 2 | 7.389056 | 1 | 0.333333 | 3 | 330 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b : ℕ) :=
a % n = b % n
#align nat.modeq Nat.ModEq
@[inherit_doc]
notation:50 a " ≡ " b " [MOD " n "]" => ModEq n a b
variable {m n a b c d : ℕ}
-- Porting note: This instance should be derivable automatically
instance : Decidable (ModEq n a b) := decEq (a % n) (b % n)
theorem modEq_zero_iff_dvd : a ≡ 0 [MOD n] ↔ n ∣ a := by rw [ModEq, zero_mod, dvd_iff_mod_eq_zero]
#align nat.modeq_zero_iff_dvd Nat.modEq_zero_iff_dvd
theorem _root_.Dvd.dvd.modEq_zero_nat (h : n ∣ a) : a ≡ 0 [MOD n] :=
modEq_zero_iff_dvd.2 h
#align has_dvd.dvd.modeq_zero_nat Dvd.dvd.modEq_zero_nat
theorem _root_.Dvd.dvd.zero_modEq_nat (h : n ∣ a) : 0 ≡ a [MOD n] :=
h.modEq_zero_nat.symm
#align has_dvd.dvd.zero_modeq_nat Dvd.dvd.zero_modEq_nat
theorem modEq_iff_dvd : a ≡ b [MOD n] ↔ (n : ℤ) ∣ b - a := by
rw [ModEq, eq_comm, ← Int.natCast_inj, Int.natCast_mod, Int.natCast_mod,
Int.emod_eq_emod_iff_emod_sub_eq_zero, Int.dvd_iff_emod_eq_zero]
#align nat.modeq_iff_dvd Nat.modEq_iff_dvd
alias ⟨ModEq.dvd, modEq_of_dvd⟩ := modEq_iff_dvd
#align nat.modeq.dvd Nat.ModEq.dvd
#align nat.modeq_of_dvd Nat.modEq_of_dvd
| Mathlib/Data/Nat/ModEq.lean | 99 | 100 | theorem modEq_iff_dvd' (h : a ≤ b) : a ≡ b [MOD n] ↔ n ∣ b - a := by |
rw [modEq_iff_dvd, ← Int.natCast_dvd_natCast, Int.ofNat_sub h]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 330 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 107 | 109 | theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by |
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 331 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
#align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff
theorem measure_union (hd : Disjoint s₁ s₂) (h : MeasurableSet s₂) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀ h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union MeasureTheory.measure_union
theorem measure_union' (hd : Disjoint s₁ s₂) (h : MeasurableSet s₁) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀' h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union' MeasureTheory.measure_union'
theorem measure_inter_add_diff (s : Set α) (ht : MeasurableSet t) : μ (s ∩ t) + μ (s \ t) = μ s :=
measure_inter_add_diff₀ _ ht.nullMeasurableSet
#align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff
theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s :=
(add_comm _ _).trans (measure_inter_add_diff s ht)
#align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 128 | 132 | theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by |
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
measure_inter_add_diff s ht]
ac_rfl
| 3 | 20.085537 | 1 | 0.333333 | 6 | 331 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
#align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff
theorem measure_union (hd : Disjoint s₁ s₂) (h : MeasurableSet s₂) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀ h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union MeasureTheory.measure_union
theorem measure_union' (hd : Disjoint s₁ s₂) (h : MeasurableSet s₁) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀' h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union' MeasureTheory.measure_union'
theorem measure_inter_add_diff (s : Set α) (ht : MeasurableSet t) : μ (s ∩ t) + μ (s \ t) = μ s :=
measure_inter_add_diff₀ _ ht.nullMeasurableSet
#align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff
theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s :=
(add_comm _ _).trans (measure_inter_add_diff s ht)
#align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
measure_inter_add_diff s ht]
ac_rfl
#align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 135 | 137 | theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by |
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 331 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
#align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff
theorem measure_union (hd : Disjoint s₁ s₂) (h : MeasurableSet s₂) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀ h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union MeasureTheory.measure_union
theorem measure_union' (hd : Disjoint s₁ s₂) (h : MeasurableSet s₁) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀' h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union' MeasureTheory.measure_union'
theorem measure_inter_add_diff (s : Set α) (ht : MeasurableSet t) : μ (s ∩ t) + μ (s \ t) = μ s :=
measure_inter_add_diff₀ _ ht.nullMeasurableSet
#align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff
theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s :=
(add_comm _ _).trans (measure_inter_add_diff s ht)
#align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
measure_inter_add_diff s ht]
ac_rfl
#align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter
theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
#align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter'
lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) :
μ (s ∆ t) = μ (s \ t) + μ (t \ s) := by
simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs)
lemma measure_symmDiff_le (s t u : Set α) :
μ (s ∆ u) ≤ μ (s ∆ t) + μ (t ∆ u) :=
le_trans (μ.mono <| symmDiff_triangle s t u) (measure_union_le (s ∆ t) (t ∆ u))
theorem measure_add_measure_compl (h : MeasurableSet s) : μ s + μ sᶜ = μ univ :=
measure_add_measure_compl₀ h.nullMeasurableSet
#align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 152 | 157 | theorem measure_biUnion₀ {s : Set β} {f : β → Set α} (hs : s.Countable)
(hd : s.Pairwise (AEDisjoint μ on f)) (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) := by |
haveI := hs.toEncodable
rw [biUnion_eq_iUnion]
exact measure_iUnion₀ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2
| 3 | 20.085537 | 1 | 0.333333 | 6 | 331 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
#align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff
theorem measure_union (hd : Disjoint s₁ s₂) (h : MeasurableSet s₂) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀ h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union MeasureTheory.measure_union
theorem measure_union' (hd : Disjoint s₁ s₂) (h : MeasurableSet s₁) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀' h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union' MeasureTheory.measure_union'
theorem measure_inter_add_diff (s : Set α) (ht : MeasurableSet t) : μ (s ∩ t) + μ (s \ t) = μ s :=
measure_inter_add_diff₀ _ ht.nullMeasurableSet
#align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff
theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s :=
(add_comm _ _).trans (measure_inter_add_diff s ht)
#align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
measure_inter_add_diff s ht]
ac_rfl
#align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter
theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
#align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter'
lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) :
μ (s ∆ t) = μ (s \ t) + μ (t \ s) := by
simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs)
lemma measure_symmDiff_le (s t u : Set α) :
μ (s ∆ u) ≤ μ (s ∆ t) + μ (t ∆ u) :=
le_trans (μ.mono <| symmDiff_triangle s t u) (measure_union_le (s ∆ t) (t ∆ u))
theorem measure_add_measure_compl (h : MeasurableSet s) : μ s + μ sᶜ = μ univ :=
measure_add_measure_compl₀ h.nullMeasurableSet
#align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl
theorem measure_biUnion₀ {s : Set β} {f : β → Set α} (hs : s.Countable)
(hd : s.Pairwise (AEDisjoint μ on f)) (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) := by
haveI := hs.toEncodable
rw [biUnion_eq_iUnion]
exact measure_iUnion₀ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2
#align measure_theory.measure_bUnion₀ MeasureTheory.measure_biUnion₀
theorem measure_biUnion {s : Set β} {f : β → Set α} (hs : s.Countable) (hd : s.PairwiseDisjoint f)
(h : ∀ b ∈ s, MeasurableSet (f b)) : μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) :=
measure_biUnion₀ hs hd.aedisjoint fun b hb => (h b hb).nullMeasurableSet
#align measure_theory.measure_bUnion MeasureTheory.measure_biUnion
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 165 | 167 | theorem measure_sUnion₀ {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint μ))
(h : ∀ s ∈ S, NullMeasurableSet s μ) : μ (⋃₀ S) = ∑' s : S, μ s := by |
rw [sUnion_eq_biUnion, measure_biUnion₀ hs hd h]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 331 |
import Mathlib.MeasureTheory.Measure.NullMeasurable
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
#align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55"
noncomputable section
open Set
open Filter hiding map
open Function MeasurableSpace
open scoped Classical symmDiff
open Topology Filter ENNReal NNReal Interval MeasureTheory
variable {α β γ δ ι R R' : Type*}
namespace MeasureTheory
section
variable {m : MeasurableSpace α} {μ μ₁ μ₂ : Measure α} {s s₁ s₂ t : Set α}
instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae μ) :=
⟨fun _s hs =>
let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs
⟨tᶜ, compl_mem_ae_iff.2 htμ, htm.compl, compl_subset_comm.1 hst⟩⟩
#align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
theorem ae_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
(∀ᵐ x ∂μ, x ∈ Ι a b → P x) ↔ (∀ᵐ x ∂μ, x ∈ Ioc a b → P x) ∧ ∀ᵐ x ∂μ, x ∈ Ioc b a → P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
#align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff
theorem measure_union (hd : Disjoint s₁ s₂) (h : MeasurableSet s₂) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀ h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union MeasureTheory.measure_union
theorem measure_union' (hd : Disjoint s₁ s₂) (h : MeasurableSet s₁) : μ (s₁ ∪ s₂) = μ s₁ + μ s₂ :=
measure_union₀' h.nullMeasurableSet hd.aedisjoint
#align measure_theory.measure_union' MeasureTheory.measure_union'
theorem measure_inter_add_diff (s : Set α) (ht : MeasurableSet t) : μ (s ∩ t) + μ (s \ t) = μ s :=
measure_inter_add_diff₀ _ ht.nullMeasurableSet
#align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff
theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s :=
(add_comm _ _).trans (measure_inter_add_diff s ht)
#align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
theorem measure_union_add_inter (s : Set α) (ht : MeasurableSet t) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [← measure_inter_add_diff (s ∪ t) ht, Set.union_inter_cancel_right, union_diff_right, ←
measure_inter_add_diff s ht]
ac_rfl
#align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter
theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set α) :
μ (s ∪ t) + μ (s ∩ t) = μ s + μ t := by
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
#align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter'
lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) :
μ (s ∆ t) = μ (s \ t) + μ (t \ s) := by
simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs)
lemma measure_symmDiff_le (s t u : Set α) :
μ (s ∆ u) ≤ μ (s ∆ t) + μ (t ∆ u) :=
le_trans (μ.mono <| symmDiff_triangle s t u) (measure_union_le (s ∆ t) (t ∆ u))
theorem measure_add_measure_compl (h : MeasurableSet s) : μ s + μ sᶜ = μ univ :=
measure_add_measure_compl₀ h.nullMeasurableSet
#align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl
theorem measure_biUnion₀ {s : Set β} {f : β → Set α} (hs : s.Countable)
(hd : s.Pairwise (AEDisjoint μ on f)) (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) := by
haveI := hs.toEncodable
rw [biUnion_eq_iUnion]
exact measure_iUnion₀ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2
#align measure_theory.measure_bUnion₀ MeasureTheory.measure_biUnion₀
theorem measure_biUnion {s : Set β} {f : β → Set α} (hs : s.Countable) (hd : s.PairwiseDisjoint f)
(h : ∀ b ∈ s, MeasurableSet (f b)) : μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p) :=
measure_biUnion₀ hs hd.aedisjoint fun b hb => (h b hb).nullMeasurableSet
#align measure_theory.measure_bUnion MeasureTheory.measure_biUnion
theorem measure_sUnion₀ {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint μ))
(h : ∀ s ∈ S, NullMeasurableSet s μ) : μ (⋃₀ S) = ∑' s : S, μ s := by
rw [sUnion_eq_biUnion, measure_biUnion₀ hs hd h]
#align measure_theory.measure_sUnion₀ MeasureTheory.measure_sUnion₀
| Mathlib/MeasureTheory/Measure/MeasureSpace.lean | 170 | 172 | theorem measure_sUnion {S : Set (Set α)} (hs : S.Countable) (hd : S.Pairwise Disjoint)
(h : ∀ s ∈ S, MeasurableSet s) : μ (⋃₀ S) = ∑' s : S, μ s := by |
rw [sUnion_eq_biUnion, measure_biUnion hs hd h]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 331 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 73 | 76 | theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by |
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
| 2 | 7.389056 | 1 | 0.333333 | 6 | 332 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
#align function.mul_support_eq_iff Function.mulSupport_eq_iff
#align function.support_eq_iff Function.support_eq_iff
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x :=
⟨fun h ↦ h ▸ ⟨rfl, fun _ _ ↦ rfl⟩, fun ⟨h₁, h₂⟩ ↦ funext fun x ↦ by
if hx : x ∈ f.mulSupport then exact h₂ x hx
else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]⟩
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 88 | 90 | theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by |
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 332 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
#align function.mul_support_eq_iff Function.mulSupport_eq_iff
#align function.support_eq_iff Function.support_eq_iff
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x :=
⟨fun h ↦ h ▸ ⟨rfl, fun _ _ ↦ rfl⟩, fun ⟨h₁, h₂⟩ ↦ funext fun x ↦ by
if hx : x ∈ f.mulSupport then exact h₂ x hx
else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]⟩
@[to_additive]
theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 93 | 95 | theorem mulSupport_update_one [DecidableEq α] (f : α → M) (x : α) :
mulSupport (update f x 1) = mulSupport f \ {x} := by |
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 332 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
#align function.mul_support_eq_iff Function.mulSupport_eq_iff
#align function.support_eq_iff Function.support_eq_iff
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x :=
⟨fun h ↦ h ▸ ⟨rfl, fun _ _ ↦ rfl⟩, fun ⟨h₁, h₂⟩ ↦ funext fun x ↦ by
if hx : x ∈ f.mulSupport then exact h₂ x hx
else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]⟩
@[to_additive]
theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
theorem mulSupport_update_one [DecidableEq α] (f : α → M) (x : α) :
mulSupport (update f x 1) = mulSupport f \ {x} := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 98 | 100 | theorem mulSupport_update_eq_ite [DecidableEq α] [DecidableEq M] (f : α → M) (x : α) (y : M) :
mulSupport (update f x y) = if y = 1 then mulSupport f \ {x} else insert x (mulSupport f) := by |
rcases eq_or_ne y 1 with rfl | hy <;> simp [mulSupport_update_one, mulSupport_update_of_ne_one, *]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 332 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
#align function.mul_support_eq_iff Function.mulSupport_eq_iff
#align function.support_eq_iff Function.support_eq_iff
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x :=
⟨fun h ↦ h ▸ ⟨rfl, fun _ _ ↦ rfl⟩, fun ⟨h₁, h₂⟩ ↦ funext fun x ↦ by
if hx : x ∈ f.mulSupport then exact h₂ x hx
else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]⟩
@[to_additive]
theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
theorem mulSupport_update_one [DecidableEq α] (f : α → M) (x : α) :
mulSupport (update f x 1) = mulSupport f \ {x} := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
theorem mulSupport_update_eq_ite [DecidableEq α] [DecidableEq M] (f : α → M) (x : α) (y : M) :
mulSupport (update f x y) = if y = 1 then mulSupport f \ {x} else insert x (mulSupport f) := by
rcases eq_or_ne y 1 with rfl | hy <;> simp [mulSupport_update_one, mulSupport_update_of_ne_one, *]
@[to_additive]
theorem mulSupport_extend_one_subset {f : α → M} {g : α → N} :
mulSupport (f.extend g 1) ⊆ f '' mulSupport g :=
mulSupport_subset_iff'.mpr fun x hfg ↦ by
by_cases hf : ∃ a, f a = x
· rw [extend, dif_pos hf, ← nmem_mulSupport]
rw [← Classical.choose_spec hf] at hfg
exact fun hg ↦ hfg ⟨_, hg, rfl⟩
· rw [extend_apply' _ _ _ hf]; rfl
@[to_additive]
theorem mulSupport_extend_one {f : α → M} {g : α → N} (hf : f.Injective) :
mulSupport (f.extend g 1) = f '' mulSupport g :=
mulSupport_extend_one_subset.antisymm <| by
rintro _ ⟨x, hx, rfl⟩; rwa [mem_mulSupport, hf.extend_apply]
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 119 | 122 | theorem mulSupport_disjoint_iff {f : α → M} {s : Set α} :
Disjoint (mulSupport f) s ↔ EqOn f 1 s := by |
simp_rw [← subset_compl_iff_disjoint_right, mulSupport_subset_iff', not_mem_compl_iff, EqOn,
Pi.one_apply]
| 2 | 7.389056 | 1 | 0.333333 | 6 | 332 |
import Mathlib.Algebra.Group.Prod
import Mathlib.Order.Cover
#align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1"
assert_not_exists MonoidWithZero
open Set
namespace Function
variable {α β A B M N P G : Type*}
section One
variable [One M] [One N] [One P]
@[to_additive "`support` of a function is the set of points `x` such that `f x ≠ 0`."]
def mulSupport (f : α → M) : Set α := {x | f x ≠ 1}
#align function.mul_support Function.mulSupport
#align function.support Function.support
@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ :=
rfl
#align function.mul_support_eq_preimage Function.mulSupport_eq_preimage
#align function.support_eq_preimage Function.support_eq_preimage
@[to_additive]
theorem nmem_mulSupport {f : α → M} {x : α} : x ∉ mulSupport f ↔ f x = 1 :=
not_not
#align function.nmem_mul_support Function.nmem_mulSupport
#align function.nmem_support Function.nmem_support
@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 } :=
ext fun _ => nmem_mulSupport
#align function.compl_mul_support Function.compl_mulSupport
#align function.compl_support Function.compl_support
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1 :=
Iff.rfl
#align function.mem_mul_support Function.mem_mulSupport
#align function.mem_support Function.mem_support
@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s :=
Iff.rfl
#align function.mul_support_subset_iff Function.mulSupport_subset_iff
#align function.support_subset_iff Function.support_subset_iff
@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1 :=
forall_congr' fun _ => not_imp_comm
#align function.mul_support_subset_iff' Function.mulSupport_subset_iff'
#align function.support_subset_iff' Function.support_subset_iff'
@[to_additive]
theorem mulSupport_eq_iff {f : α → M} {s : Set α} :
mulSupport f = s ↔ (∀ x, x ∈ s → f x ≠ 1) ∧ ∀ x, x ∉ s → f x = 1 := by
simp (config := { contextual := true }) only [ext_iff, mem_mulSupport, ne_eq, iff_def,
not_imp_comm, and_comm, forall_and]
#align function.mul_support_eq_iff Function.mulSupport_eq_iff
#align function.support_eq_iff Function.support_eq_iff
@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x :=
⟨fun h ↦ h ▸ ⟨rfl, fun _ _ ↦ rfl⟩, fun ⟨h₁, h₂⟩ ↦ funext fun x ↦ by
if hx : x ∈ f.mulSupport then exact h₂ x hx
else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]⟩
@[to_additive]
theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
mulSupport (update f x y) = insert x (mulSupport f) := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
theorem mulSupport_update_one [DecidableEq α] (f : α → M) (x : α) :
mulSupport (update f x 1) = mulSupport f \ {x} := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
@[to_additive]
theorem mulSupport_update_eq_ite [DecidableEq α] [DecidableEq M] (f : α → M) (x : α) (y : M) :
mulSupport (update f x y) = if y = 1 then mulSupport f \ {x} else insert x (mulSupport f) := by
rcases eq_or_ne y 1 with rfl | hy <;> simp [mulSupport_update_one, mulSupport_update_of_ne_one, *]
@[to_additive]
theorem mulSupport_extend_one_subset {f : α → M} {g : α → N} :
mulSupport (f.extend g 1) ⊆ f '' mulSupport g :=
mulSupport_subset_iff'.mpr fun x hfg ↦ by
by_cases hf : ∃ a, f a = x
· rw [extend, dif_pos hf, ← nmem_mulSupport]
rw [← Classical.choose_spec hf] at hfg
exact fun hg ↦ hfg ⟨_, hg, rfl⟩
· rw [extend_apply' _ _ _ hf]; rfl
@[to_additive]
theorem mulSupport_extend_one {f : α → M} {g : α → N} (hf : f.Injective) :
mulSupport (f.extend g 1) = f '' mulSupport g :=
mulSupport_extend_one_subset.antisymm <| by
rintro _ ⟨x, hx, rfl⟩; rwa [mem_mulSupport, hf.extend_apply]
@[to_additive]
theorem mulSupport_disjoint_iff {f : α → M} {s : Set α} :
Disjoint (mulSupport f) s ↔ EqOn f 1 s := by
simp_rw [← subset_compl_iff_disjoint_right, mulSupport_subset_iff', not_mem_compl_iff, EqOn,
Pi.one_apply]
#align function.mul_support_disjoint_iff Function.mulSupport_disjoint_iff
#align function.support_disjoint_iff Function.support_disjoint_iff
@[to_additive]
| Mathlib/Algebra/Group/Support.lean | 127 | 129 | theorem disjoint_mulSupport_iff {f : α → M} {s : Set α} :
Disjoint s (mulSupport f) ↔ EqOn f 1 s := by |
rw [disjoint_comm, mulSupport_disjoint_iff]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 332 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
| Mathlib/Data/DList/Defs.lean | 58 | 59 | theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by |
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 333 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
#align dlist.to_list_of_list Batteries.DList.toList_ofList
| Mathlib/Data/DList/Defs.lean | 62 | 66 | theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by |
cases' l with app inv
simp only [ofList, toList, mk.injEq]
funext x
rw [(inv x)]
| 4 | 54.59815 | 2 | 0.333333 | 6 | 333 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
#align dlist.to_list_of_list Batteries.DList.toList_ofList
theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by
cases' l with app inv
simp only [ofList, toList, mk.injEq]
funext x
rw [(inv x)]
#align dlist.of_list_to_list Batteries.DList.ofList_toList
| Mathlib/Data/DList/Defs.lean | 69 | 69 | theorem toList_empty : toList (@empty α) = [] := by | simp
| 1 | 2.718282 | 0 | 0.333333 | 6 | 333 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
#align dlist.to_list_of_list Batteries.DList.toList_ofList
theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by
cases' l with app inv
simp only [ofList, toList, mk.injEq]
funext x
rw [(inv x)]
#align dlist.of_list_to_list Batteries.DList.ofList_toList
theorem toList_empty : toList (@empty α) = [] := by simp
#align dlist.to_list_empty Batteries.DList.toList_empty
| Mathlib/Data/DList/Defs.lean | 72 | 72 | theorem toList_singleton (x : α) : toList (singleton x) = [x] := by | simp
| 1 | 2.718282 | 0 | 0.333333 | 6 | 333 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
#align dlist.to_list_of_list Batteries.DList.toList_ofList
theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by
cases' l with app inv
simp only [ofList, toList, mk.injEq]
funext x
rw [(inv x)]
#align dlist.of_list_to_list Batteries.DList.ofList_toList
theorem toList_empty : toList (@empty α) = [] := by simp
#align dlist.to_list_empty Batteries.DList.toList_empty
theorem toList_singleton (x : α) : toList (singleton x) = [x] := by simp
#align dlist.to_list_singleton Batteries.DList.toList_singleton
theorem toList_append (l₁ l₂ : DList α) : toList (l₁ ++ l₂) = toList l₁ ++ toList l₂ :=
show toList (DList.append l₁ l₂) = toList l₁ ++ toList l₂ by
cases' l₁ with _ l₁_invariant; cases' l₂; simp; rw [l₁_invariant]
#align dlist.to_list_append Batteries.DList.toList_append
| Mathlib/Data/DList/Defs.lean | 80 | 81 | theorem toList_cons (x : α) (l : DList α) : toList (cons x l) = x :: toList l := by |
cases l; simp
| 1 | 2.718282 | 0 | 0.333333 | 6 | 333 |
import Batteries.Data.DList
import Mathlib.Mathport.Rename
import Mathlib.Tactic.Cases
#align_import data.dlist from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd"
universe u
#align dlist Batteries.DList
namespace Batteries.DList
open Function
variable {α : Type u}
#align dlist.of_list Batteries.DList.ofList
def lazy_ofList (l : Thunk (List α)) : DList α :=
⟨fun xs => l.get ++ xs, fun t => by simp⟩
#align dlist.lazy_of_list Batteries.DList.lazy_ofList
#align dlist.to_list Batteries.DList.toList
#align dlist.empty Batteries.DList.empty
#align dlist.singleton Batteries.DList.singleton
attribute [local simp] Function.comp
#align dlist.cons Batteries.DList.cons
#align dlist.concat Batteries.DList.push
#align dlist.append Batteries.DList.append
attribute [local simp] ofList toList empty singleton cons push append
theorem toList_ofList (l : List α) : DList.toList (DList.ofList l) = l := by
cases l; rfl; simp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]
#align dlist.to_list_of_list Batteries.DList.toList_ofList
theorem ofList_toList (l : DList α) : DList.ofList (DList.toList l) = l := by
cases' l with app inv
simp only [ofList, toList, mk.injEq]
funext x
rw [(inv x)]
#align dlist.of_list_to_list Batteries.DList.ofList_toList
theorem toList_empty : toList (@empty α) = [] := by simp
#align dlist.to_list_empty Batteries.DList.toList_empty
theorem toList_singleton (x : α) : toList (singleton x) = [x] := by simp
#align dlist.to_list_singleton Batteries.DList.toList_singleton
theorem toList_append (l₁ l₂ : DList α) : toList (l₁ ++ l₂) = toList l₁ ++ toList l₂ :=
show toList (DList.append l₁ l₂) = toList l₁ ++ toList l₂ by
cases' l₁ with _ l₁_invariant; cases' l₂; simp; rw [l₁_invariant]
#align dlist.to_list_append Batteries.DList.toList_append
theorem toList_cons (x : α) (l : DList α) : toList (cons x l) = x :: toList l := by
cases l; simp
#align dlist.to_list_cons Batteries.DList.toList_cons
| Mathlib/Data/DList/Defs.lean | 84 | 85 | theorem toList_push (x : α) (l : DList α) : toList (push l x) = toList l ++ [x] := by |
cases' l with _ l_invariant; simp; rw [l_invariant]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 333 |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
#align_import combinatorics.simple_graph.prod from "leanprover-community/mathlib"@"2985fa3c31a27274aed06c433510bc14b73d6488"
variable {α β γ : Type*}
namespace SimpleGraph
-- Porting note: pruned variables to keep things out of local contexts, which
-- can impact how generalization works, or what aesop does.
variable {G : SimpleGraph α} {H : SimpleGraph β}
def boxProd (G : SimpleGraph α) (H : SimpleGraph β) : SimpleGraph (α × β) where
Adj x y := G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1
symm x y := by simp [and_comm, or_comm, eq_comm, adj_comm]
loopless x := by simp
#align simple_graph.box_prod SimpleGraph.boxProd
infixl:70 " □ " => boxProd
set_option autoImplicit true in
@[simp]
theorem boxProd_adj : (G □ H).Adj x y ↔ G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1 :=
Iff.rfl
#align simple_graph.box_prod_adj SimpleGraph.boxProd_adj
set_option autoImplicit true in
--@[simp] Porting note (#10618): `simp` can prove
| Mathlib/Combinatorics/SimpleGraph/Prod.lean | 59 | 60 | theorem boxProd_adj_left : (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂ := by |
simp only [boxProd_adj, and_true, SimpleGraph.irrefl, false_and, or_false]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 334 |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
#align_import combinatorics.simple_graph.prod from "leanprover-community/mathlib"@"2985fa3c31a27274aed06c433510bc14b73d6488"
variable {α β γ : Type*}
namespace SimpleGraph
-- Porting note: pruned variables to keep things out of local contexts, which
-- can impact how generalization works, or what aesop does.
variable {G : SimpleGraph α} {H : SimpleGraph β}
def boxProd (G : SimpleGraph α) (H : SimpleGraph β) : SimpleGraph (α × β) where
Adj x y := G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1
symm x y := by simp [and_comm, or_comm, eq_comm, adj_comm]
loopless x := by simp
#align simple_graph.box_prod SimpleGraph.boxProd
infixl:70 " □ " => boxProd
set_option autoImplicit true in
@[simp]
theorem boxProd_adj : (G □ H).Adj x y ↔ G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1 :=
Iff.rfl
#align simple_graph.box_prod_adj SimpleGraph.boxProd_adj
set_option autoImplicit true in
--@[simp] Porting note (#10618): `simp` can prove
theorem boxProd_adj_left : (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂ := by
simp only [boxProd_adj, and_true, SimpleGraph.irrefl, false_and, or_false]
#align simple_graph.box_prod_adj_left SimpleGraph.boxProd_adj_left
set_option autoImplicit true in
--@[simp] Porting note (#10618): `simp` can prove
| Mathlib/Combinatorics/SimpleGraph/Prod.lean | 65 | 66 | theorem boxProd_adj_right : (G □ H).Adj (a, b₁) (a, b₂) ↔ H.Adj b₁ b₂ := by |
simp only [boxProd_adj, SimpleGraph.irrefl, false_and, and_true, false_or]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 334 |
import Mathlib.Combinatorics.SimpleGraph.Connectivity
#align_import combinatorics.simple_graph.prod from "leanprover-community/mathlib"@"2985fa3c31a27274aed06c433510bc14b73d6488"
variable {α β γ : Type*}
namespace SimpleGraph
-- Porting note: pruned variables to keep things out of local contexts, which
-- can impact how generalization works, or what aesop does.
variable {G : SimpleGraph α} {H : SimpleGraph β}
def boxProd (G : SimpleGraph α) (H : SimpleGraph β) : SimpleGraph (α × β) where
Adj x y := G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1
symm x y := by simp [and_comm, or_comm, eq_comm, adj_comm]
loopless x := by simp
#align simple_graph.box_prod SimpleGraph.boxProd
infixl:70 " □ " => boxProd
set_option autoImplicit true in
@[simp]
theorem boxProd_adj : (G □ H).Adj x y ↔ G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1 :=
Iff.rfl
#align simple_graph.box_prod_adj SimpleGraph.boxProd_adj
set_option autoImplicit true in
--@[simp] Porting note (#10618): `simp` can prove
theorem boxProd_adj_left : (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂ := by
simp only [boxProd_adj, and_true, SimpleGraph.irrefl, false_and, or_false]
#align simple_graph.box_prod_adj_left SimpleGraph.boxProd_adj_left
set_option autoImplicit true in
--@[simp] Porting note (#10618): `simp` can prove
theorem boxProd_adj_right : (G □ H).Adj (a, b₁) (a, b₂) ↔ H.Adj b₁ b₂ := by
simp only [boxProd_adj, SimpleGraph.irrefl, false_and, and_true, false_or]
#align simple_graph.box_prod_adj_right SimpleGraph.boxProd_adj_right
| Mathlib/Combinatorics/SimpleGraph/Prod.lean | 69 | 73 | theorem boxProd_neighborSet (x : α × β) :
(G □ H).neighborSet x = G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2 := by |
ext ⟨a', b'⟩
simp only [mem_neighborSet, Set.mem_union, boxProd_adj, Set.mem_prod, Set.mem_singleton_iff]
simp only [eq_comm, and_comm]
| 3 | 20.085537 | 1 | 0.333333 | 3 | 334 |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Dual
import Mathlib.Data.Fin.FlagRange
open Set Submodule
namespace Basis
section Semiring
variable {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] {n : ℕ}
def flag (b : Basis (Fin n) R M) (k : Fin (n + 1)) : Submodule R M :=
.span R <| b '' {i | i.castSucc < k}
@[simp]
| Mathlib/LinearAlgebra/Basis/Flag.lean | 32 | 32 | theorem flag_zero (b : Basis (Fin n) R M) : b.flag 0 = ⊥ := by | simp [flag]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 335 |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Dual
import Mathlib.Data.Fin.FlagRange
open Set Submodule
namespace Basis
section Semiring
variable {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] {n : ℕ}
def flag (b : Basis (Fin n) R M) (k : Fin (n + 1)) : Submodule R M :=
.span R <| b '' {i | i.castSucc < k}
@[simp]
theorem flag_zero (b : Basis (Fin n) R M) : b.flag 0 = ⊥ := by simp [flag]
@[simp]
| Mathlib/LinearAlgebra/Basis/Flag.lean | 35 | 36 | theorem flag_last (b : Basis (Fin n) R M) : b.flag (.last n) = ⊤ := by |
simp [flag, Fin.castSucc_lt_last]
| 1 | 2.718282 | 0 | 0.333333 | 3 | 335 |
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Dual
import Mathlib.Data.Fin.FlagRange
open Set Submodule
namespace Basis
section Semiring
variable {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] {n : ℕ}
def flag (b : Basis (Fin n) R M) (k : Fin (n + 1)) : Submodule R M :=
.span R <| b '' {i | i.castSucc < k}
@[simp]
theorem flag_zero (b : Basis (Fin n) R M) : b.flag 0 = ⊥ := by simp [flag]
@[simp]
theorem flag_last (b : Basis (Fin n) R M) : b.flag (.last n) = ⊤ := by
simp [flag, Fin.castSucc_lt_last]
theorem flag_le_iff (b : Basis (Fin n) R M) {k p} :
b.flag k ≤ p ↔ ∀ i : Fin n, i.castSucc < k → b i ∈ p :=
span_le.trans forall_mem_image
| Mathlib/LinearAlgebra/Basis/Flag.lean | 42 | 45 | theorem flag_succ (b : Basis (Fin n) R M) (k : Fin n) :
b.flag k.succ = (R ∙ b k) ⊔ b.flag k.castSucc := by |
simp only [flag, Fin.castSucc_lt_castSucc_iff]
simp [Fin.castSucc_lt_iff_succ_le, le_iff_eq_or_lt, setOf_or, image_insert_eq, span_insert]
| 2 | 7.389056 | 1 | 0.333333 | 3 | 335 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
| Mathlib/Data/Set/NAry.lean | 37 | 39 | theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by |
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
| 2 | 7.389056 | 1 | 0.333333 | 6 | 336 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
#align set.image2_subset Set.image2_subset
theorem image2_subset_left (ht : t ⊆ t') : image2 f s t ⊆ image2 f s t' :=
image2_subset Subset.rfl ht
#align set.image2_subset_left Set.image2_subset_left
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t :=
image2_subset hs Subset.rfl
#align set.image2_subset_right Set.image2_subset_right
theorem image_subset_image2_left (hb : b ∈ t) : (fun a => f a b) '' s ⊆ image2 f s t :=
forall_mem_image.2 fun _ ha => mem_image2_of_mem ha hb
#align set.image_subset_image2_left Set.image_subset_image2_left
theorem image_subset_image2_right (ha : a ∈ s) : f a '' t ⊆ image2 f s t :=
forall_mem_image.2 fun _ => mem_image2_of_mem ha
#align set.image_subset_image2_right Set.image_subset_image2_right
theorem forall_image2_iff {p : γ → Prop} :
(∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y) :=
⟨fun h x hx y hy => h _ ⟨x, hx, y, hy, rfl⟩, fun h _ ⟨x, hx, y, hy, hz⟩ => hz ▸ h x hx y hy⟩
#align set.forall_image2_iff Set.forall_image2_iff
@[simp]
theorem image2_subset_iff {u : Set γ} : image2 f s t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, f x y ∈ u :=
forall_image2_iff
#align set.image2_subset_iff Set.image2_subset_iff
| Mathlib/Data/Set/NAry.lean | 68 | 69 | theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u := by |
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 336 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
#align set.image2_subset Set.image2_subset
theorem image2_subset_left (ht : t ⊆ t') : image2 f s t ⊆ image2 f s t' :=
image2_subset Subset.rfl ht
#align set.image2_subset_left Set.image2_subset_left
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t :=
image2_subset hs Subset.rfl
#align set.image2_subset_right Set.image2_subset_right
theorem image_subset_image2_left (hb : b ∈ t) : (fun a => f a b) '' s ⊆ image2 f s t :=
forall_mem_image.2 fun _ ha => mem_image2_of_mem ha hb
#align set.image_subset_image2_left Set.image_subset_image2_left
theorem image_subset_image2_right (ha : a ∈ s) : f a '' t ⊆ image2 f s t :=
forall_mem_image.2 fun _ => mem_image2_of_mem ha
#align set.image_subset_image2_right Set.image_subset_image2_right
theorem forall_image2_iff {p : γ → Prop} :
(∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y) :=
⟨fun h x hx y hy => h _ ⟨x, hx, y, hy, rfl⟩, fun h _ ⟨x, hx, y, hy, hz⟩ => hz ▸ h x hx y hy⟩
#align set.forall_image2_iff Set.forall_image2_iff
@[simp]
theorem image2_subset_iff {u : Set γ} : image2 f s t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, f x y ∈ u :=
forall_image2_iff
#align set.image2_subset_iff Set.image2_subset_iff
theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
#align set.image2_subset_iff_left Set.image2_subset_iff_left
| Mathlib/Data/Set/NAry.lean | 72 | 73 | theorem image2_subset_iff_right : image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u := by |
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage, @forall₂_swap α]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 336 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
#align set.image2_subset Set.image2_subset
theorem image2_subset_left (ht : t ⊆ t') : image2 f s t ⊆ image2 f s t' :=
image2_subset Subset.rfl ht
#align set.image2_subset_left Set.image2_subset_left
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t :=
image2_subset hs Subset.rfl
#align set.image2_subset_right Set.image2_subset_right
theorem image_subset_image2_left (hb : b ∈ t) : (fun a => f a b) '' s ⊆ image2 f s t :=
forall_mem_image.2 fun _ ha => mem_image2_of_mem ha hb
#align set.image_subset_image2_left Set.image_subset_image2_left
theorem image_subset_image2_right (ha : a ∈ s) : f a '' t ⊆ image2 f s t :=
forall_mem_image.2 fun _ => mem_image2_of_mem ha
#align set.image_subset_image2_right Set.image_subset_image2_right
theorem forall_image2_iff {p : γ → Prop} :
(∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y) :=
⟨fun h x hx y hy => h _ ⟨x, hx, y, hy, rfl⟩, fun h _ ⟨x, hx, y, hy, hz⟩ => hz ▸ h x hx y hy⟩
#align set.forall_image2_iff Set.forall_image2_iff
@[simp]
theorem image2_subset_iff {u : Set γ} : image2 f s t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, f x y ∈ u :=
forall_image2_iff
#align set.image2_subset_iff Set.image2_subset_iff
theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
#align set.image2_subset_iff_left Set.image2_subset_iff_left
theorem image2_subset_iff_right : image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage, @forall₂_swap α]
#align set.image2_subset_iff_right Set.image2_subset_iff_right
variable (f)
-- Porting note: Removing `simp` - LHS does not simplify
lemma image_prod : (fun x : α × β ↦ f x.1 x.2) '' s ×ˢ t = image2 f s t :=
ext fun _ ↦ by simp [and_assoc]
#align set.image_prod Set.image_prod
@[simp] lemma image_uncurry_prod (s : Set α) (t : Set β) : uncurry f '' s ×ˢ t = image2 f s t :=
image_prod _
#align set.image_uncurry_prod Set.image_uncurry_prod
@[simp] lemma image2_mk_eq_prod : image2 Prod.mk s t = s ×ˢ t := ext <| by simp
#align set.image2_mk_eq_prod Set.image2_mk_eq_prod
-- Porting note: Removing `simp` - LHS does not simplify
lemma image2_curry (f : α × β → γ) (s : Set α) (t : Set β) :
image2 (fun a b ↦ f (a, b)) s t = f '' s ×ˢ t := by
simp [← image_uncurry_prod, uncurry]
#align set.image2_curry Set.image2_curry
| Mathlib/Data/Set/NAry.lean | 96 | 98 | theorem image2_swap (s : Set α) (t : Set β) : image2 f s t = image2 (fun a b => f b a) t s := by |
ext
constructor <;> rintro ⟨a, ha, b, hb, rfl⟩ <;> exact ⟨b, hb, a, ha, rfl⟩
| 2 | 7.389056 | 1 | 0.333333 | 6 | 336 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
#align set.image2_subset Set.image2_subset
theorem image2_subset_left (ht : t ⊆ t') : image2 f s t ⊆ image2 f s t' :=
image2_subset Subset.rfl ht
#align set.image2_subset_left Set.image2_subset_left
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t :=
image2_subset hs Subset.rfl
#align set.image2_subset_right Set.image2_subset_right
theorem image_subset_image2_left (hb : b ∈ t) : (fun a => f a b) '' s ⊆ image2 f s t :=
forall_mem_image.2 fun _ ha => mem_image2_of_mem ha hb
#align set.image_subset_image2_left Set.image_subset_image2_left
theorem image_subset_image2_right (ha : a ∈ s) : f a '' t ⊆ image2 f s t :=
forall_mem_image.2 fun _ => mem_image2_of_mem ha
#align set.image_subset_image2_right Set.image_subset_image2_right
theorem forall_image2_iff {p : γ → Prop} :
(∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y) :=
⟨fun h x hx y hy => h _ ⟨x, hx, y, hy, rfl⟩, fun h _ ⟨x, hx, y, hy, hz⟩ => hz ▸ h x hx y hy⟩
#align set.forall_image2_iff Set.forall_image2_iff
@[simp]
theorem image2_subset_iff {u : Set γ} : image2 f s t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, f x y ∈ u :=
forall_image2_iff
#align set.image2_subset_iff Set.image2_subset_iff
theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
#align set.image2_subset_iff_left Set.image2_subset_iff_left
theorem image2_subset_iff_right : image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage, @forall₂_swap α]
#align set.image2_subset_iff_right Set.image2_subset_iff_right
variable (f)
-- Porting note: Removing `simp` - LHS does not simplify
lemma image_prod : (fun x : α × β ↦ f x.1 x.2) '' s ×ˢ t = image2 f s t :=
ext fun _ ↦ by simp [and_assoc]
#align set.image_prod Set.image_prod
@[simp] lemma image_uncurry_prod (s : Set α) (t : Set β) : uncurry f '' s ×ˢ t = image2 f s t :=
image_prod _
#align set.image_uncurry_prod Set.image_uncurry_prod
@[simp] lemma image2_mk_eq_prod : image2 Prod.mk s t = s ×ˢ t := ext <| by simp
#align set.image2_mk_eq_prod Set.image2_mk_eq_prod
-- Porting note: Removing `simp` - LHS does not simplify
lemma image2_curry (f : α × β → γ) (s : Set α) (t : Set β) :
image2 (fun a b ↦ f (a, b)) s t = f '' s ×ˢ t := by
simp [← image_uncurry_prod, uncurry]
#align set.image2_curry Set.image2_curry
theorem image2_swap (s : Set α) (t : Set β) : image2 f s t = image2 (fun a b => f b a) t s := by
ext
constructor <;> rintro ⟨a, ha, b, hb, rfl⟩ <;> exact ⟨b, hb, a, ha, rfl⟩
#align set.image2_swap Set.image2_swap
variable {f}
| Mathlib/Data/Set/NAry.lean | 103 | 104 | theorem image2_union_left : image2 f (s ∪ s') t = image2 f s t ∪ image2 f s' t := by |
simp_rw [← image_prod, union_prod, image_union]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 336 |
import Mathlib.Data.Set.Prod
#align_import data.set.n_ary from "leanprover-community/mathlib"@"5e526d18cea33550268dcbbddcb822d5cde40654"
open Function
namespace Set
variable {α α' β β' γ γ' δ δ' ε ε' ζ ζ' ν : Type*} {f f' : α → β → γ} {g g' : α → β → γ → δ}
variable {s s' : Set α} {t t' : Set β} {u u' : Set γ} {v : Set δ} {a a' : α} {b b' : β} {c c' : γ}
{d d' : δ}
theorem mem_image2_iff (hf : Injective2 f) : f a b ∈ image2 f s t ↔ a ∈ s ∧ b ∈ t :=
⟨by
rintro ⟨a', ha', b', hb', h⟩
rcases hf h with ⟨rfl, rfl⟩
exact ⟨ha', hb'⟩, fun ⟨ha, hb⟩ => mem_image2_of_mem ha hb⟩
#align set.mem_image2_iff Set.mem_image2_iff
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t' := by
rintro _ ⟨a, ha, b, hb, rfl⟩
exact mem_image2_of_mem (hs ha) (ht hb)
#align set.image2_subset Set.image2_subset
theorem image2_subset_left (ht : t ⊆ t') : image2 f s t ⊆ image2 f s t' :=
image2_subset Subset.rfl ht
#align set.image2_subset_left Set.image2_subset_left
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t :=
image2_subset hs Subset.rfl
#align set.image2_subset_right Set.image2_subset_right
theorem image_subset_image2_left (hb : b ∈ t) : (fun a => f a b) '' s ⊆ image2 f s t :=
forall_mem_image.2 fun _ ha => mem_image2_of_mem ha hb
#align set.image_subset_image2_left Set.image_subset_image2_left
theorem image_subset_image2_right (ha : a ∈ s) : f a '' t ⊆ image2 f s t :=
forall_mem_image.2 fun _ => mem_image2_of_mem ha
#align set.image_subset_image2_right Set.image_subset_image2_right
theorem forall_image2_iff {p : γ → Prop} :
(∀ z ∈ image2 f s t, p z) ↔ ∀ x ∈ s, ∀ y ∈ t, p (f x y) :=
⟨fun h x hx y hy => h _ ⟨x, hx, y, hy, rfl⟩, fun h _ ⟨x, hx, y, hy, hz⟩ => hz ▸ h x hx y hy⟩
#align set.forall_image2_iff Set.forall_image2_iff
@[simp]
theorem image2_subset_iff {u : Set γ} : image2 f s t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, f x y ∈ u :=
forall_image2_iff
#align set.image2_subset_iff Set.image2_subset_iff
theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage]
#align set.image2_subset_iff_left Set.image2_subset_iff_left
theorem image2_subset_iff_right : image2 f s t ⊆ u ↔ ∀ b ∈ t, (fun a => f a b) '' s ⊆ u := by
simp_rw [image2_subset_iff, image_subset_iff, subset_def, mem_preimage, @forall₂_swap α]
#align set.image2_subset_iff_right Set.image2_subset_iff_right
variable (f)
-- Porting note: Removing `simp` - LHS does not simplify
lemma image_prod : (fun x : α × β ↦ f x.1 x.2) '' s ×ˢ t = image2 f s t :=
ext fun _ ↦ by simp [and_assoc]
#align set.image_prod Set.image_prod
@[simp] lemma image_uncurry_prod (s : Set α) (t : Set β) : uncurry f '' s ×ˢ t = image2 f s t :=
image_prod _
#align set.image_uncurry_prod Set.image_uncurry_prod
@[simp] lemma image2_mk_eq_prod : image2 Prod.mk s t = s ×ˢ t := ext <| by simp
#align set.image2_mk_eq_prod Set.image2_mk_eq_prod
-- Porting note: Removing `simp` - LHS does not simplify
lemma image2_curry (f : α × β → γ) (s : Set α) (t : Set β) :
image2 (fun a b ↦ f (a, b)) s t = f '' s ×ˢ t := by
simp [← image_uncurry_prod, uncurry]
#align set.image2_curry Set.image2_curry
theorem image2_swap (s : Set α) (t : Set β) : image2 f s t = image2 (fun a b => f b a) t s := by
ext
constructor <;> rintro ⟨a, ha, b, hb, rfl⟩ <;> exact ⟨b, hb, a, ha, rfl⟩
#align set.image2_swap Set.image2_swap
variable {f}
theorem image2_union_left : image2 f (s ∪ s') t = image2 f s t ∪ image2 f s' t := by
simp_rw [← image_prod, union_prod, image_union]
#align set.image2_union_left Set.image2_union_left
| Mathlib/Data/Set/NAry.lean | 107 | 108 | theorem image2_union_right : image2 f s (t ∪ t') = image2 f s t ∪ image2 f s t' := by |
rw [← image2_swap, image2_union_left, image2_swap f, image2_swap f]
| 1 | 2.718282 | 0 | 0.333333 | 6 | 336 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Unary
variable (xs : Vector α n) (f₁ : β → σ₁ → σ₁ × γ) (f₂ : α → σ₂ → σ₂ × β)
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 27 | 35 | theorem mapAccumr_mapAccumr :
mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
= let m := (mapAccumr (fun x s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs (s₁, s₂))
(m.fst.fst, m.snd) := by |
induction xs using Vector.revInductionOn generalizing s₁ s₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Unary
variable (xs : Vector α n) (f₁ : β → σ₁ → σ₁ × γ) (f₂ : α → σ₂ → σ₂ × β)
@[simp]
theorem mapAccumr_mapAccumr :
mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
= let m := (mapAccumr (fun x s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs using Vector.revInductionOn generalizing s₁ s₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 38 | 40 | theorem mapAccumr_map (f₂ : α → β) :
(mapAccumr f₁ (map f₂ xs) s) = (mapAccumr (fun x s => f₁ (f₂ x) s) xs s) := by |
induction xs using Vector.revInductionOn generalizing s <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Unary
variable (xs : Vector α n) (f₁ : β → σ₁ → σ₁ × γ) (f₂ : α → σ₂ → σ₂ × β)
@[simp]
theorem mapAccumr_mapAccumr :
mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
= let m := (mapAccumr (fun x s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs using Vector.revInductionOn generalizing s₁ s₂ <;> simp_all
@[simp]
theorem mapAccumr_map (f₂ : α → β) :
(mapAccumr f₁ (map f₂ xs) s) = (mapAccumr (fun x s => f₁ (f₂ x) s) xs s) := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 43 | 47 | theorem map_mapAccumr (f₁ : β → γ) :
(map f₁ (mapAccumr f₂ xs s).snd) = (mapAccumr (fun x s =>
let r := (f₂ x s); (r.fst, f₁ r.snd)
) xs s).snd := by |
induction xs using Vector.revInductionOn generalizing s <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Unary
variable (xs : Vector α n) (f₁ : β → σ₁ → σ₁ × γ) (f₂ : α → σ₂ → σ₂ × β)
@[simp]
theorem mapAccumr_mapAccumr :
mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
= let m := (mapAccumr (fun x s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs using Vector.revInductionOn generalizing s₁ s₂ <;> simp_all
@[simp]
theorem mapAccumr_map (f₂ : α → β) :
(mapAccumr f₁ (map f₂ xs) s) = (mapAccumr (fun x s => f₁ (f₂ x) s) xs s) := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
@[simp]
theorem map_mapAccumr (f₁ : β → γ) :
(map f₁ (mapAccumr f₂ xs s).snd) = (mapAccumr (fun x s =>
let r := (f₂ x s); (r.fst, f₁ r.snd)
) xs s).snd := by
induction xs using Vector.revInductionOn generalizing s <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 50 | 52 | theorem map_map (f₁ : β → γ) (f₂ : α → β) :
map f₁ (map f₂ xs) = map (fun x => f₁ <| f₂ x) xs := by |
induction xs <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 60 | 68 | theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by |
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 71 | 73 | theorem map₂_map_left (f₁ : γ → β → ζ) (f₂ : α → γ) :
map₂ f₁ (map f₂ xs) ys = map₂ (fun x y => f₁ (f₂ x) y) xs ys := by |
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_left (f₁ : γ → β → ζ) (f₂ : α → γ) :
map₂ f₁ (map f₂ xs) ys = map₂ (fun x y => f₁ (f₂ x) y) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 76 | 84 | theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ y s.snd
let r₁ := f₁ x r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by |
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_left (f₁ : γ → β → ζ) (f₂ : α → γ) :
map₂ f₁ (map f₂ xs) ys = map₂ (fun x y => f₁ (f₂ x) y) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ y s.snd
let r₁ := f₁ x r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 87 | 89 | theorem map₂_map_right (f₁ : α → γ → ζ) (f₂ : β → γ) :
map₂ f₁ xs (map f₂ ys) = map₂ (fun x y => f₁ x (f₂ y)) xs ys := by |
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_left (f₁ : γ → β → ζ) (f₂ : α → γ) :
map₂ f₁ (map f₂ xs) ys = map₂ (fun x y => f₁ (f₂ x) y) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ y s.snd
let r₁ := f₁ x r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_right (f₁ : α → γ → ζ) (f₂ : β → γ) :
map₂ f₁ xs (map f₂ ys) = map₂ (fun x y => f₁ x (f₂ y)) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 92 | 100 | theorem mapAccumr_mapAccumr₂ (f₁ : γ → σ₁ → σ₁ × ζ) (f₂ : α → β → σ₂ → σ₂ × γ) :
(mapAccumr f₁ (mapAccumr₂ f₂ xs ys s₂).snd s₁)
= let m := mapAccumr₂ (fun x y s =>
let r₂ := f₂ x y s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂)
(m.fst.fst, m.snd) := by |
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
import Mathlib.Data.Vector.Basic
import Mathlib.Data.Vector.Snoc
set_option autoImplicit true
namespace Vector
section Fold
section Binary
variable (xs : Vector α n) (ys : Vector β n)
@[simp]
theorem mapAccumr₂_mapAccumr_left (f₁ : γ → β → σ₁ → σ₁ × ζ) (f₂ : α → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ (mapAccumr f₂ xs s₂).snd ys s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ x s.snd
let r₁ := f₁ r₂.snd y s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_left (f₁ : γ → β → ζ) (f₂ : α → γ) :
map₂ f₁ (map f₂ xs) ys = map₂ (fun x y => f₁ (f₂ x) y) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
theorem mapAccumr₂_mapAccumr_right (f₁ : α → γ → σ₁ → σ₁ × ζ) (f₂ : β → σ₂ → σ₂ × γ) :
(mapAccumr₂ f₁ xs (mapAccumr f₂ ys s₂).snd s₁)
= let m := (mapAccumr₂ (fun x y s =>
let r₂ := f₂ y s.snd
let r₁ := f₁ x r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂))
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
theorem map₂_map_right (f₁ : α → γ → ζ) (f₂ : β → γ) :
map₂ f₁ xs (map f₂ ys) = map₂ (fun x y => f₁ x (f₂ y)) xs ys := by
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
@[simp]
theorem mapAccumr_mapAccumr₂ (f₁ : γ → σ₁ → σ₁ × ζ) (f₂ : α → β → σ₂ → σ₂ × γ) :
(mapAccumr f₁ (mapAccumr₂ f₂ xs ys s₂).snd s₁)
= let m := mapAccumr₂ (fun x y s =>
let r₂ := f₂ x y s.snd
let r₁ := f₁ r₂.snd s.fst
((r₁.fst, r₂.fst), r₁.snd)
) xs ys (s₁, s₂)
(m.fst.fst, m.snd) := by
induction xs, ys using Vector.revInductionOn₂ generalizing s₁ s₂ <;> simp_all
@[simp]
| Mathlib/Data/Vector/MapLemmas.lean | 103 | 105 | theorem map_map₂ (f₁ : γ → ζ) (f₂ : α → β → γ) :
map f₁ (map₂ f₂ xs ys) = map₂ (fun x y => f₁ <| f₂ x y) xs ys := by |
induction xs, ys using Vector.revInductionOn₂ <;> simp_all
| 1 | 2.718282 | 0 | 0.333333 | 24 | 337 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.