Skip to content

Commit f9d1c4a

Browse files
ElijahVlasovFerinko
andcommitted
No index for mem_subdomain_0_iff_mem
Co-authored-by: Frantisek Silvasi <silvasi.frantisek@gmail.com>
1 parent fad5cbf commit f9d1c4a

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

ArkLib/Data/CodingTheory/Basic/BlockRelDistance.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@ lemma disagreementSet_k_0 :
6767
constructor
6868
· aesop
6969
(add simp [disagreementSet])
70-
(add safe (by rw [mem_subdomain_0_iff_mem]))
7170
· simp only [Finset.mem_filter, mem_toFinset_iff_mem, hmem,
7271
true_and, disagreementSet, forall_exists_index]
7372
intro j hj
7473
have : i = j := by
7574
have := CosetFftDomainClass.injective φ (a₁ := i)
7675
aesop
7776
aesop
78-
(add safe (by rw [mem_subdomain_0_iff_mem]))
7977
· aesop
8078
(add simp [disagreementSet, blockIdx_k_0_of_ne_mem])
8179

ArkLib/Data/CodingTheory/ProximityGap/Folding.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ lemma foldWordAux_of_k_2 [NeZero n] {i : Fin (2 ^ (n - 1))} :
9797
aesop (add unsafe (by apply CosetFftDomain.injective (ω := domain)))
9898
ext u
9999
simp only [mem_filter, mem_univ, true_and, ←hpre, ←h, Nat.sub_zero, mem_preimage]
100-
have := @mem_subdomain_0_iff_mem (ω := domain)
101100
aesop
102101
rw [blockIdx, h]
103102
have hcard : Finset.card {j, j'} = 2 := by
@@ -111,13 +110,11 @@ lemma foldWordAux_of_k_2 [NeZero n] {i : Fin (2 ^ (n - 1))} :
111110
(fun a _ ↦ domain a)
112111
(fun a ha ↦ by
113112
simp only [Nat.sub_zero, mem_block, pow_one]
114-
rw [mem_subdomain_0_iff_mem]
115113
simpa using ha)
116114
(fun _ _ _ _ h ↦ CosetFftDomain.injective h)
117115
(fun b hb ↦ by
118116
obtain ⟨⟨j, hb⟩, hb'⟩ :
119117
b ∈ domain ∧ b ^ 2 = (CosetFftDomain.subdomain domain 1) i := by
120-
have := @mem_subdomain_0_iff_mem (ω := domain)
121118
aesop
122119
exact ⟨j, by simp [hb, hb'], by simp [hb]⟩)
123120
apply Polynomial.eq_of_eval_eq_degree (n := 2) (s := {y.1, -y.1})

ArkLib/Data/Domain/CosetFftDomain/Subdomain.lean

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2024-2026 ArkLib Contributors. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Julian Sutherland, Ilia Vlasov, Aristotle (Harmonic)
4+
Authors: František Silváši, Julian Sutherland, Ilia Vlasov, Aristotle (Harmonic)
55
-/
66

77
import Mathlib.Tactic.CancelDenoms.Core
@@ -141,19 +141,20 @@ lemma mem_subdomain_of_eq_vals
141141
lemma subdomain_generator_pow_generator (i : ℕ) :
142142
(subdomain ω i).cosetGenerator = ω 0 ^ 2 ^ i := rfl
143143

144+
set_option warning.simp.varHead false in
144145
/-- Membership to the `0`th subdomain is
145146
the same as membership to the original coset FFT domain. -/
146147
@[simp]
147148
lemma mem_subdomain_0_iff_mem :
148-
x ∈ subdomain ω 0 ↔ x ∈ ω := by
149-
by_cases hn : n = 0
150-
<;> aesop
151-
(add simp
152-
[subdomain,
153-
CosetFftDomainClass.subdomain_embed,
154-
mkSubgroupUnit,
155-
mem_def,
156-
CosetFftDomain.eval_coset_fft_domain_eq_eval_generator_mul_domain])
149+
no_index (x ∈ subdomain ω 0) ↔ x ∈ ω := by
150+
aesop
151+
(add safe cases Nat)
152+
(add simp
153+
[subdomain,
154+
CosetFftDomainClass.subdomain_embed,
155+
mkSubgroupUnit,
156+
mem_def,
157+
CosetFftDomain.eval_coset_fft_domain_eq_eval_generator_mul_domain])
157158

158159
/-- The `n`th subdomain consists exactly of the single element `ω 0 ^ 2 ^ n`. -/
159160
lemma mem_subdomain_n_iff_eq_pow_generator :
@@ -466,7 +467,7 @@ lemma card_block_of_mem_subdomain' [DecidableEq F] {k : ℕ}
466467
conv_rhs =>
467468
rw [←h]
468469
apply congrArg
469-
aesop (add safe (by rw [mem_subdomain_0_iff_mem]))
470+
aesop
470471

471472
end CosetFftDomainClass
472473

0 commit comments

Comments
 (0)