|
| 1 | +open Lean Grind Std |
| 2 | + |
| 3 | +set_option warn.sorry false |
| 4 | + |
| 5 | +namespace Ex1 |
| 6 | +variable [Field Q] [LT Q] [LE Q] [LawfulOrderLT Q] [IsLinearOrder Q] [OrderedRing Q] |
| 7 | + |
| 8 | +variable (a₁ a₂ a₃ a₄ a₅ : Q) |
| 9 | +variable (α L ν : Q) |
| 10 | + |
| 11 | +/-- |
| 12 | +trace: [grind.linarith.model] a₁ := 0 |
| 13 | +[grind.linarith.model] a₂ := 0 |
| 14 | +[grind.linarith.model] a₃ := 0 |
| 15 | +[grind.linarith.model] a₄ := 0 |
| 16 | +[grind.linarith.model] a₅ := 0 |
| 17 | +[grind.linarith.model] α := 0 |
| 18 | +[grind.linarith.model] L := 0 |
| 19 | +[grind.linarith.model] ν := 2 |
| 20 | +-/ |
| 21 | +#guard_msgs in |
| 22 | +set_option trace.grind.linarith.model true in |
| 23 | +theorem upper_bound |
| 24 | + (hL : L = α) (hL1 : L ≤ 1) |
| 25 | + (ha₁ : 0 ≤ a₁) (ha₂ : 0 ≤ a₂) (ha₃ : 0 ≤ a₃) (ha₄ : 0 ≤ a₄) (ha₅ : 0 ≤ a₅) |
| 26 | + (hα : α = a₁ + a₂ + a₃ + a₄ + a₅) : |
| 27 | + ν ≤ 9/10 := by |
| 28 | + fail_if_success grind |
| 29 | + sorry |
| 30 | + |
| 31 | +end Ex1 |
| 32 | + |
| 33 | +namespace Ex2 |
| 34 | + |
| 35 | +variable (a₁ a₂ a₃ a₄ a₅ : Rat) |
| 36 | +variable (α L ν : Rat) |
| 37 | + |
| 38 | +/-- |
| 39 | +trace: [grind.linarith.model] a₁ := 0 |
| 40 | +[grind.linarith.model] a₂ := 0 |
| 41 | +[grind.linarith.model] a₃ := 0 |
| 42 | +[grind.linarith.model] a₄ := 0 |
| 43 | +[grind.linarith.model] a₅ := 0 |
| 44 | +[grind.linarith.model] α := 0 |
| 45 | +[grind.linarith.model] L := 0 |
| 46 | +[grind.linarith.model] ν := 2 |
| 47 | +-/ |
| 48 | +#guard_msgs in |
| 49 | +set_option trace.grind.linarith.model true in |
| 50 | +theorem upper_bound |
| 51 | + (hL : L = α) (hL1 : L ≤ 1) |
| 52 | + (ha₁ : 0 ≤ a₁) (ha₂ : 0 ≤ a₂) (ha₃ : 0 ≤ a₃) (ha₄ : 0 ≤ a₄) (ha₅ : 0 ≤ a₅) |
| 53 | + (hα : α = a₁ + a₂ + a₃ + a₄ + a₅) : |
| 54 | + ν ≤ 9/10 := by |
| 55 | + fail_if_success grind |
| 56 | + sorry |
| 57 | + |
| 58 | +end Ex2 |
0 commit comments