Zulip Chat Archive

Stream: new members

Topic: How to use the property of exp_continuous (lim and exp_fun)


Wenrong Zou (Aug 30 2023 at 04:48):

Hi, everyone!
I am now doing a project deal with the Valuation Problem. But now I have trouble in using the property of exp_fun to prove one inequality. My problem in the last two sorry in my code.

import Mathlib.Topology.Algebra.ValuedField
import Mathlib.Analysis.Normed.Field.Basic
import Mathlib.Logic.Equiv.Defs
import Mathlib.Data.Real.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Real.NNReal
import Mathlib.RingTheory.Valuation.Basic
import Mathlib.NumberTheory.Padics.PadicNorm
import Mathlib.Algebra.Order.Group.Abs
import Mathlib.Topology.Algebra.ValuedField
import Mathlib.RingTheory.Valuation.Integers
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Data.Set.Image
import Mathlib.NumberTheory.Padics.PadicNumbers
import Mathlib.Data.Rat.NNRat
import Mathlib.Tactic
import Mathlib.RingTheory.Valuation.ValuationSubring
import Mathlib.Topology.Order.Basic

open Classical
set_option maxHeartbeats 300000

#check Valuation.IsEquiv

open Filter

variable {K : Type _} [Field K]

theorem Valuation.isEquiv_iff_val_gt_one [LinearOrderedCommGroupWithZero Γ₀]
    [LinearOrderedCommGroupWithZero Γ'₀] (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    v.IsEquiv v'   {x : K}, v x > 1  v' x > 1 := sorry


theorem RatSeqAboveTendsto (b : ) :  a :   , ( n, (b : ) < a n)  Tendsto (fun n  (a n : )) atTop (nhds b) := by
  have :  a :   , ( n, (b : ) < a n)  Tendsto a atTop (nhds b)
  · have h :  a, StrictAnti a  ( (n : ), b < a n)  Filter.Tendsto a Filter.atTop (nhds b) := exists_seq_strictAnti_tendsto b
    rcases h with a, _, h₁, h₂
    use a
  choose a hab ha using this
  choose r hr hr' using fun n  exists_rat_btwn (hab n)
  refine r, hr, tendsto_of_tendsto_of_tendsto_of_le_of_le (g := fun _  b) ?_ ha ?_ ?_
  · simp
  · exact fun n  (hr n).le
  · exact fun n  (hr' n).le

theorem RatSeqBelowTendsto (b : ) :  a :   , ( n, (b : ) > a n)  Tendsto (fun n  (a n : )) atTop (nhds b) := by
  have :  a :   , ( n, (b : ) > a n)  Tendsto a atTop (nhds b)
  · have h :  a, StrictMono a  ( (n : ), a n < b)  Filter.Tendsto a Filter.atTop (nhds b) := exists_seq_strictMono_tendsto b
    rcases h with a, _, h₁, h₂
    use a
  choose a hab ha using this
  choose r hr hr' using fun n  exists_rat_btwn (hab n)
  refine r, hr', tendsto_of_tendsto_of_tendsto_of_le_of_le (h := fun _  b) ha ?_ ?_ ?_
  · simp
  · exact fun n  (hr n).le
  · exact fun n  (hr' n).le


theorem Valuation.div_le_one {K : Type u_3} [inst : Field K]
(v : Valuation K NNReal) {x y : K} (h₀ : y  0)
(h : v (x / y) < 1): v x < v y := by
  have hxy₁ : v (x / y) * v y = v x := by
    simp only [map_div₀, ne_eq, map_eq_zero]
    have this : v y  0 := Iff.mpr (ne_zero_iff v) h₀
    exact div_mul_cancel (v x) this
  rw [hxy₁]
  have this' : 0 < v y := by
    have this : v y  0 := (Valuation.ne_zero_iff v).mpr h₀
    exact Iff.mpr zero_lt_iff this
  exact mul_lt_of_lt_one_left this' h

theorem Valuation.div_ge_one {K : Type u_3} [inst : Field K]
(v : Valuation K NNReal) {x y : K} (h₀ : y  0)
(h : v (x / y) > 1): v x > v y := by
  have hxy₁ : v (x / y) * v y = v x := by
    simp only [map_div₀, ne_eq, map_eq_zero]
    have this : v y  0 := Iff.mpr (ne_zero_iff v) h₀
    exact div_mul_cancel (v x) this
  rw [hxy₁]
  have this' : 0 < v y := by
    have this : v y  0 := (Valuation.ne_zero_iff v).mpr h₀
    exact Iff.mpr zero_lt_iff this
  exact lt_mul_left this' h

-- version problem
open Real

theorem mul_log_eq_log_iff {x y z : } (hx : 0 < x) (hz : 0 < z) :
    y * log x = log z  x ^ y = z :=
  fun h  log_injOn_pos (rpow_pos_of_pos hx _) hz <| log_rpow hx _ |>.trans h,
  by rintro rfl; rw [log_rpow hx]⟩
-- version problem


theorem exp_eq {a b : } (h1 : 0 < a) (h2 : 0 < b) (h3 : b  1):
   a = b ^ ((Real.log a) / (Real.log b))
  := by
    have this : Real.log a = ((Real.log a) / (Real.log b)) * (Real.log b) := by
      have this' : Real.log b  0 := Real.log_ne_zero_of_pos_of_ne_one h2 h3
      exact Iff.mp (div_eq_iff this') rfl
    exact Eq.symm ((mul_log_eq_log_iff h2 h1).mp (Eq.symm this))



theorem ExistSeqAbove (v₁: Valuation K NNReal)
(v₂ : Valuation K NNReal) {x y : K} (hy :  v₁ y > 1)
(h : Valuation.IsEquiv v₁ v₂) {α : } (hx₁ : v₁ x = (v₁ y) ^ α)
: (v₂ x  (v₂ y) ^ α) := by
  have sequabove :  a :   , ( i, (α : ) < a i)  Tendsto (fun k  (a k : )) atTop (nhds α) := RatSeqAboveTendsto α
  rcases sequabove with a, ha₀, ha₁
  have hxa :  (i : ), v₁ x < ((v₁ y): ) ^ (a i) := by
    intro i
    rw [hx₁]
    specialize @ha₀ i
    exact Real.rpow_lt_rpow_of_exponent_lt hy ha₀
  have hv₁ :  (i : ), v₁ x < ((v₁ y): ) ^ (((a i).num : ) / ((a i).den :)) := by
    intro i
    have this : (a i).num / (a i).den  = a i := Rat.num_div_den (a i)
    have this' : (((a i).num : ): ) / (((a i).den : ): ) = ((a i): )  := by
      rw [ (Rat.cast_div ((a i).num :) ((a i).den: ))]
      exact congrArg Rat.cast this
    rw [this']
    exact (hxa i)
  have hxa₂ :  (i : ), v₁ ((x ^ (a i).den) / (y ^ (a i).num)) < 1 := sorry
  have hv₂ :  (i : ), v₂ x < ((v₂ y): ) ^ (((a i).num: ) / ((a i).den : )) := by
    have hxa₃ :  (i : ), v₂ ((x ^ (a i).den) / (y ^ (a i).num)) < 1 :=
      fun i => ((Valuation.isEquiv_iff_val_lt_one v₁ v₂).mp h).mp (hxa₂ i)
    have hxa₄ :  (i : ), v₂ (x ^ (a i).den) < v₂ (y ^ (a i).num) := by
      intro i
      have this : (y ^ (a i).num)  0 := sorry
      exact Valuation.div_le_one v₂ this (hxa₃ i)
    have hxa₅ :  (i : ), (v₂ x) ^ ((a i).den) < (v₂ y) ^ ((a i).den) := sorry
    intro i
    specialize @hxa₅ i
    sorry
  have hv₂' :  (i : ), v₂ x < ((v₂ y): ) ^ (a i) := by
    intro i
    have this : (a i).num / (a i).den  = a i := Rat.num_div_den (a i)
    have this' : (((a i).num : ): ) / (((a i).den : ): ) = ((a i): )  := by
      rw [ (Rat.cast_div ((a i).num :) ((a i).den: ))]
      exact congrArg Rat.cast this
    rw [this']
    exact (hv₂ i)
  -- exp_continuous
  have hv₂'' :  (i : ), (v₂ x)   ((v₂ y) : ) ^ (a i) := fun i  le_of_lt (hv₂' i)
  let f := fun (i : )  ((v₂ y) : ) ^ (a i)
  let f' := fun (x : )  ((v₂ y) : ) ^ x
  have f'ContinuousAt : ContinuousAt f' α := sorry
  have lim : Filter.Tendsto f atTop (nhds (((v₂ y) : ) ^ α)) := sorry
  exact ge_of_tendsto' lim hv₂''

Maybe this working example will has mistake because my lean is not the latest. And I use one of the theorem in the latest lean version. But I mention it in my code version problem. If there is wrong in there, you can just delete that part. I am sorry about that.
And exp_continuous is what my problem mainly in. I am not sure if there is another way to prove the goal in -- exp_continuous.
Thanks in advance!


Last updated: Dec 20 2023 at 11:08 UTC