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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.