Zulip Chat Archive

Stream: new members

Topic: how to prove this in a simple and clear way?


Zihao Zhang (Sep 16 2024 at 13:06):

import Mathlib.Data.Real.Basic
import Mathlib.Data.Real.Sqrt

section

-- 定义等式左边部分,依赖于 a, b, c
noncomputable def lhs (a b c : ) :  :=
   (((a ^ 3) ^ (2 / 3) + (b ^ 3) ^ (2 / 3) + (c ^ 3) ^ (2 / 3)) ^ 3 /
      ((b + 3 * a) ^ 2 + (c + 3 * b) ^ 2 + (a + 3 * c) ^ 2)) +
  5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (b + 3 * a) +
  5 * c ^ 3 / (c + 3 * b)

-- 标记为 noncomputable,因为 sqrt 函数涉及实数计算
noncomputable def rhs (a b c : ) :  :=
   (a ^ 2 + b ^ 2 + c ^ 2) /
   (10 * a ^ 2 + 10 * b ^ 2 + 10 * c ^ 2 + 6 * a * b + 6 * a * c + 6 * b * c) *
  (a ^ (1 + 1) + c ^ (1 + 1) + b ^ (1 + 1)) +
  (5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (3 * a + b) +
  5 * c ^ 3 / (3 * b + c))

-- 证明等式 lhs a b c = rhs a b c
example complex_eq (a b c : ) : lhs a b c = rhs a b c :=by
  rw [lhs,rhs]


end

Kevin Buzzard (Sep 16 2024 at 14:09):

Is this definitely true?

import Mathlib.Data.Real.Basic
import Mathlib.Data.Real.Sqrt

section

-- 定义等式左边部分,依赖于 a, b, c
noncomputable def lhs (a b c : ) :  :=
   (((a ^ 3) ^ (2 / 3) + (b ^ 3) ^ (2 / 3) + (c ^ 3) ^ (2 / 3)) ^ 3 /
      ((b + 3 * a) ^ 2 + (c + 3 * b) ^ 2 + (a + 3 * c) ^ 2)) +
  5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (b + 3 * a) +
  5 * c ^ 3 / (c + 3 * b)

-- 标记为 noncomputable,因为 sqrt 函数涉及实数计算
noncomputable def rhs (a b c : ) :  :=
   (a ^ 2 + b ^ 2 + c ^ 2) /
   (10 * a ^ 2 + 10 * b ^ 2 + 10 * c ^ 2 + 6 * a * b + 6 * a * c + 6 * b * c) *
  (a ^ (1 + 1) + c ^ (1 + 1) + b ^ (1 + 1)) +
  (5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (3 * a + b) +
  5 * c ^ 3 / (3 * b + c))

-- 证明等式 lhs a b c = rhs a b c
example (a b c : ) : lhs a b c = rhs a b c := by
  rw [lhs,rhs]
  rw [add_comm b, add_comm c]
  repeat rw [ add_assoc]
  congr 3
  field_simp
  ring_nf
  repeat rw [ add_mul]
  rw [add_mul]
  nth_rw 11 [mul_comm]
  rw [ mul_assoc]
  congr 1
  -- goal now looks false
  sorry

Edward van de Meent (Sep 16 2024 at 14:10):

presumably, the 2/3 in the exponents should be cast to Real first...

Kevin Buzzard (Sep 16 2024 at 14:26):

You're right but this might not be enough: if a3<0a^3<0 then is it true that (a3)(2/3)=a2(a^3)^{(2/3)}=a^2 if the 2/3 is a real?

If we had a type for rational numbers with odd denominator, then one could raise a real number to such a power and get a good answer for negative numbers. But there's no sensible answer to (-1)^{1/2} and hence one can't expect (-1)^r to make sense if r is a term of a type which has got a 1/2 in.

Edward van de Meent (Sep 16 2024 at 16:14):

indeed, Real.rpow_mul requires a nonneg parameter...

Zihao Zhang (Sep 18 2024 at 04:01):

Kevin Buzzard said:

Is this definitely true?

import Mathlib.Data.Real.Basic
import Mathlib.Data.Real.Sqrt

section

-- 定义等式左边部分,依赖于 a, b, c
noncomputable def lhs (a b c : ) :  :=
   (((a ^ 3) ^ (2 / 3) + (b ^ 3) ^ (2 / 3) + (c ^ 3) ^ (2 / 3)) ^ 3 /
      ((b + 3 * a) ^ 2 + (c + 3 * b) ^ 2 + (a + 3 * c) ^ 2)) +
  5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (b + 3 * a) +
  5 * c ^ 3 / (c + 3 * b)

-- 标记为 noncomputable,因为 sqrt 函数涉及实数计算
noncomputable def rhs (a b c : ) :  :=
   (a ^ 2 + b ^ 2 + c ^ 2) /
   (10 * a ^ 2 + 10 * b ^ 2 + 10 * c ^ 2 + 6 * a * b + 6 * a * c + 6 * b * c) *
  (a ^ (1 + 1) + c ^ (1 + 1) + b ^ (1 + 1)) +
  (5 * a ^ 3 / (a + 3 * c) +
  5 * b ^ 3 / (3 * a + b) +
  5 * c ^ 3 / (3 * b + c))

-- 证明等式 lhs a b c = rhs a b c
example (a b c : ) : lhs a b c = rhs a b c := by
  rw [lhs,rhs]
  rw [add_comm b, add_comm c]
  repeat rw [ add_assoc]
  congr 3
  field_simp
  ring_nf
  repeat rw [ add_mul]
  rw [add_mul]
  nth_rw 11 [mul_comm]
  rw [ mul_assoc]
  congr 1
  -- goal now looks false
  sorry

I think the ring_nf leads to the wrong goal,the goal before and after it is not equivalent,for example,the √27 is strange enough.

Kevin Buzzard (Sep 18 2024 at 07:45):

I think that actually the questioner asked the wrong question :-) The goals are equivalent, it's just that the actual maths question has not been correctly translated into lean. As has been already noted, all those 2/3's are 0.

Zihao Zhang (Sep 20 2024 at 00:58):

@Kevin Buzzard
I changed the version,is it provale now?

import Mathlib

open Real

local macro_rules | `($x / $y)  => `(HDiv.hDiv ($x : ) ($y : ))

theorem test {a b c : } (anonneg:a0)(bnonneg:b0)(cnonneg:c0): sqrt (((a ^ 3) ^ (2 / 3) + (b ^ 3) ^ (2 / 3) + (c ^ 3) ^ (2 / 3)) ^ 3 / ((b + 3 * a) ^ 2 + (c + 3 * b) ^ 2 + (a + 3 * c) ^ 2)) + 5 * a ^ 3 / (a + 3 * c) + 5 * b ^ 3 / (b + 3 * a) + 5 * c ^ 3 / (c + 3 * b) = sqrt (a ^ 2 + b ^ 2 + c ^ 2) / sqrt (10 * a ^ 2 + 10 * b ^ 2 + 10 * c ^ 2 + 6 * a * b + 6 * a * c + 6 * b * c) * (a ^ (1 + 1) + c ^ (1 + 1) + b ^ (1 + 1)) + (5 * a ^ 3 / (a + 3 * c) + 5 * b ^ 3 / (3 * a + b) + 5 * c ^ 3 / (3 * b + c)) := by

cairunze cairunze (Sep 23 2024 at 06:33):

image.png
i'm not sure i convert your formula correctly, if available, maybe you can verify this using, say Mathematica/Maple/Matlab etc first?


Last updated: May 02 2025 at 03:31 UTC