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.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N : Type w) open Module.Free (chooseBasis ChooseBasisIndex) open FiniteDimensional (finrank) section Ring variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N] private noncomputable def linearMapEquivFun : (M β†’β‚—[R] N) ≃ₗ[S] ChooseBasisIndex R M β†’ N := (chooseBasis R M).repr.congrLeft N S β‰ͺ≫ₗ (Finsupp.lsum S).symm β‰ͺ≫ₗ LinearEquiv.piCongrRight fun _ ↦ LinearMap.ringLmapEquivSelf R S N instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M β†’β‚—[R] N) := Module.Free.of_equiv (linearMapEquivFun R S M N).symm #align module.free.linear_map Module.Free.linearMap instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M β†’β‚—[R] N) := Module.Finite.equiv (linearMapEquivFun R S M N).symm #align module.finite.linear_map Module.Finite.linearMap variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N] open Cardinal
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
53
56
theorem FiniteDimensional.rank_linearMap : Module.rank S (M β†’β‚—[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by
rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul, ← finrank_eq_card_chooseBasisIndex, ← finrank_eq_rank R, lift_natCast]
2
7.389056
1
0.6
5
528
import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N : Type w) open Module.Free (chooseBasis ChooseBasisIndex) open FiniteDimensional (finrank) section Ring variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N] private noncomputable def linearMapEquivFun : (M β†’β‚—[R] N) ≃ₗ[S] ChooseBasisIndex R M β†’ N := (chooseBasis R M).repr.congrLeft N S β‰ͺ≫ₗ (Finsupp.lsum S).symm β‰ͺ≫ₗ LinearEquiv.piCongrRight fun _ ↦ LinearMap.ringLmapEquivSelf R S N instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M β†’β‚—[R] N) := Module.Free.of_equiv (linearMapEquivFun R S M N).symm #align module.free.linear_map Module.Free.linearMap instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M β†’β‚—[R] N) := Module.Finite.equiv (linearMapEquivFun R S M N).symm #align module.finite.linear_map Module.Finite.linearMap variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N] open Cardinal theorem FiniteDimensional.rank_linearMap : Module.rank S (M β†’β‚—[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul, ← finrank_eq_card_chooseBasisIndex, ← finrank_eq_rank R, lift_natCast]
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
59
61
theorem FiniteDimensional.finrank_linearMap : finrank S (M β†’β‚—[R] N) = finrank R M * finrank S N := by
simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift]
1
2.718282
0
0.6
5
528
import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N : Type w) open Module.Free (chooseBasis ChooseBasisIndex) open FiniteDimensional (finrank) section Ring variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N] private noncomputable def linearMapEquivFun : (M β†’β‚—[R] N) ≃ₗ[S] ChooseBasisIndex R M β†’ N := (chooseBasis R M).repr.congrLeft N S β‰ͺ≫ₗ (Finsupp.lsum S).symm β‰ͺ≫ₗ LinearEquiv.piCongrRight fun _ ↦ LinearMap.ringLmapEquivSelf R S N instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M β†’β‚—[R] N) := Module.Free.of_equiv (linearMapEquivFun R S M N).symm #align module.free.linear_map Module.Free.linearMap instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M β†’β‚—[R] N) := Module.Finite.equiv (linearMapEquivFun R S M N).symm #align module.finite.linear_map Module.Finite.linearMap variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N] open Cardinal theorem FiniteDimensional.rank_linearMap : Module.rank S (M β†’β‚—[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul, ← finrank_eq_card_chooseBasisIndex, ← finrank_eq_rank R, lift_natCast] theorem FiniteDimensional.finrank_linearMap : finrank S (M β†’β‚—[R] N) = finrank R M * finrank S N := by simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift] #align finite_dimensional.finrank_linear_map FiniteDimensional.finrank_linearMap variable [Module R S] [SMulCommClass R S S]
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
66
68
theorem FiniteDimensional.rank_linearMap_self : Module.rank S (M β†’β‚—[R] S) = lift.{u'} (Module.rank R M) := by
rw [rank_linearMap, rank_self, lift_one, mul_one]
1
2.718282
0
0.6
5
528
import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N : Type w) open Module.Free (chooseBasis ChooseBasisIndex) open FiniteDimensional (finrank) section Ring variable [Ring R] [Ring S] [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] variable [AddCommGroup N] [Module R N] [Module S N] [SMulCommClass R S N] private noncomputable def linearMapEquivFun : (M β†’β‚—[R] N) ≃ₗ[S] ChooseBasisIndex R M β†’ N := (chooseBasis R M).repr.congrLeft N S β‰ͺ≫ₗ (Finsupp.lsum S).symm β‰ͺ≫ₗ LinearEquiv.piCongrRight fun _ ↦ LinearMap.ringLmapEquivSelf R S N instance Module.Free.linearMap [Module.Free S N] : Module.Free S (M β†’β‚—[R] N) := Module.Free.of_equiv (linearMapEquivFun R S M N).symm #align module.free.linear_map Module.Free.linearMap instance Module.Finite.linearMap [Module.Finite S N] : Module.Finite S (M β†’β‚—[R] N) := Module.Finite.equiv (linearMapEquivFun R S M N).symm #align module.finite.linear_map Module.Finite.linearMap variable [StrongRankCondition R] [StrongRankCondition S] [Module.Free S N] open Cardinal theorem FiniteDimensional.rank_linearMap : Module.rank S (M β†’β‚—[R] N) = lift.{w} (Module.rank R M) * lift.{v} (Module.rank S N) := by rw [(linearMapEquivFun R S M N).rank_eq, rank_fun_eq_lift_mul, ← finrank_eq_card_chooseBasisIndex, ← finrank_eq_rank R, lift_natCast] theorem FiniteDimensional.finrank_linearMap : finrank S (M β†’β‚—[R] N) = finrank R M * finrank S N := by simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift] #align finite_dimensional.finrank_linear_map FiniteDimensional.finrank_linearMap variable [Module R S] [SMulCommClass R S S] theorem FiniteDimensional.rank_linearMap_self : Module.rank S (M β†’β‚—[R] S) = lift.{u'} (Module.rank R M) := by rw [rank_linearMap, rank_self, lift_one, mul_one]
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
70
71
theorem FiniteDimensional.finrank_linearMap_self : finrank S (M β†’β‚—[R] S) = finrank R M := by
rw [finrank_linearMap, finrank_self, mul_one]
1
2.718282
0
0.6
5
528
import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition #align_import linear_algebra.free_module.finite.matrix from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b" universe u u' v w variable (R : Type u) (S : Type u') (M : Type v) (N : Type w) open Module.Free (chooseBasis ChooseBasisIndex) open FiniteDimensional (finrank)
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
113
119
theorem Matrix.rank_vecMulVec {K m n : Type u} [CommRing K] [Fintype n] [DecidableEq n] (w : m β†’ K) (v : n β†’ K) : (Matrix.vecMulVec w v).toLin'.rank ≀ 1 := by
nontriviality K rw [Matrix.vecMulVec_eq, Matrix.toLin'_mul] refine le_trans (LinearMap.rank_comp_le_left _ _) ?_ refine (LinearMap.rank_le_domain _).trans_eq ?_ rw [rank_fun', Fintype.card_unit, Nat.cast_one]
5
148.413159
2
0.6
5
528
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ENNReal def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β†’ Ξ²) : Prop := βˆ€ x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2 #align isometry Isometry
Mathlib/Topology/MetricSpace/Isometry.lean
40
42
theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, nndist (f x) (f y) = nndist x y := by
simp only [Isometry, edist_nndist, ENNReal.coe_inj]
1
2.718282
0
0.6
5
529
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ENNReal def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β†’ Ξ²) : Prop := βˆ€ x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2 #align isometry Isometry theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, nndist (f x) (f y) = nndist x y := by simp only [Isometry, edist_nndist, ENNReal.coe_inj] #align isometry_iff_nndist_eq isometry_iff_nndist_eq
Mathlib/Topology/MetricSpace/Isometry.lean
46
48
theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, dist (f x) (f y) = dist x y := by
simp only [isometry_iff_nndist_eq, ← coe_nndist, NNReal.coe_inj]
1
2.718282
0
0.6
5
529
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ENNReal def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β†’ Ξ²) : Prop := βˆ€ x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2 #align isometry Isometry theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, nndist (f x) (f y) = nndist x y := by simp only [Isometry, edist_nndist, ENNReal.coe_inj] #align isometry_iff_nndist_eq isometry_iff_nndist_eq theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, dist (f x) (f y) = dist x y := by simp only [isometry_iff_nndist_eq, ← coe_nndist, NNReal.coe_inj] #align isometry_iff_dist_eq isometry_iff_dist_eq alias ⟨Isometry.dist_eq, _⟩ := isometry_iff_dist_eq #align isometry.dist_eq Isometry.dist_eq alias ⟨_, Isometry.of_dist_eq⟩ := isometry_iff_dist_eq #align isometry.of_dist_eq Isometry.of_dist_eq alias ⟨Isometry.nndist_eq, _⟩ := isometry_iff_nndist_eq #align isometry.nndist_eq Isometry.nndist_eq alias ⟨_, Isometry.of_nndist_eq⟩ := isometry_iff_nndist_eq #align isometry.of_nndist_eq Isometry.of_nndist_eq namespace Isometry section PseudoEmetricIsometry variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {f : Ξ± β†’ Ξ²} {x y z : Ξ±} {s : Set Ξ±} theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y := hf x y #align isometry.edist_eq Isometry.edist_eq theorem lipschitz (h : Isometry f) : LipschitzWith 1 f := LipschitzWith.of_edist_le fun x y => (h x y).le #align isometry.lipschitz Isometry.lipschitz theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by simp only [h x y, ENNReal.coe_one, one_mul, le_refl] #align isometry.antilipschitz Isometry.antilipschitz @[nontriviality] theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by rw [Subsingleton.elim x y]; simp #align isometry_subsingleton isometry_subsingleton theorem _root_.isometry_id : Isometry (id : Ξ± β†’ Ξ±) := fun _ _ => rfl #align isometry_id isometry_id theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β†’ Ξ²} {g : Ξ³ β†’ Ξ΄} (hf : Isometry f) (hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply] #align isometry.prod_map Isometry.prod_map theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β†’ Type*} [βˆ€ i, PseudoEMetricSpace (Ξ± i)] [βˆ€ i, PseudoEMetricSpace (Ξ² i)] (f : βˆ€ i, Ξ± i β†’ Ξ² i) (hf : βˆ€ i, Isometry (f i)) : Isometry (fun g : (i : ΞΉ) β†’ Ξ± i => fun i => f i (g i)) := fun x y => by simp only [edist_pi_def, (hf _).edist_eq] #align isometry_dcomp isometry_dcomp theorem comp {g : Ξ² β†’ Ξ³} {f : Ξ± β†’ Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g ∘ f) := fun _ _ => (hg _ _).trans (hf _ _) #align isometry.comp Isometry.comp protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f := hf.lipschitz.uniformContinuous #align isometry.uniform_continuous Isometry.uniformContinuous protected theorem uniformInducing (hf : Isometry f) : UniformInducing f := hf.antilipschitz.uniformInducing hf.uniformContinuous #align isometry.uniform_inducing Isometry.uniformInducing theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β†’ Ξ²} {g : ΞΉ β†’ Ξ±} {a : Filter ΞΉ} {b : Ξ±} (hf : Isometry f) : Filter.Tendsto g a (𝓝 b) ↔ Filter.Tendsto (f ∘ g) a (𝓝 (f b)) := hf.uniformInducing.inducing.tendsto_nhds_iff #align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff protected theorem continuous (hf : Isometry f) : Continuous f := hf.lipschitz.continuous #align isometry.continuous Isometry.continuous theorem right_inv {f : Ξ± β†’ Ξ²} {g : Ξ² β†’ Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g := fun x y => by rw [← h, hg _, hg _] #align isometry.right_inv Isometry.right_inv
Mathlib/Topology/MetricSpace/Isometry.lean
138
141
theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.closedBall (f x) r = EMetric.closedBall x r := by
ext y simp [h.edist_eq]
2
7.389056
1
0.6
5
529
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ENNReal def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β†’ Ξ²) : Prop := βˆ€ x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2 #align isometry Isometry theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, nndist (f x) (f y) = nndist x y := by simp only [Isometry, edist_nndist, ENNReal.coe_inj] #align isometry_iff_nndist_eq isometry_iff_nndist_eq theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, dist (f x) (f y) = dist x y := by simp only [isometry_iff_nndist_eq, ← coe_nndist, NNReal.coe_inj] #align isometry_iff_dist_eq isometry_iff_dist_eq alias ⟨Isometry.dist_eq, _⟩ := isometry_iff_dist_eq #align isometry.dist_eq Isometry.dist_eq alias ⟨_, Isometry.of_dist_eq⟩ := isometry_iff_dist_eq #align isometry.of_dist_eq Isometry.of_dist_eq alias ⟨Isometry.nndist_eq, _⟩ := isometry_iff_nndist_eq #align isometry.nndist_eq Isometry.nndist_eq alias ⟨_, Isometry.of_nndist_eq⟩ := isometry_iff_nndist_eq #align isometry.of_nndist_eq Isometry.of_nndist_eq namespace Isometry section PseudoEmetricIsometry variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {f : Ξ± β†’ Ξ²} {x y z : Ξ±} {s : Set Ξ±} theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y := hf x y #align isometry.edist_eq Isometry.edist_eq theorem lipschitz (h : Isometry f) : LipschitzWith 1 f := LipschitzWith.of_edist_le fun x y => (h x y).le #align isometry.lipschitz Isometry.lipschitz theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by simp only [h x y, ENNReal.coe_one, one_mul, le_refl] #align isometry.antilipschitz Isometry.antilipschitz @[nontriviality] theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by rw [Subsingleton.elim x y]; simp #align isometry_subsingleton isometry_subsingleton theorem _root_.isometry_id : Isometry (id : Ξ± β†’ Ξ±) := fun _ _ => rfl #align isometry_id isometry_id theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β†’ Ξ²} {g : Ξ³ β†’ Ξ΄} (hf : Isometry f) (hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply] #align isometry.prod_map Isometry.prod_map theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β†’ Type*} [βˆ€ i, PseudoEMetricSpace (Ξ± i)] [βˆ€ i, PseudoEMetricSpace (Ξ² i)] (f : βˆ€ i, Ξ± i β†’ Ξ² i) (hf : βˆ€ i, Isometry (f i)) : Isometry (fun g : (i : ΞΉ) β†’ Ξ± i => fun i => f i (g i)) := fun x y => by simp only [edist_pi_def, (hf _).edist_eq] #align isometry_dcomp isometry_dcomp theorem comp {g : Ξ² β†’ Ξ³} {f : Ξ± β†’ Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g ∘ f) := fun _ _ => (hg _ _).trans (hf _ _) #align isometry.comp Isometry.comp protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f := hf.lipschitz.uniformContinuous #align isometry.uniform_continuous Isometry.uniformContinuous protected theorem uniformInducing (hf : Isometry f) : UniformInducing f := hf.antilipschitz.uniformInducing hf.uniformContinuous #align isometry.uniform_inducing Isometry.uniformInducing theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β†’ Ξ²} {g : ΞΉ β†’ Ξ±} {a : Filter ΞΉ} {b : Ξ±} (hf : Isometry f) : Filter.Tendsto g a (𝓝 b) ↔ Filter.Tendsto (f ∘ g) a (𝓝 (f b)) := hf.uniformInducing.inducing.tendsto_nhds_iff #align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff protected theorem continuous (hf : Isometry f) : Continuous f := hf.lipschitz.continuous #align isometry.continuous Isometry.continuous theorem right_inv {f : Ξ± β†’ Ξ²} {g : Ξ² β†’ Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g := fun x y => by rw [← h, hg _, hg _] #align isometry.right_inv Isometry.right_inv theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.closedBall (f x) r = EMetric.closedBall x r := by ext y simp [h.edist_eq] #align isometry.preimage_emetric_closed_ball Isometry.preimage_emetric_closedBall
Mathlib/Topology/MetricSpace/Isometry.lean
144
147
theorem preimage_emetric_ball (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r := by
ext y simp [h.edist_eq]
2
7.389056
1
0.6
5
529
import Mathlib.Topology.MetricSpace.Antilipschitz #align_import topology.metric_space.isometry from "leanprover-community/mathlib"@"b1859b6d4636fdbb78c5d5cefd24530653cfd3eb" noncomputable section universe u v w variable {ΞΉ : Type*} {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Function Set open scoped Topology ENNReal def Isometry [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (f : Ξ± β†’ Ξ²) : Prop := βˆ€ x1 x2 : Ξ±, edist (f x1) (f x2) = edist x1 x2 #align isometry Isometry theorem isometry_iff_nndist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, nndist (f x) (f y) = nndist x y := by simp only [Isometry, edist_nndist, ENNReal.coe_inj] #align isometry_iff_nndist_eq isometry_iff_nndist_eq theorem isometry_iff_dist_eq [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {f : Ξ± β†’ Ξ²} : Isometry f ↔ βˆ€ x y, dist (f x) (f y) = dist x y := by simp only [isometry_iff_nndist_eq, ← coe_nndist, NNReal.coe_inj] #align isometry_iff_dist_eq isometry_iff_dist_eq alias ⟨Isometry.dist_eq, _⟩ := isometry_iff_dist_eq #align isometry.dist_eq Isometry.dist_eq alias ⟨_, Isometry.of_dist_eq⟩ := isometry_iff_dist_eq #align isometry.of_dist_eq Isometry.of_dist_eq alias ⟨Isometry.nndist_eq, _⟩ := isometry_iff_nndist_eq #align isometry.nndist_eq Isometry.nndist_eq alias ⟨_, Isometry.of_nndist_eq⟩ := isometry_iff_nndist_eq #align isometry.of_nndist_eq Isometry.of_nndist_eq namespace Isometry section PseudoEmetricIsometry variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {f : Ξ± β†’ Ξ²} {x y z : Ξ±} {s : Set Ξ±} theorem edist_eq (hf : Isometry f) (x y : Ξ±) : edist (f x) (f y) = edist x y := hf x y #align isometry.edist_eq Isometry.edist_eq theorem lipschitz (h : Isometry f) : LipschitzWith 1 f := LipschitzWith.of_edist_le fun x y => (h x y).le #align isometry.lipschitz Isometry.lipschitz theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f := fun x y => by simp only [h x y, ENNReal.coe_one, one_mul, le_refl] #align isometry.antilipschitz Isometry.antilipschitz @[nontriviality] theorem _root_.isometry_subsingleton [Subsingleton Ξ±] : Isometry f := fun x y => by rw [Subsingleton.elim x y]; simp #align isometry_subsingleton isometry_subsingleton theorem _root_.isometry_id : Isometry (id : Ξ± β†’ Ξ±) := fun _ _ => rfl #align isometry_id isometry_id theorem prod_map {Ξ΄} [PseudoEMetricSpace Ξ΄] {f : Ξ± β†’ Ξ²} {g : Ξ³ β†’ Ξ΄} (hf : Isometry f) (hg : Isometry g) : Isometry (Prod.map f g) := fun x y => by simp only [Prod.edist_eq, hf.edist_eq, hg.edist_eq, Prod.map_apply] #align isometry.prod_map Isometry.prod_map theorem _root_.isometry_dcomp {ΞΉ} [Fintype ΞΉ] {Ξ± Ξ² : ΞΉ β†’ Type*} [βˆ€ i, PseudoEMetricSpace (Ξ± i)] [βˆ€ i, PseudoEMetricSpace (Ξ² i)] (f : βˆ€ i, Ξ± i β†’ Ξ² i) (hf : βˆ€ i, Isometry (f i)) : Isometry (fun g : (i : ΞΉ) β†’ Ξ± i => fun i => f i (g i)) := fun x y => by simp only [edist_pi_def, (hf _).edist_eq] #align isometry_dcomp isometry_dcomp theorem comp {g : Ξ² β†’ Ξ³} {f : Ξ± β†’ Ξ²} (hg : Isometry g) (hf : Isometry f) : Isometry (g ∘ f) := fun _ _ => (hg _ _).trans (hf _ _) #align isometry.comp Isometry.comp protected theorem uniformContinuous (hf : Isometry f) : UniformContinuous f := hf.lipschitz.uniformContinuous #align isometry.uniform_continuous Isometry.uniformContinuous protected theorem uniformInducing (hf : Isometry f) : UniformInducing f := hf.antilipschitz.uniformInducing hf.uniformContinuous #align isometry.uniform_inducing Isometry.uniformInducing theorem tendsto_nhds_iff {ΞΉ : Type*} {f : Ξ± β†’ Ξ²} {g : ΞΉ β†’ Ξ±} {a : Filter ΞΉ} {b : Ξ±} (hf : Isometry f) : Filter.Tendsto g a (𝓝 b) ↔ Filter.Tendsto (f ∘ g) a (𝓝 (f b)) := hf.uniformInducing.inducing.tendsto_nhds_iff #align isometry.tendsto_nhds_iff Isometry.tendsto_nhds_iff protected theorem continuous (hf : Isometry f) : Continuous f := hf.lipschitz.continuous #align isometry.continuous Isometry.continuous theorem right_inv {f : Ξ± β†’ Ξ²} {g : Ξ² β†’ Ξ±} (h : Isometry f) (hg : RightInverse g f) : Isometry g := fun x y => by rw [← h, hg _, hg _] #align isometry.right_inv Isometry.right_inv theorem preimage_emetric_closedBall (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.closedBall (f x) r = EMetric.closedBall x r := by ext y simp [h.edist_eq] #align isometry.preimage_emetric_closed_ball Isometry.preimage_emetric_closedBall theorem preimage_emetric_ball (h : Isometry f) (x : Ξ±) (r : ℝβ‰₯0∞) : f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r := by ext y simp [h.edist_eq] #align isometry.preimage_emetric_ball Isometry.preimage_emetric_ball theorem ediam_image (hf : Isometry f) (s : Set Ξ±) : EMetric.diam (f '' s) = EMetric.diam s := eq_of_forall_ge_iff fun d => by simp only [EMetric.diam_le_iff, forall_mem_image, hf.edist_eq] #align isometry.ediam_image Isometry.ediam_image
Mathlib/Topology/MetricSpace/Isometry.lean
155
157
theorem ediam_range (hf : Isometry f) : EMetric.diam (range f) = EMetric.diam (univ : Set Ξ±) := by
rw [← image_univ] exact hf.ediam_image univ
2
7.389056
1
0.6
5
529
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section CaratheodoryMeasurable universe u variable {Ξ± : Type u} (m : OuterMeasure Ξ±) attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc variable {s s₁ sβ‚‚ : Set Ξ±} def IsCaratheodory (s : Set Ξ±) : Prop := βˆ€ t, m t = m (t ∩ s) + m (t \ s) #align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory theorem isCaratheodory_iff_le' {s : Set Ξ±} : IsCaratheodory m s ↔ βˆ€ t, m (t ∩ s) + m (t \ s) ≀ m t := forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _ #align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le' @[simp]
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
62
62
theorem isCaratheodory_empty : IsCaratheodory m βˆ… := by
simp [IsCaratheodory, m.empty, diff_empty]
1
2.718282
0
0.6
5
530
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section CaratheodoryMeasurable universe u variable {Ξ± : Type u} (m : OuterMeasure Ξ±) attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc variable {s s₁ sβ‚‚ : Set Ξ±} def IsCaratheodory (s : Set Ξ±) : Prop := βˆ€ t, m t = m (t ∩ s) + m (t \ s) #align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory theorem isCaratheodory_iff_le' {s : Set Ξ±} : IsCaratheodory m s ↔ βˆ€ t, m (t ∩ s) + m (t \ s) ≀ m t := forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _ #align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le' @[simp] theorem isCaratheodory_empty : IsCaratheodory m βˆ… := by simp [IsCaratheodory, m.empty, diff_empty] #align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
65
66
theorem isCaratheodory_compl : IsCaratheodory m s₁ β†’ IsCaratheodory m sβ‚αΆœ := by
simp [IsCaratheodory, diff_eq, add_comm]
1
2.718282
0
0.6
5
530
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section CaratheodoryMeasurable universe u variable {Ξ± : Type u} (m : OuterMeasure Ξ±) attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc variable {s s₁ sβ‚‚ : Set Ξ±} def IsCaratheodory (s : Set Ξ±) : Prop := βˆ€ t, m t = m (t ∩ s) + m (t \ s) #align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory theorem isCaratheodory_iff_le' {s : Set Ξ±} : IsCaratheodory m s ↔ βˆ€ t, m (t ∩ s) + m (t \ s) ≀ m t := forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _ #align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le' @[simp] theorem isCaratheodory_empty : IsCaratheodory m βˆ… := by simp [IsCaratheodory, m.empty, diff_empty] #align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty theorem isCaratheodory_compl : IsCaratheodory m s₁ β†’ IsCaratheodory m sβ‚αΆœ := by simp [IsCaratheodory, diff_eq, add_comm] #align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl @[simp] theorem isCaratheodory_compl_iff : IsCaratheodory m sᢜ ↔ IsCaratheodory m s := ⟨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl m⟩ #align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff theorem isCaratheodory_union (h₁ : IsCaratheodory m s₁) (hβ‚‚ : IsCaratheodory m sβ‚‚) : IsCaratheodory m (s₁ βˆͺ sβ‚‚) := fun t => by rw [h₁ t, hβ‚‚ (t ∩ s₁), hβ‚‚ (t \ s₁), h₁ (t ∩ (s₁ βˆͺ sβ‚‚)), inter_diff_assoc _ _ s₁, Set.inter_assoc _ _ s₁, inter_eq_self_of_subset_right Set.subset_union_left, union_diff_left, hβ‚‚ (t ∩ s₁)] simp [diff_eq, add_assoc] #align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
82
84
theorem measure_inter_union (h : s₁ ∩ sβ‚‚ βŠ† βˆ…) (h₁ : IsCaratheodory m s₁) {t : Set Ξ±} : m (t ∩ (s₁ βˆͺ sβ‚‚)) = m (t ∩ s₁) + m (t ∩ sβ‚‚) := by
rw [h₁, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h]
1
2.718282
0
0.6
5
530
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section CaratheodoryMeasurable universe u variable {Ξ± : Type u} (m : OuterMeasure Ξ±) attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc variable {s s₁ sβ‚‚ : Set Ξ±} def IsCaratheodory (s : Set Ξ±) : Prop := βˆ€ t, m t = m (t ∩ s) + m (t \ s) #align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory theorem isCaratheodory_iff_le' {s : Set Ξ±} : IsCaratheodory m s ↔ βˆ€ t, m (t ∩ s) + m (t \ s) ≀ m t := forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _ #align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le' @[simp] theorem isCaratheodory_empty : IsCaratheodory m βˆ… := by simp [IsCaratheodory, m.empty, diff_empty] #align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty theorem isCaratheodory_compl : IsCaratheodory m s₁ β†’ IsCaratheodory m sβ‚αΆœ := by simp [IsCaratheodory, diff_eq, add_comm] #align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl @[simp] theorem isCaratheodory_compl_iff : IsCaratheodory m sᢜ ↔ IsCaratheodory m s := ⟨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl m⟩ #align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff theorem isCaratheodory_union (h₁ : IsCaratheodory m s₁) (hβ‚‚ : IsCaratheodory m sβ‚‚) : IsCaratheodory m (s₁ βˆͺ sβ‚‚) := fun t => by rw [h₁ t, hβ‚‚ (t ∩ s₁), hβ‚‚ (t \ s₁), h₁ (t ∩ (s₁ βˆͺ sβ‚‚)), inter_diff_assoc _ _ s₁, Set.inter_assoc _ _ s₁, inter_eq_self_of_subset_right Set.subset_union_left, union_diff_left, hβ‚‚ (t ∩ s₁)] simp [diff_eq, add_assoc] #align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union theorem measure_inter_union (h : s₁ ∩ sβ‚‚ βŠ† βˆ…) (h₁ : IsCaratheodory m s₁) {t : Set Ξ±} : m (t ∩ (s₁ βˆͺ sβ‚‚)) = m (t ∩ s₁) + m (t ∩ sβ‚‚) := by rw [h₁, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h] #align measure_theory.outer_measure.measure_inter_union MeasureTheory.OuterMeasure.measure_inter_union theorem isCaratheodory_iUnion_lt {s : β„• β†’ Set Ξ±} : βˆ€ {n : β„•}, (βˆ€ i < n, IsCaratheodory m (s i)) β†’ IsCaratheodory m (⋃ i < n, s i) | 0, _ => by simp [Nat.not_lt_zero] | n + 1, h => by rw [biUnion_lt_succ] exact isCaratheodory_union m (isCaratheodory_iUnion_lt fun i hi => h i <| lt_of_lt_of_le hi <| Nat.le_succ _) (h n (le_refl (n + 1))) #align measure_theory.outer_measure.is_caratheodory_Union_lt MeasureTheory.OuterMeasure.isCaratheodory_iUnion_lt
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
97
100
theorem isCaratheodory_inter (h₁ : IsCaratheodory m s₁) (hβ‚‚ : IsCaratheodory m sβ‚‚) : IsCaratheodory m (s₁ ∩ sβ‚‚) := by
rw [← isCaratheodory_compl_iff, Set.compl_inter] exact isCaratheodory_union _ (isCaratheodory_compl _ h₁) (isCaratheodory_compl _ hβ‚‚)
2
7.389056
1
0.6
5
530
import Mathlib.MeasureTheory.OuterMeasure.OfFunction import Mathlib.MeasureTheory.PiSystem #align_import measure_theory.measure.outer_measure from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set Function Filter open scoped Classical NNReal Topology ENNReal namespace MeasureTheory namespace OuterMeasure section CaratheodoryMeasurable universe u variable {Ξ± : Type u} (m : OuterMeasure Ξ±) attribute [local simp] Set.inter_comm Set.inter_left_comm Set.inter_assoc variable {s s₁ sβ‚‚ : Set Ξ±} def IsCaratheodory (s : Set Ξ±) : Prop := βˆ€ t, m t = m (t ∩ s) + m (t \ s) #align measure_theory.outer_measure.is_caratheodory MeasureTheory.OuterMeasure.IsCaratheodory theorem isCaratheodory_iff_le' {s : Set Ξ±} : IsCaratheodory m s ↔ βˆ€ t, m (t ∩ s) + m (t \ s) ≀ m t := forall_congr' fun _ => le_antisymm_iff.trans <| and_iff_right <| measure_le_inter_add_diff _ _ _ #align measure_theory.outer_measure.is_caratheodory_iff_le' MeasureTheory.OuterMeasure.isCaratheodory_iff_le' @[simp] theorem isCaratheodory_empty : IsCaratheodory m βˆ… := by simp [IsCaratheodory, m.empty, diff_empty] #align measure_theory.outer_measure.is_caratheodory_empty MeasureTheory.OuterMeasure.isCaratheodory_empty theorem isCaratheodory_compl : IsCaratheodory m s₁ β†’ IsCaratheodory m sβ‚αΆœ := by simp [IsCaratheodory, diff_eq, add_comm] #align measure_theory.outer_measure.is_caratheodory_compl MeasureTheory.OuterMeasure.isCaratheodory_compl @[simp] theorem isCaratheodory_compl_iff : IsCaratheodory m sᢜ ↔ IsCaratheodory m s := ⟨fun h => by simpa using isCaratheodory_compl m h, isCaratheodory_compl m⟩ #align measure_theory.outer_measure.is_caratheodory_compl_iff MeasureTheory.OuterMeasure.isCaratheodory_compl_iff theorem isCaratheodory_union (h₁ : IsCaratheodory m s₁) (hβ‚‚ : IsCaratheodory m sβ‚‚) : IsCaratheodory m (s₁ βˆͺ sβ‚‚) := fun t => by rw [h₁ t, hβ‚‚ (t ∩ s₁), hβ‚‚ (t \ s₁), h₁ (t ∩ (s₁ βˆͺ sβ‚‚)), inter_diff_assoc _ _ s₁, Set.inter_assoc _ _ s₁, inter_eq_self_of_subset_right Set.subset_union_left, union_diff_left, hβ‚‚ (t ∩ s₁)] simp [diff_eq, add_assoc] #align measure_theory.outer_measure.is_caratheodory_union MeasureTheory.OuterMeasure.isCaratheodory_union theorem measure_inter_union (h : s₁ ∩ sβ‚‚ βŠ† βˆ…) (h₁ : IsCaratheodory m s₁) {t : Set Ξ±} : m (t ∩ (s₁ βˆͺ sβ‚‚)) = m (t ∩ s₁) + m (t ∩ sβ‚‚) := by rw [h₁, Set.inter_assoc, Set.union_inter_cancel_left, inter_diff_assoc, union_diff_cancel_left h] #align measure_theory.outer_measure.measure_inter_union MeasureTheory.OuterMeasure.measure_inter_union theorem isCaratheodory_iUnion_lt {s : β„• β†’ Set Ξ±} : βˆ€ {n : β„•}, (βˆ€ i < n, IsCaratheodory m (s i)) β†’ IsCaratheodory m (⋃ i < n, s i) | 0, _ => by simp [Nat.not_lt_zero] | n + 1, h => by rw [biUnion_lt_succ] exact isCaratheodory_union m (isCaratheodory_iUnion_lt fun i hi => h i <| lt_of_lt_of_le hi <| Nat.le_succ _) (h n (le_refl (n + 1))) #align measure_theory.outer_measure.is_caratheodory_Union_lt MeasureTheory.OuterMeasure.isCaratheodory_iUnion_lt theorem isCaratheodory_inter (h₁ : IsCaratheodory m s₁) (hβ‚‚ : IsCaratheodory m sβ‚‚) : IsCaratheodory m (s₁ ∩ sβ‚‚) := by rw [← isCaratheodory_compl_iff, Set.compl_inter] exact isCaratheodory_union _ (isCaratheodory_compl _ h₁) (isCaratheodory_compl _ hβ‚‚) #align measure_theory.outer_measure.is_caratheodory_inter MeasureTheory.OuterMeasure.isCaratheodory_inter theorem isCaratheodory_sum {s : β„• β†’ Set Ξ±} (h : βˆ€ i, IsCaratheodory m (s i)) (hd : Pairwise (Disjoint on s)) {t : Set Ξ±} : βˆ€ {n}, (βˆ‘ i ∈ Finset.range n, m (t ∩ s i)) = m (t ∩ ⋃ i < n, s i) | 0 => by simp [Nat.not_lt_zero, m.empty] | Nat.succ n => by rw [biUnion_lt_succ, Finset.sum_range_succ, Set.union_comm, isCaratheodory_sum h hd, m.measure_inter_union _ (h n), add_comm] intro a simpa using fun (h₁ : a ∈ s n) i (hi : i < n) hβ‚‚ => (hd (ne_of_gt hi)).le_bot ⟨h₁, hβ‚‚βŸ© #align measure_theory.outer_measure.is_caratheodory_sum MeasureTheory.OuterMeasure.isCaratheodory_sum set_option linter.deprecated false in -- not immediately obvious how to replace `iUnion` here.
Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
115
128
theorem isCaratheodory_iUnion_nat {s : β„• β†’ Set Ξ±} (h : βˆ€ i, IsCaratheodory m (s i)) (hd : Pairwise (Disjoint on s)) : IsCaratheodory m (⋃ i, s i) := by
apply (isCaratheodory_iff_le' m).mpr intro t have hp : m (t ∩ ⋃ i, s i) ≀ ⨆ n, m (t ∩ ⋃ i < n, s i) := by convert m.iUnion fun i => t ∩ s i using 1 Β· simp [inter_iUnion] Β· simp [ENNReal.tsum_eq_iSup_nat, isCaratheodory_sum m h hd] refine le_trans (add_le_add_right hp _) ?_ rw [ENNReal.iSup_add] refine iSup_le fun n => le_trans (add_le_add_left ?_ _) (ge_of_eq (isCaratheodory_iUnion_lt m (fun i _ => h i) _)) refine m.mono (diff_subset_diff_right ?_) exact iUnionβ‚‚_subset fun i _ => subset_iUnion _ i
12
162,754.791419
2
0.6
5
530
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith
Mathlib/Topology/MetricSpace/Contracting.lean
53
53
theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by
simp [hf.1]
1
2.718282
0
0.6
5
531
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero
Mathlib/Topology/MetricSpace/Contracting.lean
62
64
theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by
norm_cast exact ENNReal.coe_ne_top
2
7.389056
1
0.6
5
531
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top
Mathlib/Topology/MetricSpace/Contracting.lean
68
76
theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by
rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _)
2
7.389056
1
0.6
5
531
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _) #align contracting_with.edist_inequality ContractingWith.edist_inequality
Mathlib/Topology/MetricSpace/Contracting.lean
79
81
theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) (hy : IsFixedPt f y) : edist x y ≀ edist x (f x) / (1 - K) := by
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h
1
2.718282
0
0.6
5
531
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Setoid.Basic import Mathlib.Dynamics.FixedPoints.Topology import Mathlib.Topology.MetricSpace.Lipschitz #align_import topology.metric_space.contracting from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open scoped Classical open NNReal Topology ENNReal Filter Function variable {Ξ± : Type*} def ContractingWith [EMetricSpace Ξ±] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ±) := K < 1 ∧ LipschitzWith K f #align contracting_with ContractingWith namespace ContractingWith variable [EMetricSpace Ξ±] [cs : CompleteSpace Ξ±] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ±} open EMetric Set theorem toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 #align contracting_with.to_lipschitz_with ContractingWith.toLipschitzWith theorem one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝβ‰₯0∞) < 1 - K := by simp [hf.1] set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_pos' ContractingWith.one_sub_K_pos' theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝβ‰₯0∞) - K β‰  0 := ne_of_gt hf.one_sub_K_pos' set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_zero ContractingWith.one_sub_K_ne_zero theorem one_sub_K_ne_top : (1 : ℝβ‰₯0∞) - K β‰  ∞ := by norm_cast exact ENNReal.coe_ne_top set_option linter.uppercaseLean3 false in #align contracting_with.one_sub_K_ne_top ContractingWith.one_sub_K_ne_top theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) : edist x y ≀ (edist x (f x) + edist y (f y)) / (1 - K) := suffices edist x y ≀ edist x (f x) + edist y (f y) + K * edist x y by rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top), mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right] calc edist x y ≀ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _ _ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm] _ ≀ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _) #align contracting_with.edist_inequality ContractingWith.edist_inequality theorem edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y β‰  ∞) (hy : IsFixedPt f y) : edist x y ≀ edist x (f x) / (1 - K) := by simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h #align contracting_with.edist_le_of_fixed_point ContractingWith.edist_le_of_fixedPoint
Mathlib/Topology/MetricSpace/Contracting.lean
84
87
theorem eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x) (hy : IsFixedPt f y) : x = y ∨ edist x y = ∞ := by
refine or_iff_not_imp_right.2 fun h ↦ edist_le_zero.1 ?_ simpa only [hx.eq, edist_self, add_zero, ENNReal.zero_div] using hf.edist_le_of_fixedPoint h hy
2
7.389056
1
0.6
5
531
import Mathlib.Tactic.ApplyFun import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.Separation #align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829" open Filter Set Function Topology Uniformity UniformSpace open scoped Classical noncomputable section universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³] instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± := .of_hasBasis (fun _ ↦ nhds_basis_uniformity' uniformity_hasBasis_closed) fun a _V hV ↦ isClosed_ball a hV.2 #align uniform_space.to_regular_space UniformSpace.to_regularSpace #align separation_rel Inseparable #noalign separated_equiv #align separation_rel_iff_specializes specializes_iff_inseparable #noalign separation_rel_iff_inseparable theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := (nhds_basis_uniformity h).specializes_iff theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity #align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y ↔ (x, y) ∈ (𝓀 Ξ±).ker := (𝓀 Ξ±).basis_sets.inseparable_iff_uniformity protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) : 𝓝 (x, y) ≀ 𝓀 Ξ± := by rw [h.prod rfl] apply nhds_le_uniformity
Mathlib/Topology/UniformSpace/Separation.lean
142
146
theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} : Inseparable x y ↔ ClusterPt (x, y) (𝓀 Ξ±) := by
refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩ simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt] exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU
3
20.085537
1
0.6
5
532
import Mathlib.Tactic.ApplyFun import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.Separation #align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829" open Filter Set Function Topology Uniformity UniformSpace open scoped Classical noncomputable section universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³] instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± := .of_hasBasis (fun _ ↦ nhds_basis_uniformity' uniformity_hasBasis_closed) fun a _V hV ↦ isClosed_ball a hV.2 #align uniform_space.to_regular_space UniformSpace.to_regularSpace #align separation_rel Inseparable #noalign separated_equiv #align separation_rel_iff_specializes specializes_iff_inseparable #noalign separation_rel_iff_inseparable theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := (nhds_basis_uniformity h).specializes_iff theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity #align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y ↔ (x, y) ∈ (𝓀 Ξ±).ker := (𝓀 Ξ±).basis_sets.inseparable_iff_uniformity protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) : 𝓝 (x, y) ≀ 𝓀 Ξ± := by rw [h.prod rfl] apply nhds_le_uniformity theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} : Inseparable x y ↔ ClusterPt (x, y) (𝓀 Ξ±) := by refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩ simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt] exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU #align separated_space T0Space
Mathlib/Topology/UniformSpace/Separation.lean
150
152
theorem t0Space_iff_uniformity : T0Space Ξ± ↔ βˆ€ x y, (βˆ€ r ∈ 𝓀 Ξ±, (x, y) ∈ r) β†’ x = y := by
simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id]
1
2.718282
0
0.6
5
532
import Mathlib.Tactic.ApplyFun import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.Separation #align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829" open Filter Set Function Topology Uniformity UniformSpace open scoped Classical noncomputable section universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³] instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± := .of_hasBasis (fun _ ↦ nhds_basis_uniformity' uniformity_hasBasis_closed) fun a _V hV ↦ isClosed_ball a hV.2 #align uniform_space.to_regular_space UniformSpace.to_regularSpace #align separation_rel Inseparable #noalign separated_equiv #align separation_rel_iff_specializes specializes_iff_inseparable #noalign separation_rel_iff_inseparable theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := (nhds_basis_uniformity h).specializes_iff theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity #align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y ↔ (x, y) ∈ (𝓀 Ξ±).ker := (𝓀 Ξ±).basis_sets.inseparable_iff_uniformity protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) : 𝓝 (x, y) ≀ 𝓀 Ξ± := by rw [h.prod rfl] apply nhds_le_uniformity theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} : Inseparable x y ↔ ClusterPt (x, y) (𝓀 Ξ±) := by refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩ simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt] exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU #align separated_space T0Space theorem t0Space_iff_uniformity : T0Space Ξ± ↔ βˆ€ x y, (βˆ€ r ∈ 𝓀 Ξ±, (x, y) ∈ r) β†’ x = y := by simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id] #align separated_def t0Space_iff_uniformity
Mathlib/Topology/UniformSpace/Separation.lean
155
157
theorem t0Space_iff_uniformity' : T0Space Ξ± ↔ Pairwise fun x y ↦ βˆƒ r ∈ 𝓀 Ξ±, (x, y) βˆ‰ r := by
simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity]
1
2.718282
0
0.6
5
532
import Mathlib.Tactic.ApplyFun import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.Separation #align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829" open Filter Set Function Topology Uniformity UniformSpace open scoped Classical noncomputable section universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³] instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± := .of_hasBasis (fun _ ↦ nhds_basis_uniformity' uniformity_hasBasis_closed) fun a _V hV ↦ isClosed_ball a hV.2 #align uniform_space.to_regular_space UniformSpace.to_regularSpace #align separation_rel Inseparable #noalign separated_equiv #align separation_rel_iff_specializes specializes_iff_inseparable #noalign separation_rel_iff_inseparable theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := (nhds_basis_uniformity h).specializes_iff theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity #align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y ↔ (x, y) ∈ (𝓀 Ξ±).ker := (𝓀 Ξ±).basis_sets.inseparable_iff_uniformity protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) : 𝓝 (x, y) ≀ 𝓀 Ξ± := by rw [h.prod rfl] apply nhds_le_uniformity theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} : Inseparable x y ↔ ClusterPt (x, y) (𝓀 Ξ±) := by refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩ simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt] exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU #align separated_space T0Space theorem t0Space_iff_uniformity : T0Space Ξ± ↔ βˆ€ x y, (βˆ€ r ∈ 𝓀 Ξ±, (x, y) ∈ r) β†’ x = y := by simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id] #align separated_def t0Space_iff_uniformity theorem t0Space_iff_uniformity' : T0Space Ξ± ↔ Pairwise fun x y ↦ βˆƒ r ∈ 𝓀 Ξ±, (x, y) βˆ‰ r := by simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity] #align separated_def' t0Space_iff_uniformity'
Mathlib/Topology/UniformSpace/Separation.lean
160
163
theorem t0Space_iff_ker_uniformity : T0Space Ξ± ↔ (𝓀 Ξ±).ker = diagonal Ξ± := by
simp_rw [t0Space_iff_uniformity, subset_antisymm_iff, diagonal_subset_iff, subset_def, Prod.forall, Filter.mem_ker, mem_diagonal_iff, iff_self_and] exact fun _ x s hs ↦ refl_mem_uniformity hs
3
20.085537
1
0.6
5
532
import Mathlib.Tactic.ApplyFun import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.Separation #align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829" open Filter Set Function Topology Uniformity UniformSpace open scoped Classical noncomputable section universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} variable [UniformSpace Ξ±] [UniformSpace Ξ²] [UniformSpace Ξ³] instance (priority := 100) UniformSpace.to_regularSpace : RegularSpace Ξ± := .of_hasBasis (fun _ ↦ nhds_basis_uniformity' uniformity_hasBasis_closed) fun a _V hV ↦ isClosed_ball a hV.2 #align uniform_space.to_regular_space UniformSpace.to_regularSpace #align separation_rel Inseparable #noalign separated_equiv #align separation_rel_iff_specializes specializes_iff_inseparable #noalign separation_rel_iff_inseparable theorem Filter.HasBasis.specializes_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : x β€³ y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := (nhds_basis_uniformity h).specializes_iff theorem Filter.HasBasis.inseparable_iff_uniformity {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (h : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} : Inseparable x y ↔ βˆ€ i, p i β†’ (x, y) ∈ s i := specializes_iff_inseparable.symm.trans h.specializes_iff_uniformity #align filter.has_basis.mem_separation_rel Filter.HasBasis.inseparable_iff_uniformity theorem inseparable_iff_ker_uniformity {x y : Ξ±} : Inseparable x y ↔ (x, y) ∈ (𝓀 Ξ±).ker := (𝓀 Ξ±).basis_sets.inseparable_iff_uniformity protected theorem Inseparable.nhds_le_uniformity {x y : Ξ±} (h : Inseparable x y) : 𝓝 (x, y) ≀ 𝓀 Ξ± := by rw [h.prod rfl] apply nhds_le_uniformity theorem inseparable_iff_clusterPt_uniformity {x y : Ξ±} : Inseparable x y ↔ ClusterPt (x, y) (𝓀 Ξ±) := by refine ⟨fun h ↦ .of_nhds_le h.nhds_le_uniformity, fun h ↦ ?_⟩ simp_rw [uniformity_hasBasis_closed.inseparable_iff_uniformity, isClosed_iff_clusterPt] exact fun U ⟨hU, hUc⟩ ↦ hUc _ <| h.mono <| le_principal_iff.2 hU #align separated_space T0Space theorem t0Space_iff_uniformity : T0Space Ξ± ↔ βˆ€ x y, (βˆ€ r ∈ 𝓀 Ξ±, (x, y) ∈ r) β†’ x = y := by simp only [t0Space_iff_inseparable, inseparable_iff_ker_uniformity, mem_ker, id] #align separated_def t0Space_iff_uniformity theorem t0Space_iff_uniformity' : T0Space Ξ± ↔ Pairwise fun x y ↦ βˆƒ r ∈ 𝓀 Ξ±, (x, y) βˆ‰ r := by simp [t0Space_iff_not_inseparable, inseparable_iff_ker_uniformity] #align separated_def' t0Space_iff_uniformity' theorem t0Space_iff_ker_uniformity : T0Space Ξ± ↔ (𝓀 Ξ±).ker = diagonal Ξ± := by simp_rw [t0Space_iff_uniformity, subset_antisymm_iff, diagonal_subset_iff, subset_def, Prod.forall, Filter.mem_ker, mem_diagonal_iff, iff_self_and] exact fun _ x s hs ↦ refl_mem_uniformity hs #align separated_space_iff t0Space_iff_ker_uniformity theorem eq_of_uniformity {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {x y : Ξ±} (h : βˆ€ {V}, V ∈ 𝓀 Ξ± β†’ (x, y) ∈ V) : x = y := t0Space_iff_uniformity.mp β€ΉT0Space Ξ±β€Ί x y @h #align eq_of_uniformity eq_of_uniformity theorem eq_of_uniformity_basis {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set (Ξ± Γ— Ξ±)} (hs : (𝓀 Ξ±).HasBasis p s) {x y : Ξ±} (h : βˆ€ {i}, p i β†’ (x, y) ∈ s i) : x = y := (hs.inseparable_iff_uniformity.2 @h).eq #align eq_of_uniformity_basis eq_of_uniformity_basis theorem eq_of_forall_symmetric {Ξ± : Type*} [UniformSpace Ξ±] [T0Space Ξ±] {x y : Ξ±} (h : βˆ€ {V}, V ∈ 𝓀 Ξ± β†’ SymmetricRel V β†’ (x, y) ∈ V) : x = y := eq_of_uniformity_basis hasBasis_symmetric (by simpa) #align eq_of_forall_symmetric eq_of_forall_symmetric theorem eq_of_clusterPt_uniformity [T0Space Ξ±] {x y : Ξ±} (h : ClusterPt (x, y) (𝓀 Ξ±)) : x = y := (inseparable_iff_clusterPt_uniformity.2 h).eq #align eq_of_cluster_pt_uniformity eq_of_clusterPt_uniformity
Mathlib/Topology/UniformSpace/Separation.lean
186
191
theorem Filter.Tendsto.inseparable_iff_uniformity {l : Filter Ξ²} [NeBot l] {f g : Ξ² β†’ Ξ±} {a b : Ξ±} (ha : Tendsto f l (𝓝 a)) (hb : Tendsto g l (𝓝 b)) : Inseparable a b ↔ Tendsto (fun x ↦ (f x, g x)) l (𝓀 Ξ±) := by
refine ⟨fun h ↦ (ha.prod_mk_nhds hb).mono_right h.nhds_le_uniformity, fun h ↦ ?_⟩ rw [inseparable_iff_clusterPt_uniformity] exact (ClusterPt.of_le_nhds (ha.prod_mk_nhds hb)).mono h
3
20.085537
1
0.6
5
532
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option linter.uppercaseLean3 false universe u open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite noncomputable section namespace AlgebraicGeometry def AffineTargetMorphismProperty := βˆ€ ⦃X Y : Scheme⦄ (_ : X ⟢ Y) [IsAffine Y], Prop #align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty protected def Scheme.isIso : MorphismProperty Scheme := @IsIso Scheme _ #align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f #align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso instance : Inhabited AffineTargetMorphismProperty := ⟨Scheme.affineTargetIsIso⟩ def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun _ _ f => βˆƒ h, @P _ _ f h #align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
94
96
theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by
delta AffineTargetMorphismProperty.toProperty; simp [*]
1
2.718282
0
0.6
5
533
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option linter.uppercaseLean3 false universe u open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite noncomputable section namespace AlgebraicGeometry def AffineTargetMorphismProperty := βˆ€ ⦃X Y : Scheme⦄ (_ : X ⟢ Y) [IsAffine Y], Prop #align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty protected def Scheme.isIso : MorphismProperty Scheme := @IsIso Scheme _ #align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f #align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso instance : Inhabited AffineTargetMorphismProperty := ⟨Scheme.affineTargetIsIso⟩ def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun _ _ f => βˆƒ h, @P _ _ f h #align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by delta AffineTargetMorphismProperty.toProperty; simp [*] #align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
99
101
theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso f] [IsAffine Z] : P (f ≫ g) ↔ P g := by
rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_left_isIso]
1
2.718282
0
0.6
5
533
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option linter.uppercaseLean3 false universe u open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite noncomputable section namespace AlgebraicGeometry def AffineTargetMorphismProperty := βˆ€ ⦃X Y : Scheme⦄ (_ : X ⟢ Y) [IsAffine Y], Prop #align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty protected def Scheme.isIso : MorphismProperty Scheme := @IsIso Scheme _ #align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f #align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso instance : Inhabited AffineTargetMorphismProperty := ⟨Scheme.affineTargetIsIso⟩ def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun _ _ f => βˆƒ h, @P _ _ f h #align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by delta AffineTargetMorphismProperty.toProperty; simp [*] #align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso f] [IsAffine Z] : P (f ≫ g) ↔ P g := by rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_left_isIso] #align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
104
106
theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso g] [IsAffine Z] [IsAffine Y] : P (f ≫ g) ↔ P f := by
rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_right_isIso]
1
2.718282
0
0.6
5
533
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option linter.uppercaseLean3 false universe u open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite noncomputable section namespace AlgebraicGeometry def AffineTargetMorphismProperty := βˆ€ ⦃X Y : Scheme⦄ (_ : X ⟢ Y) [IsAffine Y], Prop #align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty protected def Scheme.isIso : MorphismProperty Scheme := @IsIso Scheme _ #align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f #align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso instance : Inhabited AffineTargetMorphismProperty := ⟨Scheme.affineTargetIsIso⟩ def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun _ _ f => βˆƒ h, @P _ _ f h #align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by delta AffineTargetMorphismProperty.toProperty; simp [*] #align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso f] [IsAffine Z] : P (f ≫ g) ↔ P g := by rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_left_isIso] #align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso g] [IsAffine Z] [IsAffine Y] : P (f ≫ g) ↔ P f := by rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_right_isIso] #align algebraic_geometry.affine_cancel_right_is_iso AlgebraicGeometry.affine_cancel_right_isIso
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
109
116
theorem AffineTargetMorphismProperty.respectsIso_mk {P : AffineTargetMorphismProperty} (h₁ : βˆ€ {X Y Z} (e : X β‰… Y) (f : Y ⟢ Z) [IsAffine Z], P f β†’ P (e.hom ≫ f)) (hβ‚‚ : βˆ€ {X Y Z} (e : Y β‰… Z) (f : X ⟢ Y) [h : IsAffine Y], P f β†’ @P _ _ (f ≫ e.hom) (isAffineOfIso e.inv)) : P.toProperty.RespectsIso := by
constructor Β· rintro X Y Z e f ⟨a, h⟩; exact ⟨a, h₁ e f h⟩ Β· rintro X Y Z e f ⟨a, h⟩; exact ⟨isAffineOfIso e.inv, hβ‚‚ e f h⟩
3
20.085537
1
0.6
5
533
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Pullbacks import Mathlib.CategoryTheory.MorphismProperty.Limits import Mathlib.Data.List.TFAE #align_import algebraic_geometry.morphisms.basic from "leanprover-community/mathlib"@"434e2fd21c1900747afc6d13d8be7f4eedba7218" set_option linter.uppercaseLean3 false universe u open TopologicalSpace CategoryTheory CategoryTheory.Limits Opposite noncomputable section namespace AlgebraicGeometry def AffineTargetMorphismProperty := βˆ€ ⦃X Y : Scheme⦄ (_ : X ⟢ Y) [IsAffine Y], Prop #align algebraic_geometry.affine_target_morphism_property AlgebraicGeometry.AffineTargetMorphismProperty protected def Scheme.isIso : MorphismProperty Scheme := @IsIso Scheme _ #align algebraic_geometry.Scheme.is_iso AlgebraicGeometry.Scheme.isIso protected def Scheme.affineTargetIsIso : AffineTargetMorphismProperty := fun _ _ f _ => IsIso f #align algebraic_geometry.Scheme.affine_target_is_iso AlgebraicGeometry.Scheme.affineTargetIsIso instance : Inhabited AffineTargetMorphismProperty := ⟨Scheme.affineTargetIsIso⟩ def AffineTargetMorphismProperty.toProperty (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun _ _ f => βˆƒ h, @P _ _ f h #align algebraic_geometry.affine_target_morphism_property.to_property AlgebraicGeometry.AffineTargetMorphismProperty.toProperty theorem AffineTargetMorphismProperty.toProperty_apply (P : AffineTargetMorphismProperty) {X Y : Scheme} (f : X ⟢ Y) [i : IsAffine Y] : P.toProperty f ↔ P f := by delta AffineTargetMorphismProperty.toProperty; simp [*] #align algebraic_geometry.affine_target_morphism_property.to_property_apply AlgebraicGeometry.AffineTargetMorphismProperty.toProperty_apply theorem affine_cancel_left_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso f] [IsAffine Z] : P (f ≫ g) ↔ P g := by rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_left_isIso] #align algebraic_geometry.affine_cancel_left_is_iso AlgebraicGeometry.affine_cancel_left_isIso theorem affine_cancel_right_isIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) {X Y Z : Scheme} (f : X ⟢ Y) (g : Y ⟢ Z) [IsIso g] [IsAffine Z] [IsAffine Y] : P (f ≫ g) ↔ P f := by rw [← P.toProperty_apply, ← P.toProperty_apply, hP.cancel_right_isIso] #align algebraic_geometry.affine_cancel_right_is_iso AlgebraicGeometry.affine_cancel_right_isIso theorem AffineTargetMorphismProperty.respectsIso_mk {P : AffineTargetMorphismProperty} (h₁ : βˆ€ {X Y Z} (e : X β‰… Y) (f : Y ⟢ Z) [IsAffine Z], P f β†’ P (e.hom ≫ f)) (hβ‚‚ : βˆ€ {X Y Z} (e : Y β‰… Z) (f : X ⟢ Y) [h : IsAffine Y], P f β†’ @P _ _ (f ≫ e.hom) (isAffineOfIso e.inv)) : P.toProperty.RespectsIso := by constructor Β· rintro X Y Z e f ⟨a, h⟩; exact ⟨a, h₁ e f h⟩ Β· rintro X Y Z e f ⟨a, h⟩; exact ⟨isAffineOfIso e.inv, hβ‚‚ e f h⟩ #align algebraic_geometry.affine_target_morphism_property.respects_iso_mk AlgebraicGeometry.AffineTargetMorphismProperty.respectsIso_mk def targetAffineLocally (P : AffineTargetMorphismProperty) : MorphismProperty Scheme := fun {X Y : Scheme} (f : X ⟢ Y) => βˆ€ U : Y.affineOpens, @P _ _ (f ∣_ U) U.prop #align algebraic_geometry.target_affine_locally AlgebraicGeometry.targetAffineLocally theorem IsAffineOpen.map_isIso {X Y : Scheme} {U : Opens Y.carrier} (hU : IsAffineOpen U) (f : X ⟢ Y) [IsIso f] : IsAffineOpen ((Opens.map f.1.base).obj U) := haveI : IsAffine _ := hU isAffineOfIso (f ∣_ U) #align algebraic_geometry.is_affine_open.map_is_iso AlgebraicGeometry.IsAffineOpen.map_isIso
Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
131
141
theorem targetAffineLocally_respectsIso {P : AffineTargetMorphismProperty} (hP : P.toProperty.RespectsIso) : (targetAffineLocally P).RespectsIso := by
constructor · introv H U rw [morphismRestrict_comp, affine_cancel_left_isIso hP] exact H U · introv H rintro ⟨U, hU : IsAffineOpen U⟩; dsimp haveI : IsAffine _ := hU.map_isIso e.hom rw [morphismRestrict_comp, affine_cancel_right_isIso hP] exact H ⟨(Opens.map e.hom.val.base).obj U, hU.map_isIso e.hom⟩
9
8,103.083928
2
0.6
5
533
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚
Mathlib/Algebra/Polynomial/Eval.lean
48
49
theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by
rw [evalβ‚‚_def]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum
Mathlib/Algebra/Polynomial/Eval.lean
52
54
theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by
rintro rfl rfl rfl; rfl
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
58
61
theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by
simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true]
3
20.085537
1
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
65
65
theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by
simp [evalβ‚‚_eq_sum]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
69
69
theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by
simp [evalβ‚‚_eq_sum]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
73
73
theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by
simp [evalβ‚‚_eq_sum]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
77
78
theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by
simp [evalβ‚‚_eq_sum]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
82
85
theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by
rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp
3
20.085537
1
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
89
91
theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by
simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul]
2
7.389056
1
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
95
95
theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by
rw [← C_1, evalβ‚‚_C, f.map_one]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp] theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by rw [← C_1, evalβ‚‚_C, f.map_one] #align polynomial.evalβ‚‚_one Polynomial.evalβ‚‚_one set_option linter.deprecated false in @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
100
100
theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by
rw [bit0, evalβ‚‚_add, bit0]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp] theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by rw [← C_1, evalβ‚‚_C, f.map_one] #align polynomial.evalβ‚‚_one Polynomial.evalβ‚‚_one set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by rw [bit0, evalβ‚‚_add, bit0] #align polynomial.evalβ‚‚_bit0 Polynomial.evalβ‚‚_bit0 set_option linter.deprecated false in @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
105
106
theorem evalβ‚‚_bit1 : (bit1 p).evalβ‚‚ f x = bit1 (p.evalβ‚‚ f x) := by
rw [bit1, evalβ‚‚_add, evalβ‚‚_bit0, evalβ‚‚_one, bit1]
1
2.718282
0
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp] theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by rw [← C_1, evalβ‚‚_C, f.map_one] #align polynomial.evalβ‚‚_one Polynomial.evalβ‚‚_one set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by rw [bit0, evalβ‚‚_add, bit0] #align polynomial.evalβ‚‚_bit0 Polynomial.evalβ‚‚_bit0 set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit1 : (bit1 p).evalβ‚‚ f x = bit1 (p.evalβ‚‚ f x) := by rw [bit1, evalβ‚‚_add, evalβ‚‚_bit0, evalβ‚‚_one, bit1] #align polynomial.evalβ‚‚_bit1 Polynomial.evalβ‚‚_bit1 @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
110
115
theorem evalβ‚‚_smul (g : R β†’+* S) (p : R[X]) (x : S) {s : R} : evalβ‚‚ g x (s β€’ p) = g s * evalβ‚‚ g x p := by
have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _ have B : (s β€’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A rw [evalβ‚‚_eq_sum, evalβ‚‚_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;> simp [mul_sum, mul_assoc]
4
54.59815
2
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp] theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by rw [← C_1, evalβ‚‚_C, f.map_one] #align polynomial.evalβ‚‚_one Polynomial.evalβ‚‚_one set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by rw [bit0, evalβ‚‚_add, bit0] #align polynomial.evalβ‚‚_bit0 Polynomial.evalβ‚‚_bit0 set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit1 : (bit1 p).evalβ‚‚ f x = bit1 (p.evalβ‚‚ f x) := by rw [bit1, evalβ‚‚_add, evalβ‚‚_bit0, evalβ‚‚_one, bit1] #align polynomial.evalβ‚‚_bit1 Polynomial.evalβ‚‚_bit1 @[simp] theorem evalβ‚‚_smul (g : R β†’+* S) (p : R[X]) (x : S) {s : R} : evalβ‚‚ g x (s β€’ p) = g s * evalβ‚‚ g x p := by have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _ have B : (s β€’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A rw [evalβ‚‚_eq_sum, evalβ‚‚_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;> simp [mul_sum, mul_assoc] #align polynomial.evalβ‚‚_smul Polynomial.evalβ‚‚_smul @[simp] theorem evalβ‚‚_C_X : evalβ‚‚ C X p = p := Polynomial.induction_on' p (fun p q hp hq => by simp [hp, hq]) fun n x => by rw [evalβ‚‚_monomial, ← smul_X_eq_monomial, C_mul'] #align polynomial.evalβ‚‚_C_X Polynomial.evalβ‚‚_C_X @[simps] def evalβ‚‚AddMonoidHom : R[X] β†’+ S where toFun := evalβ‚‚ f x map_zero' := evalβ‚‚_zero _ _ map_add' _ _ := evalβ‚‚_add _ _ #align polynomial.evalβ‚‚_add_monoid_hom Polynomial.evalβ‚‚AddMonoidHom #align polynomial.evalβ‚‚_add_monoid_hom_apply Polynomial.evalβ‚‚AddMonoidHom_apply @[simp]
Mathlib/Algebra/Polynomial/Eval.lean
135
139
theorem evalβ‚‚_natCast (n : β„•) : (n : R[X]).evalβ‚‚ f x = n := by
induction' n with n ih -- Porting note: `Nat.zero_eq` is required. Β· simp only [evalβ‚‚_zero, Nat.cast_zero, Nat.zero_eq] Β· rw [n.cast_succ, evalβ‚‚_add, ih, evalβ‚‚_one, n.cast_succ]
4
54.59815
2
0.6
15
534
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polynomial.eval from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" set_option linter.uppercaseLean3 false noncomputable section open Finset AddMonoidAlgebra open Polynomial namespace Polynomial universe u v w y variable {R : Type u} {S : Type v} {T : Type w} {ΞΉ : Type y} {a b : R} {m n : β„•} section Semiring variable [Semiring R] {p q r : R[X]} section variable [Semiring S] variable (f : R β†’+* S) (x : S) irreducible_def evalβ‚‚ (p : R[X]) : S := p.sum fun e a => f a * x ^ e #align polynomial.evalβ‚‚ Polynomial.evalβ‚‚ theorem evalβ‚‚_eq_sum {f : R β†’+* S} {x : S} : p.evalβ‚‚ f x = p.sum fun e a => f a * x ^ e := by rw [evalβ‚‚_def] #align polynomial.evalβ‚‚_eq_sum Polynomial.evalβ‚‚_eq_sum theorem evalβ‚‚_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R β†’+* S} {s t : S} {Ο† ψ : R[X]} : f = g β†’ s = t β†’ Ο† = ψ β†’ evalβ‚‚ f s Ο† = evalβ‚‚ g t ψ := by rintro rfl rfl rfl; rfl #align polynomial.evalβ‚‚_congr Polynomial.evalβ‚‚_congr @[simp] theorem evalβ‚‚_at_zero : p.evalβ‚‚ f 0 = f (coeff p 0) := by simp (config := { contextual := true }) only [evalβ‚‚_eq_sum, zero_pow_eq, mul_ite, mul_zero, mul_one, sum, Classical.not_not, mem_support_iff, sum_ite_eq', ite_eq_left_iff, RingHom.map_zero, imp_true_iff, eq_self_iff_true] #align polynomial.evalβ‚‚_at_zero Polynomial.evalβ‚‚_at_zero @[simp] theorem evalβ‚‚_zero : (0 : R[X]).evalβ‚‚ f x = 0 := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_zero Polynomial.evalβ‚‚_zero @[simp] theorem evalβ‚‚_C : (C a).evalβ‚‚ f x = f a := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_C Polynomial.evalβ‚‚_C @[simp] theorem evalβ‚‚_X : X.evalβ‚‚ f x = x := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_X Polynomial.evalβ‚‚_X @[simp] theorem evalβ‚‚_monomial {n : β„•} {r : R} : (monomial n r).evalβ‚‚ f x = f r * x ^ n := by simp [evalβ‚‚_eq_sum] #align polynomial.evalβ‚‚_monomial Polynomial.evalβ‚‚_monomial @[simp] theorem evalβ‚‚_X_pow {n : β„•} : (X ^ n).evalβ‚‚ f x = x ^ n := by rw [X_pow_eq_monomial] convert evalβ‚‚_monomial f x (n := n) (r := 1) simp #align polynomial.evalβ‚‚_X_pow Polynomial.evalβ‚‚_X_pow @[simp] theorem evalβ‚‚_add : (p + q).evalβ‚‚ f x = p.evalβ‚‚ f x + q.evalβ‚‚ f x := by simp only [evalβ‚‚_eq_sum] apply sum_add_index <;> simp [add_mul] #align polynomial.evalβ‚‚_add Polynomial.evalβ‚‚_add @[simp] theorem evalβ‚‚_one : (1 : R[X]).evalβ‚‚ f x = 1 := by rw [← C_1, evalβ‚‚_C, f.map_one] #align polynomial.evalβ‚‚_one Polynomial.evalβ‚‚_one set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit0 : (bit0 p).evalβ‚‚ f x = bit0 (p.evalβ‚‚ f x) := by rw [bit0, evalβ‚‚_add, bit0] #align polynomial.evalβ‚‚_bit0 Polynomial.evalβ‚‚_bit0 set_option linter.deprecated false in @[simp] theorem evalβ‚‚_bit1 : (bit1 p).evalβ‚‚ f x = bit1 (p.evalβ‚‚ f x) := by rw [bit1, evalβ‚‚_add, evalβ‚‚_bit0, evalβ‚‚_one, bit1] #align polynomial.evalβ‚‚_bit1 Polynomial.evalβ‚‚_bit1 @[simp] theorem evalβ‚‚_smul (g : R β†’+* S) (p : R[X]) (x : S) {s : R} : evalβ‚‚ g x (s β€’ p) = g s * evalβ‚‚ g x p := by have A : p.natDegree < p.natDegree.succ := Nat.lt_succ_self _ have B : (s β€’ p).natDegree < p.natDegree.succ := (natDegree_smul_le _ _).trans_lt A rw [evalβ‚‚_eq_sum, evalβ‚‚_eq_sum, sum_over_range' _ _ _ A, sum_over_range' _ _ _ B] <;> simp [mul_sum, mul_assoc] #align polynomial.evalβ‚‚_smul Polynomial.evalβ‚‚_smul @[simp] theorem evalβ‚‚_C_X : evalβ‚‚ C X p = p := Polynomial.induction_on' p (fun p q hp hq => by simp [hp, hq]) fun n x => by rw [evalβ‚‚_monomial, ← smul_X_eq_monomial, C_mul'] #align polynomial.evalβ‚‚_C_X Polynomial.evalβ‚‚_C_X @[simps] def evalβ‚‚AddMonoidHom : R[X] β†’+ S where toFun := evalβ‚‚ f x map_zero' := evalβ‚‚_zero _ _ map_add' _ _ := evalβ‚‚_add _ _ #align polynomial.evalβ‚‚_add_monoid_hom Polynomial.evalβ‚‚AddMonoidHom #align polynomial.evalβ‚‚_add_monoid_hom_apply Polynomial.evalβ‚‚AddMonoidHom_apply @[simp] theorem evalβ‚‚_natCast (n : β„•) : (n : R[X]).evalβ‚‚ f x = n := by induction' n with n ih -- Porting note: `Nat.zero_eq` is required. Β· simp only [evalβ‚‚_zero, Nat.cast_zero, Nat.zero_eq] Β· rw [n.cast_succ, evalβ‚‚_add, ih, evalβ‚‚_one, n.cast_succ] #align polynomial.evalβ‚‚_nat_cast Polynomial.evalβ‚‚_natCast @[deprecated (since := "2024-04-17")] alias evalβ‚‚_nat_cast := evalβ‚‚_natCast -- See note [no_index around OfNat.ofNat] @[simp] lemma evalβ‚‚_ofNat {S : Type*} [Semiring S] (n : β„•) [n.AtLeastTwo] (f : R β†’+* S) (a : S) : (no_index (OfNat.ofNat n : R[X])).evalβ‚‚ f a = OfNat.ofNat n := by simp [OfNat.ofNat] variable [Semiring T]
Mathlib/Algebra/Polynomial/Eval.lean
153
161
theorem evalβ‚‚_sum (p : T[X]) (g : β„• β†’ T β†’ R[X]) (x : S) : (p.sum g).evalβ‚‚ f x = p.sum fun n a => (g n a).evalβ‚‚ f x := by
let T : R[X] β†’+ S := { toFun := evalβ‚‚ f x map_zero' := evalβ‚‚_zero _ _ map_add' := fun p q => evalβ‚‚_add _ _ } have A : βˆ€ y, evalβ‚‚ f x y = T y := fun y => rfl simp only [A] rw [sum, map_sum, sum]
7
1,096.633158
2
0.6
15
534
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp]
Mathlib/Data/List/OfFn.lean
39
40
theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by
induction i generalizing j <;> simp_all [ofFn.go]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp]
Mathlib/Data/List/OfFn.lean
44
45
theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by
simp [ofFn, length_ofFn_go]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux
Mathlib/Data/List/OfFn.lean
50
54
theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by
let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega
3
20.085537
1
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp]
Mathlib/Data/List/OfFn.lean
58
59
theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by
cases i; simp [ofFn, get_ofFn_go]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")]
Mathlib/Data/List/OfFn.lean
75
77
theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by
simp [nthLe]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by simp [nthLe] #align list.nth_le_of_fn List.nthLe_ofFn set_option linter.deprecated false in @[simp, deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn' {n} (f : Fin n β†’ Ξ±) {i : β„•} (h : i < (ofFn f).length) : nthLe (ofFn f) i h = f ⟨i, length_ofFn f β–Έ h⟩ := nthLe_ofFn f ⟨i, length_ofFn f β–Έ h⟩ #align list.nth_le_of_fn' List.nthLe_ofFn' @[simp] theorem map_ofFn {Ξ² : Type*} {n : β„•} (f : Fin n β†’ Ξ±) (g : Ξ± β†’ Ξ²) : map g (ofFn f) = ofFn (g ∘ f) := ext_get (by simp) fun i h h' => by simp #align list.map_of_fn List.map_ofFn -- Porting note: we don't have Array' in mathlib4 -- -- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read := -- by -- suffices βˆ€ {m h l}, DArray.revIterateAux a (fun i => cons) m h l = -- ofFnAux (DArray.read a) m h l -- from this -- intros; induction' m with m IH generalizing l; Β· rfl -- simp only [DArray.revIterateAux, of_fn_aux, IH] -- #align list.array_eq_of_fn List.array_eq_of_fn @[congr]
Mathlib/Data/List/OfFn.lean
105
108
theorem ofFn_congr {m n : β„•} (h : m = n) (f : Fin m β†’ Ξ±) : ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by
subst h simp_rw [Fin.cast_refl, id]
2
7.389056
1
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by simp [nthLe] #align list.nth_le_of_fn List.nthLe_ofFn set_option linter.deprecated false in @[simp, deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn' {n} (f : Fin n β†’ Ξ±) {i : β„•} (h : i < (ofFn f).length) : nthLe (ofFn f) i h = f ⟨i, length_ofFn f β–Έ h⟩ := nthLe_ofFn f ⟨i, length_ofFn f β–Έ h⟩ #align list.nth_le_of_fn' List.nthLe_ofFn' @[simp] theorem map_ofFn {Ξ² : Type*} {n : β„•} (f : Fin n β†’ Ξ±) (g : Ξ± β†’ Ξ²) : map g (ofFn f) = ofFn (g ∘ f) := ext_get (by simp) fun i h h' => by simp #align list.map_of_fn List.map_ofFn -- Porting note: we don't have Array' in mathlib4 -- -- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read := -- by -- suffices βˆ€ {m h l}, DArray.revIterateAux a (fun i => cons) m h l = -- ofFnAux (DArray.read a) m h l -- from this -- intros; induction' m with m IH generalizing l; Β· rfl -- simp only [DArray.revIterateAux, of_fn_aux, IH] -- #align list.array_eq_of_fn List.array_eq_of_fn @[congr] theorem ofFn_congr {m n : β„•} (h : m = n) (f : Fin m β†’ Ξ±) : ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by subst h simp_rw [Fin.cast_refl, id] #align list.of_fn_congr List.ofFn_congr @[simp] theorem ofFn_zero (f : Fin 0 β†’ Ξ±) : ofFn f = [] := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by contradiction) #align list.of_fn_zero List.ofFn_zero @[simp] theorem ofFn_succ {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by cases i Β· simp; rfl Β· simp) #align list.of_fn_succ List.ofFn_succ
Mathlib/Data/List/OfFn.lean
125
131
theorem ofFn_succ' {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by
induction' n with n IH Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero] rfl Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero] congr
5
148.413159
2
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by simp [nthLe] #align list.nth_le_of_fn List.nthLe_ofFn set_option linter.deprecated false in @[simp, deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn' {n} (f : Fin n β†’ Ξ±) {i : β„•} (h : i < (ofFn f).length) : nthLe (ofFn f) i h = f ⟨i, length_ofFn f β–Έ h⟩ := nthLe_ofFn f ⟨i, length_ofFn f β–Έ h⟩ #align list.nth_le_of_fn' List.nthLe_ofFn' @[simp] theorem map_ofFn {Ξ² : Type*} {n : β„•} (f : Fin n β†’ Ξ±) (g : Ξ± β†’ Ξ²) : map g (ofFn f) = ofFn (g ∘ f) := ext_get (by simp) fun i h h' => by simp #align list.map_of_fn List.map_ofFn -- Porting note: we don't have Array' in mathlib4 -- -- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read := -- by -- suffices βˆ€ {m h l}, DArray.revIterateAux a (fun i => cons) m h l = -- ofFnAux (DArray.read a) m h l -- from this -- intros; induction' m with m IH generalizing l; Β· rfl -- simp only [DArray.revIterateAux, of_fn_aux, IH] -- #align list.array_eq_of_fn List.array_eq_of_fn @[congr] theorem ofFn_congr {m n : β„•} (h : m = n) (f : Fin m β†’ Ξ±) : ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by subst h simp_rw [Fin.cast_refl, id] #align list.of_fn_congr List.ofFn_congr @[simp] theorem ofFn_zero (f : Fin 0 β†’ Ξ±) : ofFn f = [] := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by contradiction) #align list.of_fn_zero List.ofFn_zero @[simp] theorem ofFn_succ {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by cases i Β· simp; rfl Β· simp) #align list.of_fn_succ List.ofFn_succ theorem ofFn_succ' {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by induction' n with n IH Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero] rfl Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero] congr #align list.of_fn_succ' List.ofFn_succ' @[simp]
Mathlib/Data/List/OfFn.lean
135
136
theorem ofFn_eq_nil_iff {n : β„•} {f : Fin n β†’ Ξ±} : ofFn f = [] ↔ n = 0 := by
cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by simp [nthLe] #align list.nth_le_of_fn List.nthLe_ofFn set_option linter.deprecated false in @[simp, deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn' {n} (f : Fin n β†’ Ξ±) {i : β„•} (h : i < (ofFn f).length) : nthLe (ofFn f) i h = f ⟨i, length_ofFn f β–Έ h⟩ := nthLe_ofFn f ⟨i, length_ofFn f β–Έ h⟩ #align list.nth_le_of_fn' List.nthLe_ofFn' @[simp] theorem map_ofFn {Ξ² : Type*} {n : β„•} (f : Fin n β†’ Ξ±) (g : Ξ± β†’ Ξ²) : map g (ofFn f) = ofFn (g ∘ f) := ext_get (by simp) fun i h h' => by simp #align list.map_of_fn List.map_ofFn -- Porting note: we don't have Array' in mathlib4 -- -- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read := -- by -- suffices βˆ€ {m h l}, DArray.revIterateAux a (fun i => cons) m h l = -- ofFnAux (DArray.read a) m h l -- from this -- intros; induction' m with m IH generalizing l; Β· rfl -- simp only [DArray.revIterateAux, of_fn_aux, IH] -- #align list.array_eq_of_fn List.array_eq_of_fn @[congr] theorem ofFn_congr {m n : β„•} (h : m = n) (f : Fin m β†’ Ξ±) : ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by subst h simp_rw [Fin.cast_refl, id] #align list.of_fn_congr List.ofFn_congr @[simp] theorem ofFn_zero (f : Fin 0 β†’ Ξ±) : ofFn f = [] := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by contradiction) #align list.of_fn_zero List.ofFn_zero @[simp] theorem ofFn_succ {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by cases i Β· simp; rfl Β· simp) #align list.of_fn_succ List.ofFn_succ theorem ofFn_succ' {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by induction' n with n IH Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero] rfl Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero] congr #align list.of_fn_succ' List.ofFn_succ' @[simp] theorem ofFn_eq_nil_iff {n : β„•} {f : Fin n β†’ Ξ±} : ofFn f = [] ↔ n = 0 := by cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero] #align list.of_fn_eq_nil_iff List.ofFn_eq_nil_iff
Mathlib/Data/List/OfFn.lean
139
141
theorem last_ofFn {n : β„•} (f : Fin n β†’ Ξ±) (h : ofFn f β‰  []) (hn : n - 1 < n := Nat.pred_lt <| ofFn_eq_nil_iff.not.mp h) : getLast (ofFn f) h = f ⟨n - 1, hn⟩ := by
simp [getLast_eq_get]
1
2.718282
0
0.6
10
535
import Mathlib.Data.Fin.Tuple.Basic import Mathlib.Data.List.Join #align_import data.list.of_fn from "leanprover-community/mathlib"@"bf27744463e9620ca4e4ebe951fe83530ae6949b" universe u variable {Ξ± : Type u} open Nat namespace List #noalign list.length_of_fn_aux @[simp] theorem length_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) : length (ofFn.go f i j h) = i := by induction i generalizing j <;> simp_all [ofFn.go] @[simp] theorem length_ofFn {n} (f : Fin n β†’ Ξ±) : length (ofFn f) = n := by simp [ofFn, length_ofFn_go] #align list.length_of_fn List.length_ofFn #noalign list.nth_of_fn_aux theorem get_ofFn_go {n} (f : Fin n β†’ Ξ±) (i j h) (k) (hk) : get (ofFn.go f i j h) ⟨k, hk⟩ = f ⟨j + k, by simp at hk; omega⟩ := by let i+1 := i cases k <;> simp [ofFn.go, get_ofFn_go (i := i)] congr 2; omega -- Porting note (#10756): new theorem @[simp] theorem get_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get (ofFn f) i = f (Fin.cast (by simp) i) := by cases i; simp [ofFn, get_ofFn_go] @[simp] theorem get?_ofFn {n} (f : Fin n β†’ Ξ±) (i) : get? (ofFn f) i = ofFnNthVal f i := if h : i < (ofFn f).length then by rw [get?_eq_get h, get_ofFn] Β· simp only [length_ofFn] at h; simp [ofFnNthVal, h] else by rw [ofFnNthVal, dif_neg] <;> simpa using h #align list.nth_of_fn List.get?_ofFn set_option linter.deprecated false in @[deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn {n} (f : Fin n β†’ Ξ±) (i : Fin n) : nthLe (ofFn f) i ((length_ofFn f).symm β–Έ i.2) = f i := by simp [nthLe] #align list.nth_le_of_fn List.nthLe_ofFn set_option linter.deprecated false in @[simp, deprecated get_ofFn (since := "2023-01-17")] theorem nthLe_ofFn' {n} (f : Fin n β†’ Ξ±) {i : β„•} (h : i < (ofFn f).length) : nthLe (ofFn f) i h = f ⟨i, length_ofFn f β–Έ h⟩ := nthLe_ofFn f ⟨i, length_ofFn f β–Έ h⟩ #align list.nth_le_of_fn' List.nthLe_ofFn' @[simp] theorem map_ofFn {Ξ² : Type*} {n : β„•} (f : Fin n β†’ Ξ±) (g : Ξ± β†’ Ξ²) : map g (ofFn f) = ofFn (g ∘ f) := ext_get (by simp) fun i h h' => by simp #align list.map_of_fn List.map_ofFn -- Porting note: we don't have Array' in mathlib4 -- -- theorem array_eq_of_fn {n} (a : Array' n Ξ±) : a.toList = ofFn a.read := -- by -- suffices βˆ€ {m h l}, DArray.revIterateAux a (fun i => cons) m h l = -- ofFnAux (DArray.read a) m h l -- from this -- intros; induction' m with m IH generalizing l; Β· rfl -- simp only [DArray.revIterateAux, of_fn_aux, IH] -- #align list.array_eq_of_fn List.array_eq_of_fn @[congr] theorem ofFn_congr {m n : β„•} (h : m = n) (f : Fin m β†’ Ξ±) : ofFn f = ofFn fun i : Fin n => f (Fin.cast h.symm i) := by subst h simp_rw [Fin.cast_refl, id] #align list.of_fn_congr List.ofFn_congr @[simp] theorem ofFn_zero (f : Fin 0 β†’ Ξ±) : ofFn f = [] := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by contradiction) #align list.of_fn_zero List.ofFn_zero @[simp] theorem ofFn_succ {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = f 0 :: ofFn fun i => f i.succ := ext_get (by simp) (fun i hi₁ hiβ‚‚ => by cases i Β· simp; rfl Β· simp) #align list.of_fn_succ List.ofFn_succ theorem ofFn_succ' {n} (f : Fin (succ n) β†’ Ξ±) : ofFn f = (ofFn fun i => f (Fin.castSucc i)).concat (f (Fin.last _)) := by induction' n with n IH Β· rw [ofFn_zero, concat_nil, ofFn_succ, ofFn_zero] rfl Β· rw [ofFn_succ, IH, ofFn_succ, concat_cons, Fin.castSucc_zero] congr #align list.of_fn_succ' List.ofFn_succ' @[simp] theorem ofFn_eq_nil_iff {n : β„•} {f : Fin n β†’ Ξ±} : ofFn f = [] ↔ n = 0 := by cases n <;> simp only [ofFn_zero, ofFn_succ, eq_self_iff_true, Nat.succ_ne_zero] #align list.of_fn_eq_nil_iff List.ofFn_eq_nil_iff theorem last_ofFn {n : β„•} (f : Fin n β†’ Ξ±) (h : ofFn f β‰  []) (hn : n - 1 < n := Nat.pred_lt <| ofFn_eq_nil_iff.not.mp h) : getLast (ofFn f) h = f ⟨n - 1, hn⟩ := by simp [getLast_eq_get] #align list.last_of_fn List.last_ofFn theorem last_ofFn_succ {n : β„•} (f : Fin n.succ β†’ Ξ±) (h : ofFn f β‰  [] := mt ofFn_eq_nil_iff.mp (Nat.succ_ne_zero _)) : getLast (ofFn f) h = f (Fin.last _) := last_ofFn f h #align list.last_of_fn_succ List.last_ofFn_succ
Mathlib/Data/List/OfFn.lean
151
158
theorem ofFn_add {m n} (f : Fin (m + n) β†’ Ξ±) : List.ofFn f = (List.ofFn fun i => f (Fin.castAdd n i)) ++ List.ofFn fun j => f (Fin.natAdd m j) := by
induction' n with n IH Β· rw [ofFn_zero, append_nil, Fin.castAdd_zero, Fin.cast_refl] rfl Β· rw [ofFn_succ', ofFn_succ', IH, append_concat] rfl
5
148.413159
2
0.6
10
535
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] section variable (T) def Arrow := Comma.{v, v, v} (𝟭 T) (𝟭 T) #align category_theory.arrow CategoryTheory.Arrow instance : Category (Arrow T) := commaCategory -- Satisfying the inhabited linter instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where default := show Comma (𝟭 T) (𝟭 T) from default #align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited end namespace Arrow @[ext] lemma hom_ext {X Y : Arrow T} (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left (f : Arrow T) : CommaMorphism.left (πŸ™ f) = πŸ™ f.left := rfl #align category_theory.arrow.id_left CategoryTheory.Arrow.id_left @[simp] theorem id_right (f : Arrow T) : CommaMorphism.right (πŸ™ f) = πŸ™ f.right := rfl #align category_theory.arrow.id_right CategoryTheory.Arrow.id_right -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_left {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).left = f.left ≫ g.left := rfl -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_right {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).right = f.right ≫ g.right := rfl @[simps] def mk {X Y : T} (f : X ⟢ Y) : Arrow T where left := X right := Y hom := f #align category_theory.arrow.mk CategoryTheory.Arrow.mk @[simp]
Mathlib/CategoryTheory/Comma/Arrow.lean
86
88
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f rfl
2
7.389056
1
0.6
5
536
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] section variable (T) def Arrow := Comma.{v, v, v} (𝟭 T) (𝟭 T) #align category_theory.arrow CategoryTheory.Arrow instance : Category (Arrow T) := commaCategory -- Satisfying the inhabited linter instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where default := show Comma (𝟭 T) (𝟭 T) from default #align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited end namespace Arrow @[ext] lemma hom_ext {X Y : Arrow T} (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left (f : Arrow T) : CommaMorphism.left (πŸ™ f) = πŸ™ f.left := rfl #align category_theory.arrow.id_left CategoryTheory.Arrow.id_left @[simp] theorem id_right (f : Arrow T) : CommaMorphism.right (πŸ™ f) = πŸ™ f.right := rfl #align category_theory.arrow.id_right CategoryTheory.Arrow.id_right -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_left {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).left = f.left ≫ g.left := rfl -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_right {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).right = f.right ≫ g.right := rfl @[simps] def mk {X Y : T} (f : X ⟢ Y) : Arrow T where left := X right := Y hom := f #align category_theory.arrow.mk CategoryTheory.Arrow.mk @[simp] theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by cases f rfl #align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq theorem mk_injective (A B : T) : Function.Injective (Arrow.mk : (A ⟢ B) β†’ Arrow T) := fun f g h => by cases h rfl #align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective theorem mk_inj (A B : T) {f g : A ⟢ B} : Arrow.mk f = Arrow.mk g ↔ f = g := (mk_injective A B).eq_iff #align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj instance {X Y : T} : CoeOut (X ⟢ Y) (Arrow T) where coe := mk @[simps] def homMk {f g : Arrow T} {u : f.left ⟢ g.left} {v : f.right ⟢ g.right} (w : u ≫ g.hom = f.hom ≫ v) : f ⟢ g where left := u right := v w := w #align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk @[simps] def homMk' {X Y : T} {f : X ⟢ Y} {P Q : T} {g : P ⟢ Q} {u : X ⟢ P} {v : Y ⟢ Q} (w : u ≫ g = f ≫ v) : Arrow.mk f ⟢ Arrow.mk g where left := u right := v w := w #align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk' @[reassoc (attr := simp, nolint simpNF)] theorem w {f g : Arrow T} (sq : f ⟢ g) : sq.left ≫ g.hom = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w CategoryTheory.Arrow.w -- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`. @[reassoc (attr := simp)] theorem w_mk_right {f : Arrow T} {X Y : T} {g : X ⟢ Y} (sq : f ⟢ mk g) : sq.left ≫ g = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right
Mathlib/CategoryTheory/Comma/Arrow.lean
138
143
theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f ⟢ g) [IsIso ff.left] [IsIso ff.right] : IsIso ff where out := by
let inverse : g ⟢ f := ⟨inv ff.left, inv ff.right, (by simp)⟩ apply Exists.intro inverse aesop_cat
3
20.085537
1
0.6
5
536
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] section variable (T) def Arrow := Comma.{v, v, v} (𝟭 T) (𝟭 T) #align category_theory.arrow CategoryTheory.Arrow instance : Category (Arrow T) := commaCategory -- Satisfying the inhabited linter instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where default := show Comma (𝟭 T) (𝟭 T) from default #align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited end namespace Arrow @[ext] lemma hom_ext {X Y : Arrow T} (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left (f : Arrow T) : CommaMorphism.left (πŸ™ f) = πŸ™ f.left := rfl #align category_theory.arrow.id_left CategoryTheory.Arrow.id_left @[simp] theorem id_right (f : Arrow T) : CommaMorphism.right (πŸ™ f) = πŸ™ f.right := rfl #align category_theory.arrow.id_right CategoryTheory.Arrow.id_right -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_left {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).left = f.left ≫ g.left := rfl -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_right {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).right = f.right ≫ g.right := rfl @[simps] def mk {X Y : T} (f : X ⟢ Y) : Arrow T where left := X right := Y hom := f #align category_theory.arrow.mk CategoryTheory.Arrow.mk @[simp] theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by cases f rfl #align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq theorem mk_injective (A B : T) : Function.Injective (Arrow.mk : (A ⟢ B) β†’ Arrow T) := fun f g h => by cases h rfl #align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective theorem mk_inj (A B : T) {f g : A ⟢ B} : Arrow.mk f = Arrow.mk g ↔ f = g := (mk_injective A B).eq_iff #align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj instance {X Y : T} : CoeOut (X ⟢ Y) (Arrow T) where coe := mk @[simps] def homMk {f g : Arrow T} {u : f.left ⟢ g.left} {v : f.right ⟢ g.right} (w : u ≫ g.hom = f.hom ≫ v) : f ⟢ g where left := u right := v w := w #align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk @[simps] def homMk' {X Y : T} {f : X ⟢ Y} {P Q : T} {g : P ⟢ Q} {u : X ⟢ P} {v : Y ⟢ Q} (w : u ≫ g = f ≫ v) : Arrow.mk f ⟢ Arrow.mk g where left := u right := v w := w #align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk' @[reassoc (attr := simp, nolint simpNF)] theorem w {f g : Arrow T} (sq : f ⟢ g) : sq.left ≫ g.hom = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w CategoryTheory.Arrow.w -- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`. @[reassoc (attr := simp)] theorem w_mk_right {f : Arrow T} {X Y : T} {g : X ⟢ Y} (sq : f ⟢ mk g) : sq.left ≫ g = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f ⟢ g) [IsIso ff.left] [IsIso ff.right] : IsIso ff where out := by let inverse : g ⟢ f := ⟨inv ff.left, inv ff.right, (by simp)⟩ apply Exists.intro inverse aesop_cat #align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right @[simps!] def isoMk {f g : Arrow T} (l : f.left β‰… g.left) (r : f.right β‰… g.right) (h : l.hom ≫ g.hom = f.hom ≫ r.hom := by aesop_cat) : f β‰… g := Comma.isoMk l r h #align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk abbrev isoMk' {W X Y Z : T} (f : W ⟢ X) (g : Y ⟢ Z) (e₁ : W β‰… Y) (eβ‚‚ : X β‰… Z) (h : e₁.hom ≫ g = f ≫ eβ‚‚.hom := by aesop_cat) : Arrow.mk f β‰… Arrow.mk g := Arrow.isoMk e₁ eβ‚‚ h #align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk'
Mathlib/CategoryTheory/Comma/Arrow.lean
162
163
theorem hom.congr_left {f g : Arrow T} {φ₁ Ο†β‚‚ : f ⟢ g} (h : φ₁ = Ο†β‚‚) : φ₁.left = Ο†β‚‚.left := by
rw [h]
1
2.718282
0
0.6
5
536
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] section variable (T) def Arrow := Comma.{v, v, v} (𝟭 T) (𝟭 T) #align category_theory.arrow CategoryTheory.Arrow instance : Category (Arrow T) := commaCategory -- Satisfying the inhabited linter instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where default := show Comma (𝟭 T) (𝟭 T) from default #align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited end namespace Arrow @[ext] lemma hom_ext {X Y : Arrow T} (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left (f : Arrow T) : CommaMorphism.left (πŸ™ f) = πŸ™ f.left := rfl #align category_theory.arrow.id_left CategoryTheory.Arrow.id_left @[simp] theorem id_right (f : Arrow T) : CommaMorphism.right (πŸ™ f) = πŸ™ f.right := rfl #align category_theory.arrow.id_right CategoryTheory.Arrow.id_right -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_left {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).left = f.left ≫ g.left := rfl -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_right {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).right = f.right ≫ g.right := rfl @[simps] def mk {X Y : T} (f : X ⟢ Y) : Arrow T where left := X right := Y hom := f #align category_theory.arrow.mk CategoryTheory.Arrow.mk @[simp] theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by cases f rfl #align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq theorem mk_injective (A B : T) : Function.Injective (Arrow.mk : (A ⟢ B) β†’ Arrow T) := fun f g h => by cases h rfl #align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective theorem mk_inj (A B : T) {f g : A ⟢ B} : Arrow.mk f = Arrow.mk g ↔ f = g := (mk_injective A B).eq_iff #align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj instance {X Y : T} : CoeOut (X ⟢ Y) (Arrow T) where coe := mk @[simps] def homMk {f g : Arrow T} {u : f.left ⟢ g.left} {v : f.right ⟢ g.right} (w : u ≫ g.hom = f.hom ≫ v) : f ⟢ g where left := u right := v w := w #align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk @[simps] def homMk' {X Y : T} {f : X ⟢ Y} {P Q : T} {g : P ⟢ Q} {u : X ⟢ P} {v : Y ⟢ Q} (w : u ≫ g = f ≫ v) : Arrow.mk f ⟢ Arrow.mk g where left := u right := v w := w #align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk' @[reassoc (attr := simp, nolint simpNF)] theorem w {f g : Arrow T} (sq : f ⟢ g) : sq.left ≫ g.hom = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w CategoryTheory.Arrow.w -- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`. @[reassoc (attr := simp)] theorem w_mk_right {f : Arrow T} {X Y : T} {g : X ⟢ Y} (sq : f ⟢ mk g) : sq.left ≫ g = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f ⟢ g) [IsIso ff.left] [IsIso ff.right] : IsIso ff where out := by let inverse : g ⟢ f := ⟨inv ff.left, inv ff.right, (by simp)⟩ apply Exists.intro inverse aesop_cat #align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right @[simps!] def isoMk {f g : Arrow T} (l : f.left β‰… g.left) (r : f.right β‰… g.right) (h : l.hom ≫ g.hom = f.hom ≫ r.hom := by aesop_cat) : f β‰… g := Comma.isoMk l r h #align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk abbrev isoMk' {W X Y Z : T} (f : W ⟢ X) (g : Y ⟢ Z) (e₁ : W β‰… Y) (eβ‚‚ : X β‰… Z) (h : e₁.hom ≫ g = f ≫ eβ‚‚.hom := by aesop_cat) : Arrow.mk f β‰… Arrow.mk g := Arrow.isoMk e₁ eβ‚‚ h #align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk' theorem hom.congr_left {f g : Arrow T} {φ₁ Ο†β‚‚ : f ⟢ g} (h : φ₁ = Ο†β‚‚) : φ₁.left = Ο†β‚‚.left := by rw [h] #align category_theory.arrow.hom.congr_left CategoryTheory.Arrow.hom.congr_left @[simp]
Mathlib/CategoryTheory/Comma/Arrow.lean
167
168
theorem hom.congr_right {f g : Arrow T} {φ₁ Ο†β‚‚ : f ⟢ g} (h : φ₁ = Ο†β‚‚) : φ₁.right = Ο†β‚‚.right := by
rw [h]
1
2.718282
0
0.6
5
536
import Mathlib.CategoryTheory.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" namespace CategoryTheory universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. variable {T : Type u} [Category.{v} T] section variable (T) def Arrow := Comma.{v, v, v} (𝟭 T) (𝟭 T) #align category_theory.arrow CategoryTheory.Arrow instance : Category (Arrow T) := commaCategory -- Satisfying the inhabited linter instance Arrow.inhabited [Inhabited T] : Inhabited (Arrow T) where default := show Comma (𝟭 T) (𝟭 T) from default #align category_theory.arrow.inhabited CategoryTheory.Arrow.inhabited end namespace Arrow @[ext] lemma hom_ext {X Y : Arrow T} (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left (f : Arrow T) : CommaMorphism.left (πŸ™ f) = πŸ™ f.left := rfl #align category_theory.arrow.id_left CategoryTheory.Arrow.id_left @[simp] theorem id_right (f : Arrow T) : CommaMorphism.right (πŸ™ f) = πŸ™ f.right := rfl #align category_theory.arrow.id_right CategoryTheory.Arrow.id_right -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_left {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).left = f.left ≫ g.left := rfl -- Porting note (#10688): added to ease automation @[simp, reassoc] theorem comp_right {X Y Z : Arrow T} (f : X ⟢ Y) (g : Y ⟢ Z) : (f ≫ g).right = f.right ≫ g.right := rfl @[simps] def mk {X Y : T} (f : X ⟢ Y) : Arrow T where left := X right := Y hom := f #align category_theory.arrow.mk CategoryTheory.Arrow.mk @[simp] theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by cases f rfl #align category_theory.arrow.mk_eq CategoryTheory.Arrow.mk_eq theorem mk_injective (A B : T) : Function.Injective (Arrow.mk : (A ⟢ B) β†’ Arrow T) := fun f g h => by cases h rfl #align category_theory.arrow.mk_injective CategoryTheory.Arrow.mk_injective theorem mk_inj (A B : T) {f g : A ⟢ B} : Arrow.mk f = Arrow.mk g ↔ f = g := (mk_injective A B).eq_iff #align category_theory.arrow.mk_inj CategoryTheory.Arrow.mk_inj instance {X Y : T} : CoeOut (X ⟢ Y) (Arrow T) where coe := mk @[simps] def homMk {f g : Arrow T} {u : f.left ⟢ g.left} {v : f.right ⟢ g.right} (w : u ≫ g.hom = f.hom ≫ v) : f ⟢ g where left := u right := v w := w #align category_theory.arrow.hom_mk CategoryTheory.Arrow.homMk @[simps] def homMk' {X Y : T} {f : X ⟢ Y} {P Q : T} {g : P ⟢ Q} {u : X ⟢ P} {v : Y ⟢ Q} (w : u ≫ g = f ≫ v) : Arrow.mk f ⟢ Arrow.mk g where left := u right := v w := w #align category_theory.arrow.hom_mk' CategoryTheory.Arrow.homMk' @[reassoc (attr := simp, nolint simpNF)] theorem w {f g : Arrow T} (sq : f ⟢ g) : sq.left ≫ g.hom = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w CategoryTheory.Arrow.w -- `w_mk_left` is not needed, as it is a consequence of `w` and `mk_hom`. @[reassoc (attr := simp)] theorem w_mk_right {f : Arrow T} {X Y : T} {g : X ⟢ Y} (sq : f ⟢ mk g) : sq.left ≫ g = f.hom ≫ sq.right := sq.w #align category_theory.arrow.w_mk_right CategoryTheory.Arrow.w_mk_right theorem isIso_of_isIso_left_of_isIso_right {f g : Arrow T} (ff : f ⟢ g) [IsIso ff.left] [IsIso ff.right] : IsIso ff where out := by let inverse : g ⟢ f := ⟨inv ff.left, inv ff.right, (by simp)⟩ apply Exists.intro inverse aesop_cat #align category_theory.arrow.is_iso_of_iso_left_of_is_iso_right CategoryTheory.Arrow.isIso_of_isIso_left_of_isIso_right @[simps!] def isoMk {f g : Arrow T} (l : f.left β‰… g.left) (r : f.right β‰… g.right) (h : l.hom ≫ g.hom = f.hom ≫ r.hom := by aesop_cat) : f β‰… g := Comma.isoMk l r h #align category_theory.arrow.iso_mk CategoryTheory.Arrow.isoMk abbrev isoMk' {W X Y Z : T} (f : W ⟢ X) (g : Y ⟢ Z) (e₁ : W β‰… Y) (eβ‚‚ : X β‰… Z) (h : e₁.hom ≫ g = f ≫ eβ‚‚.hom := by aesop_cat) : Arrow.mk f β‰… Arrow.mk g := Arrow.isoMk e₁ eβ‚‚ h #align category_theory.arrow.iso_mk' CategoryTheory.Arrow.isoMk' theorem hom.congr_left {f g : Arrow T} {φ₁ Ο†β‚‚ : f ⟢ g} (h : φ₁ = Ο†β‚‚) : φ₁.left = Ο†β‚‚.left := by rw [h] #align category_theory.arrow.hom.congr_left CategoryTheory.Arrow.hom.congr_left @[simp] theorem hom.congr_right {f g : Arrow T} {φ₁ Ο†β‚‚ : f ⟢ g} (h : φ₁ = Ο†β‚‚) : φ₁.right = Ο†β‚‚.right := by rw [h] #align category_theory.arrow.hom.congr_right CategoryTheory.Arrow.hom.congr_right
Mathlib/CategoryTheory/Comma/Arrow.lean
171
174
theorem iso_w {f g : Arrow T} (e : f β‰… g) : g.hom = e.inv.left ≫ f.hom ≫ e.hom.right := by
have eq := Arrow.hom.congr_right e.inv_hom_id rw [Arrow.comp_right, Arrow.id_right] at eq erw [Arrow.w_assoc, eq, Category.comp_id]
3
20.085537
1
0.6
5
536
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²}
Mathlib/Topology/MetricSpace/Antilipschitz.lean
53
56
theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by
simp only [AntilipschitzWith, edist_nndist] norm_cast
2
7.389056
1
0.6
5
537
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by simp only [AntilipschitzWith, edist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist alias ⟨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndist⟩ := antilipschitzWith_iff_le_mul_nndist #align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist #align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist
Mathlib/Topology/MetricSpace/Antilipschitz.lean
64
67
theorem antilipschitzWith_iff_le_mul_dist : AntilipschitzWith K f ↔ βˆ€ x y, dist x y ≀ K * dist (f x) (f y) := by
simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist] norm_cast
2
7.389056
1
0.6
5
537
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by simp only [AntilipschitzWith, edist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist alias ⟨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndist⟩ := antilipschitzWith_iff_le_mul_nndist #align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist #align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist theorem antilipschitzWith_iff_le_mul_dist : AntilipschitzWith K f ↔ βˆ€ x y, dist x y ≀ K * dist (f x) (f y) := by simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist alias ⟨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_dist⟩ := antilipschitzWith_iff_le_mul_dist #align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist #align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist namespace AntilipschitzWith
Mathlib/Topology/MetricSpace/Antilipschitz.lean
77
79
theorem mul_le_nndist (hf : AntilipschitzWith K f) (x y : Ξ±) : K⁻¹ * nndist x y ≀ nndist (f x) (f y) := by
simpa only [div_eq_inv_mul] using NNReal.div_le_of_le_mul' (hf.le_mul_nndist x y)
1
2.718282
0
0.6
5
537
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by simp only [AntilipschitzWith, edist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist alias ⟨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndist⟩ := antilipschitzWith_iff_le_mul_nndist #align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist #align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist theorem antilipschitzWith_iff_le_mul_dist : AntilipschitzWith K f ↔ βˆ€ x y, dist x y ≀ K * dist (f x) (f y) := by simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist alias ⟨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_dist⟩ := antilipschitzWith_iff_le_mul_dist #align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist #align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist namespace AntilipschitzWith variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} open EMetric -- uses neither `f` nor `hf` @[nolint unusedArguments] protected def k (_hf : AntilipschitzWith K f) : ℝβ‰₯0 := K set_option linter.uppercaseLean3 false in #align antilipschitz_with.K AntilipschitzWith.k protected theorem injective {Ξ± : Type*} {Ξ² : Type*} [EMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (hf : AntilipschitzWith K f) : Function.Injective f := fun x y h => by simpa only [h, edist_self, mul_zero, edist_le_zero] using hf x y #align antilipschitz_with.injective AntilipschitzWith.injective
Mathlib/Topology/MetricSpace/Antilipschitz.lean
110
113
theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : Ξ±) : (K : ℝβ‰₯0∞)⁻¹ * edist x y ≀ edist (f x) (f y) := by
rw [mul_comm, ← div_eq_mul_inv] exact ENNReal.div_le_of_le_mul' (hf x y)
2
7.389056
1
0.6
5
537
import Mathlib.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topology.MetricSpace.Bounded #align_import topology.metric_space.antilipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" variable {Ξ± Ξ² Ξ³ : Type*} open scoped NNReal ENNReal Uniformity Topology open Set Filter Bornology def AntilipschitzWith [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] (K : ℝβ‰₯0) (f : Ξ± β†’ Ξ²) := βˆ€ x y, edist x y ≀ K * edist (f x) (f y) #align antilipschitz_with AntilipschitzWith theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y < ⊀ := (h x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top (edist_ne_top _ _) #align antilipschitz_with.edist_lt_top AntilipschitzWith.edist_lt_top theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (h : AntilipschitzWith K f) (x y : Ξ±) : edist x y β‰  ⊀ := (h.edist_lt_top x y).ne #align antilipschitz_with.edist_ne_top AntilipschitzWith.edist_ne_top section Metric variable [PseudoMetricSpace Ξ±] [PseudoMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} theorem antilipschitzWith_iff_le_mul_nndist : AntilipschitzWith K f ↔ βˆ€ x y, nndist x y ≀ K * nndist (f x) (f y) := by simp only [AntilipschitzWith, edist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_nndist antilipschitzWith_iff_le_mul_nndist alias ⟨AntilipschitzWith.le_mul_nndist, AntilipschitzWith.of_le_mul_nndist⟩ := antilipschitzWith_iff_le_mul_nndist #align antilipschitz_with.le_mul_nndist AntilipschitzWith.le_mul_nndist #align antilipschitz_with.of_le_mul_nndist AntilipschitzWith.of_le_mul_nndist theorem antilipschitzWith_iff_le_mul_dist : AntilipschitzWith K f ↔ βˆ€ x y, dist x y ≀ K * dist (f x) (f y) := by simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist] norm_cast #align antilipschitz_with_iff_le_mul_dist antilipschitzWith_iff_le_mul_dist alias ⟨AntilipschitzWith.le_mul_dist, AntilipschitzWith.of_le_mul_dist⟩ := antilipschitzWith_iff_le_mul_dist #align antilipschitz_with.le_mul_dist AntilipschitzWith.le_mul_dist #align antilipschitz_with.of_le_mul_dist AntilipschitzWith.of_le_mul_dist namespace AntilipschitzWith variable [PseudoEMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] [PseudoEMetricSpace Ξ³] variable {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} open EMetric -- uses neither `f` nor `hf` @[nolint unusedArguments] protected def k (_hf : AntilipschitzWith K f) : ℝβ‰₯0 := K set_option linter.uppercaseLean3 false in #align antilipschitz_with.K AntilipschitzWith.k protected theorem injective {Ξ± : Type*} {Ξ² : Type*} [EMetricSpace Ξ±] [PseudoEMetricSpace Ξ²] {K : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (hf : AntilipschitzWith K f) : Function.Injective f := fun x y h => by simpa only [h, edist_self, mul_zero, edist_le_zero] using hf x y #align antilipschitz_with.injective AntilipschitzWith.injective theorem mul_le_edist (hf : AntilipschitzWith K f) (x y : Ξ±) : (K : ℝβ‰₯0∞)⁻¹ * edist x y ≀ edist (f x) (f y) := by rw [mul_comm, ← div_eq_mul_inv] exact ENNReal.div_le_of_le_mul' (hf x y) #align antilipschitz_with.mul_le_edist AntilipschitzWith.mul_le_edist theorem ediam_preimage_le (hf : AntilipschitzWith K f) (s : Set Ξ²) : diam (f ⁻¹' s) ≀ K * diam s := diam_le fun x hx y hy => (hf x y).trans <| mul_le_mul_left' (edist_le_diam_of_mem (mem_preimage.1 hx) hy) K #align antilipschitz_with.ediam_preimage_le AntilipschitzWith.ediam_preimage_le theorem le_mul_ediam_image (hf : AntilipschitzWith K f) (s : Set Ξ±) : diam s ≀ K * diam (f '' s) := (diam_mono (subset_preimage_image _ _)).trans (hf.ediam_preimage_le (f '' s)) #align antilipschitz_with.le_mul_ediam_image AntilipschitzWith.le_mul_ediam_image protected theorem id : AntilipschitzWith 1 (id : Ξ± β†’ Ξ±) := fun x y => by simp only [ENNReal.coe_one, one_mul, id, le_refl] #align antilipschitz_with.id AntilipschitzWith.id
Mathlib/Topology/MetricSpace/Antilipschitz.lean
129
134
theorem comp {Kg : ℝβ‰₯0} {g : Ξ² β†’ Ξ³} (hg : AntilipschitzWith Kg g) {Kf : ℝβ‰₯0} {f : Ξ± β†’ Ξ²} (hf : AntilipschitzWith Kf f) : AntilipschitzWith (Kf * Kg) (g ∘ f) := fun x y => calc edist x y ≀ Kf * edist (f x) (f y) := hf x y _ ≀ Kf * (Kg * edist (g (f x)) (g (f y))) := ENNReal.mul_left_mono (hg _ _) _ = _ := by
rw [ENNReal.coe_mul, mul_assoc]; rfl
1
2.718282
0
0.6
5
537
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ noncomputable section namespace CategoryTheory open Category Adjunction variable {C : Type u₁} {D : Type uβ‚‚} {E : Type u₃} variable [Category.{v₁} C] [Category.{vβ‚‚} D] [Category.{v₃} E] class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where L : C β₯€ D adj : L ⊣ R #align category_theory.reflective CategoryTheory.Reflective variable (i : D β₯€ C) def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i) def reflectorAdjunction [Reflective i] : reflector i ⊣ i := Reflective.adj instance [Reflective i] : i.IsRightAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ instance [Reflective i] : (reflector i).IsLeftAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful := (reflectorAdjunction i).fullyFaithfulROfIsIsoCounit -- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions.
Mathlib/CategoryTheory/Adjunction/Reflective.lean
62
67
theorem unit_obj_eq_map_unit [Reflective i] (X : C) : (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) = i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by
rw [← cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))), ← i.map_comp] simp
3
20.085537
1
0.6
5
538
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ noncomputable section namespace CategoryTheory open Category Adjunction variable {C : Type u₁} {D : Type uβ‚‚} {E : Type u₃} variable [Category.{v₁} C] [Category.{vβ‚‚} D] [Category.{v₃} E] class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where L : C β₯€ D adj : L ⊣ R #align category_theory.reflective CategoryTheory.Reflective variable (i : D β₯€ C) def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i) def reflectorAdjunction [Reflective i] : reflector i ⊣ i := Reflective.adj instance [Reflective i] : i.IsRightAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ instance [Reflective i] : (reflector i).IsLeftAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful := (reflectorAdjunction i).fullyFaithfulROfIsIsoCounit -- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions. theorem unit_obj_eq_map_unit [Reflective i] (X : C) : (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) = i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by rw [← cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))), ← i.map_comp] simp #align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) := inferInstance variable {i}
Mathlib/CategoryTheory/Adjunction/Reflective.lean
87
89
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) : IsIso ((reflectorAdjunction i).unit.app A) := by
rwa [isIso_unit_app_iff_mem_essImage]
1
2.718282
0
0.6
5
538
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ noncomputable section namespace CategoryTheory open Category Adjunction variable {C : Type u₁} {D : Type uβ‚‚} {E : Type u₃} variable [Category.{v₁} C] [Category.{vβ‚‚} D] [Category.{v₃} E] class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where L : C β₯€ D adj : L ⊣ R #align category_theory.reflective CategoryTheory.Reflective variable (i : D β₯€ C) def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i) def reflectorAdjunction [Reflective i] : reflector i ⊣ i := Reflective.adj instance [Reflective i] : i.IsRightAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ instance [Reflective i] : (reflector i).IsLeftAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful := (reflectorAdjunction i).fullyFaithfulROfIsIsoCounit -- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions. theorem unit_obj_eq_map_unit [Reflective i] (X : C) : (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) = i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by rw [← cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))), ← i.map_comp] simp #align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) := inferInstance variable {i} theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) : IsIso ((reflectorAdjunction i).unit.app A) := by rwa [isIso_unit_app_iff_mem_essImage] #align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L ⊣ i) (A : C) [IsIso (adj.unit.app A)] : A ∈ i.essImage := ⟨L.obj A, ⟨(asIso (adj.unit.app A)).symm⟩⟩ #align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso
Mathlib/CategoryTheory/Adjunction/Reflective.lean
99
109
theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C} [IsSplitMono ((reflectorAdjunction i).unit.app A)] : A ∈ i.essImage := by
let Ξ· : 𝟭 C ⟢ reflector i β‹™ i := (reflectorAdjunction i).unit haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) := Functor.essImage.unit_isIso ((i.obj_mem_essImage _)) have : Epi (Ξ·.app A) := by refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_ rw [show retraction _ ≫ Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))] apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A))) haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A) exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A
9
8,103.083928
2
0.6
5
538
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ noncomputable section namespace CategoryTheory open Category Adjunction variable {C : Type u₁} {D : Type uβ‚‚} {E : Type u₃} variable [Category.{v₁} C] [Category.{vβ‚‚} D] [Category.{v₃} E] class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where L : C β₯€ D adj : L ⊣ R #align category_theory.reflective CategoryTheory.Reflective variable (i : D β₯€ C) def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i) def reflectorAdjunction [Reflective i] : reflector i ⊣ i := Reflective.adj instance [Reflective i] : i.IsRightAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ instance [Reflective i] : (reflector i).IsLeftAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful := (reflectorAdjunction i).fullyFaithfulROfIsIsoCounit -- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions. theorem unit_obj_eq_map_unit [Reflective i] (X : C) : (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) = i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by rw [← cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))), ← i.map_comp] simp #align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) := inferInstance variable {i} theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) : IsIso ((reflectorAdjunction i).unit.app A) := by rwa [isIso_unit_app_iff_mem_essImage] #align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L ⊣ i) (A : C) [IsIso (adj.unit.app A)] : A ∈ i.essImage := ⟨L.obj A, ⟨(asIso (adj.unit.app A)).symm⟩⟩ #align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C} [IsSplitMono ((reflectorAdjunction i).unit.app A)] : A ∈ i.essImage := by let Ξ· : 𝟭 C ⟢ reflector i β‹™ i := (reflectorAdjunction i).unit haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) := Functor.essImage.unit_isIso ((i.obj_mem_essImage _)) have : Epi (Ξ·.app A) := by refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_ rw [show retraction _ ≫ Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))] apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A))) haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A) exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A #align category_theory.mem_ess_image_of_unit_is_split_mono CategoryTheory.mem_essImage_of_unit_isSplitMono instance Reflective.comp (F : C β₯€ D) (G : D β₯€ E) [Reflective F] [Reflective G] : Reflective (F β‹™ G) where L := reflector G β‹™ reflector F adj := (reflectorAdjunction G).comp (reflectorAdjunction F) #align category_theory.reflective.comp CategoryTheory.Reflective.comp def unitCompPartialBijectiveAux [Reflective i] (A : C) (B : D) : (A ⟢ i.obj B) ≃ (i.obj ((reflector i).obj A) ⟢ i.obj B) := ((reflectorAdjunction i).homEquiv _ _).symm.trans (Functor.FullyFaithful.ofFullyFaithful i).homEquiv #align category_theory.unit_comp_partial_bijective_aux CategoryTheory.unitCompPartialBijectiveAux
Mathlib/CategoryTheory/Adjunction/Reflective.lean
127
130
theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D} (f : i.obj ((reflector i).obj A) ⟢ i.obj B) : (unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A ≫ f := by
simp [unitCompPartialBijectiveAux]
1
2.718282
0
0.6
5
538
import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Conj import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.adjunction.reflective from "leanprover-community/mathlib"@"239d882c4fb58361ee8b3b39fb2091320edef10a" universe v₁ vβ‚‚ v₃ u₁ uβ‚‚ u₃ noncomputable section namespace CategoryTheory open Category Adjunction variable {C : Type u₁} {D : Type uβ‚‚} {E : Type u₃} variable [Category.{v₁} C] [Category.{vβ‚‚} D] [Category.{v₃} E] class Reflective (R : D β₯€ C) extends R.Full, R.Faithful where L : C β₯€ D adj : L ⊣ R #align category_theory.reflective CategoryTheory.Reflective variable (i : D β₯€ C) def reflector [Reflective i] : C β₯€ D := Reflective.L (R := i) def reflectorAdjunction [Reflective i] : reflector i ⊣ i := Reflective.adj instance [Reflective i] : i.IsRightAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ instance [Reflective i] : (reflector i).IsLeftAdjoint := ⟨_, ⟨reflectorAdjunction i⟩⟩ def Functor.fullyFaithfulOfReflective [Reflective i] : i.FullyFaithful := (reflectorAdjunction i).fullyFaithfulROfIsIsoCounit -- TODO: This holds more generally for idempotent adjunctions, not just reflective adjunctions. theorem unit_obj_eq_map_unit [Reflective i] (X : C) : (reflectorAdjunction i).unit.app (i.obj ((reflector i).obj X)) = i.map ((reflector i).map ((reflectorAdjunction i).unit.app X)) := by rw [← cancel_mono (i.map ((reflectorAdjunction i).counit.app ((reflector i).obj X))), ← i.map_comp] simp #align category_theory.unit_obj_eq_map_unit CategoryTheory.unit_obj_eq_map_unit example [Reflective i] {B : D} : IsIso ((reflectorAdjunction i).unit.app (i.obj B)) := inferInstance variable {i} theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) : IsIso ((reflectorAdjunction i).unit.app A) := by rwa [isIso_unit_app_iff_mem_essImage] #align category_theory.functor.ess_image.unit_is_iso CategoryTheory.Functor.essImage.unit_isIso theorem mem_essImage_of_unit_isIso {L : C β₯€ D} (adj : L ⊣ i) (A : C) [IsIso (adj.unit.app A)] : A ∈ i.essImage := ⟨L.obj A, ⟨(asIso (adj.unit.app A)).symm⟩⟩ #align category_theory.mem_ess_image_of_unit_is_iso CategoryTheory.mem_essImage_of_unit_isIso theorem mem_essImage_of_unit_isSplitMono [Reflective i] {A : C} [IsSplitMono ((reflectorAdjunction i).unit.app A)] : A ∈ i.essImage := by let Ξ· : 𝟭 C ⟢ reflector i β‹™ i := (reflectorAdjunction i).unit haveI : IsIso (Ξ·.app (i.obj ((reflector i).obj A))) := Functor.essImage.unit_isIso ((i.obj_mem_essImage _)) have : Epi (Ξ·.app A) := by refine @epi_of_epi _ _ _ _ _ (retraction (Ξ·.app A)) (Ξ·.app A) ?_ rw [show retraction _ ≫ Ξ·.app A = _ from Ξ·.naturality (retraction (Ξ·.app A))] apply epi_comp (Ξ·.app (i.obj ((reflector i).obj A))) haveI := isIso_of_epi_of_isSplitMono (Ξ·.app A) exact mem_essImage_of_unit_isIso (reflectorAdjunction i) A #align category_theory.mem_ess_image_of_unit_is_split_mono CategoryTheory.mem_essImage_of_unit_isSplitMono instance Reflective.comp (F : C β₯€ D) (G : D β₯€ E) [Reflective F] [Reflective G] : Reflective (F β‹™ G) where L := reflector G β‹™ reflector F adj := (reflectorAdjunction G).comp (reflectorAdjunction F) #align category_theory.reflective.comp CategoryTheory.Reflective.comp def unitCompPartialBijectiveAux [Reflective i] (A : C) (B : D) : (A ⟢ i.obj B) ≃ (i.obj ((reflector i).obj A) ⟢ i.obj B) := ((reflectorAdjunction i).homEquiv _ _).symm.trans (Functor.FullyFaithful.ofFullyFaithful i).homEquiv #align category_theory.unit_comp_partial_bijective_aux CategoryTheory.unitCompPartialBijectiveAux theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D} (f : i.obj ((reflector i).obj A) ⟢ i.obj B) : (unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A ≫ f := by simp [unitCompPartialBijectiveAux] #align category_theory.unit_comp_partial_bijective_aux_symm_apply CategoryTheory.unitCompPartialBijectiveAux_symm_apply def unitCompPartialBijective [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage) : (A ⟢ B) ≃ (i.obj ((reflector i).obj A) ⟢ B) := calc (A ⟢ B) ≃ (A ⟢ i.obj (Functor.essImage.witness hB)) := Iso.homCongr (Iso.refl _) hB.getIso.symm _ ≃ (i.obj _ ⟢ i.obj (Functor.essImage.witness hB)) := unitCompPartialBijectiveAux _ _ _ ≃ (i.obj ((reflector i).obj A) ⟢ B) := Iso.homCongr (Iso.refl _) (Functor.essImage.getIso hB) #align category_theory.unit_comp_partial_bijective CategoryTheory.unitCompPartialBijective @[simp]
Mathlib/CategoryTheory/Adjunction/Reflective.lean
154
156
theorem unitCompPartialBijective_symm_apply [Reflective i] (A : C) {B : C} (hB : B ∈ i.essImage) (f) : (unitCompPartialBijective A hB).symm f = (reflectorAdjunction i).unit.app A ≫ f := by
simp [unitCompPartialBijective, unitCompPartialBijectiveAux_symm_apply]
1
2.718282
0
0.6
5
538
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : Type*) {B : Type*} (F : Type*) (E : B β†’ Type*) section TopologicalVectorSpace variable {F E} variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B] protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] (e : Pretrivialization F (Ο€ F E)) : Prop where linear : βˆ€ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 #align pretrivialization.is_linear Pretrivialization.IsLinear namespace Pretrivialization variable (e : Pretrivialization F (Ο€ F E)) {x : TotalSpace F E} {b : B} {y : E b} theorem linear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 := Pretrivialization.IsLinear.linear b hb #align pretrivialization.linear Pretrivialization.linear variable [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] @[simps!] protected def symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : F β†’β‚—[R] E b := by refine IsLinearMap.mk' (e.symm b) ?_ by_cases hb : b ∈ e.baseSet Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦ congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear Β· rw [e.coe_symm_of_not_mem hb] exact (0 : F β†’β‚—[R] E b).isLinear #align pretrivialization.symmβ‚— Pretrivialization.symmβ‚— @[simps (config := .asFn)] def linearEquivAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) (hb : b ∈ e.baseSet) : E b ≃ₗ[R] F where toFun y := (e ⟨b, y⟩).2 invFun := e.symm b left_inv := e.symm_apply_apply_mk hb right_inv v := by simp_rw [e.apply_mk_symm hb v] map_add' v w := (e.linear R hb).map_add v w map_smul' c v := (e.linear R hb).map_smul c v #align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt protected def linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : E b β†’β‚—[R] F := if hb : b ∈ e.baseSet then e.linearEquivAt R b hb else 0 #align pretrivialization.linear_map_at Pretrivialization.linearMapAt variable {R}
Mathlib/Topology/VectorBundle/Basic.lean
120
123
theorem coe_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by
rw [Pretrivialization.linearMapAt] split_ifs <;> rfl
2
7.389056
1
0.6
5
539
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : Type*) {B : Type*} (F : Type*) (E : B β†’ Type*) section TopologicalVectorSpace variable {F E} variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B] protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] (e : Pretrivialization F (Ο€ F E)) : Prop where linear : βˆ€ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 #align pretrivialization.is_linear Pretrivialization.IsLinear namespace Pretrivialization variable (e : Pretrivialization F (Ο€ F E)) {x : TotalSpace F E} {b : B} {y : E b} theorem linear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 := Pretrivialization.IsLinear.linear b hb #align pretrivialization.linear Pretrivialization.linear variable [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] @[simps!] protected def symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : F β†’β‚—[R] E b := by refine IsLinearMap.mk' (e.symm b) ?_ by_cases hb : b ∈ e.baseSet Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦ congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear Β· rw [e.coe_symm_of_not_mem hb] exact (0 : F β†’β‚—[R] E b).isLinear #align pretrivialization.symmβ‚— Pretrivialization.symmβ‚— @[simps (config := .asFn)] def linearEquivAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) (hb : b ∈ e.baseSet) : E b ≃ₗ[R] F where toFun y := (e ⟨b, y⟩).2 invFun := e.symm b left_inv := e.symm_apply_apply_mk hb right_inv v := by simp_rw [e.apply_mk_symm hb v] map_add' v w := (e.linear R hb).map_add v w map_smul' c v := (e.linear R hb).map_smul c v #align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt protected def linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : E b β†’β‚—[R] F := if hb : b ∈ e.baseSet then e.linearEquivAt R b hb else 0 #align pretrivialization.linear_map_at Pretrivialization.linearMapAt variable {R} theorem coe_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [Pretrivialization.linearMapAt] split_ifs <;> rfl #align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt
Mathlib/Topology/VectorBundle/Basic.lean
126
128
theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2 := by
simp_rw [coe_linearMapAt, if_pos hb]
1
2.718282
0
0.6
5
539
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : Type*) {B : Type*} (F : Type*) (E : B β†’ Type*) section TopologicalVectorSpace variable {F E} variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B] protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] (e : Pretrivialization F (Ο€ F E)) : Prop where linear : βˆ€ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 #align pretrivialization.is_linear Pretrivialization.IsLinear namespace Pretrivialization variable (e : Pretrivialization F (Ο€ F E)) {x : TotalSpace F E} {b : B} {y : E b} theorem linear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 := Pretrivialization.IsLinear.linear b hb #align pretrivialization.linear Pretrivialization.linear variable [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] @[simps!] protected def symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : F β†’β‚—[R] E b := by refine IsLinearMap.mk' (e.symm b) ?_ by_cases hb : b ∈ e.baseSet Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦ congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear Β· rw [e.coe_symm_of_not_mem hb] exact (0 : F β†’β‚—[R] E b).isLinear #align pretrivialization.symmβ‚— Pretrivialization.symmβ‚— @[simps (config := .asFn)] def linearEquivAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) (hb : b ∈ e.baseSet) : E b ≃ₗ[R] F where toFun y := (e ⟨b, y⟩).2 invFun := e.symm b left_inv := e.symm_apply_apply_mk hb right_inv v := by simp_rw [e.apply_mk_symm hb v] map_add' v w := (e.linear R hb).map_add v w map_smul' c v := (e.linear R hb).map_smul c v #align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt protected def linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : E b β†’β‚—[R] F := if hb : b ∈ e.baseSet then e.linearEquivAt R b hb else 0 #align pretrivialization.linear_map_at Pretrivialization.linearMapAt variable {R} theorem coe_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [Pretrivialization.linearMapAt] split_ifs <;> rfl #align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2 := by simp_rw [coe_linearMapAt, if_pos hb] #align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem
Mathlib/Topology/VectorBundle/Basic.lean
131
133
theorem linearMapAt_apply (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (y : E b) : e.linearMapAt R b y = if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by
rw [coe_linearMapAt]
1
2.718282
0
0.6
5
539
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : Type*) {B : Type*} (F : Type*) (E : B β†’ Type*) section TopologicalVectorSpace variable {F E} variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B] protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] (e : Pretrivialization F (Ο€ F E)) : Prop where linear : βˆ€ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 #align pretrivialization.is_linear Pretrivialization.IsLinear namespace Pretrivialization variable (e : Pretrivialization F (Ο€ F E)) {x : TotalSpace F E} {b : B} {y : E b} theorem linear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 := Pretrivialization.IsLinear.linear b hb #align pretrivialization.linear Pretrivialization.linear variable [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] @[simps!] protected def symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : F β†’β‚—[R] E b := by refine IsLinearMap.mk' (e.symm b) ?_ by_cases hb : b ∈ e.baseSet Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦ congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear Β· rw [e.coe_symm_of_not_mem hb] exact (0 : F β†’β‚—[R] E b).isLinear #align pretrivialization.symmβ‚— Pretrivialization.symmβ‚— @[simps (config := .asFn)] def linearEquivAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) (hb : b ∈ e.baseSet) : E b ≃ₗ[R] F where toFun y := (e ⟨b, y⟩).2 invFun := e.symm b left_inv := e.symm_apply_apply_mk hb right_inv v := by simp_rw [e.apply_mk_symm hb v] map_add' v w := (e.linear R hb).map_add v w map_smul' c v := (e.linear R hb).map_smul c v #align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt protected def linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : E b β†’β‚—[R] F := if hb : b ∈ e.baseSet then e.linearEquivAt R b hb else 0 #align pretrivialization.linear_map_at Pretrivialization.linearMapAt variable {R} theorem coe_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [Pretrivialization.linearMapAt] split_ifs <;> rfl #align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2 := by simp_rw [coe_linearMapAt, if_pos hb] #align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem theorem linearMapAt_apply (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (y : E b) : e.linearMapAt R b y = if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [coe_linearMapAt] #align pretrivialization.linear_map_at_apply Pretrivialization.linearMapAt_apply theorem linearMapAt_def_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb := dif_pos hb #align pretrivialization.linear_map_at_def_of_mem Pretrivialization.linearMapAt_def_of_mem theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b βˆ‰ e.baseSet) : e.linearMapAt R b = 0 := dif_neg hb #align pretrivialization.linear_map_at_def_of_not_mem Pretrivialization.linearMapAt_def_of_not_mem theorem linearMapAt_eq_zero (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b βˆ‰ e.baseSet) : e.linearMapAt R b = 0 := dif_neg hb #align pretrivialization.linear_map_at_eq_zero Pretrivialization.linearMapAt_eq_zero
Mathlib/Topology/VectorBundle/Basic.lean
151
154
theorem symmβ‚—_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) (y : E b) : e.symmβ‚— R b (e.linearMapAt R b y) = y := by
rw [e.linearMapAt_def_of_mem hb] exact (e.linearEquivAt R b hb).left_inv y
2
7.389056
1
0.6
5
539
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : Type*) {B : Type*} (F : Type*) (E : B β†’ Type*) section TopologicalVectorSpace variable {F E} variable [Semiring R] [TopologicalSpace F] [TopologicalSpace B] protected class Pretrivialization.IsLinear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] (e : Pretrivialization F (Ο€ F E)) : Prop where linear : βˆ€ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 #align pretrivialization.is_linear Pretrivialization.IsLinear namespace Pretrivialization variable (e : Pretrivialization F (Ο€ F E)) {x : TotalSpace F E} {b : B} {y : E b} theorem linear [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : IsLinearMap R fun x : E b => (e ⟨b, x⟩).2 := Pretrivialization.IsLinear.linear b hb #align pretrivialization.linear Pretrivialization.linear variable [AddCommMonoid F] [Module R F] [βˆ€ x, AddCommMonoid (E x)] [βˆ€ x, Module R (E x)] @[simps!] protected def symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : F β†’β‚—[R] E b := by refine IsLinearMap.mk' (e.symm b) ?_ by_cases hb : b ∈ e.baseSet Β· exact (((e.linear R hb).mk' _).inverse (e.symm b) (e.symm_apply_apply_mk hb) fun v ↦ congr_arg Prod.snd <| e.apply_mk_symm hb v).isLinear Β· rw [e.coe_symm_of_not_mem hb] exact (0 : F β†’β‚—[R] E b).isLinear #align pretrivialization.symmβ‚— Pretrivialization.symmβ‚— @[simps (config := .asFn)] def linearEquivAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) (hb : b ∈ e.baseSet) : E b ≃ₗ[R] F where toFun y := (e ⟨b, y⟩).2 invFun := e.symm b left_inv := e.symm_apply_apply_mk hb right_inv v := by simp_rw [e.apply_mk_symm hb v] map_add' v w := (e.linear R hb).map_add v w map_smul' c v := (e.linear R hb).map_smul c v #align pretrivialization.linear_equiv_at Pretrivialization.linearEquivAt protected def linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : E b β†’β‚—[R] F := if hb : b ∈ e.baseSet then e.linearEquivAt R b hb else 0 #align pretrivialization.linear_map_at Pretrivialization.linearMapAt variable {R} theorem coe_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] (b : B) : ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [Pretrivialization.linearMapAt] split_ifs <;> rfl #align pretrivialization.coe_linear_map_at Pretrivialization.coe_linearMapAt theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2 := by simp_rw [coe_linearMapAt, if_pos hb] #align pretrivialization.coe_linear_map_at_of_mem Pretrivialization.coe_linearMapAt_of_mem theorem linearMapAt_apply (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (y : E b) : e.linearMapAt R b y = if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by rw [coe_linearMapAt] #align pretrivialization.linear_map_at_apply Pretrivialization.linearMapAt_apply theorem linearMapAt_def_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb := dif_pos hb #align pretrivialization.linear_map_at_def_of_mem Pretrivialization.linearMapAt_def_of_mem theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b βˆ‰ e.baseSet) : e.linearMapAt R b = 0 := dif_neg hb #align pretrivialization.linear_map_at_def_of_not_mem Pretrivialization.linearMapAt_def_of_not_mem theorem linearMapAt_eq_zero (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b βˆ‰ e.baseSet) : e.linearMapAt R b = 0 := dif_neg hb #align pretrivialization.linear_map_at_eq_zero Pretrivialization.linearMapAt_eq_zero theorem symmβ‚—_linearMapAt (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) (y : E b) : e.symmβ‚— R b (e.linearMapAt R b y) = y := by rw [e.linearMapAt_def_of_mem hb] exact (e.linearEquivAt R b hb).left_inv y #align pretrivialization.symmβ‚—_linear_map_at Pretrivialization.symmβ‚—_linearMapAt
Mathlib/Topology/VectorBundle/Basic.lean
157
160
theorem linearMapAt_symmβ‚— (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) (y : F) : e.linearMapAt R b (e.symmβ‚— R b y) = y := by
rw [e.linearMapAt_def_of_mem hb] exact (e.linearEquivAt R b hb).right_inv y
2
7.389056
1
0.6
5
539
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp]
Mathlib/Data/List/ReduceOption.lean
19
21
theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by
simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp]
Mathlib/Data/List/ReduceOption.lean
25
26
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by
simp only [reduceOption, filterMap, id]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp]
Mathlib/Data/List/ReduceOption.lean
35
41
theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by
induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl
5
148.413159
2
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append
Mathlib/Data/List/ReduceOption.lean
49
53
theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by
induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl]
3
20.085537
1
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl]
Mathlib/Data/List/ReduceOption.lean
55
57
theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by
simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome]
Mathlib/Data/List/ReduceOption.lean
59
61
theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by
rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right
2
7.389056
1
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le
Mathlib/Data/List/ReduceOption.lean
64
66
theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by
rw [reduceOption_length_eq, List.filter_length_eq_length]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff
Mathlib/Data/List/ReduceOption.lean
69
74
theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by
rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
4
54.59815
2
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or] #align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff
Mathlib/Data/List/ReduceOption.lean
77
77
theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by
cases x <;> rfl
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or] #align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl #align list.reduce_option_singleton List.reduceOption_singleton
Mathlib/Data/List/ReduceOption.lean
80
85
theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) : (l.concat x).reduceOption = l.reduceOption ++ x.toList := by
induction' l with hd tl hl generalizing x Β· cases x <;> simp [Option.toList] Β· simp only [concat_eq_append, reduceOption_append] at hl cases hd <;> simp [hl, reduceOption_append]
4
54.59815
2
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or] #align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl #align list.reduce_option_singleton List.reduceOption_singleton theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) : (l.concat x).reduceOption = l.reduceOption ++ x.toList := by induction' l with hd tl hl generalizing x Β· cases x <;> simp [Option.toList] Β· simp only [concat_eq_append, reduceOption_append] at hl cases hd <;> simp [hl, reduceOption_append] #align list.reduce_option_concat List.reduceOption_concat
Mathlib/Data/List/ReduceOption.lean
88
90
theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) : (l.concat (some x)).reduceOption = l.reduceOption.concat x := by
simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or] #align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl #align list.reduce_option_singleton List.reduceOption_singleton theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) : (l.concat x).reduceOption = l.reduceOption ++ x.toList := by induction' l with hd tl hl generalizing x Β· cases x <;> simp [Option.toList] Β· simp only [concat_eq_append, reduceOption_append] at hl cases hd <;> simp [hl, reduceOption_append] #align list.reduce_option_concat List.reduceOption_concat theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) : (l.concat (some x)).reduceOption = l.reduceOption.concat x := by simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some] #align list.reduce_option_concat_of_some List.reduceOption_concat_of_some
Mathlib/Data/List/ReduceOption.lean
93
94
theorem reduceOption_mem_iff {l : List (Option Ξ±)} {x : Ξ±} : x ∈ l.reduceOption ↔ some x ∈ l := by
simp only [reduceOption, id, mem_filterMap, exists_eq_right]
1
2.718282
0
0.615385
13
540
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some List.reduceOption_cons_of_some @[simp] theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by simp only [reduceOption, filterMap, id] #align list.reduce_option_cons_of_none List.reduceOption_cons_of_none @[simp] theorem reduceOption_nil : @reduceOption Ξ± [] = [] := rfl #align list.reduce_option_nil List.reduceOption_nil @[simp] theorem reduceOption_map {l : List (Option Ξ±)} {f : Ξ± β†’ Ξ²} : reduceOption (map (Option.map f) l) = map f (reduceOption l) := by induction' l with hd tl hl Β· simp only [reduceOption_nil, map_nil] Β· cases hd <;> simpa [true_and_iff, Option.map_some', map, eq_self_iff_true, reduceOption_cons_of_some] using hl #align list.reduce_option_map List.reduceOption_map theorem reduceOption_append (l l' : List (Option Ξ±)) : (l ++ l').reduceOption = l.reduceOption ++ l'.reduceOption := filterMap_append l l' id #align list.reduce_option_append List.reduceOption_append theorem reduceOption_length_eq {l : List (Option Ξ±)} : l.reduceOption.length = (l.filter Option.isSome).length := by induction' l with hd tl hl Β· simp_rw [reduceOption_nil, filter_nil, length] Β· cases hd <;> simp [hl] theorem length_eq_reduceOption_length_add_filter_none {l : List (Option Ξ±)} : l.length = l.reduceOption.length + (l.filter Option.isNone).length := by simp_rw [reduceOption_length_eq, l.length_eq_length_filter_add Option.isSome, Option.bnot_isSome] theorem reduceOption_length_le (l : List (Option Ξ±)) : l.reduceOption.length ≀ l.length := by rw [length_eq_reduceOption_length_add_filter_none] apply Nat.le_add_right #align list.reduce_option_length_le List.reduceOption_length_le theorem reduceOption_length_eq_iff {l : List (Option Ξ±)} : l.reduceOption.length = l.length ↔ βˆ€ x ∈ l, Option.isSome x := by rw [reduceOption_length_eq, List.filter_length_eq_length] #align list.reduce_option_length_eq_iff List.reduceOption_length_eq_iff theorem reduceOption_length_lt_iff {l : List (Option Ξ±)} : l.reduceOption.length < l.length ↔ none ∈ l := by rw [Nat.lt_iff_le_and_ne, and_iff_right (reduceOption_length_le l), Ne, reduceOption_length_eq_iff] induction l <;> simp [*] rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or] #align list.reduce_option_length_lt_iff List.reduceOption_length_lt_iff theorem reduceOption_singleton (x : Option Ξ±) : [x].reduceOption = x.toList := by cases x <;> rfl #align list.reduce_option_singleton List.reduceOption_singleton theorem reduceOption_concat (l : List (Option Ξ±)) (x : Option Ξ±) : (l.concat x).reduceOption = l.reduceOption ++ x.toList := by induction' l with hd tl hl generalizing x Β· cases x <;> simp [Option.toList] Β· simp only [concat_eq_append, reduceOption_append] at hl cases hd <;> simp [hl, reduceOption_append] #align list.reduce_option_concat List.reduceOption_concat theorem reduceOption_concat_of_some (l : List (Option Ξ±)) (x : Ξ±) : (l.concat (some x)).reduceOption = l.reduceOption.concat x := by simp only [reduceOption_nil, concat_eq_append, reduceOption_append, reduceOption_cons_of_some] #align list.reduce_option_concat_of_some List.reduceOption_concat_of_some theorem reduceOption_mem_iff {l : List (Option Ξ±)} {x : Ξ±} : x ∈ l.reduceOption ↔ some x ∈ l := by simp only [reduceOption, id, mem_filterMap, exists_eq_right] #align list.reduce_option_mem_iff List.reduceOption_mem_iff
Mathlib/Data/List/ReduceOption.lean
97
99
theorem reduceOption_get?_iff {l : List (Option Ξ±)} {x : Ξ±} : (βˆƒ i, l.get? i = some (some x)) ↔ βˆƒ i, l.reduceOption.get? i = some x := by
rw [← mem_iff_get?, ← mem_iff_get?, reduceOption_mem_iff]
1
2.718282
0
0.615385
13
540
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
41
42
theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by
rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0]
1
2.718282
0
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
46
48
theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le]
2
7.389056
1
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
52
54
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le]
2
7.389056
1
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp] theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.lift_le_continuum Cardinal.lift_le_continuum @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
58
60
theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt]
2
7.389056
1
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp] theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.lift_le_continuum Cardinal.lift_le_continuum @[simp] theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
64
66
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠 := by
-- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt]
2
7.389056
1
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp] theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.lift_le_continuum Cardinal.lift_le_continuum @[simp] theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift @[simp] theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum theorem aleph0_lt_continuum : β„΅β‚€ < 𝔠 := cantor β„΅β‚€ #align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum theorem aleph0_le_continuum : β„΅β‚€ ≀ 𝔠 := aleph0_lt_continuum.le #align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum @[simp]
Mathlib/SetTheory/Cardinal/Continuum.lean
83
83
theorem beth_one : beth 1 = 𝔠 := by
simpa using beth_succ 0
1
2.718282
0
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp] theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.lift_le_continuum Cardinal.lift_le_continuum @[simp] theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift @[simp] theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum theorem aleph0_lt_continuum : β„΅β‚€ < 𝔠 := cantor β„΅β‚€ #align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum theorem aleph0_le_continuum : β„΅β‚€ ≀ 𝔠 := aleph0_lt_continuum.le #align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum @[simp] theorem beth_one : beth 1 = 𝔠 := by simpa using beth_succ 0 #align cardinal.beth_one Cardinal.beth_one theorem nat_lt_continuum (n : β„•) : ↑n < 𝔠 := (nat_lt_aleph0 n).trans aleph0_lt_continuum #align cardinal.nat_lt_continuum Cardinal.nat_lt_continuum
Mathlib/SetTheory/Cardinal/Continuum.lean
90
90
theorem mk_set_nat : #(Set β„•) = 𝔠 := by
simp
1
2.718282
0
0.625
8
541
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ β„΅β‚€ #align cardinal.continuum Cardinal.continuum scoped notation "𝔠" => Cardinal.continuum @[simp] theorem two_power_aleph0 : 2 ^ aleph0.{u} = continuum.{u} := rfl #align cardinal.two_power_aleph_0 Cardinal.two_power_aleph0 @[simp] theorem lift_continuum : lift.{v} 𝔠 = 𝔠 := by rw [← two_power_aleph0, lift_two_power, lift_aleph0, two_power_aleph0] #align cardinal.lift_continuum Cardinal.lift_continuum @[simp] theorem continuum_le_lift {c : Cardinal.{u}} : 𝔠 ≀ lift.{v} c ↔ 𝔠 ≀ c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.continuum_le_lift Cardinal.continuum_le_lift @[simp] theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≀ 𝔠 ↔ c ≀ 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_le] #align cardinal.lift_le_continuum Cardinal.lift_le_continuum @[simp] theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.continuum_lt_lift Cardinal.continuum_lt_lift @[simp] theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠 := by -- Porting note: added explicit universes rw [← lift_continuum.{u,v}, lift_lt] #align cardinal.lift_lt_continuum Cardinal.lift_lt_continuum theorem aleph0_lt_continuum : β„΅β‚€ < 𝔠 := cantor β„΅β‚€ #align cardinal.aleph_0_lt_continuum Cardinal.aleph0_lt_continuum theorem aleph0_le_continuum : β„΅β‚€ ≀ 𝔠 := aleph0_lt_continuum.le #align cardinal.aleph_0_le_continuum Cardinal.aleph0_le_continuum @[simp] theorem beth_one : beth 1 = 𝔠 := by simpa using beth_succ 0 #align cardinal.beth_one Cardinal.beth_one theorem nat_lt_continuum (n : β„•) : ↑n < 𝔠 := (nat_lt_aleph0 n).trans aleph0_lt_continuum #align cardinal.nat_lt_continuum Cardinal.nat_lt_continuum theorem mk_set_nat : #(Set β„•) = 𝔠 := by simp #align cardinal.mk_set_nat Cardinal.mk_set_nat theorem continuum_pos : 0 < 𝔠 := nat_lt_continuum 0 #align cardinal.continuum_pos Cardinal.continuum_pos theorem continuum_ne_zero : 𝔠 β‰  0 := continuum_pos.ne' #align cardinal.continuum_ne_zero Cardinal.continuum_ne_zero
Mathlib/SetTheory/Cardinal/Continuum.lean
101
103
theorem aleph_one_le_continuum : aleph 1 ≀ 𝔠 := by
rw [← succ_aleph0] exact Order.succ_le_of_lt aleph0_lt_continuum
2
7.389056
1
0.625
8
541
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v variable (K : Type u) structure RatFunc [CommRing K] : Type u where ofFractionRing :: toFractionRing : FractionRing K[X] #align ratfunc RatFunc #align ratfunc.of_fraction_ring RatFunc.ofFractionRing #align ratfunc.to_fraction_ring RatFunc.toFractionRing namespace RatFunc section CommRing variable {K} variable [CommRing K] section Rec theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β†’ RatFunc K) := fun _ _ => ofFractionRing.inj #align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β†’ FractionRing K[X]) -- Porting note: the `xy` input was `rfl` and then there was no need for the `subst` | ⟨x⟩, ⟨y⟩, xy => by subst xy; rfl #align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : P := by refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_ intros p p' q q' h exact H q.2 q'.2 (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) -- Porting note: the definition above was as follows -- (-- Fix timeout by manipulating elaboration order -- fun p q => f p q) -- fun p p' q q' h => by -- exact H q.2 q'.2 -- (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h -- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) #align ratfunc.lift_on RatFunc.liftOn
Mathlib/FieldTheory/RatFunc/Defs.lean
123
127
theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]⁰) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by
rw [RatFunc.liftOn] exact Localization.liftOn_mk _ _ _ _
2
7.389056
1
0.625
8
542
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v variable (K : Type u) structure RatFunc [CommRing K] : Type u where ofFractionRing :: toFractionRing : FractionRing K[X] #align ratfunc RatFunc #align ratfunc.of_fraction_ring RatFunc.ofFractionRing #align ratfunc.to_fraction_ring RatFunc.toFractionRing namespace RatFunc section CommRing variable {K} variable [CommRing K] section Rec theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β†’ RatFunc K) := fun _ _ => ofFractionRing.inj #align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β†’ FractionRing K[X]) -- Porting note: the `xy` input was `rfl` and then there was no need for the `subst` | ⟨x⟩, ⟨y⟩, xy => by subst xy; rfl #align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : P := by refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_ intros p p' q q' h exact H q.2 q'.2 (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) -- Porting note: the definition above was as follows -- (-- Fix timeout by manipulating elaboration order -- fun p q => f p q) -- fun p p' q q' h => by -- exact H q.2 q'.2 -- (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h -- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) #align ratfunc.lift_on RatFunc.liftOn theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]⁰) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by rw [RatFunc.liftOn] exact Localization.liftOn_mk _ _ _ _ #align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk
Mathlib/FieldTheory/RatFunc/Defs.lean
130
136
theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β†’ K[X] β†’ P} (H : βˆ€ {p q a} (hq : q β‰  0) (_ha : a β‰  0), f (a * p) (a * q) = f p q) ⦃p q p' q' : K[X]⦄ (hq : q β‰  0) (hq' : q' β‰  0) (h : q' * p = q * p') : f p q = f p' q' := calc f p q = f (q' * p) (q' * q) := (H hq hq').symm _ = f (q * p') (q * q') := by
rw [h, mul_comm q'] _ = f p' q' := H hq' hq
2
7.389056
1
0.625
8
542
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v variable (K : Type u) structure RatFunc [CommRing K] : Type u where ofFractionRing :: toFractionRing : FractionRing K[X] #align ratfunc RatFunc #align ratfunc.of_fraction_ring RatFunc.ofFractionRing #align ratfunc.to_fraction_ring RatFunc.toFractionRing namespace RatFunc section CommRing variable {K} variable [CommRing K] section Rec theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β†’ RatFunc K) := fun _ _ => ofFractionRing.inj #align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β†’ FractionRing K[X]) -- Porting note: the `xy` input was `rfl` and then there was no need for the `subst` | ⟨x⟩, ⟨y⟩, xy => by subst xy; rfl #align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : P := by refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_ intros p p' q q' h exact H q.2 q'.2 (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) -- Porting note: the definition above was as follows -- (-- Fix timeout by manipulating elaboration order -- fun p q => f p q) -- fun p p' q q' h => by -- exact H q.2 q'.2 -- (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h -- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) #align ratfunc.lift_on RatFunc.liftOn theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]⁰) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by rw [RatFunc.liftOn] exact Localization.liftOn_mk _ _ _ _ #align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β†’ K[X] β†’ P} (H : βˆ€ {p q a} (hq : q β‰  0) (_ha : a β‰  0), f (a * p) (a * q) = f p q) ⦃p q p' q' : K[X]⦄ (hq : q β‰  0) (hq' : q' β‰  0) (h : q' * p = q * p') : f p q = f p' q' := calc f p q = f (q' * p) (q' * q) := (H hq hq').symm _ = f (q * p') (q * q') := by rw [h, mul_comm q'] _ = f p' q' := H hq' hq #align ratfunc.lift_on_condition_of_lift_on'_condition RatFunc.liftOn_condition_of_liftOn'_condition section IsDomain variable [IsDomain K] protected irreducible_def mk (p q : K[X]) : RatFunc K := ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) #align ratfunc.mk RatFunc.mk
Mathlib/FieldTheory/RatFunc/Defs.lean
154
155
theorem mk_eq_div' (p q : K[X]) : RatFunc.mk p q = ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) := by
rw [RatFunc.mk]
1
2.718282
0
0.625
8
542
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v variable (K : Type u) structure RatFunc [CommRing K] : Type u where ofFractionRing :: toFractionRing : FractionRing K[X] #align ratfunc RatFunc #align ratfunc.of_fraction_ring RatFunc.ofFractionRing #align ratfunc.to_fraction_ring RatFunc.toFractionRing namespace RatFunc section CommRing variable {K} variable [CommRing K] section Rec theorem ofFractionRing_injective : Function.Injective (ofFractionRing : _ β†’ RatFunc K) := fun _ _ => ofFractionRing.inj #align ratfunc.of_fraction_ring_injective RatFunc.ofFractionRing_injective theorem toFractionRing_injective : Function.Injective (toFractionRing : _ β†’ FractionRing K[X]) -- Porting note: the `xy` input was `rfl` and then there was no need for the `subst` | ⟨x⟩, ⟨y⟩, xy => by subst xy; rfl #align ratfunc.to_fraction_ring_injective RatFunc.toFractionRing_injective protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : P := by refine Localization.liftOn (toFractionRing x) (fun p q => f p q) ?_ intros p p' q q' h exact H q.2 q'.2 (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) -- Porting note: the definition above was as follows -- (-- Fix timeout by manipulating elaboration order -- fun p q => f p q) -- fun p p' q q' h => by -- exact H q.2 q'.2 -- (let ⟨⟨c, hc⟩, mul_eq⟩ := Localization.r_iff_exists.mp h -- mul_cancel_left_coe_nonZeroDivisors.mp mul_eq) #align ratfunc.lift_on RatFunc.liftOn theorem liftOn_ofFractionRing_mk {P : Sort v} (n : K[X]) (d : K[X]⁰) (f : K[X] β†’ K[X] β†’ P) (H : βˆ€ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' β†’ f p q = f p' q') : RatFunc.liftOn (ofFractionRing (Localization.mk n d)) f @H = f n d := by rw [RatFunc.liftOn] exact Localization.liftOn_mk _ _ _ _ #align ratfunc.lift_on_of_fraction_ring_mk RatFunc.liftOn_ofFractionRing_mk theorem liftOn_condition_of_liftOn'_condition {P : Sort v} {f : K[X] β†’ K[X] β†’ P} (H : βˆ€ {p q a} (hq : q β‰  0) (_ha : a β‰  0), f (a * p) (a * q) = f p q) ⦃p q p' q' : K[X]⦄ (hq : q β‰  0) (hq' : q' β‰  0) (h : q' * p = q * p') : f p q = f p' q' := calc f p q = f (q' * p) (q' * q) := (H hq hq').symm _ = f (q * p') (q * q') := by rw [h, mul_comm q'] _ = f p' q' := H hq' hq #align ratfunc.lift_on_condition_of_lift_on'_condition RatFunc.liftOn_condition_of_liftOn'_condition section IsDomain variable [IsDomain K] protected irreducible_def mk (p q : K[X]) : RatFunc K := ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) #align ratfunc.mk RatFunc.mk theorem mk_eq_div' (p q : K[X]) : RatFunc.mk p q = ofFractionRing (algebraMap _ _ p / algebraMap _ _ q) := by rw [RatFunc.mk] #align ratfunc.mk_eq_div' RatFunc.mk_eq_div'
Mathlib/FieldTheory/RatFunc/Defs.lean
158
159
theorem mk_zero (p : K[X]) : RatFunc.mk p 0 = ofFractionRing (0 : FractionRing K[X]) := by
rw [mk_eq_div', RingHom.map_zero, div_zero]
1
2.718282
0
0.625
8
542