spider_blocked_optionvals_not_mem
For r ≥ 1 and β inward or outward, the closed-form value spider_blocked_val β r does not occur in the explicit options list of (in;{(r,β),(1,free)}).
Statement
theorem spider_blocked_optionvals_not_mem (r : ℕ) (hr : 1 ≤ r) (beta : SpiderLegEnd)
(hβ : beta = SpiderLegEnd.inward ∨ beta = SpiderLegEnd.outward) :
spider_blocked_val beta r ∉ spider_blocked_optionvals r beta- Source
- step towards spider_two_leg_blocked_incoming_val
- Verified
- 20 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 7
- spider_blocked_optionvalsThe explicit options list of the state (in;{(r,β),(1,free)}) at fuel r + 2 after substituting the inductive closed forms: for each cut j =…
- spider_blocked_valThe conjectured closed form of the blocked two-leg family at incoming centre: for end condition inward it is m - 1 when m % 4 = 3 and m +…
- spider_rhoThe function spider_rho takes h : ℕ and delta, phi : SpiderLegEnd, returning h if phi = free; if phi = inward, it returns h % 2 when delta…
- spider_rho_starThe function spider_rho_star takes h : ℕ and phi : SpiderLegEnd, returning h % 2 if phi = free, and h otherwise.
- SpiderLegEndThe end condition of an attached leg in a spider state is either free (no arc on the leg), inward (pointing towards the centre), or…
- spider_blocked_optionvals_leFor r ≥ 2 and β ≠ free, every element of the explicit options list of (in;{(r,β),(1,free)}) is at most r.
- spider_rho_zero_sameFor any non-free spider leg end φ, spider_rho 0 φ φ = 0.
The proof, explained
To prove that the closed-form value spider_blocked_val β r never appears among the option values of the blocked two-leg spider, the proof splits on r. The base case r = 1 is verified by finite computation. For r ≥ 2, if the candidate value is r + 1, non-membership is immediate because all options are bounded above by r. When the candidate value is r - 1 (which occurs when r is odd, namely r ≡ 3 mod 4 for inward and r ≡ 1 mod 4 for outward), every option is ruled out: same-end cuts have odd parity (matching r) while r - 1 is even; opposite-end cuts are excluded by arithmetic bounds on spider_rho; and the full-leg cut as well as terminal moves evaluate to r or values ≤ 1.
For any leg end δ and length m, spider_blocked_val δ m has the same parity as m + 1. automation
By definition, spider_blocked_val δ m is either m - 1 or m + 1 depending on δ and m mod 4. In either case, the value has the same parity as m + 1, which omega verifies by exhausting all cases.
dsimp [spider_blocked_val] split <;> split_ifs <;> omega
When m is even, spider_blocked_val δ m = m + 1 for any leg end δ. automation
If m is even, m % 4 can only be 0 or 2, so the conditions m % 4 = 3 and m % 4 = 1 never hold. Thus the definition always yields m + 1.
dsimp [spider_blocked_val] split <;> split_ifs <;> omega
Cutting a leg at index j with the same boundary condition β preserves parity: the option value mod 2 equals r mod 2.
When both leg ends are β, spider_rho (r - j) β β is simply (r - j) % 2. By the parity lemma, the cut piece value has parity j % 2. Rewriting the XOR mod 2 as the sum mod 2 via Nat.xor_mod_two_eq gives ((r - j) + j) % 2 = r % 2.
uses
spider_blocked_optionvals_not_mem_val_parity,Nat.xor_mod_two_eqhave h1 : spider_rho (r - j) beta beta = (r - j) % 2 := by rcases hβ with rfl | rfl <;> rfl have h2 : spider_blocked_val beta (j - 1) % 2 = j % 2 := by have := spider_blocked_optionvals_not_mem_val_parity beta (j - 1) omega rw [Nat.xor_mod_two_eq, h1] omega
When r ≥ 2 and r ≡ 3 mod 4, cutting at index j with outward end on an inward leg cannot yield value r - 1.
Assume for contradiction the option value is r - 1. The component spider_rho (r - j) outward inward is at most 1, so it is either 0 or 1. If it is 0, the cut piece value must be r - 1, which by the upper bound forces j - 1 = r - 2; but r - 2 ≡ 1 mod 4, so its value is actually r - 3, a contradiction. If it is 1, XORing both sides with 1 gives that the cut piece value is 1 ^^^ (r - 1) = r (since r - 1 is even), which exceeds the upper bound j ≤ r - 1, another contradiction.
uses
spider_blocked_optionvals_le_val_le_succ,Nat.le_one_iff_eq_zero_or_eq_one.mp,zero_xor,if_pos,Nat.even_iff,Nat.xor_comm,Nat.xor_one_of_even,congr_arg,Nat.xor_assoc,Nat.xor_selfintro h let h_len := r - j have hrho_le : spider_rho h_len SpiderLegEnd.outward SpiderLegEnd.inward ≤ 1 := by dsimp [spider_rho]; split_ifs <;> omega have hval_le : spider_blocked_val SpiderLegEnd.outward (j - 1) ≤ (j - 1) + 1 := spider_blocked_optionvals_le_val_le_succ _ _ rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hrho_le with hrho0 | hrho1 · rw [hrho0, zero_xor] at h have hj_eq : j - 1 = r - 2 := by omega rw [hj_eq] at h have hval : spider_blocked_val SpiderLegEnd.outward (r - 2) = r - 3 := by dsimp [spider_blocked_val] have : (r - 2) % 4 = 1 := by omega rw [if_pos this] omega omega · have h_even : Even (r - 1) := by rw [Nat.even_iff] omega have h_xor : 1 ^^^ (r - 1) = r := by rw [Nat.xor_comm, Nat.xor_one_of_even h_even] omega rw [hrho1] at h have h1 : spider_blocked_val SpiderLegEnd.outward (j - 1) = 1 ^^^ (r - 1) := by have := congr_arg (fun x => 1 ^^^ x) h rw [← Nat.xor_assoc, Nat.xor_self, zero_xor] at this exact this rw [h1, h_xor] at hval_le omega
When r ≥ 2 and r ≡ 1 mod 4, cutting at index j with inward end on an outward leg cannot yield value r - 1.
Assume for contradiction the option value is r - 1. By the same analysis, spider_rho is at most 1. If it is 0, the cut piece must have value r - 1, forcing j - 1 = r - 2; since r - 2 ≡ 3 mod 4, the value is r - 3, contradiction. If it is 1, the cut piece value must be 1 ^^^ (r - 1) = r, exceeding the upper bound j ≤ r - 1.
uses
spider_blocked_optionvals_le_val_le_succ,Nat.le_one_iff_eq_zero_or_eq_one.mp,zero_xor,if_pos,Nat.even_iff,Nat.xor_comm,Nat.xor_one_of_even,congr_arg,Nat.xor_assoc,Nat.xor_selfintro h let h_len := r - j have hrho_le : spider_rho h_len SpiderLegEnd.inward SpiderLegEnd.outward ≤ 1 := by dsimp [spider_rho]; split_ifs <;> omega have hval_le : spider_blocked_val SpiderLegEnd.inward (j - 1) ≤ (j - 1) + 1 := spider_blocked_optionvals_le_val_le_succ _ _ rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hrho_le with hrho0 | hrho1 · rw [hrho0, zero_xor] at h have hj_eq : j - 1 = r - 2 := by omega rw [hj_eq] at h have hval : spider_blocked_val SpiderLegEnd.inward (r - 2) = r - 3 := by dsimp [spider_blocked_val] have : (r - 2) % 4 = 3 := by omega rw [if_pos this] omega omega · have h_even : Even (r - 1) := by rw [Nat.even_iff] omega have h_xor : 1 ^^^ (r - 1) = r := by rw [Nat.xor_comm, Nat.xor_one_of_even h_even] omega rw [hrho1] at h have h1 : spider_blocked_val SpiderLegEnd.inward (j - 1) = 1 ^^^ (r - 1) := by have := congr_arg (fun x => 1 ^^^ x) h rw [← Nat.xor_assoc, Nat.xor_self, zero_xor] at this exact this rw [h1, h_xor] at hval_le omega
When r ≥ 2, if spider_blocked_val β r = r + 1, it cannot appear in the options list.
We note β ≠ free. By spider_blocked_optionvals_le, every option value reachable from (r, β) is at most r. Therefore, the value r + 1 cannot occur as an option.
uses
spider_blocked_optionvals_leby_cases hr2 : 2 ≤ r · have hβ_ne : beta ≠ SpiderLegEnd.free := by rcases hβ with rfl | rfl <;> intro h <;> cases h by_cases hval : spider_blocked_val beta r = r + 1 · intro hx have hle := spider_blocked_optionvals_le r hr2 beta hβ_ne _ hx rw [hval] at hle omega
When r ≥ 2, β = inward, and the candidate value is r - 1, no option equals r - 1.
Since the value is not r + 1, r % 4 must be 3, so r is odd and the candidate value is r - 1. We check all elements of spider_blocked_optionvals: (1) interior cuts j < r with δ = inward have parity r % 2 = 1 by cut_same_parity, while r - 1 is even; (2) interior cuts with δ = outward cannot equal r - 1 by cut_diff_inward; (3) the cut at j = r reduces to spider_blocked_val inward (r - 1), which equals r by val_even since r - 1 is even; (4) terminal moves spider_rho r outward inward is ≤ 1 < r - 1, and spider_rho_star r inward = r ≠ r - 1. Thus none equal r - 1.
uses
if_neg,if_pos,spider_blocked_optionvals_not_mem_cut_same_parity,spider_blocked_optionvals_not_mem_cut_diff_inward,spider_rho_zero_same,zero_xor,spider_blocked_optionvals_not_mem_val_even,spider_blocked_optionvals_le_rho_star_ne_free· rcases hβ with rfl | rfl · dsimp [spider_blocked_val] at hval have hr4 : r % 4 = 3 := by by_cases h : r % 4 = 3 · exact h · rw [if_neg h] at hval; contradiction have hval_eq : spider_blocked_val SpiderLegEnd.inward r = r - 1 := by dsimp [spider_blocked_val] rw [if_pos hr4] rw [hval_eq] intro hmem simp only [spider_blocked_optionvals] at hmem rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_flatMap.mp hmem with ⟨idx, hidx, hmem⟩ simp only [List.mem_range] at hidx rcases List.mem_map.mp hmem with ⟨delta, hdelta, hx⟩ simp only [List.mem_cons, List.not_mem_nil, or_false] at hdelta rcases hdelta with rfl | rfl · have hpar := spider_blocked_optionvals_not_mem_cut_same_parity r (idx + 1) (by omega) (by omega) SpiderLegEnd.inward (Or.inl rfl) rw [hx] at hpar omega · exact spider_blocked_optionvals_not_mem_cut_diff_inward r (idx + 1) hr2 hr4 (by omega) (by omega) hx · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rw [spider_rho_zero_same SpiderLegEnd.inward (by decide), zero_xor] at hmem have h_even : (r - 1) % 2 = 0 := by omega have hval_even := spider_blocked_optionvals_not_mem_val_even SpiderLegEnd.inward (r - 1) h_even rw [hval_even] at hmem omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rcases hmem with h3a | h3b · dsimp [spider_rho] at h3a split_ifs at h3a <;> omega · rw [spider_blocked_optionvals_le_rho_star_ne_free r SpiderLegEnd.inward (by decide)] at h3b omega
When r ≥ 2, β = outward, and the candidate value is r - 1, no option equals r - 1.
Since the value is not r + 1, r % 4 must be 1, so r is odd and the candidate value is r - 1. Again every option is eliminated: (1) interior cuts with δ = inward cannot equal r - 1 by cut_diff_outward; (2) interior cuts with δ = outward have parity r % 2 = 1 by cut_same_parity, disagreeing with even r - 1; (3) the cut at j = r yields value r by val_even; (4) terminal moves evaluate to at most 1 or to r, neither of which is r - 1.
uses
if_neg,if_pos,spider_blocked_optionvals_not_mem_cut_diff_outward,spider_blocked_optionvals_not_mem_cut_same_parity,spider_rho_zero_same,zero_xor,spider_blocked_optionvals_not_mem_val_even,spider_blocked_optionvals_le_rho_star_ne_free· dsimp [spider_blocked_val] at hval have hr4 : r % 4 = 1 := by by_cases h : r % 4 = 1 · exact h · rw [if_neg h] at hval; contradiction have hval_eq : spider_blocked_val SpiderLegEnd.outward r = r - 1 := by dsimp [spider_blocked_val] rw [if_pos hr4] rw [hval_eq] intro hmem simp only [spider_blocked_optionvals] at hmem rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_flatMap.mp hmem with ⟨idx, hidx, hmem⟩ simp only [List.mem_range] at hidx rcases List.mem_map.mp hmem with ⟨delta, hdelta, hx⟩ simp only [List.mem_cons, List.not_mem_nil, or_false] at hdelta rcases hdelta with rfl | rfl · exact spider_blocked_optionvals_not_mem_cut_diff_outward r (idx + 1) hr2 hr4 (by omega) (by omega) hx · have hpar := spider_blocked_optionvals_not_mem_cut_same_parity r (idx + 1) (by omega) (by omega) SpiderLegEnd.outward (Or.inr rfl) rw [hx] at hpar omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rw [spider_rho_zero_same SpiderLegEnd.outward (by decide), zero_xor] at hmem have h_even : (r - 1) % 2 = 0 := by omega have hval_even := spider_blocked_optionvals_not_mem_val_even SpiderLegEnd.outward (r - 1) h_even rw [hval_even] at hmem omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rcases hmem with h3a | h3b · dsimp [spider_rho] at h3a omega · rw [spider_blocked_optionvals_le_rho_star_ne_free r SpiderLegEnd.outward (by decide)] at h3b omega
In the base case r = 1, spider_blocked_val β 1 does not belong to spider_blocked_optionvals 1 β. automation
When ¬(2 ≤ r) and 1 ≤ r, we have r = 1. Both cases β = inward and β = outward are verified by direct computational evaluation with decide.
· have hr1 : r = 1 := by omega subst hr1 rcases hβ with rfl | rfl <;> decide
spider_blocked_optionvals_not_mem_val_parity- The closed-form value spider_blocked_val δ m has the same parity as m + 1.
Nat.xor_mod_two_eq- For any natural numbers, the parity of their bitwise XOR equals the parity of their sum.
spider_blocked_optionvals_le_val_le_succ- The closed-form value spider_blocked_val δ m is bounded by m + 1.
Nat.le_one_iff_eq_zero_or_eq_one.mp- A natural number is at most 1 if and only if it is 0 or 1.
zero_xor- Bitwise XOR with 0 is the identity.
if_pos- If a condition c holds, the conditional if c then t else e evaluates to t.
Nat.even_iff- A natural number is even if and only if it is 0 modulo 2.
Nat.xor_comm- Bitwise XOR is commutative.
Nat.xor_one_of_even- For an even natural number n, n ^^^ 1 = n + 1.
congr_arg- Functions preserve equality of arguments.
Nat.xor_assoc- Bitwise XOR is associative.
Nat.xor_self- Bitwise XOR of any number with itself is 0.
spider_blocked_optionvals_le- Every option in spider_blocked_optionvals r β is at most r when r ≥ 2 and β ≠ free.
if_neg- If a condition c does not hold, the conditional if c then t else e evaluates to e.
spider_blocked_optionvals_not_mem_cut_same_parity- For cuts with matching leg end β, the XOR sum of the remaining leg rho and the cut leg value has the same parity as r.
spider_blocked_optionvals_not_mem_cut_diff_inward- When r ≥ 2 and r ≡ 3 mod 4, an outward-to-inward cut cannot produce nim-value r - 1.
spider_rho_zero_same- The reduction function spider_rho on length 0 with identical non-free leg ends equals 0.
spider_blocked_optionvals_not_mem_val_even- When m is even, spider_blocked_val δ m = m + 1.
spider_blocked_optionvals_le_rho_star_ne_free- For non-free boundary conditions, the terminal option value spider_rho_star r β equals r.
spider_blocked_optionvals_not_mem_cut_diff_outward- When r ≥ 2 and r ≡ 1 mod 4, an inward-to-outward cut cannot produce nim-value r - 1.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem spider_blocked_optionvals_not_mem_val_parity (delta : SpiderLegEnd) (m : ℕ) : spider_blocked_val delta m % 2 = (m + 1) % 2 := by dsimp [spider_blocked_val] split <;> split_ifs <;> omegatheorem spider_blocked_optionvals_not_mem_val_even (delta : SpiderLegEnd) (m : ℕ) (hm : m % 2 = 0) : spider_blocked_val delta m = m + 1 := by dsimp [spider_blocked_val] split <;> split_ifs <;> omegatheorem spider_blocked_optionvals_not_mem_cut_same_parity (r j : ℕ) (hj : 1 ≤ j) (hjr : j ≤ r) (beta : SpiderLegEnd) (hβ : beta = SpiderLegEnd.inward ∨ beta = SpiderLegEnd.outward) : (spider_rho (r - j) beta beta ^^^ spider_blocked_val beta (j - 1)) % 2 = r % 2 := by have h1 : spider_rho (r - j) beta beta = (r - j) % 2 := by rcases hβ with rfl | rfl <;> rfl have h2 : spider_blocked_val beta (j - 1) % 2 = j % 2 := by have := spider_blocked_optionvals_not_mem_val_parity beta (j - 1) omega rw [Nat.xor_mod_two_eq, h1] omegatheorem spider_blocked_optionvals_not_mem_cut_diff_inward (r j : ℕ) (hr : 2 ≤ r) (hr4 : r % 4 = 3) (hj : 1 ≤ j) (hj_lt : j ≤ r - 1) : spider_rho (r - j) SpiderLegEnd.outward SpiderLegEnd.inward ^^^ spider_blocked_val SpiderLegEnd.outward (j - 1) ≠ r - 1 := by intro h let h_len := r - j have hrho_le : spider_rho h_len SpiderLegEnd.outward SpiderLegEnd.inward ≤ 1 := by dsimp [spider_rho]; split_ifs <;> omega have hval_le : spider_blocked_val SpiderLegEnd.outward (j - 1) ≤ (j - 1) + 1 := spider_blocked_optionvals_le_val_le_succ _ _ rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hrho_le with hrho0 | hrho1 · rw [hrho0, zero_xor] at h have hj_eq : j - 1 = r - 2 := by omega rw [hj_eq] at h have hval : spider_blocked_val SpiderLegEnd.outward (r - 2) = r - 3 := by dsimp [spider_blocked_val] have : (r - 2) % 4 = 1 := by omega rw [if_pos this] omega omega · have h_even : Even (r - 1) := by rw [Nat.even_iff] omega have h_xor : 1 ^^^ (r - 1) = r := by rw [Nat.xor_comm, Nat.xor_one_of_even h_even] omega rw [hrho1] at h have h1 : spider_blocked_val SpiderLegEnd.outward (j - 1) = 1 ^^^ (r - 1) := by have := congr_arg (fun x => 1 ^^^ x) h rw [← Nat.xor_assoc, Nat.xor_self, zero_xor] at this exact this rw [h1, h_xor] at hval_le omegatheorem spider_blocked_optionvals_not_mem_cut_diff_outward (r j : ℕ) (hr : 2 ≤ r) (hr4 : r % 4 = 1) (hj : 1 ≤ j) (hj_lt : j ≤ r - 1) : spider_rho (r - j) SpiderLegEnd.inward SpiderLegEnd.outward ^^^ spider_blocked_val SpiderLegEnd.inward (j - 1) ≠ r - 1 := by intro h let h_len := r - j have hrho_le : spider_rho h_len SpiderLegEnd.inward SpiderLegEnd.outward ≤ 1 := by dsimp [spider_rho]; split_ifs <;> omega have hval_le : spider_blocked_val SpiderLegEnd.inward (j - 1) ≤ (j - 1) + 1 := spider_blocked_optionvals_le_val_le_succ _ _ rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hrho_le with hrho0 | hrho1 · rw [hrho0, zero_xor] at h have hj_eq : j - 1 = r - 2 := by omega rw [hj_eq] at h have hval : spider_blocked_val SpiderLegEnd.inward (r - 2) = r - 3 := by dsimp [spider_blocked_val] have : (r - 2) % 4 = 3 := by omega rw [if_pos this] omega omega · have h_even : Even (r - 1) := by rw [Nat.even_iff] omega have h_xor : 1 ^^^ (r - 1) = r := by rw [Nat.xor_comm, Nat.xor_one_of_even h_even] omega rw [hrho1] at h have h1 : spider_blocked_val SpiderLegEnd.inward (j - 1) = 1 ^^^ (r - 1) := by have := congr_arg (fun x => 1 ^^^ x) h rw [← Nat.xor_assoc, Nat.xor_self, zero_xor] at this exact this rw [h1, h_xor] at hval_le omega/-- Non-membership: the closed-form value is never an actual option of the blocked two-leg family. -/theorem spider_blocked_optionvals_not_mem (r : ℕ) (hr : 1 ≤ r) (beta : SpiderLegEnd) (hβ : beta = SpiderLegEnd.inward ∨ beta = SpiderLegEnd.outward) : spider_blocked_val beta r ∉ spider_blocked_optionvals r beta := by by_cases hr2 : 2 ≤ r · have hβ_ne : beta ≠ SpiderLegEnd.free := by rcases hβ with rfl | rfl <;> intro h <;> cases h by_cases hval : spider_blocked_val beta r = r + 1 · intro hx have hle := spider_blocked_optionvals_le r hr2 beta hβ_ne _ hx rw [hval] at hle omega · rcases hβ with rfl | rfl · dsimp [spider_blocked_val] at hval have hr4 : r % 4 = 3 := by by_cases h : r % 4 = 3 · exact h · rw [if_neg h] at hval; contradiction have hval_eq : spider_blocked_val SpiderLegEnd.inward r = r - 1 := by dsimp [spider_blocked_val] rw [if_pos hr4] rw [hval_eq] intro hmem simp only [spider_blocked_optionvals] at hmem rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_flatMap.mp hmem with ⟨idx, hidx, hmem⟩ simp only [List.mem_range] at hidx rcases List.mem_map.mp hmem with ⟨delta, hdelta, hx⟩ simp only [List.mem_cons, List.not_mem_nil, or_false] at hdelta rcases hdelta with rfl | rfl · have hpar := spider_blocked_optionvals_not_mem_cut_same_parity r (idx + 1) (by omega) (by omega) SpiderLegEnd.inward (Or.inl rfl) rw [hx] at hpar omega · exact spider_blocked_optionvals_not_mem_cut_diff_inward r (idx + 1) hr2 hr4 (by omega) (by omega) hx · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rw [spider_rho_zero_same SpiderLegEnd.inward (by decide), zero_xor] at hmem have h_even : (r - 1) % 2 = 0 := by omega have hval_even := spider_blocked_optionvals_not_mem_val_even SpiderLegEnd.inward (r - 1) h_even rw [hval_even] at hmem omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rcases hmem with h3a | h3b · dsimp [spider_rho] at h3a split_ifs at h3a <;> omega · rw [spider_blocked_optionvals_le_rho_star_ne_free r SpiderLegEnd.inward (by decide)] at h3b omega · dsimp [spider_blocked_val] at hval have hr4 : r % 4 = 1 := by by_cases h : r % 4 = 1 · exact h · rw [if_neg h] at hval; contradiction have hval_eq : spider_blocked_val SpiderLegEnd.outward r = r - 1 := by dsimp [spider_blocked_val] rw [if_pos hr4] rw [hval_eq] intro hmem simp only [spider_blocked_optionvals] at hmem rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_append.mp hmem with hmem | hmem · rcases List.mem_flatMap.mp hmem with ⟨idx, hidx, hmem⟩ simp only [List.mem_range] at hidx rcases List.mem_map.mp hmem with ⟨delta, hdelta, hx⟩ simp only [List.mem_cons, List.not_mem_nil, or_false] at hdelta rcases hdelta with rfl | rfl · exact spider_blocked_optionvals_not_mem_cut_diff_outward r (idx + 1) hr2 hr4 (by omega) (by omega) hx · have hpar := spider_blocked_optionvals_not_mem_cut_same_parity r (idx + 1) (by omega) (by omega) SpiderLegEnd.outward (Or.inr rfl) rw [hx] at hpar omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rw [spider_rho_zero_same SpiderLegEnd.outward (by decide), zero_xor] at hmem have h_even : (r - 1) % 2 = 0 := by omega have hval_even := spider_blocked_optionvals_not_mem_val_even SpiderLegEnd.outward (r - 1) h_even rw [hval_even] at hmem omega · simp only [List.mem_cons, List.not_mem_nil, or_false] at hmem rcases hmem with h3a | h3b · dsimp [spider_rho] at h3a omega · rw [spider_blocked_optionvals_le_rho_star_ne_free r SpiderLegEnd.outward (by decide)] at h3b omega · have hr1 : r = 1 := by omega subst hr1 rcases hβ with rfl | rfl <;> decide