Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
num_lines
int64
1
150
complexity_score
float64
2.72
139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B
diff_level
int64
0
2
file_diff_level
float64
0
2
theorem_same_file
int64
1
32
rank_file
int64
0
2.51k
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} namespace ContinuousLinearEquiv variable (iso : E ≃L[π•œ] F) @[fun_prop] protected theorem hasStrictFDerivAt : HasStrictFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasStrictFDerivAt #align continuous_linear_equiv.has_strict_fderiv_at ContinuousLinearEquiv.hasStrictFDerivAt @[fun_prop] protected theorem hasFDerivWithinAt : HasFDerivWithinAt iso (iso : E β†’L[π•œ] F) s x := iso.toContinuousLinearMap.hasFDerivWithinAt #align continuous_linear_equiv.has_fderiv_within_at ContinuousLinearEquiv.hasFDerivWithinAt @[fun_prop] protected theorem hasFDerivAt : HasFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasFDerivAtFilter #align continuous_linear_equiv.has_fderiv_at ContinuousLinearEquiv.hasFDerivAt @[fun_prop] protected theorem differentiableAt : DifferentiableAt π•œ iso x := iso.hasFDerivAt.differentiableAt #align continuous_linear_equiv.differentiable_at ContinuousLinearEquiv.differentiableAt @[fun_prop] protected theorem differentiableWithinAt : DifferentiableWithinAt π•œ iso s x := iso.differentiableAt.differentiableWithinAt #align continuous_linear_equiv.differentiable_within_at ContinuousLinearEquiv.differentiableWithinAt protected theorem fderiv : fderiv π•œ iso x = iso := iso.hasFDerivAt.fderiv #align continuous_linear_equiv.fderiv ContinuousLinearEquiv.fderiv protected theorem fderivWithin (hxs : UniqueDiffWithinAt π•œ s x) : fderivWithin π•œ iso s x = iso := iso.toContinuousLinearMap.fderivWithin hxs #align continuous_linear_equiv.fderiv_within ContinuousLinearEquiv.fderivWithin @[fun_prop] protected theorem differentiable : Differentiable π•œ iso := fun _ => iso.differentiableAt #align continuous_linear_equiv.differentiable ContinuousLinearEquiv.differentiable @[fun_prop] protected theorem differentiableOn : DifferentiableOn π•œ iso s := iso.differentiable.differentiableOn #align continuous_linear_equiv.differentiable_on ContinuousLinearEquiv.differentiableOn theorem comp_differentiableWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} : DifferentiableWithinAt π•œ (iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x := by refine ⟨fun H => ?_, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩ have : DifferentiableWithinAt π•œ (iso.symm ∘ iso ∘ f) s x := iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this #align continuous_linear_equiv.comp_differentiable_within_at_iff ContinuousLinearEquiv.comp_differentiableWithinAt_iff theorem comp_differentiableAt_iff {f : G β†’ E} {x : G} : DifferentiableAt π•œ (iso ∘ f) x ↔ DifferentiableAt π•œ f x := by rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ, iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_at_iff ContinuousLinearEquiv.comp_differentiableAt_iff
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
110
113
theorem comp_differentiableOn_iff {f : G β†’ E} {s : Set G} : DifferentiableOn π•œ (iso ∘ f) s ↔ DifferentiableOn π•œ f s := by
rw [DifferentiableOn, DifferentiableOn] simp only [iso.comp_differentiableWithinAt_iff]
2
7.389056
1
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} namespace ContinuousLinearEquiv variable (iso : E ≃L[π•œ] F) @[fun_prop] protected theorem hasStrictFDerivAt : HasStrictFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasStrictFDerivAt #align continuous_linear_equiv.has_strict_fderiv_at ContinuousLinearEquiv.hasStrictFDerivAt @[fun_prop] protected theorem hasFDerivWithinAt : HasFDerivWithinAt iso (iso : E β†’L[π•œ] F) s x := iso.toContinuousLinearMap.hasFDerivWithinAt #align continuous_linear_equiv.has_fderiv_within_at ContinuousLinearEquiv.hasFDerivWithinAt @[fun_prop] protected theorem hasFDerivAt : HasFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasFDerivAtFilter #align continuous_linear_equiv.has_fderiv_at ContinuousLinearEquiv.hasFDerivAt @[fun_prop] protected theorem differentiableAt : DifferentiableAt π•œ iso x := iso.hasFDerivAt.differentiableAt #align continuous_linear_equiv.differentiable_at ContinuousLinearEquiv.differentiableAt @[fun_prop] protected theorem differentiableWithinAt : DifferentiableWithinAt π•œ iso s x := iso.differentiableAt.differentiableWithinAt #align continuous_linear_equiv.differentiable_within_at ContinuousLinearEquiv.differentiableWithinAt protected theorem fderiv : fderiv π•œ iso x = iso := iso.hasFDerivAt.fderiv #align continuous_linear_equiv.fderiv ContinuousLinearEquiv.fderiv protected theorem fderivWithin (hxs : UniqueDiffWithinAt π•œ s x) : fderivWithin π•œ iso s x = iso := iso.toContinuousLinearMap.fderivWithin hxs #align continuous_linear_equiv.fderiv_within ContinuousLinearEquiv.fderivWithin @[fun_prop] protected theorem differentiable : Differentiable π•œ iso := fun _ => iso.differentiableAt #align continuous_linear_equiv.differentiable ContinuousLinearEquiv.differentiable @[fun_prop] protected theorem differentiableOn : DifferentiableOn π•œ iso s := iso.differentiable.differentiableOn #align continuous_linear_equiv.differentiable_on ContinuousLinearEquiv.differentiableOn theorem comp_differentiableWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} : DifferentiableWithinAt π•œ (iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x := by refine ⟨fun H => ?_, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩ have : DifferentiableWithinAt π•œ (iso.symm ∘ iso ∘ f) s x := iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this #align continuous_linear_equiv.comp_differentiable_within_at_iff ContinuousLinearEquiv.comp_differentiableWithinAt_iff theorem comp_differentiableAt_iff {f : G β†’ E} {x : G} : DifferentiableAt π•œ (iso ∘ f) x ↔ DifferentiableAt π•œ f x := by rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ, iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_at_iff ContinuousLinearEquiv.comp_differentiableAt_iff theorem comp_differentiableOn_iff {f : G β†’ E} {s : Set G} : DifferentiableOn π•œ (iso ∘ f) s ↔ DifferentiableOn π•œ f s := by rw [DifferentiableOn, DifferentiableOn] simp only [iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_on_iff ContinuousLinearEquiv.comp_differentiableOn_iff
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
116
118
theorem comp_differentiable_iff {f : G β†’ E} : Differentiable π•œ (iso ∘ f) ↔ Differentiable π•œ f := by
rw [← differentiableOn_univ, ← differentiableOn_univ] exact iso.comp_differentiableOn_iff
2
7.389056
1
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} namespace ContinuousLinearEquiv variable (iso : E ≃L[π•œ] F) @[fun_prop] protected theorem hasStrictFDerivAt : HasStrictFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasStrictFDerivAt #align continuous_linear_equiv.has_strict_fderiv_at ContinuousLinearEquiv.hasStrictFDerivAt @[fun_prop] protected theorem hasFDerivWithinAt : HasFDerivWithinAt iso (iso : E β†’L[π•œ] F) s x := iso.toContinuousLinearMap.hasFDerivWithinAt #align continuous_linear_equiv.has_fderiv_within_at ContinuousLinearEquiv.hasFDerivWithinAt @[fun_prop] protected theorem hasFDerivAt : HasFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasFDerivAtFilter #align continuous_linear_equiv.has_fderiv_at ContinuousLinearEquiv.hasFDerivAt @[fun_prop] protected theorem differentiableAt : DifferentiableAt π•œ iso x := iso.hasFDerivAt.differentiableAt #align continuous_linear_equiv.differentiable_at ContinuousLinearEquiv.differentiableAt @[fun_prop] protected theorem differentiableWithinAt : DifferentiableWithinAt π•œ iso s x := iso.differentiableAt.differentiableWithinAt #align continuous_linear_equiv.differentiable_within_at ContinuousLinearEquiv.differentiableWithinAt protected theorem fderiv : fderiv π•œ iso x = iso := iso.hasFDerivAt.fderiv #align continuous_linear_equiv.fderiv ContinuousLinearEquiv.fderiv protected theorem fderivWithin (hxs : UniqueDiffWithinAt π•œ s x) : fderivWithin π•œ iso s x = iso := iso.toContinuousLinearMap.fderivWithin hxs #align continuous_linear_equiv.fderiv_within ContinuousLinearEquiv.fderivWithin @[fun_prop] protected theorem differentiable : Differentiable π•œ iso := fun _ => iso.differentiableAt #align continuous_linear_equiv.differentiable ContinuousLinearEquiv.differentiable @[fun_prop] protected theorem differentiableOn : DifferentiableOn π•œ iso s := iso.differentiable.differentiableOn #align continuous_linear_equiv.differentiable_on ContinuousLinearEquiv.differentiableOn theorem comp_differentiableWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} : DifferentiableWithinAt π•œ (iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x := by refine ⟨fun H => ?_, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩ have : DifferentiableWithinAt π•œ (iso.symm ∘ iso ∘ f) s x := iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this #align continuous_linear_equiv.comp_differentiable_within_at_iff ContinuousLinearEquiv.comp_differentiableWithinAt_iff theorem comp_differentiableAt_iff {f : G β†’ E} {x : G} : DifferentiableAt π•œ (iso ∘ f) x ↔ DifferentiableAt π•œ f x := by rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ, iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_at_iff ContinuousLinearEquiv.comp_differentiableAt_iff theorem comp_differentiableOn_iff {f : G β†’ E} {s : Set G} : DifferentiableOn π•œ (iso ∘ f) s ↔ DifferentiableOn π•œ f s := by rw [DifferentiableOn, DifferentiableOn] simp only [iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_on_iff ContinuousLinearEquiv.comp_differentiableOn_iff theorem comp_differentiable_iff {f : G β†’ E} : Differentiable π•œ (iso ∘ f) ↔ Differentiable π•œ f := by rw [← differentiableOn_univ, ← differentiableOn_univ] exact iso.comp_differentiableOn_iff #align continuous_linear_equiv.comp_differentiable_iff ContinuousLinearEquiv.comp_differentiable_iff
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
121
130
theorem comp_hasFDerivWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} {f' : G β†’L[π•œ] E} : HasFDerivWithinAt (iso ∘ f) ((iso : E β†’L[π•œ] F).comp f') s x ↔ HasFDerivWithinAt f f' s x := by
refine ⟨fun H => ?_, fun H => iso.hasFDerivAt.comp_hasFDerivWithinAt x H⟩ have A : f = iso.symm ∘ iso ∘ f := by rw [← Function.comp.assoc, iso.symm_comp_self] rfl have B : f' = (iso.symm : F β†’L[π•œ] E).comp ((iso : E β†’L[π•œ] F).comp f') := by rw [← ContinuousLinearMap.comp_assoc, iso.coe_symm_comp_coe, ContinuousLinearMap.id_comp] rw [A, B] exact iso.symm.hasFDerivAt.comp_hasFDerivWithinAt x H
8
2,980.957987
2
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} namespace ContinuousLinearEquiv variable (iso : E ≃L[π•œ] F) @[fun_prop] protected theorem hasStrictFDerivAt : HasStrictFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasStrictFDerivAt #align continuous_linear_equiv.has_strict_fderiv_at ContinuousLinearEquiv.hasStrictFDerivAt @[fun_prop] protected theorem hasFDerivWithinAt : HasFDerivWithinAt iso (iso : E β†’L[π•œ] F) s x := iso.toContinuousLinearMap.hasFDerivWithinAt #align continuous_linear_equiv.has_fderiv_within_at ContinuousLinearEquiv.hasFDerivWithinAt @[fun_prop] protected theorem hasFDerivAt : HasFDerivAt iso (iso : E β†’L[π•œ] F) x := iso.toContinuousLinearMap.hasFDerivAtFilter #align continuous_linear_equiv.has_fderiv_at ContinuousLinearEquiv.hasFDerivAt @[fun_prop] protected theorem differentiableAt : DifferentiableAt π•œ iso x := iso.hasFDerivAt.differentiableAt #align continuous_linear_equiv.differentiable_at ContinuousLinearEquiv.differentiableAt @[fun_prop] protected theorem differentiableWithinAt : DifferentiableWithinAt π•œ iso s x := iso.differentiableAt.differentiableWithinAt #align continuous_linear_equiv.differentiable_within_at ContinuousLinearEquiv.differentiableWithinAt protected theorem fderiv : fderiv π•œ iso x = iso := iso.hasFDerivAt.fderiv #align continuous_linear_equiv.fderiv ContinuousLinearEquiv.fderiv protected theorem fderivWithin (hxs : UniqueDiffWithinAt π•œ s x) : fderivWithin π•œ iso s x = iso := iso.toContinuousLinearMap.fderivWithin hxs #align continuous_linear_equiv.fderiv_within ContinuousLinearEquiv.fderivWithin @[fun_prop] protected theorem differentiable : Differentiable π•œ iso := fun _ => iso.differentiableAt #align continuous_linear_equiv.differentiable ContinuousLinearEquiv.differentiable @[fun_prop] protected theorem differentiableOn : DifferentiableOn π•œ iso s := iso.differentiable.differentiableOn #align continuous_linear_equiv.differentiable_on ContinuousLinearEquiv.differentiableOn theorem comp_differentiableWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} : DifferentiableWithinAt π•œ (iso ∘ f) s x ↔ DifferentiableWithinAt π•œ f s x := by refine ⟨fun H => ?_, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩ have : DifferentiableWithinAt π•œ (iso.symm ∘ iso ∘ f) s x := iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this #align continuous_linear_equiv.comp_differentiable_within_at_iff ContinuousLinearEquiv.comp_differentiableWithinAt_iff theorem comp_differentiableAt_iff {f : G β†’ E} {x : G} : DifferentiableAt π•œ (iso ∘ f) x ↔ DifferentiableAt π•œ f x := by rw [← differentiableWithinAt_univ, ← differentiableWithinAt_univ, iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_at_iff ContinuousLinearEquiv.comp_differentiableAt_iff theorem comp_differentiableOn_iff {f : G β†’ E} {s : Set G} : DifferentiableOn π•œ (iso ∘ f) s ↔ DifferentiableOn π•œ f s := by rw [DifferentiableOn, DifferentiableOn] simp only [iso.comp_differentiableWithinAt_iff] #align continuous_linear_equiv.comp_differentiable_on_iff ContinuousLinearEquiv.comp_differentiableOn_iff theorem comp_differentiable_iff {f : G β†’ E} : Differentiable π•œ (iso ∘ f) ↔ Differentiable π•œ f := by rw [← differentiableOn_univ, ← differentiableOn_univ] exact iso.comp_differentiableOn_iff #align continuous_linear_equiv.comp_differentiable_iff ContinuousLinearEquiv.comp_differentiable_iff theorem comp_hasFDerivWithinAt_iff {f : G β†’ E} {s : Set G} {x : G} {f' : G β†’L[π•œ] E} : HasFDerivWithinAt (iso ∘ f) ((iso : E β†’L[π•œ] F).comp f') s x ↔ HasFDerivWithinAt f f' s x := by refine ⟨fun H => ?_, fun H => iso.hasFDerivAt.comp_hasFDerivWithinAt x H⟩ have A : f = iso.symm ∘ iso ∘ f := by rw [← Function.comp.assoc, iso.symm_comp_self] rfl have B : f' = (iso.symm : F β†’L[π•œ] E).comp ((iso : E β†’L[π•œ] F).comp f') := by rw [← ContinuousLinearMap.comp_assoc, iso.coe_symm_comp_coe, ContinuousLinearMap.id_comp] rw [A, B] exact iso.symm.hasFDerivAt.comp_hasFDerivWithinAt x H #align continuous_linear_equiv.comp_has_fderiv_within_at_iff ContinuousLinearEquiv.comp_hasFDerivWithinAt_iff
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
133
137
theorem comp_hasStrictFDerivAt_iff {f : G β†’ E} {x : G} {f' : G β†’L[π•œ] E} : HasStrictFDerivAt (iso ∘ f) ((iso : E β†’L[π•œ] F).comp f') x ↔ HasStrictFDerivAt f f' x := by
refine ⟨fun H => ?_, fun H => iso.hasStrictFDerivAt.comp x H⟩ convert iso.symm.hasStrictFDerivAt.comp x H using 1 <;> ext z <;> apply (iso.symm_apply_apply _).symm
3
20.085537
1
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E}
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
391
410
theorem HasStrictFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by
replace hg := hg.prod_map' hg replace hfg := hfg.prod_mk_nhds hfg have : (fun p : F Γ— F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p : F Γ— F => f' (g p.1 - g p.2) - (p.1 - p.2) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine this.trans_isLittleO ?_ clear this refine ((hf.comp_tendsto hg).symm.congr' (hfg.mono ?_) (eventually_of_forall fun _ => rfl)).trans_isBigO ?_ Β· rintro p ⟨hp1, hp2⟩ simp [hp1, hp2] Β· refine (hf.isBigO_sub_rev.comp_tendsto hg).congr' (eventually_of_forall fun _ => rfl) (hfg.mono ?_) rintro p ⟨hp1, hp2⟩ simp only [(Β· ∘ Β·), hp1, hp2]
17
24,154,952.753575
2
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} theorem HasStrictFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by replace hg := hg.prod_map' hg replace hfg := hfg.prod_mk_nhds hfg have : (fun p : F Γ— F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p : F Γ— F => f' (g p.1 - g p.2) - (p.1 - p.2) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine this.trans_isLittleO ?_ clear this refine ((hf.comp_tendsto hg).symm.congr' (hfg.mono ?_) (eventually_of_forall fun _ => rfl)).trans_isBigO ?_ Β· rintro p ⟨hp1, hp2⟩ simp [hp1, hp2] Β· refine (hf.isBigO_sub_rev.comp_tendsto hg).congr' (eventually_of_forall fun _ => rfl) (hfg.mono ?_) rintro p ⟨hp1, hp2⟩ simp only [(Β· ∘ Β·), hp1, hp2] #align has_strict_fderiv_at.of_local_left_inverse HasStrictFDerivAt.of_local_left_inverse
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
418
433
theorem HasFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by
have : (fun x : F => g x - g a - f'.symm (x - a)) =O[𝓝 a] fun x : F => f' (g x - g a) - (x - a) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine HasFDerivAtFilter.of_isLittleO <| this.trans_isLittleO ?_ clear this refine ((hf.isLittleO.comp_tendsto hg).symm.congr' (hfg.mono ?_) .rfl).trans_isBigO ?_ Β· intro p hp simp [hp, hfg.self_of_nhds] Β· refine ((hf.isBigO_sub_rev f'.antilipschitz).comp_tendsto hg).congr' (eventually_of_forall fun _ => rfl) (hfg.mono ?_) rintro p hp simp only [(Β· ∘ Β·), hp, hfg.self_of_nhds]
13
442,413.392009
2
1.555556
9
1,700
import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.equiv from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {π•œ : Type*} [NontriviallyNormedField π•œ] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace π•œ G'] variable {f fβ‚€ f₁ g : E β†’ F} variable {f' fβ‚€' f₁' g' : E β†’L[π•œ] F} variable (e : E β†’L[π•œ] F) variable {x : E} variable {s t : Set E} variable {L L₁ Lβ‚‚ : Filter E} theorem HasStrictFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasStrictFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by replace hg := hg.prod_map' hg replace hfg := hfg.prod_mk_nhds hfg have : (fun p : F Γ— F => g p.1 - g p.2 - f'.symm (p.1 - p.2)) =O[𝓝 (a, a)] fun p : F Γ— F => f' (g p.1 - g p.2) - (p.1 - p.2) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine this.trans_isLittleO ?_ clear this refine ((hf.comp_tendsto hg).symm.congr' (hfg.mono ?_) (eventually_of_forall fun _ => rfl)).trans_isBigO ?_ Β· rintro p ⟨hp1, hp2⟩ simp [hp1, hp2] Β· refine (hf.isBigO_sub_rev.comp_tendsto hg).congr' (eventually_of_forall fun _ => rfl) (hfg.mono ?_) rintro p ⟨hp1, hp2⟩ simp only [(Β· ∘ Β·), hp1, hp2] #align has_strict_fderiv_at.of_local_left_inverse HasStrictFDerivAt.of_local_left_inverse theorem HasFDerivAt.of_local_left_inverse {f : E β†’ F} {f' : E ≃L[π•œ] F} {g : F β†’ E} {a : F} (hg : ContinuousAt g a) (hf : HasFDerivAt f (f' : E β†’L[π•œ] F) (g a)) (hfg : βˆ€αΆ  y in 𝓝 a, f (g y) = y) : HasFDerivAt g (f'.symm : F β†’L[π•œ] E) a := by have : (fun x : F => g x - g a - f'.symm (x - a)) =O[𝓝 a] fun x : F => f' (g x - g a) - (x - a) := by refine ((f'.symm : F β†’L[π•œ] E).isBigO_comp _ _).congr (fun x => ?_) fun _ => rfl simp refine HasFDerivAtFilter.of_isLittleO <| this.trans_isLittleO ?_ clear this refine ((hf.isLittleO.comp_tendsto hg).symm.congr' (hfg.mono ?_) .rfl).trans_isBigO ?_ Β· intro p hp simp [hp, hfg.self_of_nhds] Β· refine ((hf.isBigO_sub_rev f'.antilipschitz).comp_tendsto hg).congr' (eventually_of_forall fun _ => rfl) (hfg.mono ?_) rintro p hp simp only [(Β· ∘ Β·), hp, hfg.self_of_nhds] #align has_fderiv_at.of_local_left_inverse HasFDerivAt.of_local_left_inverse theorem PartialHomeomorph.hasStrictFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[π•œ] F} {a : F} (ha : a ∈ f.target) (htff' : HasStrictFDerivAt f (f' : E β†’L[π•œ] F) (f.symm a)) : HasStrictFDerivAt f.symm (f'.symm : F β†’L[π•œ] E) a := htff'.of_local_left_inverse (f.symm.continuousAt ha) (f.eventually_right_inverse ha) #align local_homeomorph.has_strict_fderiv_at_symm PartialHomeomorph.hasStrictFDerivAt_symm theorem PartialHomeomorph.hasFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[π•œ] F} {a : F} (ha : a ∈ f.target) (htff' : HasFDerivAt f (f' : E β†’L[π•œ] F) (f.symm a)) : HasFDerivAt f.symm (f'.symm : F β†’L[π•œ] E) a := htff'.of_local_left_inverse (f.symm.continuousAt ha) (f.eventually_right_inverse ha) #align local_homeomorph.has_fderiv_at_symm PartialHomeomorph.hasFDerivAt_symm
Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
459
465
theorem HasFDerivWithinAt.eventually_ne (h : HasFDerivWithinAt f f' s x) (hf' : βˆƒ C, βˆ€ z, β€–zβ€– ≀ C * β€–f' zβ€–) : βˆ€αΆ  z in 𝓝[s \ {x}] x, f z β‰  f x := by
rw [nhdsWithin, diff_eq, ← inf_principal, ← inf_assoc, eventually_inf_principal] have A : (fun z => z - x) =O[𝓝[s] x] fun z => f' (z - x) := isBigO_iff.2 <| hf'.imp fun C hC => eventually_of_forall fun z => hC _ have : (fun z => f z - f x) ~[𝓝[s] x] fun z => f' (z - x) := h.isLittleO.trans_isBigO A simpa [not_imp_not, sub_eq_zero] using (A.trans this.isBigO_symm).eq_zero_imp
5
148.413159
2
1.555556
9
1,700
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr)
Mathlib/Data/QPF/Univariate/Basic.lean
71
75
theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by
rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl
4
54.59815
2
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl #align qpf.id_map QPF.id_map
Mathlib/Data/QPF/Univariate/Basic.lean
78
83
theorem comp_map {Ξ± Ξ² Ξ³ : Type _} (f : Ξ± β†’ Ξ²) (g : Ξ² β†’ Ξ³) (x : F Ξ±) : (g ∘ f) <$> x = g <$> f <$> x := by
rw [← abs_repr x] cases' repr x with a f rw [← abs_map, ← abs_map, ← abs_map] rfl
4
54.59815
2
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl #align qpf.id_map QPF.id_map theorem comp_map {Ξ± Ξ² Ξ³ : Type _} (f : Ξ± β†’ Ξ²) (g : Ξ² β†’ Ξ³) (x : F Ξ±) : (g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map, ← abs_map, ← abs_map] rfl #align qpf.comp_map QPF.comp_map theorem lawfulFunctor (h : βˆ€ Ξ± Ξ² : Type u, @Functor.mapConst F _ Ξ± _ = Functor.map ∘ Function.const Ξ²) : LawfulFunctor F := { map_const := @h id_map := @id_map F _ _ comp_map := @comp_map F _ _ } #align qpf.is_lawful_functor QPF.lawfulFunctor section open Functor
Mathlib/Data/QPF/Univariate/Basic.lean
101
114
theorem liftp_iff {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ a f, x = abs ⟨a, f⟩ ∧ βˆ€ i, p (f i) := by
constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use a, fun i => (f i).val constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨a, f, hβ‚€, hβ‚βŸ© use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, hβ‚€]; rfl
12
162,754.791419
2
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl #align qpf.id_map QPF.id_map theorem comp_map {Ξ± Ξ² Ξ³ : Type _} (f : Ξ± β†’ Ξ²) (g : Ξ² β†’ Ξ³) (x : F Ξ±) : (g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map, ← abs_map, ← abs_map] rfl #align qpf.comp_map QPF.comp_map theorem lawfulFunctor (h : βˆ€ Ξ± Ξ² : Type u, @Functor.mapConst F _ Ξ± _ = Functor.map ∘ Function.const Ξ²) : LawfulFunctor F := { map_const := @h id_map := @id_map F _ _ comp_map := @comp_map F _ _ } #align qpf.is_lawful_functor QPF.lawfulFunctor section open Functor theorem liftp_iff {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ a f, x = abs ⟨a, f⟩ ∧ βˆ€ i, p (f i) := by constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use a, fun i => (f i).val constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨a, f, hβ‚€, hβ‚βŸ© use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, hβ‚€]; rfl #align qpf.liftp_iff QPF.liftp_iff
Mathlib/Data/QPF/Univariate/Basic.lean
117
131
theorem liftp_iff' {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ u : q.P Ξ±, abs u = x ∧ βˆ€ i, p (u.snd i) := by
constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use ⟨a, fun i => (f i).val⟩ dsimp constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨⟨a, f⟩, hβ‚€, hβ‚βŸ©; dsimp at * use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, ← hβ‚€]; rfl
13
442,413.392009
2
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl #align qpf.id_map QPF.id_map theorem comp_map {Ξ± Ξ² Ξ³ : Type _} (f : Ξ± β†’ Ξ²) (g : Ξ² β†’ Ξ³) (x : F Ξ±) : (g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map, ← abs_map, ← abs_map] rfl #align qpf.comp_map QPF.comp_map theorem lawfulFunctor (h : βˆ€ Ξ± Ξ² : Type u, @Functor.mapConst F _ Ξ± _ = Functor.map ∘ Function.const Ξ²) : LawfulFunctor F := { map_const := @h id_map := @id_map F _ _ comp_map := @comp_map F _ _ } #align qpf.is_lawful_functor QPF.lawfulFunctor section open Functor theorem liftp_iff {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ a f, x = abs ⟨a, f⟩ ∧ βˆ€ i, p (f i) := by constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use a, fun i => (f i).val constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨a, f, hβ‚€, hβ‚βŸ© use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, hβ‚€]; rfl #align qpf.liftp_iff QPF.liftp_iff theorem liftp_iff' {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ u : q.P Ξ±, abs u = x ∧ βˆ€ i, p (u.snd i) := by constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use ⟨a, fun i => (f i).val⟩ dsimp constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨⟨a, f⟩, hβ‚€, hβ‚βŸ©; dsimp at * use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, ← hβ‚€]; rfl #align qpf.liftp_iff' QPF.liftp_iff'
Mathlib/Data/QPF/Univariate/Basic.lean
134
153
theorem liftr_iff {Ξ± : Type u} (r : Ξ± β†’ Ξ± β†’ Prop) (x y : F Ξ±) : Liftr r x y ↔ βˆƒ a fβ‚€ f₁, x = abs ⟨a, fβ‚€βŸ© ∧ y = abs ⟨a, fβ‚βŸ© ∧ βˆ€ i, r (fβ‚€ i) (f₁ i) := by
constructor Β· rintro ⟨u, xeq, yeq⟩ cases' h : repr u with a f use a, fun i => (f i).val.fst, fun i => (f i).val.snd constructor Β· rw [← xeq, ← abs_repr u, h, ← abs_map] rfl constructor Β· rw [← yeq, ← abs_repr u, h, ← abs_map] rfl intro i exact (f i).property rintro ⟨a, fβ‚€, f₁, xeq, yeq, h⟩ use abs ⟨a, fun i => ⟨(fβ‚€ i, f₁ i), h i⟩⟩ constructor Β· rw [xeq, ← abs_map] rfl rw [yeq, ← abs_map]; rfl
18
65,659,969.137331
2
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) theorem id_map {Ξ± : Type _} (x : F Ξ±) : id <$> x = x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map] rfl #align qpf.id_map QPF.id_map theorem comp_map {Ξ± Ξ² Ξ³ : Type _} (f : Ξ± β†’ Ξ²) (g : Ξ² β†’ Ξ³) (x : F Ξ±) : (g ∘ f) <$> x = g <$> f <$> x := by rw [← abs_repr x] cases' repr x with a f rw [← abs_map, ← abs_map, ← abs_map] rfl #align qpf.comp_map QPF.comp_map theorem lawfulFunctor (h : βˆ€ Ξ± Ξ² : Type u, @Functor.mapConst F _ Ξ± _ = Functor.map ∘ Function.const Ξ²) : LawfulFunctor F := { map_const := @h id_map := @id_map F _ _ comp_map := @comp_map F _ _ } #align qpf.is_lawful_functor QPF.lawfulFunctor section open Functor theorem liftp_iff {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ a f, x = abs ⟨a, f⟩ ∧ βˆ€ i, p (f i) := by constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use a, fun i => (f i).val constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨a, f, hβ‚€, hβ‚βŸ© use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, hβ‚€]; rfl #align qpf.liftp_iff QPF.liftp_iff theorem liftp_iff' {Ξ± : Type u} (p : Ξ± β†’ Prop) (x : F Ξ±) : Liftp p x ↔ βˆƒ u : q.P Ξ±, abs u = x ∧ βˆ€ i, p (u.snd i) := by constructor Β· rintro ⟨y, hy⟩ cases' h : repr y with a f use ⟨a, fun i => (f i).val⟩ dsimp constructor Β· rw [← hy, ← abs_repr y, h, ← abs_map] rfl intro i apply (f i).property rintro ⟨⟨a, f⟩, hβ‚€, hβ‚βŸ©; dsimp at * use abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩ rw [← abs_map, ← hβ‚€]; rfl #align qpf.liftp_iff' QPF.liftp_iff' theorem liftr_iff {Ξ± : Type u} (r : Ξ± β†’ Ξ± β†’ Prop) (x y : F Ξ±) : Liftr r x y ↔ βˆƒ a fβ‚€ f₁, x = abs ⟨a, fβ‚€βŸ© ∧ y = abs ⟨a, fβ‚βŸ© ∧ βˆ€ i, r (fβ‚€ i) (f₁ i) := by constructor Β· rintro ⟨u, xeq, yeq⟩ cases' h : repr u with a f use a, fun i => (f i).val.fst, fun i => (f i).val.snd constructor Β· rw [← xeq, ← abs_repr u, h, ← abs_map] rfl constructor Β· rw [← yeq, ← abs_repr u, h, ← abs_map] rfl intro i exact (f i).property rintro ⟨a, fβ‚€, f₁, xeq, yeq, h⟩ use abs ⟨a, fun i => ⟨(fβ‚€ i, f₁ i), h i⟩⟩ constructor Β· rw [xeq, ← abs_map] rfl rw [yeq, ← abs_map]; rfl #align qpf.liftr_iff QPF.liftr_iff end def recF {Ξ± : Type _} (g : F Ξ± β†’ Ξ±) : q.P.W β†’ Ξ± | ⟨a, f⟩ => g (abs ⟨a, fun x => recF g (f x)⟩) set_option linter.uppercaseLean3 false in #align qpf.recF QPF.recF
Mathlib/Data/QPF/Univariate/Basic.lean
169
172
theorem recF_eq {Ξ± : Type _} (g : F Ξ± β†’ Ξ±) (x : q.P.W) : recF g x = g (abs (q.P.map (recF g) x.dest)) := by
cases x rfl
2
7.389056
1
1.571429
7
1,701
import Mathlib.Data.PFunctor.Univariate.M #align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7" universe u class QPF (F : Type u β†’ Type u) [Functor F] where P : PFunctor.{u} abs : βˆ€ {Ξ±}, P Ξ± β†’ F Ξ± repr : βˆ€ {Ξ±}, F Ξ± β†’ P Ξ± abs_repr : βˆ€ {Ξ±} (x : F Ξ±), abs (repr x) = x abs_map : βˆ€ {Ξ± Ξ²} (f : Ξ± β†’ Ξ²) (p : P Ξ±), abs (P.map f p) = f <$> abs p #align qpf QPF namespace QPF variable {F : Type u β†’ Type u} [Functor F] [q : QPF F] open Functor (Liftp Liftr) def corecF {Ξ± : Type _} (g : Ξ± β†’ F Ξ±) : Ξ± β†’ q.P.M := PFunctor.M.corec fun x => repr (g x) set_option linter.uppercaseLean3 false in #align qpf.corecF QPF.corecF
Mathlib/Data/QPF/Univariate/Basic.lean
377
379
theorem corecF_eq {Ξ± : Type _} (g : Ξ± β†’ F Ξ±) (x : Ξ±) : PFunctor.M.dest (corecF g x) = q.P.map (corecF g) (repr (g x)) := by
rw [corecF, PFunctor.M.dest_corec]
1
2.718282
0
1.571429
7
1,701
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis
Mathlib/Topology/Connected/LocallyConnected.lean
41
52
theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by
simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor · intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ · exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩
9
8,103.083928
2
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace
Mathlib/Topology/Connected/LocallyConnected.lean
63
67
theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by
rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩
3
20.085537
1
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩ #align connected_component_in_mem_nhds connectedComponentIn_mem_nhds protected theorem IsOpen.connectedComponentIn [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (hF : IsOpen F) : IsOpen (connectedComponentIn F x) := by rw [isOpen_iff_mem_nhds] intro y hy rw [connectedComponentIn_eq hy] exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy) #align is_open.connected_component_in IsOpen.connectedComponentIn
Mathlib/Topology/Connected/LocallyConnected.lean
78
81
theorem isOpen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsOpen (connectedComponent x) := by
rw [← connectedComponentIn_univ] exact isOpen_univ.connectedComponentIn
2
7.389056
1
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩ #align connected_component_in_mem_nhds connectedComponentIn_mem_nhds protected theorem IsOpen.connectedComponentIn [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (hF : IsOpen F) : IsOpen (connectedComponentIn F x) := by rw [isOpen_iff_mem_nhds] intro y hy rw [connectedComponentIn_eq hy] exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy) #align is_open.connected_component_in IsOpen.connectedComponentIn theorem isOpen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsOpen (connectedComponent x) := by rw [← connectedComponentIn_univ] exact isOpen_univ.connectedComponentIn #align is_open_connected_component isOpen_connectedComponent theorem isClopen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsClopen (connectedComponent x) := ⟨isClosed_connectedComponent, isOpen_connectedComponent⟩ #align is_clopen_connected_component isClopen_connectedComponent
Mathlib/Topology/Connected/LocallyConnected.lean
89
101
theorem locallyConnectedSpace_iff_connectedComponentIn_open : LocallyConnectedSpace Ξ± ↔ βˆ€ F : Set Ξ±, IsOpen F β†’ βˆ€ x ∈ F, IsOpen (connectedComponentIn F x) := by
constructor · intro h exact fun F hF x _ => hF.connectedComponentIn · intro h rw [locallyConnectedSpace_iff_open_connected_subsets] refine fun x U hU => ⟨connectedComponentIn (interior U) x, (connectedComponentIn_subset _ _).trans interior_subset, h _ isOpen_interior x ?_, mem_connectedComponentIn ?_, isConnected_connectedComponentIn_iff.mpr ?_⟩ <;> exact mem_interior_iff_mem_nhds.mpr hU
10
22,026.465795
2
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩ #align connected_component_in_mem_nhds connectedComponentIn_mem_nhds protected theorem IsOpen.connectedComponentIn [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (hF : IsOpen F) : IsOpen (connectedComponentIn F x) := by rw [isOpen_iff_mem_nhds] intro y hy rw [connectedComponentIn_eq hy] exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy) #align is_open.connected_component_in IsOpen.connectedComponentIn theorem isOpen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsOpen (connectedComponent x) := by rw [← connectedComponentIn_univ] exact isOpen_univ.connectedComponentIn #align is_open_connected_component isOpen_connectedComponent theorem isClopen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsClopen (connectedComponent x) := ⟨isClosed_connectedComponent, isOpen_connectedComponent⟩ #align is_clopen_connected_component isClopen_connectedComponent theorem locallyConnectedSpace_iff_connectedComponentIn_open : LocallyConnectedSpace Ξ± ↔ βˆ€ F : Set Ξ±, IsOpen F β†’ βˆ€ x ∈ F, IsOpen (connectedComponentIn F x) := by constructor Β· intro h exact fun F hF x _ => hF.connectedComponentIn Β· intro h rw [locallyConnectedSpace_iff_open_connected_subsets] refine fun x U hU => ⟨connectedComponentIn (interior U) x, (connectedComponentIn_subset _ _).trans interior_subset, h _ isOpen_interior x ?_, mem_connectedComponentIn ?_, isConnected_connectedComponentIn_iff.mpr ?_⟩ <;> exact mem_interior_iff_mem_nhds.mpr hU #align locally_connected_space_iff_connected_component_in_open locallyConnectedSpace_iff_connectedComponentIn_open
Mathlib/Topology/Connected/LocallyConnected.lean
104
115
theorem locallyConnectedSpace_iff_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ (x : Ξ±), βˆ€ U ∈ 𝓝 x, βˆƒ V ∈ 𝓝 x, IsPreconnected V ∧ V βŠ† U := by
constructor Β· rw [locallyConnectedSpace_iff_open_connected_subsets] intro h x U hxU rcases h x U hxU with ⟨V, hVU, hV₁, hxV, hVβ‚‚βŸ© exact ⟨V, hV₁.mem_nhds hxV, hVβ‚‚.isPreconnected, hVU⟩ Β· rw [locallyConnectedSpace_iff_connectedComponentIn_open] refine fun h U hU x _ => isOpen_iff_mem_nhds.mpr fun y hy => ?_ rw [connectedComponentIn_eq hy] rcases h y U (hU.mem_nhds <| (connectedComponentIn_subset _ _) hy) with ⟨V, hVy, hV, hVU⟩ exact Filter.mem_of_superset hVy (hV.subset_connectedComponentIn (mem_of_mem_nhds hVy) hVU)
10
22,026.465795
2
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩ #align connected_component_in_mem_nhds connectedComponentIn_mem_nhds protected theorem IsOpen.connectedComponentIn [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (hF : IsOpen F) : IsOpen (connectedComponentIn F x) := by rw [isOpen_iff_mem_nhds] intro y hy rw [connectedComponentIn_eq hy] exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy) #align is_open.connected_component_in IsOpen.connectedComponentIn theorem isOpen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsOpen (connectedComponent x) := by rw [← connectedComponentIn_univ] exact isOpen_univ.connectedComponentIn #align is_open_connected_component isOpen_connectedComponent theorem isClopen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsClopen (connectedComponent x) := ⟨isClosed_connectedComponent, isOpen_connectedComponent⟩ #align is_clopen_connected_component isClopen_connectedComponent theorem locallyConnectedSpace_iff_connectedComponentIn_open : LocallyConnectedSpace Ξ± ↔ βˆ€ F : Set Ξ±, IsOpen F β†’ βˆ€ x ∈ F, IsOpen (connectedComponentIn F x) := by constructor Β· intro h exact fun F hF x _ => hF.connectedComponentIn Β· intro h rw [locallyConnectedSpace_iff_open_connected_subsets] refine fun x U hU => ⟨connectedComponentIn (interior U) x, (connectedComponentIn_subset _ _).trans interior_subset, h _ isOpen_interior x ?_, mem_connectedComponentIn ?_, isConnected_connectedComponentIn_iff.mpr ?_⟩ <;> exact mem_interior_iff_mem_nhds.mpr hU #align locally_connected_space_iff_connected_component_in_open locallyConnectedSpace_iff_connectedComponentIn_open theorem locallyConnectedSpace_iff_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ (x : Ξ±), βˆ€ U ∈ 𝓝 x, βˆƒ V ∈ 𝓝 x, IsPreconnected V ∧ V βŠ† U := by constructor Β· rw [locallyConnectedSpace_iff_open_connected_subsets] intro h x U hxU rcases h x U hxU with ⟨V, hVU, hV₁, hxV, hVβ‚‚βŸ© exact ⟨V, hV₁.mem_nhds hxV, hVβ‚‚.isPreconnected, hVU⟩ Β· rw [locallyConnectedSpace_iff_connectedComponentIn_open] refine fun h U hU x _ => isOpen_iff_mem_nhds.mpr fun y hy => ?_ rw [connectedComponentIn_eq hy] rcases h y U (hU.mem_nhds <| (connectedComponentIn_subset _ _) hy) with ⟨V, hVy, hV, hVU⟩ exact Filter.mem_of_superset hVy (hV.subset_connectedComponentIn (mem_of_mem_nhds hVy) hVU) #align locally_connected_space_iff_connected_subsets locallyConnectedSpace_iff_connected_subsets
Mathlib/Topology/Connected/LocallyConnected.lean
118
122
theorem locallyConnectedSpace_iff_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => s ∈ 𝓝 x ∧ IsPreconnected s) id := by
rw [locallyConnectedSpace_iff_connected_subsets] exact forall_congr' fun x => Filter.hasBasis_self.symm
2
7.389056
1
1.571429
7
1,702
import Mathlib.Topology.Connected.Basic open Set Topology universe u v variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Type*} {Ο€ : ΞΉ β†’ Type*} [TopologicalSpace Ξ±] {s t u v : Set Ξ±} section LocallyConnectedSpace class LocallyConnectedSpace (Ξ± : Type*) [TopologicalSpace Ξ±] : Prop where open_connected_basis : βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id #align locally_connected_space LocallyConnectedSpace theorem locallyConnectedSpace_iff_open_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => IsOpen s ∧ x ∈ s ∧ IsConnected s) id := ⟨@LocallyConnectedSpace.open_connected_basis _ _, LocallyConnectedSpace.mk⟩ #align locally_connected_space_iff_open_connected_basis locallyConnectedSpace_iff_open_connected_basis theorem locallyConnectedSpace_iff_open_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ x, βˆ€ U ∈ 𝓝 x, βˆƒ V : Set Ξ±, V βŠ† U ∧ IsOpen V ∧ x ∈ V ∧ IsConnected V := by simp_rw [locallyConnectedSpace_iff_open_connected_basis] refine forall_congr' fun _ => ?_ constructor Β· intro h U hU rcases h.mem_iff.mp hU with ⟨V, hV, hVU⟩ exact ⟨V, hVU, hV⟩ Β· exact fun h => ⟨fun U => ⟨fun hU => let ⟨V, hVU, hV⟩ := h U hU ⟨V, hV, hVU⟩, fun ⟨V, ⟨hV, hxV, _⟩, hVU⟩ => mem_nhds_iff.mpr ⟨V, hVU, hV, hxV⟩⟩⟩ #align locally_connected_space_iff_open_connected_subsets locallyConnectedSpace_iff_open_connected_subsets instance (priority := 100) DiscreteTopology.toLocallyConnectedSpace (Ξ±) [TopologicalSpace Ξ±] [DiscreteTopology Ξ±] : LocallyConnectedSpace Ξ± := locallyConnectedSpace_iff_open_connected_subsets.2 fun x _U hU => ⟨{x}, singleton_subset_iff.2 <| mem_of_mem_nhds hU, isOpen_discrete _, rfl, isConnected_singleton⟩ #align discrete_topology.to_locally_connected_space DiscreteTopology.toLocallyConnectedSpace theorem connectedComponentIn_mem_nhds [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (h : F ∈ 𝓝 x) : connectedComponentIn F x ∈ 𝓝 x := by rw [(LocallyConnectedSpace.open_connected_basis x).mem_iff] at h rcases h with ⟨s, ⟨h1s, hxs, h2s⟩, hsF⟩ exact mem_nhds_iff.mpr ⟨s, h2s.isPreconnected.subset_connectedComponentIn hxs hsF, h1s, hxs⟩ #align connected_component_in_mem_nhds connectedComponentIn_mem_nhds protected theorem IsOpen.connectedComponentIn [LocallyConnectedSpace Ξ±] {F : Set Ξ±} {x : Ξ±} (hF : IsOpen F) : IsOpen (connectedComponentIn F x) := by rw [isOpen_iff_mem_nhds] intro y hy rw [connectedComponentIn_eq hy] exact connectedComponentIn_mem_nhds (hF.mem_nhds <| connectedComponentIn_subset F x hy) #align is_open.connected_component_in IsOpen.connectedComponentIn theorem isOpen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsOpen (connectedComponent x) := by rw [← connectedComponentIn_univ] exact isOpen_univ.connectedComponentIn #align is_open_connected_component isOpen_connectedComponent theorem isClopen_connectedComponent [LocallyConnectedSpace Ξ±] {x : Ξ±} : IsClopen (connectedComponent x) := ⟨isClosed_connectedComponent, isOpen_connectedComponent⟩ #align is_clopen_connected_component isClopen_connectedComponent theorem locallyConnectedSpace_iff_connectedComponentIn_open : LocallyConnectedSpace Ξ± ↔ βˆ€ F : Set Ξ±, IsOpen F β†’ βˆ€ x ∈ F, IsOpen (connectedComponentIn F x) := by constructor Β· intro h exact fun F hF x _ => hF.connectedComponentIn Β· intro h rw [locallyConnectedSpace_iff_open_connected_subsets] refine fun x U hU => ⟨connectedComponentIn (interior U) x, (connectedComponentIn_subset _ _).trans interior_subset, h _ isOpen_interior x ?_, mem_connectedComponentIn ?_, isConnected_connectedComponentIn_iff.mpr ?_⟩ <;> exact mem_interior_iff_mem_nhds.mpr hU #align locally_connected_space_iff_connected_component_in_open locallyConnectedSpace_iff_connectedComponentIn_open theorem locallyConnectedSpace_iff_connected_subsets : LocallyConnectedSpace Ξ± ↔ βˆ€ (x : Ξ±), βˆ€ U ∈ 𝓝 x, βˆƒ V ∈ 𝓝 x, IsPreconnected V ∧ V βŠ† U := by constructor Β· rw [locallyConnectedSpace_iff_open_connected_subsets] intro h x U hxU rcases h x U hxU with ⟨V, hVU, hV₁, hxV, hVβ‚‚βŸ© exact ⟨V, hV₁.mem_nhds hxV, hVβ‚‚.isPreconnected, hVU⟩ Β· rw [locallyConnectedSpace_iff_connectedComponentIn_open] refine fun h U hU x _ => isOpen_iff_mem_nhds.mpr fun y hy => ?_ rw [connectedComponentIn_eq hy] rcases h y U (hU.mem_nhds <| (connectedComponentIn_subset _ _) hy) with ⟨V, hVy, hV, hVU⟩ exact Filter.mem_of_superset hVy (hV.subset_connectedComponentIn (mem_of_mem_nhds hVy) hVU) #align locally_connected_space_iff_connected_subsets locallyConnectedSpace_iff_connected_subsets theorem locallyConnectedSpace_iff_connected_basis : LocallyConnectedSpace Ξ± ↔ βˆ€ x, (𝓝 x).HasBasis (fun s : Set Ξ± => s ∈ 𝓝 x ∧ IsPreconnected s) id := by rw [locallyConnectedSpace_iff_connected_subsets] exact forall_congr' fun x => Filter.hasBasis_self.symm #align locally_connected_space_iff_connected_basis locallyConnectedSpace_iff_connected_basis
Mathlib/Topology/Connected/LocallyConnected.lean
125
132
theorem locallyConnectedSpace_of_connected_bases {ΞΉ : Type*} (b : Ξ± β†’ ΞΉ β†’ Set Ξ±) (p : Ξ± β†’ ΞΉ β†’ Prop) (hbasis : βˆ€ x, (𝓝 x).HasBasis (p x) (b x)) (hconnected : βˆ€ x i, p x i β†’ IsPreconnected (b x i)) : LocallyConnectedSpace Ξ± := by
rw [locallyConnectedSpace_iff_connected_basis] exact fun x => (hbasis x).to_hasBasis (fun i hi => ⟨b x i, ⟨(hbasis x).mem_of_mem hi, hconnected x i hi⟩, subset_rfl⟩) fun s hs => ⟨(hbasis x).index s hs.1, ⟨(hbasis x).property_index hs.1, (hbasis x).set_index_subset hs.1⟩⟩
5
148.413159
2
1.571429
7
1,702
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top
Mathlib/RingTheory/Ideal/Prod.lean
50
58
theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by
apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚)
7
1,096.633158
2
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp]
Mathlib/RingTheory/Ideal/Prod.lean
62
68
theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by
ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩
6
403.428793
2
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp] theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩ #align ideal.map_fst_prod Ideal.map_fst_prod @[simp]
Mathlib/RingTheory/Ideal/Prod.lean
72
78
theorem map_snd_prod (I : Ideal R) (J : Ideal S) : map (RingHom.snd R S) (prod I J) = J := by
ext x rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩
6
403.428793
2
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp] theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩ #align ideal.map_fst_prod Ideal.map_fst_prod @[simp] theorem map_snd_prod (I : Ideal R) (J : Ideal S) : map (RingHom.snd R S) (prod I J) = J := by ext x rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩ #align ideal.map_snd_prod Ideal.map_snd_prod @[simp]
Mathlib/RingTheory/Ideal/Prod.lean
82
85
theorem map_prodComm_prod : map ((RingEquiv.prodComm : R Γ— S ≃+* S Γ— R) : R Γ— S β†’+* S Γ— R) (prod I J) = prod J I := by
refine Trans.trans (ideal_prod_eq _) ?_ simp [map_map]
2
7.389056
1
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp] theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩ #align ideal.map_fst_prod Ideal.map_fst_prod @[simp] theorem map_snd_prod (I : Ideal R) (J : Ideal S) : map (RingHom.snd R S) (prod I J) = J := by ext x rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩ #align ideal.map_snd_prod Ideal.map_snd_prod @[simp] theorem map_prodComm_prod : map ((RingEquiv.prodComm : R Γ— S ≃+* S Γ— R) : R Γ— S β†’+* S Γ— R) (prod I J) = prod J I := by refine Trans.trans (ideal_prod_eq _) ?_ simp [map_map] #align ideal.map_prod_comm_prod Ideal.map_prodComm_prod def idealProdEquiv : Ideal (R Γ— S) ≃ Ideal R Γ— Ideal S where toFun I := ⟨map (RingHom.fst R S) I, map (RingHom.snd R S) I⟩ invFun I := prod I.1 I.2 left_inv I := (ideal_prod_eq I).symm right_inv := fun ⟨I, J⟩ => by simp #align ideal.ideal_prod_equiv Ideal.idealProdEquiv @[simp] theorem idealProdEquiv_symm_apply (I : Ideal R) (J : Ideal S) : idealProdEquiv.symm ⟨I, J⟩ = prod I J := rfl #align ideal.ideal_prod_equiv_symm_apply Ideal.idealProdEquiv_symm_apply
Mathlib/RingTheory/Ideal/Prod.lean
103
105
theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} : prod I J = prod I' J' ↔ I = I' ∧ J = J' := by
simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff]
1
2.718282
0
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp] theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩ #align ideal.map_fst_prod Ideal.map_fst_prod @[simp] theorem map_snd_prod (I : Ideal R) (J : Ideal S) : map (RingHom.snd R S) (prod I J) = J := by ext x rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩ #align ideal.map_snd_prod Ideal.map_snd_prod @[simp] theorem map_prodComm_prod : map ((RingEquiv.prodComm : R Γ— S ≃+* S Γ— R) : R Γ— S β†’+* S Γ— R) (prod I J) = prod J I := by refine Trans.trans (ideal_prod_eq _) ?_ simp [map_map] #align ideal.map_prod_comm_prod Ideal.map_prodComm_prod def idealProdEquiv : Ideal (R Γ— S) ≃ Ideal R Γ— Ideal S where toFun I := ⟨map (RingHom.fst R S) I, map (RingHom.snd R S) I⟩ invFun I := prod I.1 I.2 left_inv I := (ideal_prod_eq I).symm right_inv := fun ⟨I, J⟩ => by simp #align ideal.ideal_prod_equiv Ideal.idealProdEquiv @[simp] theorem idealProdEquiv_symm_apply (I : Ideal R) (J : Ideal S) : idealProdEquiv.symm ⟨I, J⟩ = prod I J := rfl #align ideal.ideal_prod_equiv_symm_apply Ideal.idealProdEquiv_symm_apply theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} : prod I J = prod I' J' ↔ I = I' ∧ J = J' := by simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff] #align ideal.prod.ext_iff Ideal.prod.ext_iff
Mathlib/RingTheory/Ideal/Prod.lean
108
118
theorem isPrime_of_isPrime_prod_top {I : Ideal R} (h : (Ideal.prod I (⊀ : Ideal S)).IsPrime) : I.IsPrime := by
constructor Β· contrapose! h rw [h, prod_top_top, isPrime_iff] simp [isPrime_iff, h] Β· intro x y hxy have : (⟨x, 1⟩ : R Γ— S) * ⟨y, 1⟩ ∈ prod I ⊀ := by rw [Prod.mk_mul_mk, mul_one, mem_prod] exact ⟨hxy, trivial⟩ simpa using h.mem_or_mem this
9
8,103.083928
2
1.571429
7
1,703
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R Γ— S) where carrier := { x | x.fst ∈ I ∧ x.snd ∈ J } zero_mem' := by simp add_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨ha₁, haβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.add_mem ha₁ hb₁, J.add_mem haβ‚‚ hbβ‚‚βŸ© smul_mem' := by rintro ⟨a₁, aβ‚‚βŸ© ⟨b₁, bβ‚‚βŸ© ⟨hb₁, hbβ‚‚βŸ© exact ⟨I.mul_mem_left _ hb₁, J.mul_mem_left _ hbβ‚‚βŸ© #align ideal.prod Ideal.prod @[simp] theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R Γ— S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J := Iff.rfl #align ideal.mem_prod Ideal.mem_prod @[simp] theorem prod_top_top : prod (⊀ : Ideal R) (⊀ : Ideal S) = ⊀ := Ideal.ext <| by simp #align ideal.prod_top_top Ideal.prod_top_top theorem ideal_prod_eq (I : Ideal (R Γ— S)) : I = Ideal.prod (map (RingHom.fst R S) I : Ideal R) (map (RingHom.snd R S) I) := by apply Ideal.ext rintro ⟨r, s⟩ rw [mem_prod, mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective, mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] refine ⟨fun h => ⟨⟨_, ⟨h, rfl⟩⟩, ⟨_, ⟨h, rfl⟩⟩⟩, ?_⟩ rintro ⟨⟨⟨r, s'⟩, ⟨h₁, rfl⟩⟩, ⟨⟨r', s⟩, ⟨hβ‚‚, rfl⟩⟩⟩ simpa using I.add_mem (I.mul_mem_left (1, 0) h₁) (I.mul_mem_left (0, 1) hβ‚‚) #align ideal.ideal_prod_eq Ideal.ideal_prod_eq @[simp] theorem map_fst_prod (I : Ideal R) (J : Ideal S) : map (RingHom.fst R S) (prod I J) = I := by ext x rw [mem_map_iff_of_surjective (RingHom.fst R S) Prod.fst_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.1, fun h => ⟨⟨x, 0⟩, ⟨⟨h, Ideal.zero_mem _⟩, rfl⟩⟩⟩ #align ideal.map_fst_prod Ideal.map_fst_prod @[simp] theorem map_snd_prod (I : Ideal R) (J : Ideal S) : map (RingHom.snd R S) (prod I J) = J := by ext x rw [mem_map_iff_of_surjective (RingHom.snd R S) Prod.snd_surjective] exact ⟨by rintro ⟨x, ⟨h, rfl⟩⟩ exact h.2, fun h => ⟨⟨0, x⟩, ⟨⟨Ideal.zero_mem _, h⟩, rfl⟩⟩⟩ #align ideal.map_snd_prod Ideal.map_snd_prod @[simp] theorem map_prodComm_prod : map ((RingEquiv.prodComm : R Γ— S ≃+* S Γ— R) : R Γ— S β†’+* S Γ— R) (prod I J) = prod J I := by refine Trans.trans (ideal_prod_eq _) ?_ simp [map_map] #align ideal.map_prod_comm_prod Ideal.map_prodComm_prod def idealProdEquiv : Ideal (R Γ— S) ≃ Ideal R Γ— Ideal S where toFun I := ⟨map (RingHom.fst R S) I, map (RingHom.snd R S) I⟩ invFun I := prod I.1 I.2 left_inv I := (ideal_prod_eq I).symm right_inv := fun ⟨I, J⟩ => by simp #align ideal.ideal_prod_equiv Ideal.idealProdEquiv @[simp] theorem idealProdEquiv_symm_apply (I : Ideal R) (J : Ideal S) : idealProdEquiv.symm ⟨I, J⟩ = prod I J := rfl #align ideal.ideal_prod_equiv_symm_apply Ideal.idealProdEquiv_symm_apply theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} : prod I J = prod I' J' ↔ I = I' ∧ J = J' := by simp only [← idealProdEquiv_symm_apply, idealProdEquiv.symm.injective.eq_iff, Prod.mk.inj_iff] #align ideal.prod.ext_iff Ideal.prod.ext_iff theorem isPrime_of_isPrime_prod_top {I : Ideal R} (h : (Ideal.prod I (⊀ : Ideal S)).IsPrime) : I.IsPrime := by constructor Β· contrapose! h rw [h, prod_top_top, isPrime_iff] simp [isPrime_iff, h] Β· intro x y hxy have : (⟨x, 1⟩ : R Γ— S) * ⟨y, 1⟩ ∈ prod I ⊀ := by rw [Prod.mk_mul_mk, mul_one, mem_prod] exact ⟨hxy, trivial⟩ simpa using h.mem_or_mem this #align ideal.is_prime_of_is_prime_prod_top Ideal.isPrime_of_isPrime_prod_top
Mathlib/RingTheory/Ideal/Prod.lean
121
126
theorem isPrime_of_isPrime_prod_top' {I : Ideal S} (h : (Ideal.prod (⊀ : Ideal R) I).IsPrime) : I.IsPrime := by
apply isPrime_of_isPrime_prod_top (S := R) rw [← map_prodComm_prod] -- Note: couldn't synthesize the right instances without the `R` and `S` hints exact map_isPrime_of_equiv (RingEquiv.prodComm (R := R) (S := S))
4
54.59815
2
1.571429
7
1,703
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp]
Mathlib/Algebra/Polynomial/Mirror.lean
44
44
theorem mirror_zero : (0 : R[X]).mirror = 0 := by
simp [mirror]
1
2.718282
0
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero
Mathlib/Algebra/Polynomial/Mirror.lean
47
53
theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by
classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one]
6
403.428793
2
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one] #align polynomial.mirror_monomial Polynomial.mirror_monomial theorem mirror_C (a : R) : (C a).mirror = C a := mirror_monomial 0 a set_option linter.uppercaseLean3 false in #align polynomial.mirror_C Polynomial.mirror_C theorem mirror_X : X.mirror = (X : R[X]) := mirror_monomial 1 (1 : R) set_option linter.uppercaseLean3 false in #align polynomial.mirror_X Polynomial.mirror_X
Mathlib/Algebra/Polynomial/Mirror.lean
66
72
theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by
by_cases hp : p = 0 Β· rw [hp, mirror_zero] nontriviality R rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow, tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree] rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero]
6
403.428793
2
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one] #align polynomial.mirror_monomial Polynomial.mirror_monomial theorem mirror_C (a : R) : (C a).mirror = C a := mirror_monomial 0 a set_option linter.uppercaseLean3 false in #align polynomial.mirror_C Polynomial.mirror_C theorem mirror_X : X.mirror = (X : R[X]) := mirror_monomial 1 (1 : R) set_option linter.uppercaseLean3 false in #align polynomial.mirror_X Polynomial.mirror_X theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] nontriviality R rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow, tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree] rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero] #align polynomial.mirror_nat_degree Polynomial.mirror_natDegree
Mathlib/Algebra/Polynomial/Mirror.lean
75
79
theorem mirror_natTrailingDegree : p.mirror.natTrailingDegree = p.natTrailingDegree := by
by_cases hp : p = 0 Β· rw [hp, mirror_zero] Β· rw [mirror, natTrailingDegree_mul_X_pow ((mt reverse_eq_zero.mp) hp), natTrailingDegree_reverse, zero_add]
4
54.59815
2
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one] #align polynomial.mirror_monomial Polynomial.mirror_monomial theorem mirror_C (a : R) : (C a).mirror = C a := mirror_monomial 0 a set_option linter.uppercaseLean3 false in #align polynomial.mirror_C Polynomial.mirror_C theorem mirror_X : X.mirror = (X : R[X]) := mirror_monomial 1 (1 : R) set_option linter.uppercaseLean3 false in #align polynomial.mirror_X Polynomial.mirror_X theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] nontriviality R rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow, tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree] rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero] #align polynomial.mirror_nat_degree Polynomial.mirror_natDegree theorem mirror_natTrailingDegree : p.mirror.natTrailingDegree = p.natTrailingDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] Β· rw [mirror, natTrailingDegree_mul_X_pow ((mt reverse_eq_zero.mp) hp), natTrailingDegree_reverse, zero_add] #align polynomial.mirror_nat_trailing_degree Polynomial.mirror_natTrailingDegree
Mathlib/Algebra/Polynomial/Mirror.lean
82
97
theorem coeff_mirror (n : β„•) : p.mirror.coeff n = p.coeff (revAt (p.natDegree + p.natTrailingDegree) n) := by
by_cases h2 : p.natDegree < n Β· rw [coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])] by_cases h1 : n ≀ p.natDegree + p.natTrailingDegree Β· rw [revAt_le h1, coeff_eq_zero_of_lt_natTrailingDegree] exact (tsub_lt_iff_left h1).mpr (Nat.add_lt_add_right h2 _) Β· rw [← revAtFun_eq, revAtFun, if_neg h1, coeff_eq_zero_of_natDegree_lt h2] rw [not_lt] at h2 rw [revAt_le (h2.trans (Nat.le_add_right _ _))] by_cases h3 : p.natTrailingDegree ≀ n Β· rw [← tsub_add_eq_add_tsub h2, ← tsub_tsub_assoc h2 h3, mirror, coeff_mul_X_pow', if_pos h3, coeff_reverse, revAt_le (tsub_le_self.trans h2)] rw [not_le] at h3 rw [coeff_eq_zero_of_natDegree_lt (lt_tsub_iff_right.mpr (Nat.add_lt_add_left h3 _))] exact coeff_eq_zero_of_lt_natTrailingDegree (by rwa [mirror_natTrailingDegree])
14
1,202,604.284165
2
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one] #align polynomial.mirror_monomial Polynomial.mirror_monomial theorem mirror_C (a : R) : (C a).mirror = C a := mirror_monomial 0 a set_option linter.uppercaseLean3 false in #align polynomial.mirror_C Polynomial.mirror_C theorem mirror_X : X.mirror = (X : R[X]) := mirror_monomial 1 (1 : R) set_option linter.uppercaseLean3 false in #align polynomial.mirror_X Polynomial.mirror_X theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] nontriviality R rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow, tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree] rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero] #align polynomial.mirror_nat_degree Polynomial.mirror_natDegree theorem mirror_natTrailingDegree : p.mirror.natTrailingDegree = p.natTrailingDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] Β· rw [mirror, natTrailingDegree_mul_X_pow ((mt reverse_eq_zero.mp) hp), natTrailingDegree_reverse, zero_add] #align polynomial.mirror_nat_trailing_degree Polynomial.mirror_natTrailingDegree theorem coeff_mirror (n : β„•) : p.mirror.coeff n = p.coeff (revAt (p.natDegree + p.natTrailingDegree) n) := by by_cases h2 : p.natDegree < n Β· rw [coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])] by_cases h1 : n ≀ p.natDegree + p.natTrailingDegree Β· rw [revAt_le h1, coeff_eq_zero_of_lt_natTrailingDegree] exact (tsub_lt_iff_left h1).mpr (Nat.add_lt_add_right h2 _) Β· rw [← revAtFun_eq, revAtFun, if_neg h1, coeff_eq_zero_of_natDegree_lt h2] rw [not_lt] at h2 rw [revAt_le (h2.trans (Nat.le_add_right _ _))] by_cases h3 : p.natTrailingDegree ≀ n Β· rw [← tsub_add_eq_add_tsub h2, ← tsub_tsub_assoc h2 h3, mirror, coeff_mul_X_pow', if_pos h3, coeff_reverse, revAt_le (tsub_le_self.trans h2)] rw [not_le] at h3 rw [coeff_eq_zero_of_natDegree_lt (lt_tsub_iff_right.mpr (Nat.add_lt_add_left h3 _))] exact coeff_eq_zero_of_lt_natTrailingDegree (by rwa [mirror_natTrailingDegree]) #align polynomial.coeff_mirror Polynomial.coeff_mirror --TODO: Extract `Finset.sum_range_rev_at` lemma.
Mathlib/Algebra/Polynomial/Mirror.lean
101
120
theorem mirror_eval_one : p.mirror.eval 1 = p.eval 1 := by
simp_rw [eval_eq_sum_range, one_pow, mul_one, mirror_natDegree] refine Finset.sum_bij_ne_zero ?_ ?_ ?_ ?_ ?_ Β· exact fun n _ _ => revAt (p.natDegree + p.natTrailingDegree) n Β· intro n hn hp rw [Finset.mem_range_succ_iff] at * rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, add_comm, add_tsub_cancel_right, ← mirror_natTrailingDegree] exact natTrailingDegree_le_of_ne_zero hp Β· exact fun n₁ _ _ _ _ _ h => by rw [← @revAt_invol _ n₁, h, revAt_invol] Β· intro n hn hp use revAt (p.natDegree + p.natTrailingDegree) n refine ⟨?_, ?_, revAt_invol⟩ Β· rw [Finset.mem_range_succ_iff] at * rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, add_comm, add_tsub_cancel_right] exact natTrailingDegree_le_of_ne_zero hp Β· change p.mirror.coeff _ β‰  0 rwa [coeff_mirror, revAt_invol] Β· exact fun n _ _ => p.coeff_mirror n
19
178,482,300.963187
2
1.571429
7
1,704
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.Polynomial.RingDivision #align_import data.polynomial.mirror from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" namespace Polynomial open Polynomial section Semiring variable {R : Type*} [Semiring R] (p q : R[X]) noncomputable def mirror := p.reverse * X ^ p.natTrailingDegree #align polynomial.mirror Polynomial.mirror @[simp] theorem mirror_zero : (0 : R[X]).mirror = 0 := by simp [mirror] #align polynomial.mirror_zero Polynomial.mirror_zero theorem mirror_monomial (n : β„•) (a : R) : (monomial n a).mirror = monomial n a := by classical by_cases ha : a = 0 Β· rw [ha, monomial_zero_right, mirror_zero] Β· rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ← C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero, mul_one] #align polynomial.mirror_monomial Polynomial.mirror_monomial theorem mirror_C (a : R) : (C a).mirror = C a := mirror_monomial 0 a set_option linter.uppercaseLean3 false in #align polynomial.mirror_C Polynomial.mirror_C theorem mirror_X : X.mirror = (X : R[X]) := mirror_monomial 1 (1 : R) set_option linter.uppercaseLean3 false in #align polynomial.mirror_X Polynomial.mirror_X theorem mirror_natDegree : p.mirror.natDegree = p.natDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] nontriviality R rw [mirror, natDegree_mul', reverse_natDegree, natDegree_X_pow, tsub_add_cancel_of_le p.natTrailingDegree_le_natDegree] rwa [leadingCoeff_X_pow, mul_one, reverse_leadingCoeff, Ne, trailingCoeff_eq_zero] #align polynomial.mirror_nat_degree Polynomial.mirror_natDegree theorem mirror_natTrailingDegree : p.mirror.natTrailingDegree = p.natTrailingDegree := by by_cases hp : p = 0 Β· rw [hp, mirror_zero] Β· rw [mirror, natTrailingDegree_mul_X_pow ((mt reverse_eq_zero.mp) hp), natTrailingDegree_reverse, zero_add] #align polynomial.mirror_nat_trailing_degree Polynomial.mirror_natTrailingDegree theorem coeff_mirror (n : β„•) : p.mirror.coeff n = p.coeff (revAt (p.natDegree + p.natTrailingDegree) n) := by by_cases h2 : p.natDegree < n Β· rw [coeff_eq_zero_of_natDegree_lt (by rwa [mirror_natDegree])] by_cases h1 : n ≀ p.natDegree + p.natTrailingDegree Β· rw [revAt_le h1, coeff_eq_zero_of_lt_natTrailingDegree] exact (tsub_lt_iff_left h1).mpr (Nat.add_lt_add_right h2 _) Β· rw [← revAtFun_eq, revAtFun, if_neg h1, coeff_eq_zero_of_natDegree_lt h2] rw [not_lt] at h2 rw [revAt_le (h2.trans (Nat.le_add_right _ _))] by_cases h3 : p.natTrailingDegree ≀ n Β· rw [← tsub_add_eq_add_tsub h2, ← tsub_tsub_assoc h2 h3, mirror, coeff_mul_X_pow', if_pos h3, coeff_reverse, revAt_le (tsub_le_self.trans h2)] rw [not_le] at h3 rw [coeff_eq_zero_of_natDegree_lt (lt_tsub_iff_right.mpr (Nat.add_lt_add_left h3 _))] exact coeff_eq_zero_of_lt_natTrailingDegree (by rwa [mirror_natTrailingDegree]) #align polynomial.coeff_mirror Polynomial.coeff_mirror --TODO: Extract `Finset.sum_range_rev_at` lemma. theorem mirror_eval_one : p.mirror.eval 1 = p.eval 1 := by simp_rw [eval_eq_sum_range, one_pow, mul_one, mirror_natDegree] refine Finset.sum_bij_ne_zero ?_ ?_ ?_ ?_ ?_ Β· exact fun n _ _ => revAt (p.natDegree + p.natTrailingDegree) n Β· intro n hn hp rw [Finset.mem_range_succ_iff] at * rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, add_comm, add_tsub_cancel_right, ← mirror_natTrailingDegree] exact natTrailingDegree_le_of_ne_zero hp Β· exact fun n₁ _ _ _ _ _ h => by rw [← @revAt_invol _ n₁, h, revAt_invol] Β· intro n hn hp use revAt (p.natDegree + p.natTrailingDegree) n refine ⟨?_, ?_, revAt_invol⟩ Β· rw [Finset.mem_range_succ_iff] at * rw [revAt_le (hn.trans (Nat.le_add_right _ _))] rw [tsub_le_iff_tsub_le, add_comm, add_tsub_cancel_right] exact natTrailingDegree_le_of_ne_zero hp Β· change p.mirror.coeff _ β‰  0 rwa [coeff_mirror, revAt_invol] Β· exact fun n _ _ => p.coeff_mirror n #align polynomial.mirror_eval_one Polynomial.mirror_eval_one theorem mirror_mirror : p.mirror.mirror = p := Polynomial.ext fun n => by rw [coeff_mirror, coeff_mirror, mirror_natDegree, mirror_natTrailingDegree, revAt_invol] #align polynomial.mirror_mirror Polynomial.mirror_mirror variable {p q} theorem mirror_involutive : Function.Involutive (mirror : R[X] β†’ R[X]) := mirror_mirror #align polynomial.mirror_involutive Polynomial.mirror_involutive theorem mirror_eq_iff : p.mirror = q ↔ p = q.mirror := mirror_involutive.eq_iff #align polynomial.mirror_eq_iff Polynomial.mirror_eq_iff @[simp] theorem mirror_inj : p.mirror = q.mirror ↔ p = q := mirror_involutive.injective.eq_iff #align polynomial.mirror_inj Polynomial.mirror_inj @[simp] theorem mirror_eq_zero : p.mirror = 0 ↔ p = 0 := ⟨fun h => by rw [← p.mirror_mirror, h, mirror_zero], fun h => by rw [h, mirror_zero]⟩ #align polynomial.mirror_eq_zero Polynomial.mirror_eq_zero variable (p q) @[simp]
Mathlib/Algebra/Polynomial/Mirror.lean
151
153
theorem mirror_trailingCoeff : p.mirror.trailingCoeff = p.leadingCoeff := by
rw [leadingCoeff, trailingCoeff, mirror_natTrailingDegree, coeff_mirror, revAt_le (Nat.le_add_left _ _), add_tsub_cancel_right]
2
7.389056
1
1.571429
7
1,704
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp]
Mathlib/Analysis/Complex/Isometry.lean
60
62
theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by
ext1 simp
2
7.389056
1
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans
Mathlib/Analysis/Complex/Isometry.lean
65
71
theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by
intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI
6
403.428793
2
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI #align rotation_ne_conj_lie rotation_ne_conjLIE @[simps] def rotationOf (e : β„‚ ≃ₗᡒ[ℝ] β„‚) : circle := ⟨e 1 / Complex.abs (e 1), by simp⟩ #align rotation_of rotationOf @[simp] theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a := Subtype.ext <| by simp #align rotation_of_rotation rotationOf_rotation theorem rotation_injective : Function.Injective rotation := Function.LeftInverse.injective rotationOf_rotation #align rotation_injective rotation_injective
Mathlib/Analysis/Complex/Isometry.lean
90
93
theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β„‚ β†’β‚—α΅’[ℝ] β„‚) (h₃ : βˆ€ z, z + conj z = f z + conj (f z)) (z : β„‚) : (f z).re = z.re := by
simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) β‰  0 by simp [two_ne_zero]] using (h₃ z).symm
2
7.389056
1
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI #align rotation_ne_conj_lie rotation_ne_conjLIE @[simps] def rotationOf (e : β„‚ ≃ₗᡒ[ℝ] β„‚) : circle := ⟨e 1 / Complex.abs (e 1), by simp⟩ #align rotation_of rotationOf @[simp] theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a := Subtype.ext <| by simp #align rotation_of_rotation rotationOf_rotation theorem rotation_injective : Function.Injective rotation := Function.LeftInverse.injective rotationOf_rotation #align rotation_injective rotation_injective theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β„‚ β†’β‚—α΅’[ℝ] β„‚) (h₃ : βˆ€ z, z + conj z = f z + conj (f z)) (z : β„‚) : (f z).re = z.re := by simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) β‰  0 by simp [two_ne_zero]] using (h₃ z).symm #align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq
Mathlib/Analysis/Complex/Isometry.lean
96
101
theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (hβ‚‚ : βˆ€ z, (f z).re = z.re) (z : β„‚) : (f z).im = z.im ∨ (f z).im = -z.im := by
have h₁ := f.norm_map z simp only [Complex.abs_def, norm_eq_abs] at h₁ rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z, hβ‚‚, add_left_cancel_iff, mul_self_eq_mul_self_iff] at h₁
4
54.59815
2
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI #align rotation_ne_conj_lie rotation_ne_conjLIE @[simps] def rotationOf (e : β„‚ ≃ₗᡒ[ℝ] β„‚) : circle := ⟨e 1 / Complex.abs (e 1), by simp⟩ #align rotation_of rotationOf @[simp] theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a := Subtype.ext <| by simp #align rotation_of_rotation rotationOf_rotation theorem rotation_injective : Function.Injective rotation := Function.LeftInverse.injective rotationOf_rotation #align rotation_injective rotation_injective theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β„‚ β†’β‚—α΅’[ℝ] β„‚) (h₃ : βˆ€ z, z + conj z = f z + conj (f z)) (z : β„‚) : (f z).re = z.re := by simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) β‰  0 by simp [two_ne_zero]] using (h₃ z).symm #align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (hβ‚‚ : βˆ€ z, (f z).re = z.re) (z : β„‚) : (f z).im = z.im ∨ (f z).im = -z.im := by have h₁ := f.norm_map z simp only [Complex.abs_def, norm_eq_abs] at h₁ rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z, hβ‚‚, add_left_cancel_iff, mul_self_eq_mul_self_iff] at h₁ #align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re
Mathlib/Analysis/Complex/Isometry.lean
104
116
theorem LinearIsometry.im_apply_eq_im {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (h : f 1 = 1) (z : β„‚) : z + conj z = f z + conj (f z) := by
have : β€–f z - 1β€– = β€–z - 1β€– := by rw [← f.norm_map (z - 1), f.map_sub, h] apply_fun fun x => x ^ 2 at this simp only [norm_eq_abs, ← normSq_eq_abs] at this rw [← ofReal_inj, ← mul_conj, ← mul_conj] at this rw [RingHom.map_sub, RingHom.map_sub] at this simp only [sub_mul, mul_sub, one_mul, mul_one] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs, LinearIsometry.norm_map] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs] at this simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this simp only [add_sub, sub_left_inj] at this rw [add_comm, ← this, add_comm]
11
59,874.141715
2
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI #align rotation_ne_conj_lie rotation_ne_conjLIE @[simps] def rotationOf (e : β„‚ ≃ₗᡒ[ℝ] β„‚) : circle := ⟨e 1 / Complex.abs (e 1), by simp⟩ #align rotation_of rotationOf @[simp] theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a := Subtype.ext <| by simp #align rotation_of_rotation rotationOf_rotation theorem rotation_injective : Function.Injective rotation := Function.LeftInverse.injective rotationOf_rotation #align rotation_injective rotation_injective theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β„‚ β†’β‚—α΅’[ℝ] β„‚) (h₃ : βˆ€ z, z + conj z = f z + conj (f z)) (z : β„‚) : (f z).re = z.re := by simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) β‰  0 by simp [two_ne_zero]] using (h₃ z).symm #align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (hβ‚‚ : βˆ€ z, (f z).re = z.re) (z : β„‚) : (f z).im = z.im ∨ (f z).im = -z.im := by have h₁ := f.norm_map z simp only [Complex.abs_def, norm_eq_abs] at h₁ rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z, hβ‚‚, add_left_cancel_iff, mul_self_eq_mul_self_iff] at h₁ #align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re theorem LinearIsometry.im_apply_eq_im {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (h : f 1 = 1) (z : β„‚) : z + conj z = f z + conj (f z) := by have : β€–f z - 1β€– = β€–z - 1β€– := by rw [← f.norm_map (z - 1), f.map_sub, h] apply_fun fun x => x ^ 2 at this simp only [norm_eq_abs, ← normSq_eq_abs] at this rw [← ofReal_inj, ← mul_conj, ← mul_conj] at this rw [RingHom.map_sub, RingHom.map_sub] at this simp only [sub_mul, mul_sub, one_mul, mul_one] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs, LinearIsometry.norm_map] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs] at this simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this simp only [add_sub, sub_left_inj] at this rw [add_comm, ← this, add_comm] #align linear_isometry.im_apply_eq_im LinearIsometry.im_apply_eq_im
Mathlib/Analysis/Complex/Isometry.lean
119
122
theorem LinearIsometry.re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (h : f 1 = 1) (z : β„‚) : (f z).re = z.re := by
apply LinearIsometry.re_apply_eq_re_of_add_conj_eq intro z apply LinearIsometry.im_apply_eq_im h
3
20.085537
1
1.571429
7
1,705
import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup #align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5" noncomputable section open Complex open ComplexConjugate local notation "|" x "|" => Complex.abs x def rotation : circle β†’* β„‚ ≃ₗᡒ[ℝ] β„‚ where toFun a := { DistribMulAction.toLinearEquiv ℝ β„‚ a with norm_map' := fun x => show |a * x| = |x| by rw [map_mul, abs_coe_circle, one_mul] } map_one' := LinearIsometryEquiv.ext <| one_smul circle map_mul' a b := LinearIsometryEquiv.ext <| mul_smul a b #align rotation rotation @[simp] theorem rotation_apply (a : circle) (z : β„‚) : rotation a z = a * z := rfl #align rotation_apply rotation_apply @[simp] theorem rotation_symm (a : circle) : (rotation a).symm = rotation a⁻¹ := LinearIsometryEquiv.ext fun _ => rfl #align rotation_symm rotation_symm @[simp] theorem rotation_trans (a b : circle) : (rotation a).trans (rotation b) = rotation (b * a) := by ext1 simp #align rotation_trans rotation_trans theorem rotation_ne_conjLIE (a : circle) : rotation a β‰  conjLIE := by intro h have h1 : rotation a 1 = conj 1 := LinearIsometryEquiv.congr_fun h 1 have hI : rotation a I = conj I := LinearIsometryEquiv.congr_fun h I rw [rotation_apply, RingHom.map_one, mul_one] at h1 rw [rotation_apply, conj_I, ← neg_one_mul, mul_left_inj' I_ne_zero, h1, eq_neg_self_iff] at hI exact one_ne_zero hI #align rotation_ne_conj_lie rotation_ne_conjLIE @[simps] def rotationOf (e : β„‚ ≃ₗᡒ[ℝ] β„‚) : circle := ⟨e 1 / Complex.abs (e 1), by simp⟩ #align rotation_of rotationOf @[simp] theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a := Subtype.ext <| by simp #align rotation_of_rotation rotationOf_rotation theorem rotation_injective : Function.Injective rotation := Function.LeftInverse.injective rotationOf_rotation #align rotation_injective rotation_injective theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : β„‚ β†’β‚—α΅’[ℝ] β„‚) (h₃ : βˆ€ z, z + conj z = f z + conj (f z)) (z : β„‚) : (f z).re = z.re := by simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul, show (2 : ℝ) β‰  0 by simp [two_ne_zero]] using (h₃ z).symm #align linear_isometry.re_apply_eq_re_of_add_conj_eq LinearIsometry.re_apply_eq_re_of_add_conj_eq theorem LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (hβ‚‚ : βˆ€ z, (f z).re = z.re) (z : β„‚) : (f z).im = z.im ∨ (f z).im = -z.im := by have h₁ := f.norm_map z simp only [Complex.abs_def, norm_eq_abs] at h₁ rwa [Real.sqrt_inj (normSq_nonneg _) (normSq_nonneg _), normSq_apply (f z), normSq_apply z, hβ‚‚, add_left_cancel_iff, mul_self_eq_mul_self_iff] at h₁ #align linear_isometry.im_apply_eq_im_or_neg_of_re_apply_eq_re LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re theorem LinearIsometry.im_apply_eq_im {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (h : f 1 = 1) (z : β„‚) : z + conj z = f z + conj (f z) := by have : β€–f z - 1β€– = β€–z - 1β€– := by rw [← f.norm_map (z - 1), f.map_sub, h] apply_fun fun x => x ^ 2 at this simp only [norm_eq_abs, ← normSq_eq_abs] at this rw [← ofReal_inj, ← mul_conj, ← mul_conj] at this rw [RingHom.map_sub, RingHom.map_sub] at this simp only [sub_mul, mul_sub, one_mul, mul_one] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs, LinearIsometry.norm_map] at this rw [mul_conj, normSq_eq_abs, ← norm_eq_abs] at this simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one, norm_eq_abs] at this simp only [add_sub, sub_left_inj] at this rw [add_comm, ← this, add_comm] #align linear_isometry.im_apply_eq_im LinearIsometry.im_apply_eq_im theorem LinearIsometry.re_apply_eq_re {f : β„‚ β†’β‚—α΅’[ℝ] β„‚} (h : f 1 = 1) (z : β„‚) : (f z).re = z.re := by apply LinearIsometry.re_apply_eq_re_of_add_conj_eq intro z apply LinearIsometry.im_apply_eq_im h #align linear_isometry.re_apply_eq_re LinearIsometry.re_apply_eq_re
Mathlib/Analysis/Complex/Isometry.lean
125
139
theorem linear_isometry_complex_aux {f : β„‚ ≃ₗᡒ[ℝ] β„‚} (h : f 1 = 1) : f = LinearIsometryEquiv.refl ℝ β„‚ ∨ f = conjLIE := by
have h0 : f I = I ∨ f I = -I := by simp only [ext_iff, ← and_or_left, neg_re, I_re, neg_im, neg_zero] constructor Β· rw [← I_re] exact @LinearIsometry.re_apply_eq_re f.toLinearIsometry h I Β· apply @LinearIsometry.im_apply_eq_im_or_neg_of_re_apply_eq_re f.toLinearIsometry intro z rw [@LinearIsometry.re_apply_eq_re f.toLinearIsometry h] refine h0.imp (fun h' : f I = I => ?_) fun h' : f I = -I => ?_ <;> Β· apply LinearIsometryEquiv.toLinearEquiv_injective apply Complex.basisOneI.ext' intro i fin_cases i <;> simp [h, h']
13
442,413.392009
2
1.571429
7
1,705
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
33
37
theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by
unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg]
4
54.59815
2
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
40
50
theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by
rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *]
10
22,026.465795
2
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] #align complex.cos_arg Complex.cos_arg @[simp]
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
54
58
theorem abs_mul_exp_arg_mul_I (x : β„‚) : ↑(abs x) * exp (arg x * I) = x := by
rcases eq_or_ne x 0 with (rfl | hx) Β· simp Β· have : abs x β‰  0 := abs.ne_zero hx apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)]
4
54.59815
2
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] #align complex.cos_arg Complex.cos_arg @[simp] theorem abs_mul_exp_arg_mul_I (x : β„‚) : ↑(abs x) * exp (arg x * I) = x := by rcases eq_or_ne x 0 with (rfl | hx) Β· simp Β· have : abs x β‰  0 := abs.ne_zero hx apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)] set_option linter.uppercaseLean3 false in #align complex.abs_mul_exp_arg_mul_I Complex.abs_mul_exp_arg_mul_I @[simp]
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
63
64
theorem abs_mul_cos_add_sin_mul_I (x : β„‚) : (abs x * (cos (arg x) + sin (arg x) * I) : β„‚) = x := by
rw [← exp_mul_I, abs_mul_exp_arg_mul_I]
1
2.718282
0
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] #align complex.cos_arg Complex.cos_arg @[simp] theorem abs_mul_exp_arg_mul_I (x : β„‚) : ↑(abs x) * exp (arg x * I) = x := by rcases eq_or_ne x 0 with (rfl | hx) Β· simp Β· have : abs x β‰  0 := abs.ne_zero hx apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)] set_option linter.uppercaseLean3 false in #align complex.abs_mul_exp_arg_mul_I Complex.abs_mul_exp_arg_mul_I @[simp] theorem abs_mul_cos_add_sin_mul_I (x : β„‚) : (abs x * (cos (arg x) + sin (arg x) * I) : β„‚) = x := by rw [← exp_mul_I, abs_mul_exp_arg_mul_I] set_option linter.uppercaseLean3 false in #align complex.abs_mul_cos_add_sin_mul_I Complex.abs_mul_cos_add_sin_mul_I @[simp] lemma abs_mul_cos_arg (x : β„‚) : abs x * Real.cos (arg x) = x.re := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg re (abs_mul_cos_add_sin_mul_I x) @[simp] lemma abs_mul_sin_arg (x : β„‚) : abs x * Real.sin (arg x) = x.im := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg im (abs_mul_cos_add_sin_mul_I x)
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
76
83
theorem abs_eq_one_iff (z : β„‚) : abs z = 1 ↔ βˆƒ ΞΈ : ℝ, exp (ΞΈ * I) = z := by
refine ⟨fun hz => ⟨arg z, ?_⟩, ?_⟩ · calc exp (arg z * I) = abs z * exp (arg z * I) := by rw [hz, ofReal_one, one_mul] _ = z := abs_mul_exp_arg_mul_I z · rintro ⟨θ, rfl⟩ exact Complex.abs_exp_ofReal_mul_I θ
6
403.428793
2
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] #align complex.cos_arg Complex.cos_arg @[simp] theorem abs_mul_exp_arg_mul_I (x : β„‚) : ↑(abs x) * exp (arg x * I) = x := by rcases eq_or_ne x 0 with (rfl | hx) Β· simp Β· have : abs x β‰  0 := abs.ne_zero hx apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)] set_option linter.uppercaseLean3 false in #align complex.abs_mul_exp_arg_mul_I Complex.abs_mul_exp_arg_mul_I @[simp] theorem abs_mul_cos_add_sin_mul_I (x : β„‚) : (abs x * (cos (arg x) + sin (arg x) * I) : β„‚) = x := by rw [← exp_mul_I, abs_mul_exp_arg_mul_I] set_option linter.uppercaseLean3 false in #align complex.abs_mul_cos_add_sin_mul_I Complex.abs_mul_cos_add_sin_mul_I @[simp] lemma abs_mul_cos_arg (x : β„‚) : abs x * Real.cos (arg x) = x.re := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg re (abs_mul_cos_add_sin_mul_I x) @[simp] lemma abs_mul_sin_arg (x : β„‚) : abs x * Real.sin (arg x) = x.im := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg im (abs_mul_cos_add_sin_mul_I x) theorem abs_eq_one_iff (z : β„‚) : abs z = 1 ↔ βˆƒ ΞΈ : ℝ, exp (ΞΈ * I) = z := by refine ⟨fun hz => ⟨arg z, ?_⟩, ?_⟩ Β· calc exp (arg z * I) = abs z * exp (arg z * I) := by rw [hz, ofReal_one, one_mul] _ = z := abs_mul_exp_arg_mul_I z Β· rintro ⟨θ, rfl⟩ exact Complex.abs_exp_ofReal_mul_I ΞΈ #align complex.abs_eq_one_iff Complex.abs_eq_one_iff @[simp]
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
87
89
theorem range_exp_mul_I : (Set.range fun x : ℝ => exp (x * I)) = Metric.sphere 0 1 := by
ext x simp only [mem_sphere_zero_iff_norm, norm_eq_abs, abs_eq_one_iff, Set.mem_range]
2
7.389056
1
1.571429
7
1,706
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real Topology namespace Complex variable {a x z : β„‚} noncomputable def arg (x : β„‚) : ℝ := if 0 ≀ x.re then Real.arcsin (x.im / abs x) else if 0 ≀ x.im then Real.arcsin ((-x).im / abs x) + Ο€ else Real.arcsin ((-x).im / abs x) - Ο€ #align complex.arg Complex.arg theorem sin_arg (x : β„‚) : Real.sin (arg x) = x.im / abs x := by unfold arg; split_ifs <;> simp [sub_eq_add_neg, arg, Real.sin_arcsin (abs_le.1 (abs_im_div_abs_le_one x)).1 (abs_le.1 (abs_im_div_abs_le_one x)).2, Real.sin_add, neg_div, Real.arcsin_neg, Real.sin_neg] #align complex.sin_arg Complex.sin_arg theorem cos_arg {x : β„‚} (hx : x β‰  0) : Real.cos (arg x) = x.re / abs x := by rw [arg] split_ifs with h₁ hβ‚‚ Β· rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] Β· rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] Β· rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] #align complex.cos_arg Complex.cos_arg @[simp] theorem abs_mul_exp_arg_mul_I (x : β„‚) : ↑(abs x) * exp (arg x * I) = x := by rcases eq_or_ne x 0 with (rfl | hx) Β· simp Β· have : abs x β‰  0 := abs.ne_zero hx apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)] set_option linter.uppercaseLean3 false in #align complex.abs_mul_exp_arg_mul_I Complex.abs_mul_exp_arg_mul_I @[simp] theorem abs_mul_cos_add_sin_mul_I (x : β„‚) : (abs x * (cos (arg x) + sin (arg x) * I) : β„‚) = x := by rw [← exp_mul_I, abs_mul_exp_arg_mul_I] set_option linter.uppercaseLean3 false in #align complex.abs_mul_cos_add_sin_mul_I Complex.abs_mul_cos_add_sin_mul_I @[simp] lemma abs_mul_cos_arg (x : β„‚) : abs x * Real.cos (arg x) = x.re := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg re (abs_mul_cos_add_sin_mul_I x) @[simp] lemma abs_mul_sin_arg (x : β„‚) : abs x * Real.sin (arg x) = x.im := by simpa [-abs_mul_cos_add_sin_mul_I] using congr_arg im (abs_mul_cos_add_sin_mul_I x) theorem abs_eq_one_iff (z : β„‚) : abs z = 1 ↔ βˆƒ ΞΈ : ℝ, exp (ΞΈ * I) = z := by refine ⟨fun hz => ⟨arg z, ?_⟩, ?_⟩ Β· calc exp (arg z * I) = abs z * exp (arg z * I) := by rw [hz, ofReal_one, one_mul] _ = z := abs_mul_exp_arg_mul_I z Β· rintro ⟨θ, rfl⟩ exact Complex.abs_exp_ofReal_mul_I ΞΈ #align complex.abs_eq_one_iff Complex.abs_eq_one_iff @[simp] theorem range_exp_mul_I : (Set.range fun x : ℝ => exp (x * I)) = Metric.sphere 0 1 := by ext x simp only [mem_sphere_zero_iff_norm, norm_eq_abs, abs_eq_one_iff, Set.mem_range] set_option linter.uppercaseLean3 false in #align complex.range_exp_mul_I Complex.range_exp_mul_I
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
93
114
theorem arg_mul_cos_add_sin_mul_I {r : ℝ} (hr : 0 < r) {ΞΈ : ℝ} (hΞΈ : ΞΈ ∈ Set.Ioc (-Ο€) Ο€) : arg (r * (cos ΞΈ + sin ΞΈ * I)) = ΞΈ := by
simp only [arg, map_mul, abs_cos_add_sin_mul_I, abs_of_nonneg hr.le, mul_one] simp only [re_ofReal_mul, im_ofReal_mul, neg_im, ← ofReal_cos, ← ofReal_sin, ← mk_eq_add_mul_I, neg_div, mul_div_cancel_leftβ‚€ _ hr.ne', mul_nonneg_iff_right_nonneg_of_pos hr] by_cases h₁ : ΞΈ ∈ Set.Icc (-(Ο€ / 2)) (Ο€ / 2) Β· rw [if_pos] exacts [Real.arcsin_sin' h₁, Real.cos_nonneg_of_mem_Icc h₁] Β· rw [Set.mem_Icc, not_and_or, not_le, not_le] at h₁ cases' h₁ with h₁ h₁ Β· replace hΞΈ := hΞΈ.1 have hcos : Real.cos ΞΈ < 0 := by rw [← neg_pos, ← Real.cos_add_pi] refine Real.cos_pos_of_mem_Ioo ⟨?_, ?_⟩ <;> linarith have hsin : Real.sin ΞΈ < 0 := Real.sin_neg_of_neg_of_neg_pi_lt (by linarith) hΞΈ rw [if_neg, if_neg, ← Real.sin_add_pi, Real.arcsin_sin, add_sub_cancel_right] <;> [linarith; linarith; exact hsin.not_le; exact hcos.not_le] Β· replace hΞΈ := hΞΈ.2 have hcos : Real.cos ΞΈ < 0 := Real.cos_neg_of_pi_div_two_lt_of_lt h₁ (by linarith) have hsin : 0 ≀ Real.sin ΞΈ := Real.sin_nonneg_of_mem_Icc ⟨by linarith, hθ⟩ rw [if_neg, if_pos, ← Real.sin_sub_pi, Real.arcsin_sin, sub_add_cancel] <;> [linarith; linarith; exact hsin; exact hcos.not_le]
20
485,165,195.40979
2
1.571429
7
1,706
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ]
Mathlib/Data/Finsupp/BigOperators.lean
39
45
theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by
induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl
5
148.413159
2
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset
Mathlib/Data/Finsupp/BigOperators.lean
48
52
theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by
induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _
3
20.085537
1
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset
Mathlib/Data/Finsupp/BigOperators.lean
55
57
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by
classical convert Multiset.support_sum_subset s.1; simp
1
2.718282
0
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by classical convert Multiset.support_sum_subset s.1; simp #align finset.support_sum_subset Finset.support_sum_subset
Mathlib/Data/Finsupp/BigOperators.lean
60
66
theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… ↔ βˆƒ f ∈ l, x ∈ f.support := by
simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop] induction' l with hd tl IH Β· simp Β· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons, exists_eq_or_imp]
5
148.413159
2
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by classical convert Multiset.support_sum_subset s.1; simp #align finset.support_sum_subset Finset.support_sum_subset theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… ↔ βˆƒ f ∈ l, x ∈ f.support := by simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop] induction' l with hd tl IH Β· simp Β· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons, exists_eq_or_imp] #align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ (s.map Finsupp.support).sup ↔ βˆƒ f ∈ s, x ∈ f.support := Quot.inductionOn s fun _ ↦ by simpa only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.mem_foldr_sup_support_iff #align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ s.sup Finsupp.support ↔ βˆƒ f ∈ s, x ∈ f.support := Multiset.mem_sup_map_support_iff #align finset.mem_sup_support_iff Finset.mem_sup_support_iff
Mathlib/Data/Finsupp/BigOperators.lean
81
96
theorem List.support_sum_eq [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) (hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) : l.sum.support = l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by
induction' l with hd tl IH Β· simp Β· simp only [List.pairwise_cons] at hl simp only [List.sum_cons, List.foldr_cons, Function.comp_apply] rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union] suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x βŠ” y)) βˆ…) by exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset, Finset.disjoint_sup_right] intro f hf simp only [List.mem_toFinset, List.mem_map] at hf obtain ⟨f, hf, rfl⟩ := hf exact hl.left _ hf
13
442,413.392009
2
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by classical convert Multiset.support_sum_subset s.1; simp #align finset.support_sum_subset Finset.support_sum_subset theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… ↔ βˆƒ f ∈ l, x ∈ f.support := by simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop] induction' l with hd tl IH Β· simp Β· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons, exists_eq_or_imp] #align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ (s.map Finsupp.support).sup ↔ βˆƒ f ∈ s, x ∈ f.support := Quot.inductionOn s fun _ ↦ by simpa only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.mem_foldr_sup_support_iff #align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ s.sup Finsupp.support ↔ βˆƒ f ∈ s, x ∈ f.support := Multiset.mem_sup_map_support_iff #align finset.mem_sup_support_iff Finset.mem_sup_support_iff theorem List.support_sum_eq [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) (hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) : l.sum.support = l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.pairwise_cons] at hl simp only [List.sum_cons, List.foldr_cons, Function.comp_apply] rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union] suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x βŠ” y)) βˆ…) by exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset, Finset.disjoint_sup_right] intro f hf simp only [List.mem_toFinset, List.mem_map] at hf obtain ⟨f, hf, rfl⟩ := hf exact hl.left _ hf #align list.support_sum_eq List.support_sum_eq
Mathlib/Data/Finsupp/BigOperators.lean
99
111
theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) : s.sum.support = (s.map Finsupp.support).sup := by
induction' s using Quot.inductionOn with a obtain ⟨l, hl, hd⟩ := hs suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by convert List.support_sum_eq a this Β· simp only [Multiset.quot_mk_to_coe'', Multiset.sum_coe] Β· dsimp only [Function.comp_def] simp only [quot_mk_to_coe'', map_coe, sup_coe, ge_iff_le, Finset.le_eq_subset, Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map] simp only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.coe_eq_coe] at hl exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h
10
22,026.465795
2
1.571429
7
1,707
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) : l.sum.support βŠ† l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.sum_cons, Finset.union_comm] refine Finsupp.support_add.trans (Finset.union_subset_union ?_ IH) rfl #align list.support_sum_subset List.support_sum_subset theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) : s.sum.support βŠ† (s.map Finsupp.support).sup := by induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _ #align multiset.support_sum_subset Multiset.support_sum_subset theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by classical convert Multiset.support_sum_subset s.1; simp #align finset.support_sum_subset Finset.support_sum_subset theorem List.mem_foldr_sup_support_iff [Zero M] {l : List (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… ↔ βˆƒ f ∈ l, x ∈ f.support := by simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop] induction' l with hd tl IH Β· simp Β· simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH, find?, mem_cons, exists_eq_or_imp] #align list.mem_foldr_sup_support_iff List.mem_foldr_sup_support_iff theorem Multiset.mem_sup_map_support_iff [Zero M] {s : Multiset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ (s.map Finsupp.support).sup ↔ βˆƒ f ∈ s, x ∈ f.support := Quot.inductionOn s fun _ ↦ by simpa only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.mem_foldr_sup_support_iff #align multiset.mem_sup_map_support_iff Multiset.mem_sup_map_support_iff theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ΞΉ β†’β‚€ M)} {x : ΞΉ} : x ∈ s.sup Finsupp.support ↔ βˆƒ f ∈ s, x ∈ f.support := Multiset.mem_sup_map_support_iff #align finset.mem_sup_support_iff Finset.mem_sup_support_iff theorem List.support_sum_eq [AddMonoid M] (l : List (ΞΉ β†’β‚€ M)) (hl : l.Pairwise (_root_.Disjoint on Finsupp.support)) : l.sum.support = l.foldr (Finsupp.support Β· βŠ” Β·) βˆ… := by induction' l with hd tl IH Β· simp Β· simp only [List.pairwise_cons] at hl simp only [List.sum_cons, List.foldr_cons, Function.comp_apply] rw [Finsupp.support_add_eq, IH hl.right, Finset.sup_eq_union] suffices _root_.Disjoint hd.support (tl.foldr (fun x y ↦ (Finsupp.support x βŠ” y)) βˆ…) by exact Finset.disjoint_of_subset_right (List.support_sum_subset _) this rw [← List.foldr_map, ← Finset.bot_eq_empty, List.foldr_sup_eq_sup_toFinset, Finset.disjoint_sup_right] intro f hf simp only [List.mem_toFinset, List.mem_map] at hf obtain ⟨f, hf, rfl⟩ := hf exact hl.left _ hf #align list.support_sum_eq List.support_sum_eq theorem Multiset.support_sum_eq [AddCommMonoid M] (s : Multiset (ΞΉ β†’β‚€ M)) (hs : s.Pairwise (_root_.Disjoint on Finsupp.support)) : s.sum.support = (s.map Finsupp.support).sup := by induction' s using Quot.inductionOn with a obtain ⟨l, hl, hd⟩ := hs suffices a.Pairwise (_root_.Disjoint on Finsupp.support) by convert List.support_sum_eq a this Β· simp only [Multiset.quot_mk_to_coe'', Multiset.sum_coe] Β· dsimp only [Function.comp_def] simp only [quot_mk_to_coe'', map_coe, sup_coe, ge_iff_le, Finset.le_eq_subset, Finset.sup_eq_union, Finset.bot_eq_empty, List.foldr_map] simp only [Multiset.quot_mk_to_coe'', Multiset.map_coe, Multiset.coe_eq_coe] at hl exact hl.symm.pairwise hd fun h ↦ _root_.Disjoint.symm h #align multiset.support_sum_eq Multiset.support_sum_eq
Mathlib/Data/Finsupp/BigOperators.lean
114
128
theorem Finset.support_sum_eq [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) (hs : (s : Set (ΞΉ β†’β‚€ M)).PairwiseDisjoint Finsupp.support) : (s.sum id).support = Finset.sup s Finsupp.support := by
classical suffices s.1.Pairwise (_root_.Disjoint on Finsupp.support) by convert Multiset.support_sum_eq s.1 this exact (Finset.sum_val _).symm obtain ⟨l, hl, hn⟩ : βˆƒ l : List (ΞΉ β†’β‚€ M), l.toFinset = s ∧ l.Nodup := by refine ⟨s.toList, ?_, Finset.nodup_toList _⟩ simp subst hl rwa [List.toFinset_val, List.dedup_eq_self.mpr hn, Multiset.pairwise_coe_iff_pairwise, ← List.pairwiseDisjoint_iff_coe_toFinset_pairwise_disjoint hn] intro x y hxy exact symmetric_disjoint hxy
12
162,754.791419
2
1.571429
7
1,707
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R]
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
50
55
theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by
refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _
4
54.59815
2
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
61
64
theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by
let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)]
2
7.389056
1
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)] #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions' end variable [IsDomain S] [NoZeroSMulDivisors R S] variable [IsIntegrallyClosed R]
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
75
92
theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]} (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by
let K := FractionRing R let L := FractionRing S let _ : Algebra K L := FractionRing.liftAlgebra R L have := FractionRing.isScalarTower_liftAlgebra R L have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %β‚˜ minpoly R s) := by rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div] Β· refine dvd_sub (minpoly.dvd K (algebraMap S L s) ?_) ?_ Β· rw [← map_aeval_eq_aeval_map, hp, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq] apply dvd_mul_of_dvd_left rw [isIntegrallyClosed_eq_field_fractions K L hs] exact Monic.map _ (minpoly.monic hs) rw [isIntegrallyClosed_eq_field_fractions _ _ hs, map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)] exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs)
16
8,886,110.520508
2
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)] #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions' end variable [IsDomain S] [NoZeroSMulDivisors R S] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]} (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by let K := FractionRing R let L := FractionRing S let _ : Algebra K L := FractionRing.liftAlgebra R L have := FractionRing.isScalarTower_liftAlgebra R L have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %β‚˜ minpoly R s) := by rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div] Β· refine dvd_sub (minpoly.dvd K (algebraMap S L s) ?_) ?_ Β· rw [← map_aeval_eq_aeval_map, hp, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq] apply dvd_mul_of_dvd_left rw [isIntegrallyClosed_eq_field_fractions K L hs] exact Monic.map _ (minpoly.monic hs) rw [isIntegrallyClosed_eq_field_fractions _ _ hs, map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)] exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs) #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) : Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p := ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by simpa only [RingHom.mem_ker, RingHom.coe_comp, coe_evalRingHom, coe_mapRingHom, Function.comp_apply, eval_map, ← aeval_def] using aeval_eq_zero_of_dvd_aeval_eq_zero hp (minpoly.aeval R s)⟩ #align minpoly.is_integrally_closed_dvd_iff minpoly.isIntegrallyClosed_dvd_iff
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
103
108
theorem ker_eval {s : S} (hs : IsIntegral R s) : RingHom.ker ((Polynomial.aeval s).toRingHom : R[X] β†’+* S) = Ideal.span ({minpoly R s} : Set R[X]) := by
ext p simp_rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, isIntegrallyClosed_dvd_iff hs, ← Ideal.mem_span_singleton]
3
20.085537
1
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)] #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions' end variable [IsDomain S] [NoZeroSMulDivisors R S] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]} (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by let K := FractionRing R let L := FractionRing S let _ : Algebra K L := FractionRing.liftAlgebra R L have := FractionRing.isScalarTower_liftAlgebra R L have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %β‚˜ minpoly R s) := by rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div] Β· refine dvd_sub (minpoly.dvd K (algebraMap S L s) ?_) ?_ Β· rw [← map_aeval_eq_aeval_map, hp, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq] apply dvd_mul_of_dvd_left rw [isIntegrallyClosed_eq_field_fractions K L hs] exact Monic.map _ (minpoly.monic hs) rw [isIntegrallyClosed_eq_field_fractions _ _ hs, map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)] exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs) #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) : Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p := ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by simpa only [RingHom.mem_ker, RingHom.coe_comp, coe_evalRingHom, coe_mapRingHom, Function.comp_apply, eval_map, ← aeval_def] using aeval_eq_zero_of_dvd_aeval_eq_zero hp (minpoly.aeval R s)⟩ #align minpoly.is_integrally_closed_dvd_iff minpoly.isIntegrallyClosed_dvd_iff theorem ker_eval {s : S} (hs : IsIntegral R s) : RingHom.ker ((Polynomial.aeval s).toRingHom : R[X] β†’+* S) = Ideal.span ({minpoly R s} : Set R[X]) := by ext p simp_rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, isIntegrallyClosed_dvd_iff hs, ← Ideal.mem_span_singleton] #align minpoly.ker_eval minpoly.ker_eval
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
114
118
theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p : R[X]} (hp0 : p β‰  0) (hp : Polynomial.aeval s p = 0) : degree (minpoly R s) ≀ degree p := by
rw [degree_eq_natDegree (minpoly.ne_zero hs), degree_eq_natDegree hp0] norm_cast exact natDegree_le_of_dvd ((isIntegrallyClosed_dvd_iff hs _).mp hp) hp0
3
20.085537
1
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)] #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions' end variable [IsDomain S] [NoZeroSMulDivisors R S] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]} (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by let K := FractionRing R let L := FractionRing S let _ : Algebra K L := FractionRing.liftAlgebra R L have := FractionRing.isScalarTower_liftAlgebra R L have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %β‚˜ minpoly R s) := by rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div] Β· refine dvd_sub (minpoly.dvd K (algebraMap S L s) ?_) ?_ Β· rw [← map_aeval_eq_aeval_map, hp, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq] apply dvd_mul_of_dvd_left rw [isIntegrallyClosed_eq_field_fractions K L hs] exact Monic.map _ (minpoly.monic hs) rw [isIntegrallyClosed_eq_field_fractions _ _ hs, map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)] exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs) #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) : Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p := ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by simpa only [RingHom.mem_ker, RingHom.coe_comp, coe_evalRingHom, coe_mapRingHom, Function.comp_apply, eval_map, ← aeval_def] using aeval_eq_zero_of_dvd_aeval_eq_zero hp (minpoly.aeval R s)⟩ #align minpoly.is_integrally_closed_dvd_iff minpoly.isIntegrallyClosed_dvd_iff theorem ker_eval {s : S} (hs : IsIntegral R s) : RingHom.ker ((Polynomial.aeval s).toRingHom : R[X] β†’+* S) = Ideal.span ({minpoly R s} : Set R[X]) := by ext p simp_rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, isIntegrallyClosed_dvd_iff hs, ← Ideal.mem_span_singleton] #align minpoly.ker_eval minpoly.ker_eval theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p : R[X]} (hp0 : p β‰  0) (hp : Polynomial.aeval s p = 0) : degree (minpoly R s) ≀ degree p := by rw [degree_eq_natDegree (minpoly.ne_zero hs), degree_eq_natDegree hp0] norm_cast exact natDegree_le_of_dvd ((isIntegrallyClosed_dvd_iff hs _).mp hp) hp0 #align minpoly.is_integrally_closed.degree_le_of_ne_zero minpoly.IsIntegrallyClosed.degree_le_of_ne_zero
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
125
135
theorem _root_.IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic) (hP : Polynomial.aeval s P = 0) (Pmin : βˆ€ Q : R[X], Q.Monic β†’ Polynomial.aeval s Q = 0 β†’ degree P ≀ degree Q) : P = minpoly R s := by
have hs : IsIntegral R s := ⟨P, hmo, hP⟩ symm; apply eq_of_sub_eq_zero by_contra hnz refine IsIntegrallyClosed.degree_le_of_ne_zero hs hnz (by simp [hP]) |>.not_lt ?_ refine degree_sub_lt ?_ (ne_zero hs) ?_ · exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s)) · rw [(monic hs).leadingCoeff, hmo.leadingCoeff]
7
1,096.633158
2
1.571429
7
1,708
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set Function minpoly namespace minpoly variable {R S : Type*} [CommRing R] [CommRing S] [IsDomain R] [Algebra R S] section variable (K L : Type*) [Field K] [Algebra R K] [IsFractionRing R K] [CommRing L] [Nontrivial L] [Algebra R L] [Algebra S L] [Algebra K L] [IsScalarTower R K L] [IsScalarTower R S L] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) : minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K) := by refine (eq_of_irreducible_of_monic ?_ ?_ ?_).symm Β· exact ((monic hs).irreducible_iff_irreducible_map_fraction_map).1 (irreducible hs) Β· rw [aeval_map_algebraMap, aeval_algebraMap_apply, aeval, map_zero] Β· exact (monic hs).map _ #align minpoly.is_integrally_closed_eq_field_fractions minpoly.isIntegrallyClosed_eq_field_fractions theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S] {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K) := by let L := FractionRing S rw [← isIntegrallyClosed_eq_field_fractions K L hs, algebraMap_eq (IsFractionRing.injective S L)] #align minpoly.is_integrally_closed_eq_field_fractions' minpoly.isIntegrallyClosed_eq_field_fractions' end variable [IsDomain S] [NoZeroSMulDivisors R S] variable [IsIntegrallyClosed R] theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]} (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p := by let K := FractionRing R let L := FractionRing S let _ : Algebra K L := FractionRing.liftAlgebra R L have := FractionRing.isScalarTower_liftAlgebra R L have : minpoly K (algebraMap S L s) ∣ map (algebraMap R K) (p %β‚˜ minpoly R s) := by rw [map_modByMonic _ (minpoly.monic hs), modByMonic_eq_sub_mul_div] Β· refine dvd_sub (minpoly.dvd K (algebraMap S L s) ?_) ?_ Β· rw [← map_aeval_eq_aeval_map, hp, map_zero] rw [← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq] apply dvd_mul_of_dvd_left rw [isIntegrallyClosed_eq_field_fractions K L hs] exact Monic.map _ (minpoly.monic hs) rw [isIntegrallyClosed_eq_field_fractions _ _ hs, map_dvd_map (algebraMap R K) (IsFractionRing.injective R K) (minpoly.monic hs)] at this rw [← modByMonic_eq_zero_iff_dvd (minpoly.monic hs)] exact Polynomial.eq_zero_of_dvd_of_degree_lt this (degree_modByMonic_lt p <| minpoly.monic hs) #align minpoly.is_integrally_closed_dvd minpoly.isIntegrallyClosed_dvd theorem isIntegrallyClosed_dvd_iff {s : S} (hs : IsIntegral R s) (p : R[X]) : Polynomial.aeval s p = 0 ↔ minpoly R s ∣ p := ⟨fun hp => isIntegrallyClosed_dvd hs hp, fun hp => by simpa only [RingHom.mem_ker, RingHom.coe_comp, coe_evalRingHom, coe_mapRingHom, Function.comp_apply, eval_map, ← aeval_def] using aeval_eq_zero_of_dvd_aeval_eq_zero hp (minpoly.aeval R s)⟩ #align minpoly.is_integrally_closed_dvd_iff minpoly.isIntegrallyClosed_dvd_iff theorem ker_eval {s : S} (hs : IsIntegral R s) : RingHom.ker ((Polynomial.aeval s).toRingHom : R[X] β†’+* S) = Ideal.span ({minpoly R s} : Set R[X]) := by ext p simp_rw [RingHom.mem_ker, AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, isIntegrallyClosed_dvd_iff hs, ← Ideal.mem_span_singleton] #align minpoly.ker_eval minpoly.ker_eval theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p : R[X]} (hp0 : p β‰  0) (hp : Polynomial.aeval s p = 0) : degree (minpoly R s) ≀ degree p := by rw [degree_eq_natDegree (minpoly.ne_zero hs), degree_eq_natDegree hp0] norm_cast exact natDegree_le_of_dvd ((isIntegrallyClosed_dvd_iff hs _).mp hp) hp0 #align minpoly.is_integrally_closed.degree_le_of_ne_zero minpoly.IsIntegrallyClosed.degree_le_of_ne_zero theorem _root_.IsIntegrallyClosed.minpoly.unique {s : S} {P : R[X]} (hmo : P.Monic) (hP : Polynomial.aeval s P = 0) (Pmin : βˆ€ Q : R[X], Q.Monic β†’ Polynomial.aeval s Q = 0 β†’ degree P ≀ degree Q) : P = minpoly R s := by have hs : IsIntegral R s := ⟨P, hmo, hP⟩ symm; apply eq_of_sub_eq_zero by_contra hnz refine IsIntegrallyClosed.degree_le_of_ne_zero hs hnz (by simp [hP]) |>.not_lt ?_ refine degree_sub_lt ?_ (ne_zero hs) ?_ Β· exact le_antisymm (min R s hmo hP) (Pmin (minpoly R s) (monic hs) (aeval R s)) Β· rw [(monic hs).leadingCoeff, hmo.leadingCoeff] #align minpoly.is_integrally_closed.minpoly.unique IsIntegrallyClosed.minpoly.unique
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
138
145
theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpoly R x) := by
refine ⟨(minpoly.monic hx).ne_zero, ⟨fun h_contra => (ne_of_lt (minpoly.degree_pos hx)) (degree_eq_zero_of_isUnit h_contra).symm, fun a b h => or_iff_not_imp_left.mpr fun h' => ?_⟩⟩ rw [← minpoly.isIntegrallyClosed_dvd_iff hx] at h' h ⊒ rw [aeval_mul] at h exact eq_zero_of_ne_zero_of_mul_left_eq_zero h' h
7
1,096.633158
2
1.571429
7
1,708
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp]
Mathlib/ModelTheory/Semantics.lean
88
92
theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by
induction' t with _ n f ts ih Β· rfl Β· simp [ih]
3
20.085537
1
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp]
Mathlib/ModelTheory/Semantics.lean
109
113
theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by
rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one]
3
20.085537
1
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp] theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one] #align first_order.language.term.realize_functions_apply₁ FirstOrder.Language.Term.realize_functions_apply₁ @[simp]
Mathlib/ModelTheory/Semantics.lean
117
122
theorem realize_functions_applyβ‚‚ {f : L.Functions 2} {t₁ tβ‚‚ : L.Term Ξ±} {v : Ξ± β†’ M} : (f.applyβ‚‚ t₁ tβ‚‚).realize v = funMap f ![t₁.realize v, tβ‚‚.realize v] := by
rw [Functions.applyβ‚‚, Term.realize] refine congr rfl (funext (Fin.cases ?_ ?_)) Β· simp only [Matrix.cons_val_zero] Β· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const]
4
54.59815
2
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp] theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one] #align first_order.language.term.realize_functions_apply₁ FirstOrder.Language.Term.realize_functions_apply₁ @[simp] theorem realize_functions_applyβ‚‚ {f : L.Functions 2} {t₁ tβ‚‚ : L.Term Ξ±} {v : Ξ± β†’ M} : (f.applyβ‚‚ t₁ tβ‚‚).realize v = funMap f ![t₁.realize v, tβ‚‚.realize v] := by rw [Functions.applyβ‚‚, Term.realize] refine congr rfl (funext (Fin.cases ?_ ?_)) Β· simp only [Matrix.cons_val_zero] Β· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const] #align first_order.language.term.realize_functions_applyβ‚‚ FirstOrder.Language.Term.realize_functions_applyβ‚‚ theorem realize_con {A : Set M} {a : A} {v : Ξ± β†’ M} : (L.con a).term.realize v = a := rfl #align first_order.language.term.realize_con FirstOrder.Language.Term.realize_con @[simp]
Mathlib/ModelTheory/Semantics.lean
130
134
theorem realize_subst {t : L.Term Ξ±} {tf : Ξ± β†’ L.Term Ξ²} {v : Ξ² β†’ M} : (t.subst tf).realize v = t.realize fun a => (tf a).realize v := by
induction' t with _ _ _ _ ih Β· rfl Β· simp [ih]
3
20.085537
1
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp] theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one] #align first_order.language.term.realize_functions_apply₁ FirstOrder.Language.Term.realize_functions_apply₁ @[simp] theorem realize_functions_applyβ‚‚ {f : L.Functions 2} {t₁ tβ‚‚ : L.Term Ξ±} {v : Ξ± β†’ M} : (f.applyβ‚‚ t₁ tβ‚‚).realize v = funMap f ![t₁.realize v, tβ‚‚.realize v] := by rw [Functions.applyβ‚‚, Term.realize] refine congr rfl (funext (Fin.cases ?_ ?_)) Β· simp only [Matrix.cons_val_zero] Β· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const] #align first_order.language.term.realize_functions_applyβ‚‚ FirstOrder.Language.Term.realize_functions_applyβ‚‚ theorem realize_con {A : Set M} {a : A} {v : Ξ± β†’ M} : (L.con a).term.realize v = a := rfl #align first_order.language.term.realize_con FirstOrder.Language.Term.realize_con @[simp] theorem realize_subst {t : L.Term Ξ±} {tf : Ξ± β†’ L.Term Ξ²} {v : Ξ² β†’ M} : (t.subst tf).realize v = t.realize fun a => (tf a).realize v := by induction' t with _ _ _ _ ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_subst FirstOrder.Language.Term.realize_subst @[simp]
Mathlib/ModelTheory/Semantics.lean
138
143
theorem realize_restrictVar [DecidableEq Ξ±] {t : L.Term Ξ±} {s : Set Ξ±} (h : ↑t.varFinset βŠ† s) {v : Ξ± β†’ M} : (t.restrictVar (Set.inclusion h)).realize (v ∘ (↑)) = t.realize v := by
induction' t with _ _ _ _ ih Β· rfl Β· simp_rw [varFinset, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i)))
4
54.59815
2
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp] theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one] #align first_order.language.term.realize_functions_apply₁ FirstOrder.Language.Term.realize_functions_apply₁ @[simp] theorem realize_functions_applyβ‚‚ {f : L.Functions 2} {t₁ tβ‚‚ : L.Term Ξ±} {v : Ξ± β†’ M} : (f.applyβ‚‚ t₁ tβ‚‚).realize v = funMap f ![t₁.realize v, tβ‚‚.realize v] := by rw [Functions.applyβ‚‚, Term.realize] refine congr rfl (funext (Fin.cases ?_ ?_)) Β· simp only [Matrix.cons_val_zero] Β· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const] #align first_order.language.term.realize_functions_applyβ‚‚ FirstOrder.Language.Term.realize_functions_applyβ‚‚ theorem realize_con {A : Set M} {a : A} {v : Ξ± β†’ M} : (L.con a).term.realize v = a := rfl #align first_order.language.term.realize_con FirstOrder.Language.Term.realize_con @[simp] theorem realize_subst {t : L.Term Ξ±} {tf : Ξ± β†’ L.Term Ξ²} {v : Ξ² β†’ M} : (t.subst tf).realize v = t.realize fun a => (tf a).realize v := by induction' t with _ _ _ _ ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_subst FirstOrder.Language.Term.realize_subst @[simp] theorem realize_restrictVar [DecidableEq Ξ±] {t : L.Term Ξ±} {s : Set Ξ±} (h : ↑t.varFinset βŠ† s) {v : Ξ± β†’ M} : (t.restrictVar (Set.inclusion h)).realize (v ∘ (↑)) = t.realize v := by induction' t with _ _ _ _ ih Β· rfl Β· simp_rw [varFinset, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i))) #align first_order.language.term.realize_restrict_var FirstOrder.Language.Term.realize_restrictVar @[simp]
Mathlib/ModelTheory/Semantics.lean
147
154
theorem realize_restrictVarLeft [DecidableEq Ξ±] {Ξ³ : Type*} {t : L.Term (Sum Ξ± Ξ³)} {s : Set Ξ±} (h : ↑t.varFinsetLeft βŠ† s) {v : Ξ± β†’ M} {xs : Ξ³ β†’ M} : (t.restrictVarLeft (Set.inclusion h)).realize (Sum.elim (v ∘ (↑)) xs) = t.realize (Sum.elim v xs) := by
induction' t with a _ _ _ ih Β· cases a <;> rfl Β· simp_rw [varFinsetLeft, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i)))
4
54.59815
2
1.571429
7
1,709
import Mathlib.Data.Finset.Basic import Mathlib.ModelTheory.Syntax import Mathlib.Data.List.ProdSigma #align_import model_theory.semantics from "leanprover-community/mathlib"@"d565b3df44619c1498326936be16f1a935df0728" universe u v w u' v' namespace FirstOrder namespace Language variable {L : Language.{u, v}} {L' : Language} variable {M : Type w} {N P : Type*} [L.Structure M] [L.Structure N] [L.Structure P] variable {Ξ± : Type u'} {Ξ² : Type v'} {Ξ³ : Type*} open FirstOrder Cardinal open Structure Cardinal Fin namespace Term -- Porting note: universes in different order def realize (v : Ξ± β†’ M) : βˆ€ _t : L.Term Ξ±, M | var k => v k | func f ts => funMap f fun i => (ts i).realize v #align first_order.language.term.realize FirstOrder.Language.Term.realize @[simp] theorem realize_var (v : Ξ± β†’ M) (k) : realize v (var k : L.Term Ξ±) = v k := rfl @[simp] theorem realize_func (v : Ξ± β†’ M) {n} (f : L.Functions n) (ts) : realize v (func f ts : L.Term Ξ±) = funMap f fun i => (ts i).realize v := rfl @[simp] theorem realize_relabel {t : L.Term Ξ±} {g : Ξ± β†’ Ξ²} {v : Ξ² β†’ M} : (t.relabel g).realize v = t.realize (v ∘ g) := by induction' t with _ n f ts ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_relabel FirstOrder.Language.Term.realize_relabel @[simp] theorem realize_liftAt {n n' m : β„•} {t : L.Term (Sum Ξ± (Fin n))} {v : Sum Ξ± (Fin (n + n')) β†’ M} : (t.liftAt n' m).realize v = t.realize (v ∘ Sum.map id fun i : Fin _ => if ↑i < m then Fin.castAdd n' i else Fin.addNat i n') := realize_relabel #align first_order.language.term.realize_lift_at FirstOrder.Language.Term.realize_liftAt @[simp] theorem realize_constants {c : L.Constants} {v : Ξ± β†’ M} : c.term.realize v = c := funMap_eq_coe_constants #align first_order.language.term.realize_constants FirstOrder.Language.Term.realize_constants @[simp] theorem realize_functions_apply₁ {f : L.Functions 1} {t : L.Term Ξ±} {v : Ξ± β†’ M} : (f.apply₁ t).realize v = funMap f ![t.realize v] := by rw [Functions.apply₁, Term.realize] refine congr rfl (funext fun i => ?_) simp only [Matrix.cons_val_fin_one] #align first_order.language.term.realize_functions_apply₁ FirstOrder.Language.Term.realize_functions_apply₁ @[simp] theorem realize_functions_applyβ‚‚ {f : L.Functions 2} {t₁ tβ‚‚ : L.Term Ξ±} {v : Ξ± β†’ M} : (f.applyβ‚‚ t₁ tβ‚‚).realize v = funMap f ![t₁.realize v, tβ‚‚.realize v] := by rw [Functions.applyβ‚‚, Term.realize] refine congr rfl (funext (Fin.cases ?_ ?_)) Β· simp only [Matrix.cons_val_zero] Β· simp only [Matrix.cons_val_succ, Matrix.cons_val_fin_one, forall_const] #align first_order.language.term.realize_functions_applyβ‚‚ FirstOrder.Language.Term.realize_functions_applyβ‚‚ theorem realize_con {A : Set M} {a : A} {v : Ξ± β†’ M} : (L.con a).term.realize v = a := rfl #align first_order.language.term.realize_con FirstOrder.Language.Term.realize_con @[simp] theorem realize_subst {t : L.Term Ξ±} {tf : Ξ± β†’ L.Term Ξ²} {v : Ξ² β†’ M} : (t.subst tf).realize v = t.realize fun a => (tf a).realize v := by induction' t with _ _ _ _ ih Β· rfl Β· simp [ih] #align first_order.language.term.realize_subst FirstOrder.Language.Term.realize_subst @[simp] theorem realize_restrictVar [DecidableEq Ξ±] {t : L.Term Ξ±} {s : Set Ξ±} (h : ↑t.varFinset βŠ† s) {v : Ξ± β†’ M} : (t.restrictVar (Set.inclusion h)).realize (v ∘ (↑)) = t.realize v := by induction' t with _ _ _ _ ih Β· rfl Β· simp_rw [varFinset, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i))) #align first_order.language.term.realize_restrict_var FirstOrder.Language.Term.realize_restrictVar @[simp] theorem realize_restrictVarLeft [DecidableEq Ξ±] {Ξ³ : Type*} {t : L.Term (Sum Ξ± Ξ³)} {s : Set Ξ±} (h : ↑t.varFinsetLeft βŠ† s) {v : Ξ± β†’ M} {xs : Ξ³ β†’ M} : (t.restrictVarLeft (Set.inclusion h)).realize (Sum.elim (v ∘ (↑)) xs) = t.realize (Sum.elim v xs) := by induction' t with a _ _ _ ih Β· cases a <;> rfl Β· simp_rw [varFinsetLeft, Finset.coe_biUnion, Set.iUnion_subset_iff] at h exact congr rfl (funext fun i => ih i (h i (Finset.mem_univ i))) #align first_order.language.term.realize_restrict_var_left FirstOrder.Language.Term.realize_restrictVarLeft @[simp]
Mathlib/ModelTheory/Semantics.lean
158
174
theorem realize_constantsToVars [L[[Ξ±]].Structure M] [(lhomWithConstants L Ξ±).IsExpansionOn M] {t : L[[Ξ±]].Term Ξ²} {v : Ξ² β†’ M} : t.constantsToVars.realize (Sum.elim (fun a => ↑(L.con a)) v) = t.realize v := by
induction' t with _ n f ts ih Β· simp Β· cases n Β· cases f Β· simp only [realize, ih, Nat.zero_eq, constantsOn, mkβ‚‚_Functions] -- Porting note: below lemma does not work with simp for some reason rw [withConstants_funMap_sum_inl] Β· simp only [realize, constantsToVars, Sum.elim_inl, funMap_eq_coe_constants] rfl Β· cases' f with _ f Β· simp only [realize, ih, constantsOn, mkβ‚‚_Functions] -- Porting note: below lemma does not work with simp for some reason rw [withConstants_funMap_sum_inl] Β· exact isEmptyElim f
14
1,202,604.284165
2
1.571429
7
1,709
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E]
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
36
38
theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by
rw [sqrt_le_left (by positivity)] simp [add_sq]
2
7.389056
1
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
41
46
theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by
rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith
4
54.59815
2
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith #align one_add_norm_le_sqrt_two_mul_sqrt one_add_norm_le_sqrt_two_mul_sqrt
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
49
59
theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) ≀ (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := calc ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + β€–xβ€– ^ 2)) ^ r)⁻¹ := by
rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_leftβ‚€] <;> positivity _ ≀ (2 : ℝ) ^ (r / 2) * ((1 + β€–xβ€–) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := by rw [rpow_neg]; positivity
6
403.428793
2
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith #align one_add_norm_le_sqrt_two_mul_sqrt one_add_norm_le_sqrt_two_mul_sqrt theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) ≀ (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := calc ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + β€–xβ€– ^ 2)) ^ r)⁻¹ := by rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_leftβ‚€] <;> positivity _ ≀ (2 : ℝ) ^ (r / 2) * ((1 + β€–xβ€–) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := by rw [rpow_neg]; positivity #align rpow_neg_one_add_norm_sq_le rpow_neg_one_add_norm_sq_le
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
62
65
theorem le_rpow_one_add_norm_iff_norm_le {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (x : E) : t ≀ (1 + β€–xβ€–) ^ (-r) ↔ β€–xβ€– ≀ t ^ (-r⁻¹) - 1 := by
rw [le_sub_iff_add_le', neg_inv] exact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm
2
7.389056
1
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith #align one_add_norm_le_sqrt_two_mul_sqrt one_add_norm_le_sqrt_two_mul_sqrt theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) ≀ (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := calc ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + β€–xβ€– ^ 2)) ^ r)⁻¹ := by rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_leftβ‚€] <;> positivity _ ≀ (2 : ℝ) ^ (r / 2) * ((1 + β€–xβ€–) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := by rw [rpow_neg]; positivity #align rpow_neg_one_add_norm_sq_le rpow_neg_one_add_norm_sq_le theorem le_rpow_one_add_norm_iff_norm_le {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (x : E) : t ≀ (1 + β€–xβ€–) ^ (-r) ↔ β€–xβ€– ≀ t ^ (-r⁻¹) - 1 := by rw [le_sub_iff_add_le', neg_inv] exact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm #align le_rpow_one_add_norm_iff_norm_le le_rpow_one_add_norm_iff_norm_le variable (E)
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
70
73
theorem closedBall_rpow_sub_one_eq_empty_aux {r t : ℝ} (hr : 0 < r) (ht : 1 < t) : Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1) = βˆ… := by
rw [Metric.closedBall_eq_empty, sub_neg] exact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos])
2
7.389056
1
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith #align one_add_norm_le_sqrt_two_mul_sqrt one_add_norm_le_sqrt_two_mul_sqrt theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) ≀ (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := calc ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + β€–xβ€– ^ 2)) ^ r)⁻¹ := by rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_leftβ‚€] <;> positivity _ ≀ (2 : ℝ) ^ (r / 2) * ((1 + β€–xβ€–) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := by rw [rpow_neg]; positivity #align rpow_neg_one_add_norm_sq_le rpow_neg_one_add_norm_sq_le theorem le_rpow_one_add_norm_iff_norm_le {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (x : E) : t ≀ (1 + β€–xβ€–) ^ (-r) ↔ β€–xβ€– ≀ t ^ (-r⁻¹) - 1 := by rw [le_sub_iff_add_le', neg_inv] exact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm #align le_rpow_one_add_norm_iff_norm_le le_rpow_one_add_norm_iff_norm_le variable (E) theorem closedBall_rpow_sub_one_eq_empty_aux {r t : ℝ} (hr : 0 < r) (ht : 1 < t) : Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1) = βˆ… := by rw [Metric.closedBall_eq_empty, sub_neg] exact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos]) #align closed_ball_rpow_sub_one_eq_empty_aux closedBall_rpow_sub_one_eq_empty_aux variable [NormedSpace ℝ E] [FiniteDimensional ℝ E] variable {E}
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
79
95
theorem finite_integral_rpow_sub_one_pow_aux {r : ℝ} (n : β„•) (hnr : (n : ℝ) < r) : (∫⁻ x : ℝ in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n)) < ∞ := by
have hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr have h_int : βˆ€ x : ℝ, x ∈ Ioc (0 : ℝ) 1 β†’ ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≀ ENNReal.ofReal (x ^ (-(r⁻¹ * n))) := fun x hx ↦ by apply ENNReal.ofReal_le_ofReal rw [← neg_mul, rpow_mul hx.1.le, rpow_natCast] refine pow_le_pow_left ?_ (by simp only [sub_le_self_iff, zero_le_one]) n rw [le_sub_iff_add_le', add_zero] refine Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 ?_ rw [Right.neg_nonpos_iff, inv_nonneg] exact hr.le refine lt_of_le_of_lt (set_lintegral_mono' measurableSet_Ioc h_int) ?_ refine IntegrableOn.set_lintegral_lt_top ?_ rw [← intervalIntegrable_iff_integrableOn_Ioc_of_le zero_le_one] apply intervalIntegral.intervalIntegrable_rpow' rwa [neg_lt_neg_iff, inv_mul_lt_iff' hr, one_mul]
15
3,269,017.372472
2
1.571429
7
1,710
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake #align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open scoped NNReal Filter Topology ENNReal open Asymptotics Filter Set Real MeasureTheory FiniteDimensional variable {E : Type*} [NormedAddCommGroup E] theorem sqrt_one_add_norm_sq_le (x : E) : √((1 : ℝ) + β€–xβ€– ^ 2) ≀ 1 + β€–xβ€– := by rw [sqrt_le_left (by positivity)] simp [add_sq] #align sqrt_one_add_norm_sq_le sqrt_one_add_norm_sq_le theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) : (1 : ℝ) + β€–xβ€– ≀ √2 * √(1 + β€–xβ€– ^ 2) := by rw [← sqrt_mul zero_le_two] have := sq_nonneg (β€–xβ€– - 1) apply le_sqrt_of_sq_le linarith #align one_add_norm_le_sqrt_two_mul_sqrt one_add_norm_le_sqrt_two_mul_sqrt theorem rpow_neg_one_add_norm_sq_le {r : ℝ} (x : E) (hr : 0 < r) : ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) ≀ (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := calc ((1 : ℝ) + β€–xβ€– ^ 2) ^ (-r / 2) = (2 : ℝ) ^ (r / 2) * ((√2 * √((1 : ℝ) + β€–xβ€– ^ 2)) ^ r)⁻¹ := by rw [rpow_div_two_eq_sqrt, rpow_div_two_eq_sqrt, mul_rpow, mul_inv, rpow_neg, mul_inv_cancel_leftβ‚€] <;> positivity _ ≀ (2 : ℝ) ^ (r / 2) * ((1 + β€–xβ€–) ^ r)⁻¹ := by gcongr apply one_add_norm_le_sqrt_two_mul_sqrt _ = (2 : ℝ) ^ (r / 2) * (1 + β€–xβ€–) ^ (-r) := by rw [rpow_neg]; positivity #align rpow_neg_one_add_norm_sq_le rpow_neg_one_add_norm_sq_le theorem le_rpow_one_add_norm_iff_norm_le {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (x : E) : t ≀ (1 + β€–xβ€–) ^ (-r) ↔ β€–xβ€– ≀ t ^ (-r⁻¹) - 1 := by rw [le_sub_iff_add_le', neg_inv] exact (Real.le_rpow_inv_iff_of_neg (by positivity) ht (neg_lt_zero.mpr hr)).symm #align le_rpow_one_add_norm_iff_norm_le le_rpow_one_add_norm_iff_norm_le variable (E) theorem closedBall_rpow_sub_one_eq_empty_aux {r t : ℝ} (hr : 0 < r) (ht : 1 < t) : Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1) = βˆ… := by rw [Metric.closedBall_eq_empty, sub_neg] exact Real.rpow_lt_one_of_one_lt_of_neg ht (by simp only [hr, Right.neg_neg_iff, inv_pos]) #align closed_ball_rpow_sub_one_eq_empty_aux closedBall_rpow_sub_one_eq_empty_aux variable [NormedSpace ℝ E] [FiniteDimensional ℝ E] variable {E} theorem finite_integral_rpow_sub_one_pow_aux {r : ℝ} (n : β„•) (hnr : (n : ℝ) < r) : (∫⁻ x : ℝ in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n)) < ∞ := by have hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr have h_int : βˆ€ x : ℝ, x ∈ Ioc (0 : ℝ) 1 β†’ ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≀ ENNReal.ofReal (x ^ (-(r⁻¹ * n))) := fun x hx ↦ by apply ENNReal.ofReal_le_ofReal rw [← neg_mul, rpow_mul hx.1.le, rpow_natCast] refine pow_le_pow_left ?_ (by simp only [sub_le_self_iff, zero_le_one]) n rw [le_sub_iff_add_le', add_zero] refine Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 ?_ rw [Right.neg_nonpos_iff, inv_nonneg] exact hr.le refine lt_of_le_of_lt (set_lintegral_mono' measurableSet_Ioc h_int) ?_ refine IntegrableOn.set_lintegral_lt_top ?_ rw [← intervalIntegrable_iff_integrableOn_Ioc_of_le zero_le_one] apply intervalIntegral.intervalIntegrable_rpow' rwa [neg_lt_neg_iff, inv_mul_lt_iff' hr, one_mul] #align finite_integral_rpow_sub_one_pow_aux finite_integral_rpow_sub_one_pow_aux variable [MeasurableSpace E] [BorelSpace E] {ΞΌ : Measure E} [ΞΌ.IsAddHaarMeasure]
Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
100
139
theorem finite_integral_one_add_norm {r : ℝ} (hnr : (finrank ℝ E : ℝ) < r) : (∫⁻ x : E, ENNReal.ofReal ((1 + β€–xβ€–) ^ (-r)) βˆ‚ΞΌ) < ∞ := by
have hr : 0 < r := lt_of_le_of_lt (finrank ℝ E).cast_nonneg hnr -- We start by applying the layer cake formula have h_meas : Measurable fun Ο‰ : E => (1 + β€–Ο‰β€–) ^ (-r) := -- Porting note: was `by measurability` (measurable_norm.const_add _).pow_const _ have h_pos : βˆ€ x : E, 0 ≀ (1 + β€–xβ€–) ^ (-r) := fun x ↦ by positivity rw [lintegral_eq_lintegral_meas_le ΞΌ (eventually_of_forall h_pos) h_meas.aemeasurable] have h_int : βˆ€ t, 0 < t β†’ ΞΌ {a : E | t ≀ (1 + β€–aβ€–) ^ (-r)} = ΞΌ (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1)) := fun t ht ↦ by congr 1 ext x simp only [mem_setOf_eq, mem_closedBall_zero_iff] exact le_rpow_one_add_norm_iff_norm_le hr (mem_Ioi.mp ht) x rw [set_lintegral_congr_fun measurableSet_Ioi (eventually_of_forall h_int)] set f := fun t : ℝ ↦ ΞΌ (Metric.closedBall (0 : E) (t ^ (-r⁻¹) - 1)) set mB := ΞΌ (Metric.ball (0 : E) 1) -- the next two inequalities are in fact equalities but we don't need that calc ∫⁻ t in Ioi 0, f t ≀ ∫⁻ t in Ioc 0 1 βˆͺ Ioi 1, f t := lintegral_mono_set Ioi_subset_Ioc_union_Ioi _ ≀ (∫⁻ t in Ioc 0 1, f t) + ∫⁻ t in Ioi 1, f t := lintegral_union_le _ _ _ _ < ∞ := ENNReal.add_lt_top.2 ⟨?_, ?_⟩ Β· -- We use estimates from auxiliary lemmas to deal with integral from `0` to `1` have h_int' : βˆ€ t ∈ Ioc (0 : ℝ) 1, f t = ENNReal.ofReal ((t ^ (-r⁻¹) - 1) ^ finrank ℝ E) * mB := fun t ht ↦ by refine ΞΌ.addHaar_closedBall (0 : E) ?_ rw [sub_nonneg] exact Real.one_le_rpow_of_pos_of_le_one_of_nonpos ht.1 ht.2 (by simp [hr.le]) rw [set_lintegral_congr_fun measurableSet_Ioc (ae_of_all _ h_int'), lintegral_mul_const' _ _ measure_ball_lt_top.ne] exact ENNReal.mul_lt_top (finite_integral_rpow_sub_one_pow_aux (finrank ℝ E) hnr).ne measure_ball_lt_top.ne Β· -- The integral from 1 to ∞ is zero: have h_int'' : βˆ€ t ∈ Ioi (1 : ℝ), f t = 0 := fun t ht => by simp only [f, closedBall_rpow_sub_one_eq_empty_aux E hr ht, measure_empty] -- The integral over the constant zero function is finite: rw [set_lintegral_congr_fun measurableSet_Ioi (ae_of_all volume <| h_int''), lintegral_const 0, zero_mul] exact WithTop.zero_lt_top
38
31,855,931,757,113,756
2
1.571429
7
1,710
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperator {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : Prop := βˆƒ K, IsCompact K ∧ f ⁻¹' K ∈ (𝓝 0 : Filter M₁) #align is_compact_operator IsCompactOperator theorem isCompactOperator_zero {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [Zero Mβ‚‚] : IsCompactOperator (0 : M₁ β†’ Mβ‚‚) := ⟨{0}, isCompact_singleton, mem_of_superset univ_mem fun _ _ => rfl⟩ #align is_compact_operator_zero isCompactOperator_zero section Characterizations section variable {R₁ Rβ‚‚ : Type*} [Semiring R₁] [Semiring Rβ‚‚] {σ₁₂ : R₁ β†’+* Rβ‚‚} {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), βˆƒ K : Set Mβ‚‚, IsCompact K ∧ f '' V βŠ† K := ⟨fun ⟨K, hK, hKf⟩ => ⟨f ⁻¹' K, hKf, K, hK, image_preimage_subset _ _⟩, fun ⟨_, hV, K, hK, hVK⟩ => ⟨K, hK, mem_of_superset hV (image_subset_iff.mp hVK)⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_image_subset_compact isCompactOperator_iff_exists_mem_nhds_image_subset_compact
Mathlib/Analysis/NormedSpace/CompactOperator.lean
84
89
theorem isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image [T2Space Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), IsCompact (closure <| f '' V) := by
rw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact] exact ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, hK.closure_of_subset hKV⟩, fun ⟨V, hV, hVc⟩ => ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩
4
54.59815
2
1.6
5
1,713
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperator {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : Prop := βˆƒ K, IsCompact K ∧ f ⁻¹' K ∈ (𝓝 0 : Filter M₁) #align is_compact_operator IsCompactOperator theorem isCompactOperator_zero {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [Zero Mβ‚‚] : IsCompactOperator (0 : M₁ β†’ Mβ‚‚) := ⟨{0}, isCompact_singleton, mem_of_superset univ_mem fun _ _ => rfl⟩ #align is_compact_operator_zero isCompactOperator_zero section Characterizations section variable {R₁ Rβ‚‚ : Type*} [Semiring R₁] [Semiring Rβ‚‚] {σ₁₂ : R₁ β†’+* Rβ‚‚} {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), βˆƒ K : Set Mβ‚‚, IsCompact K ∧ f '' V βŠ† K := ⟨fun ⟨K, hK, hKf⟩ => ⟨f ⁻¹' K, hKf, K, hK, image_preimage_subset _ _⟩, fun ⟨_, hV, K, hK, hVK⟩ => ⟨K, hK, mem_of_superset hV (image_subset_iff.mp hVK)⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_image_subset_compact isCompactOperator_iff_exists_mem_nhds_image_subset_compact theorem isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image [T2Space Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), IsCompact (closure <| f '' V) := by rw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact] exact ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, hK.closure_of_subset hKV⟩, fun ⟨V, hV, hVc⟩ => ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_is_compact_closure_image isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image end section Operations variable {R₁ Rβ‚‚ R₃ Rβ‚„ : Type*} [Semiring R₁] [Semiring Rβ‚‚] [CommSemiring R₃] [CommSemiring Rβ‚„] {σ₁₂ : R₁ β†’+* Rβ‚‚} {σ₁₄ : R₁ β†’+* Rβ‚„} {σ₃₄ : R₃ β†’+* Rβ‚„} {M₁ Mβ‚‚ M₃ Mβ‚„ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] [AddCommMonoid Mβ‚‚] [TopologicalSpace M₃] [AddCommGroup M₃] [TopologicalSpace Mβ‚„] [AddCommGroup Mβ‚„] theorem IsCompactOperator.smul {S : Type*} [Monoid S] [DistribMulAction S Mβ‚‚] [ContinuousConstSMul S Mβ‚‚] {f : M₁ β†’ Mβ‚‚} (hf : IsCompactOperator f) (c : S) : IsCompactOperator (c β€’ f) := let ⟨K, hK, hKf⟩ := hf ⟨c β€’ K, hK.image <| continuous_id.const_smul c, mem_of_superset hKf fun _ hx => smul_mem_smul_set hx⟩ #align is_compact_operator.smul IsCompactOperator.smul theorem IsCompactOperator.add [ContinuousAdd Mβ‚‚] {f g : M₁ β†’ Mβ‚‚} (hf : IsCompactOperator f) (hg : IsCompactOperator g) : IsCompactOperator (f + g) := let ⟨A, hA, hAf⟩ := hf let ⟨B, hB, hBg⟩ := hg ⟨A + B, hA.add hB, mem_of_superset (inter_mem hAf hBg) fun _ ⟨hxA, hxB⟩ => Set.add_mem_add hxA hxB⟩ #align is_compact_operator.add IsCompactOperator.add theorem IsCompactOperator.neg [ContinuousNeg Mβ‚„] {f : M₁ β†’ Mβ‚„} (hf : IsCompactOperator f) : IsCompactOperator (-f) := let ⟨K, hK, hKf⟩ := hf ⟨-K, hK.neg, mem_of_superset hKf fun x (hx : f x ∈ K) => Set.neg_mem_neg.mpr hx⟩ #align is_compact_operator.neg IsCompactOperator.neg
Mathlib/Analysis/NormedSpace/CompactOperator.lean
228
230
theorem IsCompactOperator.sub [TopologicalAddGroup Mβ‚„] {f g : M₁ β†’ Mβ‚„} (hf : IsCompactOperator f) (hg : IsCompactOperator g) : IsCompactOperator (f - g) := by
rw [sub_eq_add_neg]; exact hf.add hg.neg
1
2.718282
0
1.6
5
1,713
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperator {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : Prop := βˆƒ K, IsCompact K ∧ f ⁻¹' K ∈ (𝓝 0 : Filter M₁) #align is_compact_operator IsCompactOperator theorem isCompactOperator_zero {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [Zero Mβ‚‚] : IsCompactOperator (0 : M₁ β†’ Mβ‚‚) := ⟨{0}, isCompact_singleton, mem_of_superset univ_mem fun _ _ => rfl⟩ #align is_compact_operator_zero isCompactOperator_zero section Characterizations section variable {R₁ Rβ‚‚ : Type*} [Semiring R₁] [Semiring Rβ‚‚] {σ₁₂ : R₁ β†’+* Rβ‚‚} {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), βˆƒ K : Set Mβ‚‚, IsCompact K ∧ f '' V βŠ† K := ⟨fun ⟨K, hK, hKf⟩ => ⟨f ⁻¹' K, hKf, K, hK, image_preimage_subset _ _⟩, fun ⟨_, hV, K, hK, hVK⟩ => ⟨K, hK, mem_of_superset hV (image_subset_iff.mp hVK)⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_image_subset_compact isCompactOperator_iff_exists_mem_nhds_image_subset_compact theorem isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image [T2Space Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), IsCompact (closure <| f '' V) := by rw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact] exact ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, hK.closure_of_subset hKV⟩, fun ⟨V, hV, hVc⟩ => ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_is_compact_closure_image isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image end section Comp variable {R₁ Rβ‚‚ R₃ : Type*} [Semiring R₁] [Semiring Rβ‚‚] [Semiring R₃] {σ₁₂ : R₁ β†’+* Rβ‚‚} {σ₂₃ : Rβ‚‚ β†’+* R₃} {M₁ Mβ‚‚ M₃ : Type*} [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [TopologicalSpace M₃] [AddCommMonoid M₁] [Module R₁ M₁]
Mathlib/Analysis/NormedSpace/CompactOperator.lean
252
257
theorem IsCompactOperator.comp_clm [AddCommMonoid Mβ‚‚] [Module Rβ‚‚ Mβ‚‚] {f : Mβ‚‚ β†’ M₃} (hf : IsCompactOperator f) (g : M₁ β†’SL[σ₁₂] Mβ‚‚) : IsCompactOperator (f ∘ g) := by
have := g.continuous.tendsto 0 rw [map_zero] at this rcases hf with ⟨K, hK, hKf⟩ exact ⟨K, hK, this hKf⟩
4
54.59815
2
1.6
5
1,713
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperator {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : Prop := βˆƒ K, IsCompact K ∧ f ⁻¹' K ∈ (𝓝 0 : Filter M₁) #align is_compact_operator IsCompactOperator theorem isCompactOperator_zero {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [Zero Mβ‚‚] : IsCompactOperator (0 : M₁ β†’ Mβ‚‚) := ⟨{0}, isCompact_singleton, mem_of_superset univ_mem fun _ _ => rfl⟩ #align is_compact_operator_zero isCompactOperator_zero section Characterizations section variable {R₁ Rβ‚‚ : Type*} [Semiring R₁] [Semiring Rβ‚‚] {σ₁₂ : R₁ β†’+* Rβ‚‚} {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), βˆƒ K : Set Mβ‚‚, IsCompact K ∧ f '' V βŠ† K := ⟨fun ⟨K, hK, hKf⟩ => ⟨f ⁻¹' K, hKf, K, hK, image_preimage_subset _ _⟩, fun ⟨_, hV, K, hK, hVK⟩ => ⟨K, hK, mem_of_superset hV (image_subset_iff.mp hVK)⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_image_subset_compact isCompactOperator_iff_exists_mem_nhds_image_subset_compact theorem isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image [T2Space Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), IsCompact (closure <| f '' V) := by rw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact] exact ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, hK.closure_of_subset hKV⟩, fun ⟨V, hV, hVc⟩ => ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_is_compact_closure_image isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image end section Comp variable {R₁ Rβ‚‚ R₃ : Type*} [Semiring R₁] [Semiring Rβ‚‚] [Semiring R₃] {σ₁₂ : R₁ β†’+* Rβ‚‚} {σ₂₃ : Rβ‚‚ β†’+* R₃} {M₁ Mβ‚‚ M₃ : Type*} [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [TopologicalSpace M₃] [AddCommMonoid M₁] [Module R₁ M₁] theorem IsCompactOperator.comp_clm [AddCommMonoid Mβ‚‚] [Module Rβ‚‚ Mβ‚‚] {f : Mβ‚‚ β†’ M₃} (hf : IsCompactOperator f) (g : M₁ β†’SL[σ₁₂] Mβ‚‚) : IsCompactOperator (f ∘ g) := by have := g.continuous.tendsto 0 rw [map_zero] at this rcases hf with ⟨K, hK, hKf⟩ exact ⟨K, hK, this hKf⟩ #align is_compact_operator.comp_clm IsCompactOperator.comp_clm
Mathlib/Analysis/NormedSpace/CompactOperator.lean
260
265
theorem IsCompactOperator.continuous_comp {f : M₁ β†’ Mβ‚‚} (hf : IsCompactOperator f) {g : Mβ‚‚ β†’ M₃} (hg : Continuous g) : IsCompactOperator (g ∘ f) := by
rcases hf with ⟨K, hK, hKf⟩ refine ⟨g '' K, hK.image hg, mem_of_superset hKf ?_⟩ rw [preimage_comp] exact preimage_mono (subset_preimage_image _ _)
4
54.59815
2
1.6
5
1,713
import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Topology.Algebra.Module.StrongTopology #align_import analysis.normed_space.compact_operator from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open Function Set Filter Bornology Metric Pointwise Topology def IsCompactOperator {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : Prop := βˆƒ K, IsCompact K ∧ f ⁻¹' K ∈ (𝓝 0 : Filter M₁) #align is_compact_operator IsCompactOperator theorem isCompactOperator_zero {M₁ Mβ‚‚ : Type*} [Zero M₁] [TopologicalSpace M₁] [TopologicalSpace Mβ‚‚] [Zero Mβ‚‚] : IsCompactOperator (0 : M₁ β†’ Mβ‚‚) := ⟨{0}, isCompact_singleton, mem_of_superset univ_mem fun _ _ => rfl⟩ #align is_compact_operator_zero isCompactOperator_zero section Characterizations section variable {R₁ Rβ‚‚ : Type*} [Semiring R₁] [Semiring Rβ‚‚] {σ₁₂ : R₁ β†’+* Rβ‚‚} {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommMonoid M₁] [TopologicalSpace Mβ‚‚] theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), βˆƒ K : Set Mβ‚‚, IsCompact K ∧ f '' V βŠ† K := ⟨fun ⟨K, hK, hKf⟩ => ⟨f ⁻¹' K, hKf, K, hK, image_preimage_subset _ _⟩, fun ⟨_, hV, K, hK, hVK⟩ => ⟨K, hK, mem_of_superset hV (image_subset_iff.mp hVK)⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_image_subset_compact isCompactOperator_iff_exists_mem_nhds_image_subset_compact theorem isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image [T2Space Mβ‚‚] (f : M₁ β†’ Mβ‚‚) : IsCompactOperator f ↔ βˆƒ V ∈ (𝓝 0 : Filter M₁), IsCompact (closure <| f '' V) := by rw [isCompactOperator_iff_exists_mem_nhds_image_subset_compact] exact ⟨fun ⟨V, hV, K, hK, hKV⟩ => ⟨V, hV, hK.closure_of_subset hKV⟩, fun ⟨V, hV, hVc⟩ => ⟨V, hV, closure (f '' V), hVc, subset_closure⟩⟩ #align is_compact_operator_iff_exists_mem_nhds_is_compact_closure_image isCompactOperator_iff_exists_mem_nhds_isCompact_closure_image end section Continuous variable {π•œβ‚ π•œβ‚‚ : Type*} [NontriviallyNormedField π•œβ‚] [NontriviallyNormedField π•œβ‚‚] {σ₁₂ : π•œβ‚ β†’+* π•œβ‚‚} [RingHomIsometric σ₁₂] {M₁ Mβ‚‚ : Type*} [TopologicalSpace M₁] [AddCommGroup M₁] [TopologicalSpace Mβ‚‚] [AddCommGroup Mβ‚‚] [Module π•œβ‚ M₁] [Module π•œβ‚‚ Mβ‚‚] [TopologicalAddGroup M₁] [ContinuousConstSMul π•œβ‚ M₁] [TopologicalAddGroup Mβ‚‚] [ContinuousSMul π•œβ‚‚ Mβ‚‚] @[continuity]
Mathlib/Analysis/NormedSpace/CompactOperator.lean
336
365
theorem IsCompactOperator.continuous {f : M₁ β†’β‚›β‚—[σ₁₂] Mβ‚‚} (hf : IsCompactOperator f) : Continuous f := by
letI : UniformSpace Mβ‚‚ := TopologicalAddGroup.toUniformSpace _ haveI : UniformAddGroup Mβ‚‚ := comm_topologicalAddGroup_is_uniform -- Since `f` is linear, we only need to show that it is continuous at zero. -- Let `U` be a neighborhood of `0` in `Mβ‚‚`. refine continuous_of_continuousAt_zero f fun U hU => ?_ rw [map_zero] at hU -- The compactness of `f` gives us a compact set `K : Set Mβ‚‚` such that `f ⁻¹' K` is a -- neighborhood of `0` in `M₁`. rcases hf with ⟨K, hK, hKf⟩ -- But any compact set is totally bounded, hence Von-Neumann bounded. Thus, `K` absorbs `U`. -- This gives `r > 0` such that `βˆ€ a : π•œβ‚‚, r ≀ β€–aβ€– β†’ K βŠ† a β€’ U`. rcases (hK.totallyBounded.isVonNBounded π•œβ‚‚ hU).exists_pos with ⟨r, hr, hrU⟩ -- Choose `c : π•œβ‚‚` with `r < β€–cβ€–`. rcases NormedField.exists_lt_norm π•œβ‚ r with ⟨c, hc⟩ have hcnz : c β‰  0 := ne_zero_of_norm_ne_zero (hr.trans hc).ne.symm -- We have `f ⁻¹' ((σ₁₂ c⁻¹) β€’ K) = c⁻¹ β€’ f ⁻¹' K ∈ 𝓝 0`. Thus, showing that -- `(σ₁₂ c⁻¹) β€’ K βŠ† U` is enough to deduce that `f ⁻¹' U ∈ 𝓝 0`. suffices (σ₁₂ <| c⁻¹) β€’ K βŠ† U by refine mem_of_superset ?_ this have : IsUnit c⁻¹ := hcnz.isUnit.inv rwa [mem_map, preimage_smul_setβ‚›β‚— _ _ _ f this, set_smul_mem_nhds_zero_iff (inv_ne_zero hcnz)] -- Since `σ₁₂ c⁻¹` = `(σ₁₂ c)⁻¹`, we have to prove that `K βŠ† σ₁₂ c β€’ U`. rw [map_invβ‚€, ← subset_set_smul_iffβ‚€ ((map_ne_zero σ₁₂).mpr hcnz)] -- But `σ₁₂` is isometric, so `‖σ₁₂ cβ€– = β€–cβ€– > r`, which concludes the argument since -- `βˆ€ a : π•œβ‚‚, r ≀ β€–aβ€– β†’ K βŠ† a β€’ U`. refine hrU (σ₁₂ c) ?_ rw [RingHomIsometric.is_iso] exact hc.le
28
1,446,257,064,291.475
2
1.6
5
1,713
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace AffineSubspace section StrictOrderedCommRing variable [StrictOrderedCommRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] variable [AddCommGroup V'] [Module R V'] [AddTorsor V' P'] def WSameSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (y -α΅₯ pβ‚‚) #align affine_subspace.w_same_side AffineSubspace.WSameSide def SSameSide (s : AffineSubspace R P) (x y : P) : Prop := s.WSameSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_same_side AffineSubspace.SSameSide def WOppSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) #align affine_subspace.w_opp_side AffineSubspace.WOppSide def SOppSide (s : AffineSubspace R P) (x y : P) : Prop := s.WOppSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_opp_side AffineSubspace.SOppSide
Mathlib/Analysis/Convex/Side.lean
62
67
theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᡃ[R] P') : (s.map f).WSameSide (f x) (f y) := by
rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear
4
54.59815
2
1.6
5
1,714
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace AffineSubspace section StrictOrderedCommRing variable [StrictOrderedCommRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] variable [AddCommGroup V'] [Module R V'] [AddTorsor V' P'] def WSameSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (y -α΅₯ pβ‚‚) #align affine_subspace.w_same_side AffineSubspace.WSameSide def SSameSide (s : AffineSubspace R P) (x y : P) : Prop := s.WSameSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_same_side AffineSubspace.SSameSide def WOppSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) #align affine_subspace.w_opp_side AffineSubspace.WOppSide def SOppSide (s : AffineSubspace R P) (x y : P) : Prop := s.WOppSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_opp_side AffineSubspace.SOppSide theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᡃ[R] P') : (s.map f).WSameSide (f x) (f y) := by rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear #align affine_subspace.w_same_side.map AffineSubspace.WSameSide.map
Mathlib/Analysis/Convex/Side.lean
70
80
theorem _root_.Function.Injective.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).WSameSide (f x) (f y) ↔ s.WSameSide x y := by
refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fpβ‚‚, hfpβ‚‚, h⟩ rw [mem_map] at hfp₁ hfpβ‚‚ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfpβ‚‚ with ⟨pβ‚‚, hpβ‚‚, rfl⟩ refine ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h
8
2,980.957987
2
1.6
5
1,714
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace AffineSubspace section StrictOrderedCommRing variable [StrictOrderedCommRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] variable [AddCommGroup V'] [Module R V'] [AddTorsor V' P'] def WSameSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (y -α΅₯ pβ‚‚) #align affine_subspace.w_same_side AffineSubspace.WSameSide def SSameSide (s : AffineSubspace R P) (x y : P) : Prop := s.WSameSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_same_side AffineSubspace.SSameSide def WOppSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) #align affine_subspace.w_opp_side AffineSubspace.WOppSide def SOppSide (s : AffineSubspace R P) (x y : P) : Prop := s.WOppSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_opp_side AffineSubspace.SOppSide theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᡃ[R] P') : (s.map f).WSameSide (f x) (f y) := by rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear #align affine_subspace.w_same_side.map AffineSubspace.WSameSide.map theorem _root_.Function.Injective.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).WSameSide (f x) (f y) ↔ s.WSameSide x y := by refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fpβ‚‚, hfpβ‚‚, h⟩ rw [mem_map] at hfp₁ hfpβ‚‚ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfpβ‚‚ with ⟨pβ‚‚, hpβ‚‚, rfl⟩ refine ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h #align function.injective.w_same_side_map_iff Function.Injective.wSameSide_map_iff
Mathlib/Analysis/Convex/Side.lean
83
86
theorem _root_.Function.Injective.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).SSameSide (f x) (f y) ↔ s.SSameSide x y := by
simp_rw [SSameSide, hf.wSameSide_map_iff, mem_map_iff_mem_of_injective hf]
1
2.718282
0
1.6
5
1,714
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace AffineSubspace section StrictOrderedCommRing variable [StrictOrderedCommRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] variable [AddCommGroup V'] [Module R V'] [AddTorsor V' P'] def WSameSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (y -α΅₯ pβ‚‚) #align affine_subspace.w_same_side AffineSubspace.WSameSide def SSameSide (s : AffineSubspace R P) (x y : P) : Prop := s.WSameSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_same_side AffineSubspace.SSameSide def WOppSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) #align affine_subspace.w_opp_side AffineSubspace.WOppSide def SOppSide (s : AffineSubspace R P) (x y : P) : Prop := s.WOppSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_opp_side AffineSubspace.SOppSide theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᡃ[R] P') : (s.map f).WSameSide (f x) (f y) := by rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear #align affine_subspace.w_same_side.map AffineSubspace.WSameSide.map theorem _root_.Function.Injective.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).WSameSide (f x) (f y) ↔ s.WSameSide x y := by refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fpβ‚‚, hfpβ‚‚, h⟩ rw [mem_map] at hfp₁ hfpβ‚‚ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfpβ‚‚ with ⟨pβ‚‚, hpβ‚‚, rfl⟩ refine ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h #align function.injective.w_same_side_map_iff Function.Injective.wSameSide_map_iff theorem _root_.Function.Injective.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).SSameSide (f x) (f y) ↔ s.SSameSide x y := by simp_rw [SSameSide, hf.wSameSide_map_iff, mem_map_iff_mem_of_injective hf] #align function.injective.s_same_side_map_iff Function.Injective.sSameSide_map_iff @[simp] theorem _root_.AffineEquiv.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᡃ[R] P') : (s.map ↑f).WSameSide (f x) (f y) ↔ s.WSameSide x y := (show Function.Injective f.toAffineMap from f.injective).wSameSide_map_iff #align affine_equiv.w_same_side_map_iff AffineEquiv.wSameSide_map_iff @[simp] theorem _root_.AffineEquiv.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᡃ[R] P') : (s.map ↑f).SSameSide (f x) (f y) ↔ s.SSameSide x y := (show Function.Injective f.toAffineMap from f.injective).sSameSide_map_iff #align affine_equiv.s_same_side_map_iff AffineEquiv.sSameSide_map_iff
Mathlib/Analysis/Convex/Side.lean
101
106
theorem WOppSide.map {s : AffineSubspace R P} {x y : P} (h : s.WOppSide x y) (f : P →ᡃ[R] P') : (s.map f).WOppSide (f x) (f y) := by
rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear
4
54.59815
2
1.6
5
1,714
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Normed import Mathlib.Analysis.Normed.Group.AddTorsor #align_import analysis.convex.side from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052a5230f" variable {R V V' P P' : Type*} open AffineEquiv AffineMap namespace AffineSubspace section StrictOrderedCommRing variable [StrictOrderedCommRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] variable [AddCommGroup V'] [Module R V'] [AddTorsor V' P'] def WSameSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (y -α΅₯ pβ‚‚) #align affine_subspace.w_same_side AffineSubspace.WSameSide def SSameSide (s : AffineSubspace R P) (x y : P) : Prop := s.WSameSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_same_side AffineSubspace.SSameSide def WOppSide (s : AffineSubspace R P) (x y : P) : Prop := βˆƒα΅‰ (p₁ ∈ s) (pβ‚‚ ∈ s), SameRay R (x -α΅₯ p₁) (pβ‚‚ -α΅₯ y) #align affine_subspace.w_opp_side AffineSubspace.WOppSide def SOppSide (s : AffineSubspace R P) (x y : P) : Prop := s.WOppSide x y ∧ x βˆ‰ s ∧ y βˆ‰ s #align affine_subspace.s_opp_side AffineSubspace.SOppSide theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᡃ[R] P') : (s.map f).WSameSide (f x) (f y) := by rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear #align affine_subspace.w_same_side.map AffineSubspace.WSameSide.map theorem _root_.Function.Injective.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).WSameSide (f x) (f y) ↔ s.WSameSide x y := by refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fpβ‚‚, hfpβ‚‚, h⟩ rw [mem_map] at hfp₁ hfpβ‚‚ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfpβ‚‚ with ⟨pβ‚‚, hpβ‚‚, rfl⟩ refine ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h #align function.injective.w_same_side_map_iff Function.Injective.wSameSide_map_iff theorem _root_.Function.Injective.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).SSameSide (f x) (f y) ↔ s.SSameSide x y := by simp_rw [SSameSide, hf.wSameSide_map_iff, mem_map_iff_mem_of_injective hf] #align function.injective.s_same_side_map_iff Function.Injective.sSameSide_map_iff @[simp] theorem _root_.AffineEquiv.wSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᡃ[R] P') : (s.map ↑f).WSameSide (f x) (f y) ↔ s.WSameSide x y := (show Function.Injective f.toAffineMap from f.injective).wSameSide_map_iff #align affine_equiv.w_same_side_map_iff AffineEquiv.wSameSide_map_iff @[simp] theorem _root_.AffineEquiv.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᡃ[R] P') : (s.map ↑f).SSameSide (f x) (f y) ↔ s.SSameSide x y := (show Function.Injective f.toAffineMap from f.injective).sSameSide_map_iff #align affine_equiv.s_same_side_map_iff AffineEquiv.sSameSide_map_iff theorem WOppSide.map {s : AffineSubspace R P} {x y : P} (h : s.WOppSide x y) (f : P →ᡃ[R] P') : (s.map f).WOppSide (f x) (f y) := by rcases h with ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, h⟩ refine ⟨f p₁, mem_map_of_mem f hp₁, f pβ‚‚, mem_map_of_mem f hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub] exact h.map f.linear #align affine_subspace.w_opp_side.map AffineSubspace.WOppSide.map
Mathlib/Analysis/Convex/Side.lean
109
119
theorem _root_.Function.Injective.wOppSide_map_iff {s : AffineSubspace R P} {x y : P} {f : P →ᡃ[R] P'} (hf : Function.Injective f) : (s.map f).WOppSide (f x) (f y) ↔ s.WOppSide x y := by
refine ⟨fun h => ?_, fun h => h.map _⟩ rcases h with ⟨fp₁, hfp₁, fpβ‚‚, hfpβ‚‚, h⟩ rw [mem_map] at hfp₁ hfpβ‚‚ rcases hfp₁ with ⟨p₁, hp₁, rfl⟩ rcases hfpβ‚‚ with ⟨pβ‚‚, hpβ‚‚, rfl⟩ refine ⟨p₁, hp₁, pβ‚‚, hpβ‚‚, ?_⟩ simp_rw [← linearMap_vsub, (f.linear_injective_iff.2 hf).sameRay_map_iff] at h exact h
8
2,980.957987
2
1.6
5
1,714
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section open Nat Polynomial open Nat Finset namespace Polynomial def bernoulli (n : β„•) : β„š[X] := βˆ‘ i ∈ range (n + 1), Polynomial.monomial (n - i) (_root_.bernoulli i * choose n i) #align polynomial.bernoulli Polynomial.bernoulli
Mathlib/NumberTheory/BernoulliPolynomials.lean
57
63
theorem bernoulli_def (n : β„•) : bernoulli n = βˆ‘ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by
rw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli] apply sum_congr rfl rintro x hx rw [mem_range_succ_iff] at hx rw [choose_symm hx, tsub_tsub_cancel_of_le hx]
5
148.413159
2
1.6
5
1,715
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section open Nat Polynomial open Nat Finset namespace Polynomial def bernoulli (n : β„•) : β„š[X] := βˆ‘ i ∈ range (n + 1), Polynomial.monomial (n - i) (_root_.bernoulli i * choose n i) #align polynomial.bernoulli Polynomial.bernoulli theorem bernoulli_def (n : β„•) : bernoulli n = βˆ‘ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by rw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli] apply sum_congr rfl rintro x hx rw [mem_range_succ_iff] at hx rw [choose_symm hx, tsub_tsub_cancel_of_le hx] #align polynomial.bernoulli_def Polynomial.bernoulli_def section Examples @[simp]
Mathlib/NumberTheory/BernoulliPolynomials.lean
72
72
theorem bernoulli_zero : bernoulli 0 = 1 := by
simp [bernoulli]
1
2.718282
0
1.6
5
1,715
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section open Nat Polynomial open Nat Finset namespace Polynomial def bernoulli (n : β„•) : β„š[X] := βˆ‘ i ∈ range (n + 1), Polynomial.monomial (n - i) (_root_.bernoulli i * choose n i) #align polynomial.bernoulli Polynomial.bernoulli theorem bernoulli_def (n : β„•) : bernoulli n = βˆ‘ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by rw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli] apply sum_congr rfl rintro x hx rw [mem_range_succ_iff] at hx rw [choose_symm hx, tsub_tsub_cancel_of_le hx] #align polynomial.bernoulli_def Polynomial.bernoulli_def section Examples @[simp] theorem bernoulli_zero : bernoulli 0 = 1 := by simp [bernoulli] #align polynomial.bernoulli_zero Polynomial.bernoulli_zero @[simp]
Mathlib/NumberTheory/BernoulliPolynomials.lean
76
82
theorem bernoulli_eval_zero (n : β„•) : (bernoulli n).eval 0 = _root_.bernoulli n := by
rw [bernoulli, eval_finset_sum, sum_range_succ] have : βˆ‘ x ∈ range n, _root_.bernoulli x * n.choose x * 0 ^ (n - x) = 0 := by apply sum_eq_zero fun x hx => _ intros x hx simp [tsub_eq_zero_iff_le, mem_range.1 hx] simp [this]
6
403.428793
2
1.6
5
1,715
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section open Nat Polynomial open Nat Finset namespace Polynomial def bernoulli (n : β„•) : β„š[X] := βˆ‘ i ∈ range (n + 1), Polynomial.monomial (n - i) (_root_.bernoulli i * choose n i) #align polynomial.bernoulli Polynomial.bernoulli theorem bernoulli_def (n : β„•) : bernoulli n = βˆ‘ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by rw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli] apply sum_congr rfl rintro x hx rw [mem_range_succ_iff] at hx rw [choose_symm hx, tsub_tsub_cancel_of_le hx] #align polynomial.bernoulli_def Polynomial.bernoulli_def section Examples @[simp] theorem bernoulli_zero : bernoulli 0 = 1 := by simp [bernoulli] #align polynomial.bernoulli_zero Polynomial.bernoulli_zero @[simp] theorem bernoulli_eval_zero (n : β„•) : (bernoulli n).eval 0 = _root_.bernoulli n := by rw [bernoulli, eval_finset_sum, sum_range_succ] have : βˆ‘ x ∈ range n, _root_.bernoulli x * n.choose x * 0 ^ (n - x) = 0 := by apply sum_eq_zero fun x hx => _ intros x hx simp [tsub_eq_zero_iff_le, mem_range.1 hx] simp [this] #align polynomial.bernoulli_eval_zero Polynomial.bernoulli_eval_zero @[simp]
Mathlib/NumberTheory/BernoulliPolynomials.lean
86
92
theorem bernoulli_eval_one (n : β„•) : (bernoulli n).eval 1 = bernoulli' n := by
simp only [bernoulli, eval_finset_sum] simp only [← succ_eq_add_one, sum_range_succ, mul_one, cast_one, choose_self, (_root_.bernoulli _).mul_comm, sum_bernoulli, one_pow, mul_one, eval_C, eval_monomial, one_mul] by_cases h : n = 1 Β· norm_num [h] Β· simp [h, bernoulli_eq_bernoulli'_of_ne_one h]
6
403.428793
2
1.6
5
1,715
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.NumberTheory.Bernoulli #align_import number_theory.bernoulli_polynomials from "leanprover-community/mathlib"@"ca3d21f7f4fd613c2a3c54ac7871163e1e5ecb3a" noncomputable section open Nat Polynomial open Nat Finset namespace Polynomial def bernoulli (n : β„•) : β„š[X] := βˆ‘ i ∈ range (n + 1), Polynomial.monomial (n - i) (_root_.bernoulli i * choose n i) #align polynomial.bernoulli Polynomial.bernoulli theorem bernoulli_def (n : β„•) : bernoulli n = βˆ‘ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) := by rw [← sum_range_reflect, add_succ_sub_one, add_zero, bernoulli] apply sum_congr rfl rintro x hx rw [mem_range_succ_iff] at hx rw [choose_symm hx, tsub_tsub_cancel_of_le hx] #align polynomial.bernoulli_def Polynomial.bernoulli_def
Mathlib/NumberTheory/BernoulliPolynomials.lean
97
108
theorem derivative_bernoulli_add_one (k : β„•) : Polynomial.derivative (bernoulli (k + 1)) = (k + 1) * bernoulli k := by
simp_rw [bernoulli, derivative_sum, derivative_monomial, Nat.sub_sub, Nat.add_sub_add_right] -- LHS sum has an extra term, but the coefficient is zero: rw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, mul_zero, map_zero, zero_add, mul_sum] -- the rest of the sum is termwise equal: refine sum_congr (by rfl) fun m _ => ?_ conv_rhs => rw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_natCast, C_mul_monomial, mul_comm] rw [mul_assoc, mul_assoc, ← Nat.cast_mul, ← Nat.cast_mul] congr 3 rw [(choose_mul_succ_eq k m).symm]
10
22,026.465795
2
1.6
5
1,715
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u v open scoped Classical open Finset NNReal ENNReal set_option linter.uppercaseLean3 false noncomputable section variable {ΞΉ : Type u} (s : Finset ΞΉ) section GeomMeanLEArithMean namespace Real
Mathlib/Analysis/MeanInequalities.lean
113
134
theorem geom_mean_le_arith_mean_weighted (w z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) : ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i := by
-- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : βˆƒ i ∈ s, z i = 0 ∧ w i β‰  0 Β· rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] Β· exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) Β· rw [hzi] exact zero_rpow hwi -- If all numbers `z i` with non-zero weight are positive, then we apply Jensen's inequality -- for `exp` and numbers `log (z i)` with weights `w i`. Β· simp only [not_exists, not_and, Ne, Classical.not_not] at A have := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i) simp only [exp_sum, (Β· ∘ Β·), smul_eq_mul, mul_comm (w _) (log _)] at this convert this using 1 <;> [apply prod_congr rfl;apply sum_congr rfl] <;> intro i hi Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· exact rpow_def_of_pos hz _ Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· rw [exp_log hz]
19
178,482,300.963187
2
1.6
5
1,716
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u v open scoped Classical open Finset NNReal ENNReal set_option linter.uppercaseLean3 false noncomputable section variable {ΞΉ : Type u} (s : Finset ΞΉ) section GeomMeanLEArithMean namespace Real theorem geom_mean_le_arith_mean_weighted (w z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) : ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i := by -- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : βˆƒ i ∈ s, z i = 0 ∧ w i β‰  0 Β· rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] Β· exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) Β· rw [hzi] exact zero_rpow hwi -- If all numbers `z i` with non-zero weight are positive, then we apply Jensen's inequality -- for `exp` and numbers `log (z i)` with weights `w i`. Β· simp only [not_exists, not_and, Ne, Classical.not_not] at A have := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i) simp only [exp_sum, (Β· ∘ Β·), smul_eq_mul, mul_comm (w _) (log _)] at this convert this using 1 <;> [apply prod_congr rfl;apply sum_congr rfl] <;> intro i hi Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· exact rpow_def_of_pos hz _ Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· rw [exp_log hz] #align real.geom_mean_le_arith_mean_weighted Real.geom_mean_le_arith_mean_weighted
Mathlib/Analysis/MeanInequalities.lean
138
148
theorem geom_mean_le_arith_mean {ΞΉ : Type*} (s : Finset ΞΉ) (w : ΞΉ β†’ ℝ) (z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : 0 < βˆ‘ i ∈ s, w i) (hz : βˆ€ i ∈ s, 0 ≀ z i) : (∏ i ∈ s, z i ^ w i) ^ (βˆ‘ i ∈ s, w i)⁻¹ ≀ (βˆ‘ i ∈ s, w i * z i) / (βˆ‘ i ∈ s, w i) := by
convert geom_mean_le_arith_mean_weighted s (fun i => (w i) / βˆ‘ i ∈ s, w i) z ?_ ?_ hz using 2 Β· rw [← finset_prod_rpow _ _ (fun i hi => rpow_nonneg (hz _ hi) _) _] refine Finset.prod_congr rfl (fun _ ih => ?_) rw [div_eq_mul_inv, rpow_mul (hz _ ih)] Β· simp_rw [div_eq_mul_inv, mul_assoc, mul_comm, ← mul_assoc, ← Finset.sum_mul, mul_comm] Β· exact fun _ hi => div_nonneg (hw _ hi) (le_of_lt hw') Β· simp_rw [div_eq_mul_inv, ← Finset.sum_mul] exact mul_inv_cancel (by linarith)
8
2,980.957987
2
1.6
5
1,716
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u v open scoped Classical open Finset NNReal ENNReal set_option linter.uppercaseLean3 false noncomputable section variable {ΞΉ : Type u} (s : Finset ΞΉ) section GeomMeanLEArithMean namespace Real theorem geom_mean_le_arith_mean_weighted (w z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) : ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i := by -- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : βˆƒ i ∈ s, z i = 0 ∧ w i β‰  0 Β· rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] Β· exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) Β· rw [hzi] exact zero_rpow hwi -- If all numbers `z i` with non-zero weight are positive, then we apply Jensen's inequality -- for `exp` and numbers `log (z i)` with weights `w i`. Β· simp only [not_exists, not_and, Ne, Classical.not_not] at A have := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i) simp only [exp_sum, (Β· ∘ Β·), smul_eq_mul, mul_comm (w _) (log _)] at this convert this using 1 <;> [apply prod_congr rfl;apply sum_congr rfl] <;> intro i hi Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· exact rpow_def_of_pos hz _ Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· rw [exp_log hz] #align real.geom_mean_le_arith_mean_weighted Real.geom_mean_le_arith_mean_weighted theorem geom_mean_le_arith_mean {ΞΉ : Type*} (s : Finset ΞΉ) (w : ΞΉ β†’ ℝ) (z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : 0 < βˆ‘ i ∈ s, w i) (hz : βˆ€ i ∈ s, 0 ≀ z i) : (∏ i ∈ s, z i ^ w i) ^ (βˆ‘ i ∈ s, w i)⁻¹ ≀ (βˆ‘ i ∈ s, w i * z i) / (βˆ‘ i ∈ s, w i) := by convert geom_mean_le_arith_mean_weighted s (fun i => (w i) / βˆ‘ i ∈ s, w i) z ?_ ?_ hz using 2 Β· rw [← finset_prod_rpow _ _ (fun i hi => rpow_nonneg (hz _ hi) _) _] refine Finset.prod_congr rfl (fun _ ih => ?_) rw [div_eq_mul_inv, rpow_mul (hz _ ih)] Β· simp_rw [div_eq_mul_inv, mul_assoc, mul_comm, ← mul_assoc, ← Finset.sum_mul, mul_comm] Β· exact fun _ hi => div_nonneg (hw _ hi) (le_of_lt hw') Β· simp_rw [div_eq_mul_inv, ← Finset.sum_mul] exact mul_inv_cancel (by linarith)
Mathlib/Analysis/MeanInequalities.lean
150
166
theorem geom_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : ∏ i ∈ s, z i ^ w i = x := calc ∏ i ∈ s, z i ^ w i = ∏ i ∈ s, x ^ w i := by
refine prod_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hβ‚€ | hβ‚€ Β· rw [hβ‚€, rpow_zero, rpow_zero] Β· rw [hx i hi hβ‚€] _ = x := by rw [← rpow_sum_of_nonneg _ hw, hw', rpow_one] have : (βˆ‘ i ∈ s, w i) β‰  0 := by rw [hw'] exact one_ne_zero obtain ⟨i, his, hi⟩ := exists_ne_zero_of_sum_ne_zero this rw [← hx i his hi] exact hz i his
12
162,754.791419
2
1.6
5
1,716
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u v open scoped Classical open Finset NNReal ENNReal set_option linter.uppercaseLean3 false noncomputable section variable {ΞΉ : Type u} (s : Finset ΞΉ) section GeomMeanLEArithMean namespace Real theorem geom_mean_le_arith_mean_weighted (w z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) : ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i := by -- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : βˆƒ i ∈ s, z i = 0 ∧ w i β‰  0 Β· rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] Β· exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) Β· rw [hzi] exact zero_rpow hwi -- If all numbers `z i` with non-zero weight are positive, then we apply Jensen's inequality -- for `exp` and numbers `log (z i)` with weights `w i`. Β· simp only [not_exists, not_and, Ne, Classical.not_not] at A have := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i) simp only [exp_sum, (Β· ∘ Β·), smul_eq_mul, mul_comm (w _) (log _)] at this convert this using 1 <;> [apply prod_congr rfl;apply sum_congr rfl] <;> intro i hi Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· exact rpow_def_of_pos hz _ Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· rw [exp_log hz] #align real.geom_mean_le_arith_mean_weighted Real.geom_mean_le_arith_mean_weighted theorem geom_mean_le_arith_mean {ΞΉ : Type*} (s : Finset ΞΉ) (w : ΞΉ β†’ ℝ) (z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : 0 < βˆ‘ i ∈ s, w i) (hz : βˆ€ i ∈ s, 0 ≀ z i) : (∏ i ∈ s, z i ^ w i) ^ (βˆ‘ i ∈ s, w i)⁻¹ ≀ (βˆ‘ i ∈ s, w i * z i) / (βˆ‘ i ∈ s, w i) := by convert geom_mean_le_arith_mean_weighted s (fun i => (w i) / βˆ‘ i ∈ s, w i) z ?_ ?_ hz using 2 Β· rw [← finset_prod_rpow _ _ (fun i hi => rpow_nonneg (hz _ hi) _) _] refine Finset.prod_congr rfl (fun _ ih => ?_) rw [div_eq_mul_inv, rpow_mul (hz _ ih)] Β· simp_rw [div_eq_mul_inv, mul_assoc, mul_comm, ← mul_assoc, ← Finset.sum_mul, mul_comm] Β· exact fun _ hi => div_nonneg (hw _ hi) (le_of_lt hw') Β· simp_rw [div_eq_mul_inv, ← Finset.sum_mul] exact mul_inv_cancel (by linarith) theorem geom_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : ∏ i ∈ s, z i ^ w i = x := calc ∏ i ∈ s, z i ^ w i = ∏ i ∈ s, x ^ w i := by refine prod_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hβ‚€ | hβ‚€ Β· rw [hβ‚€, rpow_zero, rpow_zero] Β· rw [hx i hi hβ‚€] _ = x := by rw [← rpow_sum_of_nonneg _ hw, hw', rpow_one] have : (βˆ‘ i ∈ s, w i) β‰  0 := by rw [hw'] exact one_ne_zero obtain ⟨i, his, hi⟩ := exists_ne_zero_of_sum_ne_zero this rw [← hx i his hi] exact hz i his #align real.geom_mean_weighted_of_constant Real.geom_mean_weighted_of_constant
Mathlib/Analysis/MeanInequalities.lean
169
177
theorem arith_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw' : βˆ‘ i ∈ s, w i = 1) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : βˆ‘ i ∈ s, w i * z i = x := calc βˆ‘ i ∈ s, w i * z i = βˆ‘ i ∈ s, w i * x := by
refine sum_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hwi | hwi Β· rw [hwi, zero_mul, zero_mul] Β· rw [hx i hi hwi] _ = x := by rw [← sum_mul, hw', one_mul]
5
148.413159
2
1.6
5
1,716
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u v open scoped Classical open Finset NNReal ENNReal set_option linter.uppercaseLean3 false noncomputable section variable {ΞΉ : Type u} (s : Finset ΞΉ) section GeomMeanLEArithMean namespace Real theorem geom_mean_le_arith_mean_weighted (w z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) : ∏ i ∈ s, z i ^ w i ≀ βˆ‘ i ∈ s, w i * z i := by -- If some number `z i` equals zero and has non-zero weight, then LHS is 0 and RHS is nonnegative. by_cases A : βˆƒ i ∈ s, z i = 0 ∧ w i β‰  0 Β· rcases A with ⟨i, his, hzi, hwi⟩ rw [prod_eq_zero his] Β· exact sum_nonneg fun j hj => mul_nonneg (hw j hj) (hz j hj) Β· rw [hzi] exact zero_rpow hwi -- If all numbers `z i` with non-zero weight are positive, then we apply Jensen's inequality -- for `exp` and numbers `log (z i)` with weights `w i`. Β· simp only [not_exists, not_and, Ne, Classical.not_not] at A have := convexOn_exp.map_sum_le hw hw' fun i _ => Set.mem_univ <| log (z i) simp only [exp_sum, (Β· ∘ Β·), smul_eq_mul, mul_comm (w _) (log _)] at this convert this using 1 <;> [apply prod_congr rfl;apply sum_congr rfl] <;> intro i hi Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· exact rpow_def_of_pos hz _ Β· cases' eq_or_lt_of_le (hz i hi) with hz hz Β· simp [A i hi hz.symm] Β· rw [exp_log hz] #align real.geom_mean_le_arith_mean_weighted Real.geom_mean_le_arith_mean_weighted theorem geom_mean_le_arith_mean {ΞΉ : Type*} (s : Finset ΞΉ) (w : ΞΉ β†’ ℝ) (z : ΞΉ β†’ ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : 0 < βˆ‘ i ∈ s, w i) (hz : βˆ€ i ∈ s, 0 ≀ z i) : (∏ i ∈ s, z i ^ w i) ^ (βˆ‘ i ∈ s, w i)⁻¹ ≀ (βˆ‘ i ∈ s, w i * z i) / (βˆ‘ i ∈ s, w i) := by convert geom_mean_le_arith_mean_weighted s (fun i => (w i) / βˆ‘ i ∈ s, w i) z ?_ ?_ hz using 2 Β· rw [← finset_prod_rpow _ _ (fun i hi => rpow_nonneg (hz _ hi) _) _] refine Finset.prod_congr rfl (fun _ ih => ?_) rw [div_eq_mul_inv, rpow_mul (hz _ ih)] Β· simp_rw [div_eq_mul_inv, mul_assoc, mul_comm, ← mul_assoc, ← Finset.sum_mul, mul_comm] Β· exact fun _ hi => div_nonneg (hw _ hi) (le_of_lt hw') Β· simp_rw [div_eq_mul_inv, ← Finset.sum_mul] exact mul_inv_cancel (by linarith) theorem geom_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : ∏ i ∈ s, z i ^ w i = x := calc ∏ i ∈ s, z i ^ w i = ∏ i ∈ s, x ^ w i := by refine prod_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hβ‚€ | hβ‚€ Β· rw [hβ‚€, rpow_zero, rpow_zero] Β· rw [hx i hi hβ‚€] _ = x := by rw [← rpow_sum_of_nonneg _ hw, hw', rpow_one] have : (βˆ‘ i ∈ s, w i) β‰  0 := by rw [hw'] exact one_ne_zero obtain ⟨i, his, hi⟩ := exists_ne_zero_of_sum_ne_zero this rw [← hx i his hi] exact hz i his #align real.geom_mean_weighted_of_constant Real.geom_mean_weighted_of_constant theorem arith_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw' : βˆ‘ i ∈ s, w i = 1) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : βˆ‘ i ∈ s, w i * z i = x := calc βˆ‘ i ∈ s, w i * z i = βˆ‘ i ∈ s, w i * x := by refine sum_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with hwi | hwi Β· rw [hwi, zero_mul, zero_mul] Β· rw [hx i hi hwi] _ = x := by rw [← sum_mul, hw', one_mul] #align real.arith_mean_weighted_of_constant Real.arith_mean_weighted_of_constant
Mathlib/Analysis/MeanInequalities.lean
180
183
theorem geom_mean_eq_arith_mean_weighted_of_constant (w z : ΞΉ β†’ ℝ) (x : ℝ) (hw : βˆ€ i ∈ s, 0 ≀ w i) (hw' : βˆ‘ i ∈ s, w i = 1) (hz : βˆ€ i ∈ s, 0 ≀ z i) (hx : βˆ€ i ∈ s, w i β‰  0 β†’ z i = x) : ∏ i ∈ s, z i ^ w i = βˆ‘ i ∈ s, w i * z i := by
rw [geom_mean_weighted_of_constant, arith_mean_weighted_of_constant] <;> assumption
1
2.718282
0
1.6
5
1,716
import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" noncomputable section open scoped Topology ENNReal MeasureTheory ProbabilityTheory open Set Function Real ENNReal MeasureTheory Filter ProbabilityTheory ProbabilityTheory.kernel variable {Ξ± Ξ² Ξ³ E : Type*} {mΞ± : MeasurableSpace Ξ±} {mΞ² : MeasurableSpace Ξ²} {mΞ³ : MeasurableSpace Ξ³} [NormedAddCommGroup E] {ΞΊ : kernel Ξ± Ξ²} [IsSFiniteKernel ΞΊ] {Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³} [IsSFiniteKernel Ξ·] {a : Ξ±} namespace ProbabilityTheory
Mathlib/Probability/Kernel/IntegralCompProd.lean
48
61
theorem hasFiniteIntegral_prod_mk_left (a : Ξ±) {s : Set (Ξ² Γ— Ξ³)} (h2s : (ΞΊ βŠ—β‚– Ξ·) a s β‰  ∞) : HasFiniteIntegral (fun b => (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a) := by
let t := toMeasurable ((ΞΊ βŠ—β‚– Ξ·) a) s simp_rw [HasFiniteIntegral, ennnorm_eq_ofReal toReal_nonneg] calc ∫⁻ b, ENNReal.ofReal (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal βˆ‚ΞΊ a _ ≀ ∫⁻ b, Ξ· (a, b) (Prod.mk b ⁻¹' t) βˆ‚ΞΊ a := by refine lintegral_mono_ae ?_ filter_upwards [ae_kernel_lt_top a h2s] with b hb rw [ofReal_toReal hb.ne] exact measure_mono (preimage_mono (subset_toMeasurable _ _)) _ ≀ (ΞΊ βŠ—β‚– Ξ·) a t := le_compProd_apply _ _ _ _ _ = (ΞΊ βŠ—β‚– Ξ·) a s := measure_toMeasurable s _ < ⊀ := h2s.lt_top
12
162,754.791419
2
1.6
5
1,717
import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" noncomputable section open scoped Topology ENNReal MeasureTheory ProbabilityTheory open Set Function Real ENNReal MeasureTheory Filter ProbabilityTheory ProbabilityTheory.kernel variable {Ξ± Ξ² Ξ³ E : Type*} {mΞ± : MeasurableSpace Ξ±} {mΞ² : MeasurableSpace Ξ²} {mΞ³ : MeasurableSpace Ξ³} [NormedAddCommGroup E] {ΞΊ : kernel Ξ± Ξ²} [IsSFiniteKernel ΞΊ] {Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³} [IsSFiniteKernel Ξ·] {a : Ξ±} namespace ProbabilityTheory theorem hasFiniteIntegral_prod_mk_left (a : Ξ±) {s : Set (Ξ² Γ— Ξ³)} (h2s : (ΞΊ βŠ—β‚– Ξ·) a s β‰  ∞) : HasFiniteIntegral (fun b => (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a) := by let t := toMeasurable ((ΞΊ βŠ—β‚– Ξ·) a) s simp_rw [HasFiniteIntegral, ennnorm_eq_ofReal toReal_nonneg] calc ∫⁻ b, ENNReal.ofReal (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal βˆ‚ΞΊ a _ ≀ ∫⁻ b, Ξ· (a, b) (Prod.mk b ⁻¹' t) βˆ‚ΞΊ a := by refine lintegral_mono_ae ?_ filter_upwards [ae_kernel_lt_top a h2s] with b hb rw [ofReal_toReal hb.ne] exact measure_mono (preimage_mono (subset_toMeasurable _ _)) _ ≀ (ΞΊ βŠ—β‚– Ξ·) a t := le_compProd_apply _ _ _ _ _ = (ΞΊ βŠ—β‚– Ξ·) a s := measure_toMeasurable s _ < ⊀ := h2s.lt_top #align probability_theory.has_finite_integral_prod_mk_left ProbabilityTheory.hasFiniteIntegral_prod_mk_left
Mathlib/Probability/Kernel/IntegralCompProd.lean
64
68
theorem integrable_kernel_prod_mk_left (a : Ξ±) {s : Set (Ξ² Γ— Ξ³)} (hs : MeasurableSet s) (h2s : (ΞΊ βŠ—β‚– Ξ·) a s β‰  ∞) : Integrable (fun b => (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a) := by
constructor Β· exact (measurable_kernel_prod_mk_left' hs a).ennreal_toReal.aestronglyMeasurable Β· exact hasFiniteIntegral_prod_mk_left a h2s
3
20.085537
1
1.6
5
1,717
import Mathlib.Probability.Kernel.Composition import Mathlib.MeasureTheory.Integral.SetIntegral #align_import probability.kernel.integral_comp_prod from "leanprover-community/mathlib"@"c0d694db494dd4f9aa57f2714b6e4c82b4ebc113" noncomputable section open scoped Topology ENNReal MeasureTheory ProbabilityTheory open Set Function Real ENNReal MeasureTheory Filter ProbabilityTheory ProbabilityTheory.kernel variable {Ξ± Ξ² Ξ³ E : Type*} {mΞ± : MeasurableSpace Ξ±} {mΞ² : MeasurableSpace Ξ²} {mΞ³ : MeasurableSpace Ξ³} [NormedAddCommGroup E] {ΞΊ : kernel Ξ± Ξ²} [IsSFiniteKernel ΞΊ] {Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³} [IsSFiniteKernel Ξ·] {a : Ξ±} namespace ProbabilityTheory theorem hasFiniteIntegral_prod_mk_left (a : Ξ±) {s : Set (Ξ² Γ— Ξ³)} (h2s : (ΞΊ βŠ—β‚– Ξ·) a s β‰  ∞) : HasFiniteIntegral (fun b => (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a) := by let t := toMeasurable ((ΞΊ βŠ—β‚– Ξ·) a) s simp_rw [HasFiniteIntegral, ennnorm_eq_ofReal toReal_nonneg] calc ∫⁻ b, ENNReal.ofReal (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal βˆ‚ΞΊ a _ ≀ ∫⁻ b, Ξ· (a, b) (Prod.mk b ⁻¹' t) βˆ‚ΞΊ a := by refine lintegral_mono_ae ?_ filter_upwards [ae_kernel_lt_top a h2s] with b hb rw [ofReal_toReal hb.ne] exact measure_mono (preimage_mono (subset_toMeasurable _ _)) _ ≀ (ΞΊ βŠ—β‚– Ξ·) a t := le_compProd_apply _ _ _ _ _ = (ΞΊ βŠ—β‚– Ξ·) a s := measure_toMeasurable s _ < ⊀ := h2s.lt_top #align probability_theory.has_finite_integral_prod_mk_left ProbabilityTheory.hasFiniteIntegral_prod_mk_left theorem integrable_kernel_prod_mk_left (a : Ξ±) {s : Set (Ξ² Γ— Ξ³)} (hs : MeasurableSet s) (h2s : (ΞΊ βŠ—β‚– Ξ·) a s β‰  ∞) : Integrable (fun b => (Ξ· (a, b) (Prod.mk b ⁻¹' s)).toReal) (ΞΊ a) := by constructor Β· exact (measurable_kernel_prod_mk_left' hs a).ennreal_toReal.aestronglyMeasurable Β· exact hasFiniteIntegral_prod_mk_left a h2s #align probability_theory.integrable_kernel_prod_mk_left ProbabilityTheory.integrable_kernel_prod_mk_left theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_compProd [NormedSpace ℝ E] ⦃f : Ξ² Γ— Ξ³ β†’ E⦄ (hf : AEStronglyMeasurable f ((ΞΊ βŠ—β‚– Ξ·) a)) : AEStronglyMeasurable (fun x => ∫ y, f (x, y) βˆ‚Ξ· (a, x)) (ΞΊ a) := ⟨fun x => ∫ y, hf.mk f (x, y) βˆ‚Ξ· (a, x), hf.stronglyMeasurable_mk.integral_kernel_prod_right'', by filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩ #align measure_theory.ae_strongly_measurable.integral_kernel_comp_prod MeasureTheory.AEStronglyMeasurable.integral_kernel_compProd
Mathlib/Probability/Kernel/IntegralCompProd.lean
78
82
theorem _root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left {Ξ΄ : Type*} [TopologicalSpace Ξ΄] {f : Ξ² Γ— Ξ³ β†’ Ξ΄} (hf : AEStronglyMeasurable f ((ΞΊ βŠ—β‚– Ξ·) a)) : βˆ€α΅ x βˆ‚ΞΊ a, AEStronglyMeasurable (fun y => f (x, y)) (Ξ· (a, x)) := by
filter_upwards [ae_ae_of_ae_compProd hf.ae_eq_mk] with x hx using ⟨fun y => hf.mk f (x, y), hf.stronglyMeasurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
2
7.389056
1
1.6
5
1,717