Skip to content

Commit 485f251

Browse files
committed
test: for #10317
This PR adds tests for issue that has been fixed by previous commits. closes #10317
1 parent cd60d9c commit 485f251

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/lean/run/grind_10317.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
axiom Finset (α : Type u) : Type u
2+
3+
@[instance]
4+
axiom memFinset : Membership α (Finset α)
5+
6+
axiom finsetProd {ι : Type u} {M : Type v} (s : Finset ι) (f : ι → M) : M
7+
8+
axiom toFinset (l : List α) : Finset α
9+
10+
axiom finsetProdCongr {ι : Type u} {M : Type v} {s₁ s₂ : Finset ι}
11+
{f g : ι → M} (hs : s₁ = s₂) (hf : ∀ x ∈ s₂, f x = g x) : finsetProd s₁ f = finsetProd s₂ g
12+
13+
example [Mul M] [Std.Associative (HMul.hMul (α := M))] [Pow M Nat] [DecidableEq ι]
14+
(f : ι → M) (a : ι) (s : List ι) (has : a ∉ toFinset s) :
15+
f a * finsetProd (toFinset s) (fun m => f m ^ List.count m s) = f a * finsetProd (toFinset s) (fun x => f x ^ List.count x (a :: s)) := by
16+
grind [finsetProdCongr]
17+
18+
example [Mul M] [Std.Associative (HMul.hMul (α := M))] [Pow M Nat] [DecidableEq ι]
19+
(f : ι → M) (a : ι) (s : List ι) (has : a ∉ toFinset s) :
20+
f a * finsetProd (toFinset s) (fun m => f m ^ List.count m s) = f a * finsetProd (toFinset s) (fun x => f x ^ List.count x (a :: s)) := by
21+
grind -ac [finsetProdCongr]

0 commit comments

Comments
 (0)