|
| 1 | +/- |
| 2 | +The `ite` and `dite` propagators in `grind` were not internalizing |
| 3 | +their children using the correct parent information. Several examples |
| 4 | +in this file were failing because of this bug. |
| 5 | +-/ |
| 6 | + |
| 7 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 8 | + [Lean.Grind.IntModule α] [DecidableLE α] [Lean.Grind.OrderedAdd α] |
| 9 | + (a b c d : α) |
| 10 | + (h : ¬(-(a - b)) ≤ ((-(a - c)) + -(c - d)) + -(b - d)) |
| 11 | + (h_1 : b - d ≤ -(b - d)) : False := by |
| 12 | + grind |
| 13 | + |
| 14 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 15 | + [Lean.Grind.IntModule α] [DecidableLE α] [Lean.Grind.OrderedAdd α] |
| 16 | + (a b c d : α) |
| 17 | + (h : ¬(-(a - b)) ≤ ((-(a - c)) + -(c - d)) + if b - d ≤ -(b - d) then -(b - d) else b - d) |
| 18 | + (h_1 : b - d ≤ -(b - d)) : False := by |
| 19 | + grind |
| 20 | + |
| 21 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 22 | + [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] |
| 23 | + (a b c : α) |
| 24 | + (h : a ≤ a + if b ≤ c then (-1 : α) else (-2)) |
| 25 | + (h_1 : b ≤ c) |
| 26 | + : False := by |
| 27 | + grind |
| 28 | + |
| 29 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 30 | + [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] |
| 31 | + (a b c : α) |
| 32 | + (h : a ≤ a + if b ≤ c then (-1 : α) else (-2)) |
| 33 | + : False := by |
| 34 | + grind |
| 35 | + |
| 36 | +example [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] (a b c : α) : |
| 37 | + (if a - b ≤ -(a - b) then -(a - b) else a - b) ≤ |
| 38 | + ((if a - c ≤ -(a - c) then -(a - c) else a - c) + if c - d ≤ -(c - d) then -(c - d) else c - d) + |
| 39 | + if b - d ≤ -(b - d) then -(b - d) else b - d := by |
| 40 | + grind |
| 41 | + |
| 42 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 43 | + [Lean.Grind.IntModule α] [DecidableLE α] [Lean.Grind.OrderedAdd α] |
| 44 | + (a b c d : α) |
| 45 | + (h : ¬(-(a - b)) ≤ ((-(a - c)) + -(c - d)) + -(b - d)) |
| 46 | + (h_1 : b - d ≤ -(b - d)) : False := by |
| 47 | + grind -order |
| 48 | + |
| 49 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 50 | + [Lean.Grind.IntModule α] [DecidableLE α] [Lean.Grind.OrderedAdd α] |
| 51 | + (a b c d : α) |
| 52 | + (h : ¬(-(a - b)) ≤ ((-(a - c)) + -(c - d)) + if b - d ≤ -(b - d) then -(b - d) else b - d) |
| 53 | + (h_1 : b - d ≤ -(b - d)) : False := by |
| 54 | + grind -order |
| 55 | + |
| 56 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 57 | + [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] |
| 58 | + (a b c : α) |
| 59 | + (h : a ≤ a + if b ≤ c then (-1 : α) else (-2)) |
| 60 | + (h_1 : b ≤ c) |
| 61 | + : False := by |
| 62 | + grind -order |
| 63 | + |
| 64 | +example {α : Type _} [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] |
| 65 | + [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] |
| 66 | + (a b c : α) |
| 67 | + (h : a ≤ a + if b ≤ c then (-1 : α) else (-2)) |
| 68 | + : False := by |
| 69 | + grind -order |
| 70 | + |
| 71 | +example [LE α] [LT α] [Std.IsLinearOrder α] [Std.LawfulOrderLT α] [Lean.Grind.CommRing α] [DecidableLE α] [Lean.Grind.OrderedRing α] (a b c : α) : |
| 72 | + (if a - b ≤ -(a - b) then -(a - b) else a - b) ≤ |
| 73 | + ((if a - c ≤ -(a - c) then -(a - c) else a - c) + if c - d ≤ -(c - d) then -(c - d) else c - d) + |
| 74 | + if b - d ≤ -(b - d) then -(b - d) else b - d := by |
| 75 | + grind -order |
0 commit comments