Zulip Chat Archive
Stream: new members
Topic: How to simplify a polynomial
tsuki hao (Jan 21 2024 at 13:59):
There will be many complex coefficients in the polynomial proof. In mathematics, we will replace it with a variable to make the proof process look relatively simple. I would like to ask if there is a similar tactic in lean?
tsuki hao (Jan 21 2024 at 14:02):
import Mathlib.Tactic
import Mathlib.Order.Basic
theorem exp1' (x₁ x₂ y: ℝ)
(h₁: f₁=-3 *x₁^2 - x₂^2 + 1)
(h₂:f₂ = -1 *y^2 + x₂)
--φ = 0 ≤ f₁ ∧ 0 ≤ f₂
(h₃:I = 107/50*x₂ - 2881/1000*x₁ - 2479/1000*x₁*x₂ - 327/500*x₁^2
- 147/125*x₂^2 + 581/200): -- the polynomial interpolant I
0 ≤ f₁ ∧ 0 ≤ f₂ -- Premises
→ I > 0 -- Conclusion
:= by
have l: I = 250/463*((381*x₂)/1000 - (2871*x₁)/2000 - (537*x₁*x₂)/800 - (731*x₁^2)/1500 - (369*x₂^2)/500
- (323*y^2)/750 + 463/250)^2 + 22224000/35780621*((35780621*x₁)/22224000 - (910939*x₂)/3704000 - (1645187*x₁*x₂)/14816000
- (727347*x₁^2)/1852000 - (281559*x₂^2)/1852000 - (93353*y^2)/926000)^2 + 894515525/747861443*((747861443*x₂)/894515525
- (76962704289*x₁*x₂)/286244968000 - (28694063011*x₁^2)/143122484000 - (1130660241*x₂^2)/8945155250
- (8222434883*y^2)/35780621000)^2+4307681911680000/8571789992422891*((8571789992422891*x₁^2)/4307681911680000 -
(5071022337719*x₁*x₂)/23347869440000 + (12570716568667*x₂^2)/89743373160000 + (148589533955243*y^2)/1076920477920000)^2+
8571789992422891000/5396711918315107757*((5396711918315107757*x₂^2)/8571789992422891000 - (377595226097715311*x₁*x₂)/1318736921911214000
- (1657661435566708657*y^2)/12857684988634336500)^2+ 9714081452967193962600/8154076148600657476273*((8154076148600657476273*y^2)/9714081452967193962600 -
(6412026553257505137151*x₁*x₂)/32380271509890646542000)^2+ 489244568916039448576380000/1131919696787266928609295991*((1131919696787266928609295991*x₁*x₂)/489244568916039448576380000)^2 +
750/877*((877*y)/750 - (277*x₁*y)/1000 - (503*x₂*y)/1000)^2+ 10524000/12316199*((12316199*x₂*y)/10524000 - (830183*x₁*y)/3508000)^2+
12316199000/25833556029*((25833556029*x₁*y)/12316199000)^2
+ (250/263*((9*x₂)/50 - x₁/200 + 263/250)^2 + 1052000/793183*((793183*x₁)/1052000 + (587*x₂)/32875)^2 + 793183000/742243733*((742243733*x₂)/793183000)^2 +
100/71*((71*y)/100)^2)*f₁ + (500/509*(509/500 - (567*x₂)/2000 - (11*x₁)/250)^2 + 509000/377219*((377219*x₁)/509000 - (6013*x₂)/127250)^2 + 3017752000/2378096993*((2378096993*x₂)/3017752000)^2 +
200/209*((209*y)/200)^2)*f₂ + 1/1000 := by
linear_combination -(967/1000*x₂^2 + 17/500*x₁*x₂ + 9/25*x₂ + 377/500*x₁^2 - 1/100*x₁ + 263/250 + 71/100*y^2)* h₁ - --linear_combination通过将等式从左到右相加来创建线性组合证明等式相等
(509/500 - 567/1000*x₂ - 11/125*x₁ + 87/100*x₂^2 - 7/100*x₁*x₂ + 743/1000*x₁^2 + 209/200*y^2) * h₂ + h₃ - (
250/463*((381*x₂)/1000 - (2871*x₁)/2000 - (537*x₁*x₂)/800 - (731*x₁^2)/1500 - (369*x₂^2)/500 - (323*y^2)/750 + 463/250)^2 +
22224000/35780621*((35780621*x₁)/22224000 - (910939*x₂)/3704000 - (1645187*x₁*x₂)/14816000 - (727347*x₁^2)/1852000 - (281559*x₂^2)/1852000 - (93353*y^2)/926000)^2 +
894515525/747861443*((747861443*x₂)/894515525 - (76962704289*x₁*x₂)/286244968000 - (28694063011*x₁^2)/143122484000 - (1130660241*x₂^2)/8945155250 - (8222434883*y^2)/35780621000)^2+
4307681911680000/8571789992422891*((8571789992422891*x₁^2)/4307681911680000 - (5071022337719*x₁*x₂)/23347869440000 + (12570716568667*x₂^2)/89743373160000 + (148589533955243*y^2)/1076920477920000)^2+
8571789992422891000/5396711918315107757*((5396711918315107757*x₂^2)/8571789992422891000 - (377595226097715311*x₁*x₂)/1318736921911214000 - (1657661435566708657*y^2)/12857684988634336500)^2+
9714081452967193962600/8154076148600657476273*((8154076148600657476273*y^2)/9714081452967193962600 - (6412026553257505137151*x₁*x₂)/32380271509890646542000)^2+
489244568916039448576380000/1131919696787266928609295991*((1131919696787266928609295991*x₁*x₂)/489244568916039448576380000)^2 +
750/877*((877*y)/750 - (277*x₁*y)/1000 - (503*x₂*y)/1000)^2+
10524000/12316199*((12316199*x₂*y)/10524000 - (830183*x₁*y)/3508000)^2+
12316199000/25833556029*((25833556029*x₁*y)/12316199000)^2) - f₁ * ((250/263*((9*x₂)/50 - x₁/200 + 263/250)^2 + 1052000/793183*((793183*x₁)/1052000 + (587*x₂)/32875)^2 + 793183000/742243733*((742243733*x₂)/793183000)^2 +
100/71*((71*y)/100)^2)) - f₂ * ((500/509*(509/500 - (567*x₂)/2000 - (11*x₁)/250)^2) + 509000/377219*((377219*x₁)/509000 - (6013*x₂)/127250)^2 + 3017752000/2378096993*((2378096993*x₂)/3017752000)^2 +
200/209*((209*y)/200)^2) - 1/1000
rw [l]
intro h1
sorry
For example, in this question, I want to replace the complex question with letters to make it appear simpler.
Last updated: May 02 2025 at 03:31 UTC