File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean

full_name: NumberField.mixedEmbedding._aux_Mathlib_NumberTheory_NumberField_CanonicalEmbedding_ConvexBody___macroRules_NumberField_mixedEmbedding_termE__1
code: /-- The space `ℝ^r₁ × ℂ^r₂` with `(r₁, r₂)` the signature of `K`. -/
local notation "E" K =>
  ({w : InfinitePlace K // IsReal w} → ℝ) × ({w : InfinitePlace K // IsComplex w} → ℂ)
goal: Lean.Macro

full_name: NumberField.mixedEmbedding.convexBodyLT
code: /-- The convex body defined by `f`: the set of points `x : E` such that `‖x w‖ < f w` for all
infinite places `w`. -/
abbrev convexBodyLT : Set (E K) 
goal: Set (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

full_name: NumberField.mixedEmbedding.convexBodyLT_mem
code: theorem convexBodyLT_mem {x : K} :
    mixedEmbedding K x ∈ (convexBodyLT K f) ↔ ∀ w : InfinitePlace K, w x < f w 
goal: (NumberField.mixedEmbedding K) x ∈ NumberField.mixedEmbedding.convexBodyLT K f ↔
  ∀ (w : NumberField.InfinitePlace K), w x < ↑(f w)

full_name: NumberField.mixedEmbedding.convexBodyLT_neg_mem
code: theorem convexBodyLT_neg_mem (x : E K) (hx : x ∈ (convexBodyLT K f)) :
    -x ∈ (convexBodyLT K f) 
goal: -x ∈ NumberField.mixedEmbedding.convexBodyLT K f

full_name: NumberField.mixedEmbedding.convexBodyLT_convex
code: theorem convexBodyLT_convex : Convex ℝ (convexBodyLT K f) 
goal: Convex ℝ (NumberField.mixedEmbedding.convexBodyLT K f)

full_name: NumberField.mixedEmbedding.instIsAddHaarMeasureProdForallSubtypeInfinitePlaceIsRealRealForallIsComplexComplexVolume
code: instance : IsAddHaarMeasure (volume : Measure (E K)) 
goal: MeasureTheory.volume.IsAddHaarMeasure

full_name: NumberField.mixedEmbedding.instNoAtomsProdForallSubtypeInfinitePlaceIsRealRealForallIsComplexComplexVolume
code: instance : NoAtoms (volume : Measure (E K)) 
goal: MeasureTheory.NoAtoms MeasureTheory.volume

full_name: NumberField.mixedEmbedding.convexBodyLTFactor
code: /-- The fudge factor that appears in the formula for the volume of `convexBodyLT`. -/
noncomputable abbrev convexBodyLTFactor : ℝ≥0 
goal: NNReal

full_name: NumberField.mixedEmbedding.convexBodyLTFactor_ne_zero
code: theorem convexBodyLTFactor_ne_zero : convexBodyLTFactor K ≠ 0 
goal: NumberField.mixedEmbedding.convexBodyLTFactor K ≠ 0

full_name: NumberField.mixedEmbedding.one_le_convexBodyLTFactor
code: theorem one_le_convexBodyLTFactor : 1 ≤ convexBodyLTFactor K 
goal: 1 ≤ NumberField.mixedEmbedding.convexBodyLTFactor K

full_name: NumberField.mixedEmbedding.convexBodyLT_volume
code: /-- The volume of `(ConvexBodyLt K f)` where `convexBodyLT K f` is the set of points `x`
such that `‖x w‖ < f w` for all infinite places `w`. -/
theorem convexBodyLT_volume :
    volume (convexBodyLT K f) = (convexBodyLTFactor K) * ∏ w, (f w) ^ (mult w) 
goal: MeasureTheory.volume (NumberField.mixedEmbedding.convexBodyLT K f) =
  ↑(NumberField.mixedEmbedding.convexBodyLTFactor K) * ↑(∏ w : NumberField.InfinitePlace K, f w ^ w.mult)

full_name: NumberField.mixedEmbedding.adjust_f
code: /-- This is a technical result: quite often, we want to impose conditions at all infinite places
but one and choose the value at the remaining place so that we can apply
`exists_ne_zero_mem_ringOfIntegers_lt`. -/
theorem adjust_f {w₁ : InfinitePlace K} (B : ℝ≥0) (hf : ∀ w, w ≠ w₁ → f w ≠ 0) :
    ∃ g : InfinitePlace K → ℝ≥0, (∀ w, w ≠ w₁ → g w = f w) ∧ ∏ w, (g w) ^ mult w = B 
goal: ∃ g, (∀ (w : NumberField.InfinitePlace K), w ≠ w₁ → g w = f w) ∧ ∏ w : NumberField.InfinitePlace K, g w ^ w.mult = B

full_name: NumberField.mixedEmbedding.convexBodyLT'
code: /-- A version of `convexBodyLT` with an additional condition at a fixed complex place. This is
needed to ensure the element constructed is not real, see for example
`exists_primitive_element_lt_of_isComplex`.
-/
abbrev convexBodyLT' : Set (E K) 
goal: Set (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

full_name: NumberField.mixedEmbedding.convexBodyLT'_mem
code: theorem convexBodyLT'_mem {x : K} :
    mixedEmbedding K x ∈ convexBodyLT' K f w₀ ↔
      (∀ w : InfinitePlace K, w ≠ w₀ → w x < f w) ∧
      |(w₀.val.embedding x).re| < 1 ∧ |(w₀.val.embedding x).im| < (f w₀ : ℝ) ^ 2 
goal: (NumberField.mixedEmbedding K) x ∈ NumberField.mixedEmbedding.convexBodyLT' K f w₀ ↔
  (∀ (w : NumberField.InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧
    |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2

full_name: NumberField.mixedEmbedding.convexBodyLT'_neg_mem
code: theorem convexBodyLT'_neg_mem (x : E K) (hx : x ∈ convexBodyLT' K f w₀) :
    -x ∈ convexBodyLT' K f w₀ 
goal: -x ∈ NumberField.mixedEmbedding.convexBodyLT' K f w₀

full_name: NumberField.mixedEmbedding.convexBodyLT'_convex
code: theorem convexBodyLT'_convex : Convex ℝ (convexBodyLT' K f w₀) 
goal: Convex ℝ (NumberField.mixedEmbedding.convexBodyLT' K f w₀)

full_name: NumberField.mixedEmbedding.convexBodyLT'Factor
code: /-- The fudge factor that appears in the formula for the volume of `convexBodyLT'`. -/
noncomputable abbrev convexBodyLT'Factor : ℝ≥0 
goal: NNReal

full_name: NumberField.mixedEmbedding.convexBodyLT'Factor_ne_zero
code: theorem convexBodyLT'Factor_ne_zero : convexBodyLT'Factor K ≠ 0 
goal: NumberField.mixedEmbedding.convexBodyLT'Factor K ≠ 0

full_name: NumberField.mixedEmbedding.one_le_convexBodyLT'Factor
code: theorem one_le_convexBodyLT'Factor : 1 ≤ convexBodyLT'Factor K 
goal: 1 ≤ NumberField.mixedEmbedding.convexBodyLT'Factor K

full_name: NumberField.mixedEmbedding.convexBodyLT'_volume
code: theorem convexBodyLT'_volume :
    volume (convexBodyLT' K f w₀) = convexBodyLT'Factor K * ∏ w, (f w) ^ (mult w) 
goal: MeasureTheory.volume (NumberField.mixedEmbedding.convexBodyLT' K f w₀) =
  ↑(NumberField.mixedEmbedding.convexBodyLT'Factor K) * ↑(∏ w : NumberField.InfinitePlace K, f w ^ w.mult)

full_name: NumberField.mixedEmbedding.convexBodySumFun
code: /-- The function that sends `x : ({w // IsReal w} → ℝ) × ({w // IsComplex w} → ℂ)` to
  `∑ w, ‖x.1 w‖ + 2 * ∑ w, ‖x.2 w‖`. It defines a norm and it used to define `convexBodySum`. -/
noncomputable abbrev convexBodySumFun (x : E K) : ℝ 
goal: ℝ

full_name: NumberField.mixedEmbedding.convexBodySumFun_apply
code: theorem convexBodySumFun_apply (x : E K) :
    convexBodySumFun x = ∑ w,  mult w * normAtPlace w x 
goal: NumberField.mixedEmbedding.convexBodySumFun x =
  ∑ w : NumberField.InfinitePlace K, ↑w.mult * (NumberField.mixedEmbedding.normAtPlace w) x

full_name: NumberField.mixedEmbedding.convexBodySumFun_apply'
code: theorem convexBodySumFun_apply' (x : E K) :
    convexBodySumFun x = ∑ w, ‖x.1 w‖ + 2 * ∑ w, ‖x.2 w‖ 
goal: NumberField.mixedEmbedding.convexBodySumFun x =
  ∑ w : { w // w.IsReal }, ‖x.1 w‖ + 2 * ∑ w : { w // w.IsComplex }, ‖x.2 w‖

full_name: NumberField.mixedEmbedding.convexBodySumFun_nonneg
code: theorem convexBodySumFun_nonneg (x : E K) :
    0 ≤ convexBodySumFun x 
goal: 0 ≤ NumberField.mixedEmbedding.convexBodySumFun x

full_name: NumberField.mixedEmbedding.convexBodySumFun_neg
code: theorem convexBodySumFun_neg (x : E K) :
    convexBodySumFun (- x) = convexBodySumFun x 
goal: NumberField.mixedEmbedding.convexBodySumFun (-x) = NumberField.mixedEmbedding.convexBodySumFun x

full_name: NumberField.mixedEmbedding.convexBodySumFun_add_le
code: theorem convexBodySumFun_add_le (x y : E K) :
    convexBodySumFun (x + y) ≤ convexBodySumFun x + convexBodySumFun y 
goal: NumberField.mixedEmbedding.convexBodySumFun (x + y) ≤
  NumberField.mixedEmbedding.convexBodySumFun x + NumberField.mixedEmbedding.convexBodySumFun y

full_name: NumberField.mixedEmbedding.convexBodySumFun_smul
code: theorem convexBodySumFun_smul (c : ℝ) (x : E K) :
    convexBodySumFun (c • x) = |c| * convexBodySumFun x 
goal: NumberField.mixedEmbedding.convexBodySumFun (c • x) = |c| * NumberField.mixedEmbedding.convexBodySumFun x

full_name: NumberField.mixedEmbedding.convexBodySumFun_eq_zero_iff
code: theorem convexBodySumFun_eq_zero_iff (x : E K) :
    convexBodySumFun x = 0 ↔ x = 0 
goal: NumberField.mixedEmbedding.convexBodySumFun x = 0 ↔ x = 0

full_name: NumberField.mixedEmbedding.norm_le_convexBodySumFun
code: theorem norm_le_convexBodySumFun (x : E K) : ‖x‖ ≤ convexBodySumFun x 
goal: ‖x‖ ≤ NumberField.mixedEmbedding.convexBodySumFun x

full_name: NumberField.mixedEmbedding.convexBodySumFun_continuous
code: theorem convexBodySumFun_continuous :
    Continuous (convexBodySumFun : (E K) → ℝ) 
goal: Continuous NumberField.mixedEmbedding.convexBodySumFun

full_name: NumberField.mixedEmbedding.convexBodySum
code: /-- The convex body equal to the set of points `x : E` such that
  `∑ w real, ‖x w‖ + 2 * ∑ w complex, ‖x w‖ ≤ B`. -/
abbrev convexBodySum : Set (E K)  
goal: Set (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

full_name: NumberField.mixedEmbedding.convexBodySum_volume_eq_zero_of_le_zero
code: theorem convexBodySum_volume_eq_zero_of_le_zero {B} (hB : B ≤ 0) :
    volume (convexBodySum K B) = 0 
goal: MeasureTheory.volume (NumberField.mixedEmbedding.convexBodySum K B) = 0

full_name: NumberField.mixedEmbedding.convexBodySum_mem
code: theorem convexBodySum_mem {x : K} :
    mixedEmbedding K x ∈ (convexBodySum K B) ↔
      ∑ w : InfinitePlace K, (mult w) * w.val x ≤ B 
goal: (NumberField.mixedEmbedding K) x ∈ NumberField.mixedEmbedding.convexBodySum K B ↔
  ∑ w : NumberField.InfinitePlace K, ↑w.mult * ↑w x ≤ B

full_name: NumberField.mixedEmbedding.convexBodySum_neg_mem
code: theorem convexBodySum_neg_mem {x : E K} (hx : x ∈ (convexBodySum K B)) :
    -x ∈ (convexBodySum K B) 
goal: -x ∈ NumberField.mixedEmbedding.convexBodySum K B

full_name: NumberField.mixedEmbedding.convexBodySum_convex
code: theorem convexBodySum_convex : Convex ℝ (convexBodySum K B) 
goal: Convex ℝ (NumberField.mixedEmbedding.convexBodySum K B)

full_name: NumberField.mixedEmbedding.convexBodySum_isBounded
code: theorem convexBodySum_isBounded : Bornology.IsBounded (convexBodySum K B) 
goal: Bornology.IsBounded (NumberField.mixedEmbedding.convexBodySum K B)

full_name: NumberField.mixedEmbedding.convexBodySum_compact
code: theorem convexBodySum_compact : IsCompact (convexBodySum K B) 
goal: IsCompact (NumberField.mixedEmbedding.convexBodySum K B)

full_name: NumberField.mixedEmbedding.convexBodySumFactor
code: /-- The fudge factor that appears in the formula for the volume of `convexBodyLt`. -/
noncomputable abbrev convexBodySumFactor : ℝ≥0 
goal: NNReal

full_name: NumberField.mixedEmbedding.convexBodySumFactor_ne_zero
code: theorem convexBodySumFactor_ne_zero : convexBodySumFactor K ≠ 0 
goal: NumberField.mixedEmbedding.convexBodySumFactor K ≠ 0

full_name: NumberField.mixedEmbedding.convexBodySum_volume
code: theorem convexBodySum_volume :
    volume (convexBodySum K B) = (convexBodySumFactor K) * (.ofReal B) ^ (finrank ℚ K) 
goal: MeasureTheory.volume (NumberField.mixedEmbedding.convexBodySum K B) =
  ↑(NumberField.mixedEmbedding.convexBodySumFactor K) * ENNReal.ofReal B ^ FiniteDimensional.finrank ℚ K

full_name: NumberField.mixedEmbedding.minkowskiBound
code: /-- The bound that appears in **Minkowski Convex Body theorem**, see
`MeasureTheory.exists_ne_zero_mem_lattice_of_measure_mul_two_pow_lt_measure`. See
`NumberField.mixedEmbedding.volume_fundamentalDomain_idealLatticeBasis_eq` and
`NumberField.mixedEmbedding.volume_fundamentalDomain_latticeBasis` for the computation of
`volume (fundamentalDomain (idealLatticeBasis K))`. -/
noncomputable def minkowskiBound : ℝ≥0∞ 
goal: ENNReal

full_name: NumberField.mixedEmbedding.volume_fundamentalDomain_fractionalIdealLatticeBasis
code: theorem volume_fundamentalDomain_fractionalIdealLatticeBasis :
    volume (fundamentalDomain (fractionalIdealLatticeBasis K I)) =
      .ofReal (FractionalIdeal.absNorm I.1) *  volume (fundamentalDomain (latticeBasis K)) 
goal: MeasureTheory.volume (Zspan.fundamentalDomain (NumberField.mixedEmbedding.fractionalIdealLatticeBasis K I)) =
  ENNReal.ofReal ↑(FractionalIdeal.absNorm ↑I) *
    MeasureTheory.volume (Zspan.fundamentalDomain (NumberField.mixedEmbedding.latticeBasis K))

full_name: NumberField.mixedEmbedding.minkowskiBound_lt_top
code: theorem minkowskiBound_lt_top : minkowskiBound K I < ⊤ 
goal: NumberField.mixedEmbedding.minkowskiBound K I < ⊤

full_name: NumberField.mixedEmbedding.minkowskiBound_pos
code: theorem minkowskiBound_pos : 0 < minkowskiBound K I 
goal: 0 < NumberField.mixedEmbedding.minkowskiBound K I

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ideal_lt
code: /-- Let `I` be a fractional ideal of `K`. Assume that `f : InfinitePlace K → ℝ≥0` is such that
`minkowskiBound K I < volume (convexBodyLT K f)` where `convexBodyLT K f` is the set of
points `x` such that `‖x w‖ < f w` for all infinite places `w` (see `convexBodyLT_volume` for
the computation of this volume), then there exists a nonzero algebraic number `a` in `I` such
that `w a < f w` for all infinite places `w`. -/
theorem exists_ne_zero_mem_ideal_lt (h : minkowskiBound K I < volume (convexBodyLT K f)) :
    ∃ a ∈ (I : FractionalIdeal (𝓞 K)⁰ K), a ≠ 0 ∧ ∀ w : InfinitePlace K, w a < f w 
goal: ∃ a ∈ ↑I, a ≠ 0 ∧ ∀ (w : NumberField.InfinitePlace K), w a < ↑(f w)

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ideal_lt'
code: /-- A version of `exists_ne_zero_mem_ideal_lt` where the absolute value of the real part of `a` is
smaller than `1` at some fixed complex place. This is useful to ensure that `a` is not real. -/
theorem exists_ne_zero_mem_ideal_lt' (w₀ : {w : InfinitePlace K // IsComplex w})
    (h : minkowskiBound K I < volume (convexBodyLT' K f w₀)) :
    ∃ a ∈ (I : FractionalIdeal (𝓞 K)⁰ K), a ≠ 0 ∧ (∀ w : InfinitePlace K, w ≠ w₀ → w a < f w) ∧
      |(w₀.val.embedding a).re| < 1 ∧ |(w₀.val.embedding a).im| < (f w₀ : ℝ) ^ 2 
goal: ∃ a ∈ ↑I,
  a ≠ 0 ∧
    (∀ (w : NumberField.InfinitePlace K), w ≠ ↑w₀ → w a < ↑(f w)) ∧
      |((↑w₀).embedding a).re| < 1 ∧ |((↑w₀).embedding a).im| < ↑(f ↑w₀) ^ 2

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ringOfIntegers_lt
code: /-- A version of `exists_ne_zero_mem_ideal_lt` for the ring of integers of `K`. -/
theorem exists_ne_zero_mem_ringOfIntegers_lt (h : minkowskiBound K ↑1 < volume (convexBodyLT K f)) :
    ∃ a : 𝓞 K, a ≠ 0 ∧ ∀ w : InfinitePlace K, w a < f w 
goal: ∃ a, a ≠ 0 ∧ ∀ (w : NumberField.InfinitePlace K), w ↑a < ↑(f w)

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ringOfIntegers_lt'
code: /-- A version of `exists_ne_zero_mem_ideal_lt'` for the ring of integers of `K`. -/
theorem exists_ne_zero_mem_ringOfIntegers_lt' (w₀ : {w : InfinitePlace K // IsComplex w})
    (h : minkowskiBound K ↑1 < volume (convexBodyLT' K f w₀)) :
    ∃ a : 𝓞 K, a ≠ 0 ∧ (∀ w : InfinitePlace K, w ≠ w₀ → w a < f w) ∧
      |(w₀.val.embedding a).re| < 1 ∧ |(w₀.val.embedding a).im| < (f w₀ : ℝ) ^ 2 
goal: ∃ a,
  a ≠ 0 ∧
    (∀ (w : NumberField.InfinitePlace K), w ≠ ↑w₀ → w ↑a < ↑(f w)) ∧
      |((↑w₀).embedding ↑a).re| < 1 ∧ |((↑w₀).embedding ↑a).im| < ↑(f ↑w₀) ^ 2

full_name: NumberField.mixedEmbedding.exists_primitive_element_lt_of_isReal
code: theorem exists_primitive_element_lt_of_isReal {w₀ : InfinitePlace K} (hw₀ : IsReal w₀) {B : ℝ≥0}
    (hB : minkowskiBound K ↑1 < convexBodyLTFactor K * B) :
    ∃ a : 𝓞 K, ℚ⟮(a : K)⟯ = ⊤ ∧
      ∀ w : InfinitePlace K, w a < max B 1 
goal: ∃ a, ℚ⟮↑a⟯ = ⊤ ∧ ∀ (w : NumberField.InfinitePlace K), w ↑a < ↑(max B 1)

full_name: NumberField.mixedEmbedding.exists_primitive_element_lt_of_isComplex
code: theorem exists_primitive_element_lt_of_isComplex {w₀ : InfinitePlace K} (hw₀ : IsComplex w₀)
    {B : ℝ≥0} (hB : minkowskiBound K ↑1 < convexBodyLT'Factor K * B) :
    ∃ a : 𝓞 K, ℚ⟮(a : K)⟯ = ⊤ ∧
      ∀ w : InfinitePlace K, w a < Real.sqrt (1 + B ^ 2) 
goal: ∃ a, ℚ⟮↑a⟯ = ⊤ ∧ ∀ (w : NumberField.InfinitePlace K), w ↑a < √(1 + ↑B ^ 2)

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ideal_of_norm_le
code: /-- Let `I` be a fractional ideal of `K`. Assume that `B : ℝ` is such that
`minkowskiBound K I < volume (convexBodySum K B)` where `convexBodySum K B` is the set of points
`x` such that `∑ w real, ‖x w‖ + 2 * ∑ w complex, ‖x w‖ ≤ B` (see `convexBodySum_volume` for
the computation of this volume), then there exists a nonzero algebraic number `a` in `I` such
that `|Norm a| < (B / d) ^ d` where `d` is the degree of `K`. -/
theorem exists_ne_zero_mem_ideal_of_norm_le {B : ℝ}
    (h : (minkowskiBound K I) ≤ volume (convexBodySum K B)) :
    ∃ a ∈ (I : FractionalIdeal (𝓞 K)⁰ K), a ≠ 0 ∧
      |Algebra.norm ℚ (a : K)| ≤ (B / finrank ℚ K) ^ finrank ℚ K 
goal: ∃ a ∈ ↑I, a ≠ 0 ∧ ↑|(Algebra.norm ℚ) a| ≤ (B / ↑(FiniteDimensional.finrank ℚ K)) ^ FiniteDimensional.finrank ℚ K

full_name: NumberField.mixedEmbedding.exists_ne_zero_mem_ringOfIntegers_of_norm_le
code: theorem exists_ne_zero_mem_ringOfIntegers_of_norm_le {B : ℝ}
    (h : (minkowskiBound K ↑1) ≤ volume (convexBodySum K B)) :
    ∃ a : 𝓞 K, a ≠ 0 ∧ |Algebra.norm ℚ (a : K)| ≤ (B / finrank ℚ K) ^ finrank ℚ K 
goal: ∃ a, a ≠ 0 ∧ ↑|(Algebra.norm ℚ) ↑a| ≤ (B / ↑(FiniteDimensional.finrank ℚ K)) ^ FiniteDimensional.finrank ℚ K