cycle_power_dyadic_regular_continuation_right_bit_one
First part of the rightward continuation, for every exponent t+1 ≥ 3, without the coverage hypothesis. In a tight, exactly dyadically covered integer Boolean class model at exponent t+1 with exactly t+2 active classes at every vertex, suppose that for every root r with p0 - 3·2^t ≤ r ≤ p0: if p0 - r is even, the class rooted at r contains offset 1 and its offsets come in consecutive pairs (2i and 2i+1 both in or both out, i < 2^t); if p0 - r is odd, that class consists of its two endpoints only. Then the class rooted at p0+1 does not contain offset 1 and the class rooted at p0+2 does: bit 1 keeps alternating for two more roots.
Statement
theorem cycle_power_dyadic_regular_continuation_right_bit_one (t : ℕ) (ht : 2 ≤ t) (x : ℤ → ℕ → Bool) (htight : ∀ p, cycle_power_dyadic_class_weight (t+1) (x p) = (Finset.range (2^(t+1))).sum (fun a => (x p a).toNat)) (hexact : ∀ i < t+1, ∀ v : ℤ, (Finset.range (2^i)).sum (fun a => (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^(t+1)-2^i)).toNat) = 1) (hcount : ∀ v : ℤ, (Finset.range (2^(t+1))).sum (fun a => (x (v-(a : ℤ)) a).toNat) = (t+1)+1) (p0 : ℤ) (hreg : ∀ r : ℤ, p0 - 3*2^t ≤ r → r ≤ p0 → ((p0 - r) % 2 = 0 → x r 1 = true ∧ ∀ i < 2^t, x r (2*i) = x r (2*i+1)) ∧ ((p0 - r) % 2 = 1 → ∀ a, 0 < a → a < 2^(t+1) - 1 → x r a = false)) : x (p0+1) 1 = false ∧ x (p0+2) 1 = true
- Source
- Helper step for the main statement of OP-205 (arXiv:2610.15635, the case k+1 = 2^m, n even, (k+1) not dividing n, left open there). Partial result towards the stated cycle_power_dyadic_regular_continuation_right: its conclusion restricted to offset 1 of the two new classes.
- Verified
- 28 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- cycle_power_dyadic_tight_class_parentEquality in the dyadic class weight bound forces all rooted-tree parent implications at every smaller dyadic scale, uniformly in the arc…
- cycle_power_dyadic_class_weightThe weighted number of pairs in a dyadic arc: the endpoint pair has weight two, and distances 2^m-2^j for 1≤j<m have weight one.
- TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or… - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder.
- Used by 4
- cycle_power_dyadic_regular_continuation_right_next_paired_of_middleConditional form of the pairing step. Let t ≥ 2 and D = 2^(t+1). In a tight, exactly dyadically covered, fully covered integer Boolean…
- cycle_power_dyadic_regular_continuation_right_of_low_cornersConditional form of the rightward continuation. In a tight, exactly dyadically covered integer Boolean class model at exponent t+1 ≥ 3…
- cycle_power_dyadic_regular_continuation_right_next_paired_highPart of the rightward continuation, uniform in the exponent. Let t ≥ 2 and D = 2^(t+1). In a tight, exactly dyadically covered, fully…
- cycle_power_dyadic_regular_continuation_right_next_paired_powPart of the rightward continuation, uniform in the exponent. Let t ≥ 2 and D = 2^(t+1). In a tight, exactly dyadically covered, fully…
The proof, explained
The proof establishes that bit 1 continues alternating at roots p0+1 and p0+2 by comparing the active class counts (both equal to t+2) at vertices p0+2 and p0+3. First, dyadic exactness at scale i = 1 and regularity at p0 force x(p0+1, 2^(t+1)-2) = false, which by class tightness prevents offset 2 from being active at p0+1. Decomposing the class counts at vertices p0+2 and p0+3 reveals that their interior sums of length 2^(t+1)-3 coincide term by term because the regularity hypothesis pairs or zeroes out interior offsets according to the parity of p0 - r. Equating the two counts and canceling the interior sum leaves x(p0+1, 1) + 1 = x(p0+2, 1), forcing x(p0+1, 1) = false and x(p0+2, 1) = true.
The constant T = 2^t satisfies T ≥ 4, 2^(t+1) = 2T, and its integer coercion identities.
Define T = 2^t. Because t ≥ 2, monotonic scaling of powers gives T ≥ 2^2 = 4. Expanding the exponent gives 2^(t+1) = 2T, and basic integer cast conversions are established for later arithmetic.
uses
Nat.pow_le_pow_right,pow_succobtain ⟨T, hT⟩ : ∃ T : ℕ, T = 2^t := ⟨_, rfl⟩ have hT4 : 4 ≤ T := by rw [hT] calc 4 = 2^2 := by norm_num _ ≤ 2^t := Nat.pow_le_pow_right (by norm_num) ht have hD : (2:ℕ)^(t+1) = 2*T := by rw [hT, pow_succ]; ring have hTz : ((2:ℤ))^t = (T:ℤ) := by rw [hT]; push_cast; rfl
Class evaluations are congruent under equal arguments: if q = q' and a = a', then x(q, a) = x(q', a').
The helper lemma hx proves that replacing equal coordinates in the evaluation of x preserves equality.
have hx : ∀ (q q' : ℤ) (a a' : ℕ), q = q' → a = a' → x q a = x q' a' := by intro q q' a a' h1 h2; rw [h1, h2]
Every class has both endpoints active: for every vertex v, x(v, 0) = true and x(v, 2^(t+1) - 1) = true.
At dyadic rank i = 0, exactness states that the single term x(v, 0) && x(v, 2^(t+1) - 1) sums to 1. Since both factors are boolean, each must equal true.
uses
pow_zero,Finset.range_one,Finset.sum_singleton,Nat.cast_zero,sub_zero,Nat.zero_addhave hends : ∀ v : ℤ, x v 0 = true ∧ x v (2^(t+1) - 1) = true := by intro v have h := hexact 0 (by omega) v simp only [pow_zero, Finset.range_one, Finset.sum_singleton, Nat.cast_zero, sub_zero, Nat.zero_add] at h revert h generalize x v 0 = u generalize x v (2^(t+1) - 1) = w cases u <;> cases w <;> simp
Offset 1 is active at root p0 (x(p0, 1) = true), and offset 2^(t+1) - 2 is inactive at root p0+1 (x(p0+1, 2^(t+1) - 2) = false).
Since p0 - p0 = 0 is even, the regularity hypothesis gives x(p0, 1) = true. At dyadic rank i = 1 for vertex p0+1, exactness sums over a = 0 and a = 1. The summand at a = 1 is x(p0, 1) && x(p0, 2^(t+1) - 1), which evaluates to 1 because both endpoints and offset 1 are active. Since the sum of the two terms is 1, the summand at a = 0, which is x(p0+1, 0) && x(p0+1, 2^(t+1) - 2), must be 0. Since x(p0+1, 0) = true, this forces x(p0+1, 2^(t+1) - 2) = false.
uses
le_rfl,Finset.sum_range_succ,Finset.sum_range_onehave hk1 : x p0 1 = true := ((hreg p0 (by rw [hTz]; omega) le_rfl).1 (by simp)).1 -- rank one exactness at p0+1: the class at p0 owns the pair, so the class at p0+1 lacks offset D-2 have hD2 : x (p0+1) (2^(t+1) - 2) = false := by have h := hexact 1 (by omega) (p0+1) rw [show (2:ℕ)^1 = 1 + 1 from rfl, Finset.sum_range_succ, Finset.sum_range_one] at h rw [hx (p0+1-((0:ℕ):ℤ)) (p0+1) 0 0 (by simp) rfl, hx (p0+1-((0:ℕ):ℤ)) (p0+1) (0+2^(t+1)-(1+1)) (2^(t+1)-2) (by simp) (by omega), hx (p0+1-((1:ℕ):ℤ)) p0 1 1 (by push_cast; ring) rfl, hx (p0+1-((1:ℕ):ℤ)) p0 (1+2^(t+1)-(1+1)) (2^(t+1)-1) (by push_cast; ring) (by omega), hk1, (hends p0).2, (hends (p0+1)).1] at h revert h generalize x (p0+1) (2^(t+1) - 2) = w cases w <;> simp
Offset 2 is inactive at root p0+1: x(p0+1, 2) = false.
Suppose for contradiction that x(p0+1, 2) = true. By tightness of the class at p0+1 (cycle_power_dyadic_tight_class_parent) at scale j = 2 and index a = 2, since 2^(2-1) ≤ 2 < 2^2, an active offset 2 forces offset 2 + 2^(t+1) - 2^2 = 2^(t+1) - 2 to be active as well. This contradicts x(p0+1, 2^(t+1) - 2) = false.
uses
cycle_power_dyadic_tight_class_parenthave hb2 : x (p0+1) 2 = false := by by_contra hne have h2 : x (p0+1) 2 = true := by revert hne; generalize x (p0+1) 2 = w; cases w <;> simp have hp := (cycle_power_dyadic_tight_class_parent (t+1) 2 (by norm_num) (by omega) (x (p0+1)) (htight (p0+1)) 2 (by norm_num)).2 (by norm_num) h2 rw [hx (p0+1) (p0+1) (2 + 2^(t+1) - 2^2) (2^(t+1) - 2) rfl (by norm_num; omega), hD2] at hp exact absurd hp (by decide)
The active class counts at vertices p0+2 and p0+3 split into boundary terms and an interior sum of length E = 2^(t+1) - 3.
Writing 2^(t+1) = E + 3, a sum of length E + 3 can be split by isolating the first two terms and the last term (split2), or by isolating the first three terms (split3). Applying these splitting identities to the vertex count hypothesis (which equals t+2 at every vertex) rewrites the counts at p0+2 and p0+3 into their boundary terms and shifted interior sums.
uses
Finset.sum_range_succ,Finset.sum_range_succ'-- compare the counts at p0+2 and p0+3 obtain ⟨E, hE⟩ : ∃ E : ℕ, 2^(t+1) = E + 3 := ⟨2^(t+1) - 3, by omega⟩ have split2 : ∀ f : ℕ → ℕ, (Finset.range (E+3)).sum f = f 0 + f 1 + (Finset.range E).sum (fun a => f (a+2)) + f (E+2) := by intro f rw [Finset.sum_range_succ, Finset.sum_range_succ', Finset.sum_range_succ'] ring have split3 : ∀ f : ℕ → ℕ, (Finset.range (E+3)).sum f = f 0 + f 1 + f 2 + (Finset.range E).sum (fun a => f (a+3)) := by intro f rw [Finset.sum_range_succ', Finset.sum_range_succ', Finset.sum_range_succ'] ring have h2 := hcount (p0+2) have h3 := hcount (p0+3) rw [hE, split2] at h2 rw [hE, split3] at h3
The shifted interior sums of length E for vertices p0+2 and p0+3 are equal term by term.
For each index a < E, the term in the sum at p0+2 evaluates root r = p0 - a at offset a + 2, and the term at p0+3 evaluates the same root r at offset a + 3. By the regularity hypothesis on r: if a is even, p0 - r is even, so consecutive offsets 2i and 2i+1 (here a + 2 = 2(a/2 + 1) and a + 3 = 2(a/2 + 1) + 1) take identical values; if a is odd, p0 - r is odd, so all interior offsets are false, giving x(r, a + 2) = false = x(r, a + 3). In both cases the summands match.
uses
Finset.sum_congr,Finset.mem_range.mp,Nat.mod_two_eq_zero_or_one,congrArghave hmid : (Finset.range E).sum (fun a => (x (p0+2-((a+2 : ℕ) : ℤ)) (a+2)).toNat) = (Finset.range E).sum (fun a => (x (p0+3-((a+3 : ℕ) : ℤ)) (a+3)).toNat) := by refine Finset.sum_congr rfl fun a ha => ?_ have haE := Finset.mem_range.mp ha have hr := hreg (p0 - (a:ℤ)) (by rw [hTz]; omega) (by omega) rw [hx (p0+2-((a+2 : ℕ) : ℤ)) (p0 - (a:ℤ)) (a+2) (a+2) (by push_cast; ring) rfl, hx (p0+3-((a+3 : ℕ) : ℤ)) (p0 - (a:ℤ)) (a+3) (a+3) (by push_cast; ring) rfl] rcases Nat.mod_two_eq_zero_or_one a with hpar | hpar · have hp := (hr.1 (by omega)).2 (a/2+1) (by rw [← hT]; omega) rw [hx _ _ (a+2) (2*(a/2+1)) rfl (by omega), hp] exact congrArg Bool.toNat (hx _ _ _ _ rfl (by omega)) · rw [hr.2 (by omega) (a+2) (by omega) (by omega), hr.2 (by omega) (a+3) (by omega) (by omega)]
The boundary terms evaluate to 1, x(p0+1, 1), 1 for vertex p0+2, and to 1, x(p0+2, 1), 0 for vertex p0+3.
At vertex p0+2, offset 0 is 1 by endpoint activity, offset 1 is x(p0+1, 1), and offset E + 2 = 2^(t+1) - 1 is 1 by endpoint activity. At vertex p0+3, offset 0 is 1, offset 1 is x(p0+2, 1), and offset 2 is x(p0+1, 2) = 0 as established earlier.
have f0 : (x (p0+2-((0:ℕ):ℤ)) 0).toNat = 1 := by rw [hx _ (p0+2) 0 0 (by simp) rfl, (hends _).1]; rfl have f1 : (x (p0+2-((1:ℕ):ℤ)) 1).toNat = (x (p0+1) 1).toNat := by rw [hx _ (p0+1) 1 1 (by push_cast; ring) rfl] have fE : (x (p0+2-((E+2:ℕ):ℤ)) (E+2)).toNat = 1 := by rw [hx _ (p0+2-((E+2:ℕ):ℤ)) (E+2) (2^(t+1) - 1) rfl (by omega), (hends _).2]; rfl have g0 : (x (p0+3-((0:ℕ):ℤ)) 0).toNat = 1 := by rw [hx _ (p0+3) 0 0 (by simp) rfl, (hends _).1]; rfl have g1 : (x (p0+3-((1:ℕ):ℤ)) 1).toNat = (x (p0+2) 1).toNat := by rw [hx _ (p0+2) 1 1 (by push_cast; ring) rfl] have g2 : (x (p0+3-((2:ℕ):ℤ)) 2).toNat = 0 := by rw [hx _ (p0+1) 2 2 (by push_cast; ring) rfl, hb2]; rfl
Bit 1 alternates: x(p0+1, 1) = false and x(p0+2, 1) = true.
Equating the two count expressions and canceling the common interior sum yields x(p0+1, 1) + 1 = x(p0+2, 1). Because both variables are boolean (taking values 0 or 1), this equation uniquely determines x(p0+1, 1) = false and x(p0+2, 1) = true.
rw [f0, f1, fE, hmid] at h2 rw [g0, g1, g2] at h3 have hfin : (x (p0+1) 1).toNat + 1 = (x (p0+2) 1).toNat := by omega revert hfin generalize x (p0+1) 1 = u generalize x (p0+2) 1 = w cases u <;> cases w <;> simp
congrArg- A function preserves equality under application: if a = b, then f(a) = f(b).
cycle_power_dyadic_tight_class_parent- In a tight dyadic class of length 2^m, if an offset a in the upper half of dyadic block j is active, then the shifted offset a + 2^m - 2^j is also active.
Finset.mem_range.mp- An element k belongs to the range of length n if and only if k < n.
Finset.range_one- The range of length 1 consists of the single element 0: range 1 = {0}.
Finset.sum_congr- Two finite sums over equal index sets agree if their summands agree at every index.
Finset.sum_range_one- A sum over the range of length 1 is simply the value at 0: ∑_{k=0}^0 f(k) = f(0).
Finset.sum_range_succ- Splitting off the last term of a finite range sum: ∑_{k=0}^n f(k) = (∑_{k=0}^{n-1} f(k)) + f(n).
Finset.sum_range_succ'- Splitting off the first term of a finite range sum: ∑_{k=0}^n f(k) = f(0) + ∑_{k=0}^{n-1} f(k+1).
Finset.sum_singleton- The sum of a function over a singleton set {a} equals f(a).
le_rfl- The preorder relation ≤ is reflexive: a ≤ a for all a.
Nat.cast_zero- The coercion of the natural number 0 into an additive group is 0.
Nat.mod_two_eq_zero_or_one- Every natural number modulo 2 is either 0 or 1.
Nat.pow_le_pow_right- For any positive integer base n > 0, n^i ≤ n^j whenever i ≤ j.
Nat.zero_add- Adding 0 on the left leaves a natural number unchanged: 0 + n = n.
pow_succ- The successor power satisfies a^(n+1) = a^n * a.
pow_zero- Any element raised to the zeroth power equals 1: a^0 = 1.
sub_zero- Subtracting 0 leaves an element unchanged: a - 0 = a.
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 cycle_power_dyadic_regular_continuation_right_bit_one (t : ℕ) (ht : 2 ≤ t) (x : ℤ → ℕ → Bool) (htight : ∀ p, cycle_power_dyadic_class_weight (t+1) (x p) = (Finset.range (2^(t+1))).sum (fun a => (x p a).toNat)) (hexact : ∀ i < t+1, ∀ v : ℤ, (Finset.range (2^i)).sum (fun a => (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+2^(t+1)-2^i)).toNat) = 1) (hcount : ∀ v : ℤ, (Finset.range (2^(t+1))).sum (fun a => (x (v-(a : ℤ)) a).toNat) = (t+1)+1) (p0 : ℤ) (hreg : ∀ r : ℤ, p0 - 3*2^t ≤ r → r ≤ p0 → ((p0 - r) % 2 = 0 → x r 1 = true ∧ ∀ i < 2^t, x r (2*i) = x r (2*i+1)) ∧ ((p0 - r) % 2 = 1 → ∀ a, 0 < a → a < 2^(t+1) - 1 → x r a = false)) : x (p0+1) 1 = false ∧ x (p0+2) 1 = true := by obtain ⟨T, hT⟩ : ∃ T : ℕ, T = 2^t := ⟨_, rfl⟩ have hT4 : 4 ≤ T := by rw [hT] calc 4 = 2^2 := by norm_num _ ≤ 2^t := Nat.pow_le_pow_right (by norm_num) ht have hD : (2:ℕ)^(t+1) = 2*T := by rw [hT, pow_succ]; ring have hTz : ((2:ℤ))^t = (T:ℤ) := by rw [hT]; push_cast; rfl have hx : ∀ (q q' : ℤ) (a a' : ℕ), q = q' → a = a' → x q a = x q' a' := by intro q q' a a' h1 h2; rw [h1, h2] have hends : ∀ v : ℤ, x v 0 = true ∧ x v (2^(t+1) - 1) = true := by intro v have h := hexact 0 (by omega) v simp only [pow_zero, Finset.range_one, Finset.sum_singleton, Nat.cast_zero, sub_zero, Nat.zero_add] at h revert h generalize x v 0 = u generalize x v (2^(t+1) - 1) = w cases u <;> cases w <;> simp have hk1 : x p0 1 = true := ((hreg p0 (by rw [hTz]; omega) le_rfl).1 (by simp)).1 -- rank one exactness at p0+1: the class at p0 owns the pair, so the class at p0+1 lacks offset D-2 have hD2 : x (p0+1) (2^(t+1) - 2) = false := by have h := hexact 1 (by omega) (p0+1) rw [show (2:ℕ)^1 = 1 + 1 from rfl, Finset.sum_range_succ, Finset.sum_range_one] at h rw [hx (p0+1-((0:ℕ):ℤ)) (p0+1) 0 0 (by simp) rfl, hx (p0+1-((0:ℕ):ℤ)) (p0+1) (0+2^(t+1)-(1+1)) (2^(t+1)-2) (by simp) (by omega), hx (p0+1-((1:ℕ):ℤ)) p0 1 1 (by push_cast; ring) rfl, hx (p0+1-((1:ℕ):ℤ)) p0 (1+2^(t+1)-(1+1)) (2^(t+1)-1) (by push_cast; ring) (by omega), hk1, (hends p0).2, (hends (p0+1)).1] at h revert h generalize x (p0+1) (2^(t+1) - 2) = w cases w <;> simp have hb2 : x (p0+1) 2 = false := by by_contra hne have h2 : x (p0+1) 2 = true := by revert hne; generalize x (p0+1) 2 = w; cases w <;> simp have hp := (cycle_power_dyadic_tight_class_parent (t+1) 2 (by norm_num) (by omega) (x (p0+1)) (htight (p0+1)) 2 (by norm_num)).2 (by norm_num) h2 rw [hx (p0+1) (p0+1) (2 + 2^(t+1) - 2^2) (2^(t+1) - 2) rfl (by norm_num; omega), hD2] at hp exact absurd hp (by decide) -- compare the counts at p0+2 and p0+3 obtain ⟨E, hE⟩ : ∃ E : ℕ, 2^(t+1) = E + 3 := ⟨2^(t+1) - 3, by omega⟩ have split2 : ∀ f : ℕ → ℕ, (Finset.range (E+3)).sum f = f 0 + f 1 + (Finset.range E).sum (fun a => f (a+2)) + f (E+2) := by intro f rw [Finset.sum_range_succ, Finset.sum_range_succ', Finset.sum_range_succ'] ring have split3 : ∀ f : ℕ → ℕ, (Finset.range (E+3)).sum f = f 0 + f 1 + f 2 + (Finset.range E).sum (fun a => f (a+3)) := by intro f rw [Finset.sum_range_succ', Finset.sum_range_succ', Finset.sum_range_succ'] ring have h2 := hcount (p0+2) have h3 := hcount (p0+3) rw [hE, split2] at h2 rw [hE, split3] at h3 have hmid : (Finset.range E).sum (fun a => (x (p0+2-((a+2 : ℕ) : ℤ)) (a+2)).toNat) = (Finset.range E).sum (fun a => (x (p0+3-((a+3 : ℕ) : ℤ)) (a+3)).toNat) := by refine Finset.sum_congr rfl fun a ha => ?_ have haE := Finset.mem_range.mp ha have hr := hreg (p0 - (a:ℤ)) (by rw [hTz]; omega) (by omega) rw [hx (p0+2-((a+2 : ℕ) : ℤ)) (p0 - (a:ℤ)) (a+2) (a+2) (by push_cast; ring) rfl, hx (p0+3-((a+3 : ℕ) : ℤ)) (p0 - (a:ℤ)) (a+3) (a+3) (by push_cast; ring) rfl] rcases Nat.mod_two_eq_zero_or_one a with hpar | hpar · have hp := (hr.1 (by omega)).2 (a/2+1) (by rw [← hT]; omega) rw [hx _ _ (a+2) (2*(a/2+1)) rfl (by omega), hp] exact congrArg Bool.toNat (hx _ _ _ _ rfl (by omega)) · rw [hr.2 (by omega) (a+2) (by omega) (by omega), hr.2 (by omega) (a+3) (by omega) (by omega)] have f0 : (x (p0+2-((0:ℕ):ℤ)) 0).toNat = 1 := by rw [hx _ (p0+2) 0 0 (by simp) rfl, (hends _).1]; rfl have f1 : (x (p0+2-((1:ℕ):ℤ)) 1).toNat = (x (p0+1) 1).toNat := by rw [hx _ (p0+1) 1 1 (by push_cast; ring) rfl] have fE : (x (p0+2-((E+2:ℕ):ℤ)) (E+2)).toNat = 1 := by rw [hx _ (p0+2-((E+2:ℕ):ℤ)) (E+2) (2^(t+1) - 1) rfl (by omega), (hends _).2]; rfl have g0 : (x (p0+3-((0:ℕ):ℤ)) 0).toNat = 1 := by rw [hx _ (p0+3) 0 0 (by simp) rfl, (hends _).1]; rfl have g1 : (x (p0+3-((1:ℕ):ℤ)) 1).toNat = (x (p0+2) 1).toNat := by rw [hx _ (p0+2) 1 1 (by push_cast; ring) rfl] have g2 : (x (p0+3-((2:ℕ):ℤ)) 2).toNat = 0 := by rw [hx _ (p0+1) 2 2 (by push_cast; ring) rfl, hb2]; rfl rw [f0, f1, fE, hmid] at h2 rw [g0, g1, g2] at h3 have hfin : (x (p0+1) 1).toNat + 1 = (x (p0+2) 1).toNat := by omega revert hfin generalize x (p0+1) 1 = u generalize x (p0+2) 1 = w cases u <;> cases w <;> simp