Skip to content

Commit 722fa33

Browse files
committed
test:
1 parent fc8304d commit 722fa33

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
open Lean Grind
2+
3+
/--
4+
info: Try this:
5+
[apply] cases #c4b6 <;> ring <;> cases #4c68 <;> ring
6+
-/
7+
#guard_msgs in
8+
example {α : Type} [CommRing α] (a b c d e : α) :
9+
(a * a = b * c ∨ a^2 = c * b) →
10+
(a^2 = c * b ∨ e^2 = d * c) →
11+
(b^2 = d*c ∨ b^2 = c*d) →
12+
a*b*(b*a) = c^2*b*d := by
13+
grind => finish?
14+
15+
16+
/--
17+
info: Try this:
18+
[apply]
19+
cases #b0f4
20+
next => cases #50fc
21+
next => cases #50fc <;> lia
22+
-/
23+
#guard_msgs in
24+
example (p : Nat → Prop) (x y z w : Int) :
25+
(x = 1 ∨ x = 2) →
26+
(w = 1 ∨ w = 4) →
27+
(y = 1 ∨ (∃ x : Nat, y = 3 - x ∧ p x)) →
28+
(z = 1 ∨ z = 0) → x + y ≤ 6 := by
29+
grind => finish?
30+
31+
/--
32+
info: Try this:
33+
[apply]
34+
ac
35+
cases #5c4b <;> cases #896f <;> ac
36+
-/
37+
#guard_msgs in
38+
example {α : Type} (op : α → α → α) [Std.Associative op] [Std.Commutative op] (a b c d e : α) :
39+
(op a a = op b c ∨ op a a = op c b) →
40+
(op a a = op c b ∨ op e e = op d c) →
41+
(op b b = op d c ∨ op b b = op c d) →
42+
op (op a b) (op b a) = op (op c c) (op b d) := by
43+
grind => finish?
44+
45+
/--
46+
info: Try this:
47+
[apply]
48+
instantiate
49+
instantiate
50+
-/
51+
#guard_msgs in
52+
example (as bs cs : Array α) (v₁ v₂ : α)
53+
(i₁ i₂ j : Nat)
54+
(h₁ : i₁ < as.size)
55+
(h₂ : bs = as.set i₁ v₁)
56+
(h₃ : i₂ < bs.size)
57+
(h₃ : cs = bs.set i₂ v₂)
58+
(h₄ : i₁ ≠ j ∧ i₂ ≠ j)
59+
(h₅ : j < cs.size)
60+
(h₆ : j < as.size)
61+
: cs[j] = as[j] := by
62+
grind => finish?

0 commit comments

Comments
 (0)