Theorem: ℤθ.unit_pow_zero_mod_three (Mordell4/CubicRing.lean)

State before:
a b c : ℤθ
⊢ ∀ (k : ℕ),
    ((↑(unit ^ (3 * ↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑k))).h % 3 = 0) ∧
      (↑(unit ^ (3 * -↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑k))).h % 3 = 0
Tactic:
intro k
State after:
a b c : ℤθ
k : ℕ
⊢ ((↑(unit ^ (3 * ↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑k))).h % 3 = 0) ∧
    (↑(unit ^ (3 * -↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑k))).h % 3 = 0

State before:
a b c : ℤθ
k : ℕ
⊢ ((↑(unit ^ (3 * ↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑k))).h % 3 = 0) ∧
    (↑(unit ^ (3 * -↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑k))).h % 3 = 0
Tactic:
constructor
State after:
case left
a b c : ℤθ
k : ℕ
⊢ (↑(unit ^ (3 * ↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑k))).h % 3 = 0

case right
a b c : ℤθ
k : ℕ
⊢ (↑(unit ^ (3 * -↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑k))).h % 3 = 0

State before:
case left
a b c : ℤθ
k : ℕ
⊢ (↑(unit ^ (3 * ↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑k))).h % 3 = 0
Tactic:
induction' k with b hb
State after:
case left.zero
a b c : ℤθ
⊢ (↑(unit ^ (3 * ↑Nat.zero))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑Nat.zero))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑Nat.zero))).h % 3 = 0

case left.succ
a b✝ c : ℤθ
b : ℕ
hb : (↑(unit ^ (3 * ↑b))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0

State before:
case left.succ
a b✝ c : ℤθ
b : ℕ
hb : (↑(unit ^ (3 * ↑b))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0
Tactic:
cases' hb with h1 h23
State after:
case left.succ.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h23 : (↑(unit ^ (3 * ↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0

State before:
case left.succ.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h23 : (↑(unit ^ (3 * ↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0
Tactic:
cases' h23 with h2 h3
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0
Tactic:
have p : b.succ = b + 1 := by rfl
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * ↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * ↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(Nat.succ b)))).h % 3 = 0
Tactic:
rw [p]
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * ↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * ↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑(b + 1)))).h % 3 = 0
Tactic:
norm_cast
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have w : (unit ^ (3 * (b + 1)) : ℤθ) = (unit ^ (3 * b) : ℤθ) * ((unit:ℤθ) ^ 3 : ℤθ) :=
by
  norm_cast
  rw [mul_add, mul_one, pow_add]
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have t1 : ((unit ) ^ (3 * b):ℤθ).f % 3 = 1 :=
  by
    norm_cast
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have t2 : ((unit) ^ (3 * b) : ℤθ).g % 3 = 0 :=
  by
    norm_cast
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have t3 : ((unit ) ^ (3 * b): ℤθ).h % 3 = 0 :=
  by
    norm_cast
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have r1 := y_mod_three (unit ^ (3 * b) : ℤθ).f 1 t1
State after:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
r1 : ∃ k, (↑(unit ^ (3 * b))).f = 3 * k + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
r1 : ∃ k, (↑(unit ^ (3 * b))).f = 3 * k + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
cases' r1 with c1 hc1
State after:
case left.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have r2 := y_mod_three (unit ^ (3 * b) : ℤθ).g 0 t2
State after:
case left.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
r2 : ∃ k, (↑(unit ^ (3 * b))).g = 3 * k + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
r2 : ∃ k, (↑(unit ^ (3 * b))).g = 3 * k + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
cases' r2 with c2 hc2
State after:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2 + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2 + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [add_zero] at hc2
State after:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have r3 := y_mod_three (unit ^ (3 * b) : ℤθ).h 0 t3
State after:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
r3 : ∃ k, (↑(unit ^ (3 * b))).h = 3 * k + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
r3 : ∃ k, (↑(unit ^ (3 * b))).h = 3 * k + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
cases' r3 with c3 hc3
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3 + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3 + 0
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [add_zero] at hc3
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have s : (unit ^ (3 * b) : ℤθ) = ⟨3 * c1 + 1, 3 * c2, 3 * c3⟩ :=
  by
  ext <;> dsimp
  exact hc1; exact hc2; exact hc3
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [s] at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * (b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * ↑unit ^ 3
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * (b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * ↑unit ^ 3
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [unit_cubed] at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * (b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * { f := -23, g := -63, h := -15 }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * (b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * { f := -23, g := -63, h := -15 }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [hMul_mule_3] at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * (b + 1))) =
    {
      f :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.f +
              6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g,
      g :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.g +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.f +
              16 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g,
      h :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.h +
                  { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.f +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.g +
              3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * (b + 1))) =
    {
      f :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.f +
              6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g,
      g :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.g +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.f +
              16 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g,
      h :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := -23, g := -63, h := -15 }.h +
                  { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.f +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.g +
              3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.h -
            3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := -23, g := -63, h := -15 }.h -
          3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := -23, g := -63, h := -15 }.g }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
dsimp at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * (b + 1))) =
    { f := (3 * c1 + 1) * -23 + 6 * (3 * c3) * -15 - 2 * (3 * c2) * -15 - 2 * (3 * c3) * -63,
      g := (3 * c1 + 1) * -63 + 3 * c2 * -23 + 16 * (3 * c3) * -15 - 6 * (3 * c2) * -15 - 6 * (3 * c3) * -63,
      h :=
        (3 * c1 + 1) * -15 + 3 * c3 * -23 + 3 * c2 * -63 + 3 * (3 * c3) * -15 - 3 * (3 * c2) * -15 -
          3 * (3 * c3) * -63 }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * (b + 1))) =
    { f := (3 * c1 + 1) * -23 + 6 * (3 * c3) * -15 - 2 * (3 * c2) * -15 - 2 * (3 * c3) * -63,
      g := (3 * c1 + 1) * -63 + 3 * c2 * -23 + 16 * (3 * c3) * -15 - 6 * (3 * c2) * -15 - 6 * (3 * c3) * -63,
      h :=
        (3 * c1 + 1) * -15 + 3 * c3 * -23 + 3 * c2 * -63 + 3 * (3 * c3) * -15 - 3 * (3 * c2) * -15 -
          3 * (3 * c3) * -63 }
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
ring_nf at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  ↑(unit ^ (3 + b * 3)) =
    { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
      h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  ↑(unit ^ (3 + b * 3)) =
    { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
      h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [ℤθ.ext_iff] at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f =
      { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
          h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.f ∧
    (↑(unit ^ (3 + b * 3))).g =
        { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
            h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.g ∧
      (↑(unit ^ (3 + b * 3))).h =
        { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
            h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.h
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f =
      { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
          h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.f ∧
    (↑(unit ^ (3 + b * 3))).g =
        { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
            h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.g ∧
      (↑(unit ^ (3 + b * 3))).h =
        { f := -23 - c1 * 69 + c3 * 108 + c2 * 90, g := -63 - c1 * 189 + c3 * 414 + c2 * 201,
            h := -15 - c1 * 45 + (c3 * 363 - c2 * 54) }.h
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
dsimp at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 + b * 3))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 + b * 3))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 + b * 3))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 + b * 3))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
have : 3 + b*3 = 3*(b+1):= by ring
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 + b * 3))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 + b * 3))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
this : 3 + b * 3 = 3 * (b + 1)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 + b * 3))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 + b * 3))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
this : 3 + b * 3 = 3 * (b + 1)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [this] at w
State after:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 * (b + 1)))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 * (b + 1)))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 * (b + 1)))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
this : 3 + b * 3 = 3 * (b + 1)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 * (b + 1)))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 * (b + 1)))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 * (b + 1)))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
this : 3 + b * 3 = 3 * (b + 1)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
obtain ⟨f1,f2,f3⟩:=w
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90
f2 : (↑(unit ^ (3 * (b + 1)))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201
f3 : (↑(unit ^ (3 * (b + 1)))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90
f2 : (↑(unit ^ (3 * (b + 1)))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201
f3 : (↑(unit ^ (3 * (b + 1)))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
apply_fun (fun x => x%3) at f1 f2 f3
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (↑(unit ^ (3 * (b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * (b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * (b + 1)))).h % 3 = 0
Tactic:
rw [f1,f2,f3]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3 = 1 ∧
    (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0 ∧ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3 = 1 ∧
    (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0 ∧ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0
Tactic:
constructor
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3 = 1

case left.succ.intro.intro.intro.intro.intro.intro.intro.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0 ∧ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0

State before:
case left.zero
a b c : ℤθ
⊢ (↑(unit ^ (3 * ↑Nat.zero))).f % 3 = 1 ∧ (↑(unit ^ (3 * ↑Nat.zero))).g % 3 = 0 ∧ (↑(unit ^ (3 * ↑Nat.zero))).h % 3 = 0
Tactic:
exact unit_pow_zero
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
⊢ Nat.succ b = b + 1
Tactic:
rfl
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
Tactic:
norm_cast
State after:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ unit ^ (3 * (b + 1)) = unit ^ (3 * b) * unit ^ 3

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ unit ^ (3 * (b + 1)) = unit ^ (3 * b) * unit ^ 3
Tactic:
rw [mul_add, mul_one, pow_add]
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
⊢ (↑(unit ^ (3 * b))).f % 3 = 1
Tactic:
norm_cast
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
⊢ (↑(unit ^ (3 * b))).g % 3 = 0
Tactic:
norm_cast
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
⊢ (↑(unit ^ (3 * b))).h % 3 = 0
Tactic:
norm_cast
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
Tactic:
ext <;> dsimp
State after:
case f
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).f = 3 * c1 + 1

case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3

State before:
case f
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).f = 3 * c1 + 1

case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3
Tactic:
exact hc1
State after:
case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3

State before:
case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3
Tactic:
exact hc2
State after:
case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3

State before:
case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * (b + 1))) = ↑(unit ^ (3 * b)) * ↑unit ^ 3
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
⊢ (↑(unit ^ (3 * b))).h = 3 * c3
Tactic:
exact hc3
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (3 + b * 3))).f = -23 - c1 * 69 + c3 * 108 + c2 * 90 ∧
    (↑(unit ^ (3 + b * 3))).g = -63 - c1 * 189 + c3 * 414 + c2 * 201 ∧
      (↑(unit ^ (3 + b * 3))).h = -15 - c1 * 45 + (c3 * 363 - c2 * 54)
⊢ 3 + b * 3 = 3 * (b + 1)
Tactic:
ring
State after:
no goals

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3 = 1
Tactic:
rw [Int.add_emod,Int.add_emod _ (c3*108),Int.sub_emod, Int.mul_emod _ 69,Int.mul_emod _ 108,Int.mul_emod _ 90]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (((-23 % 3 - c1 % 3 * (69 % 3) % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (((-23 % 3 - c1 % 3 * (69 % 3) % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
have : (69:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 69 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * (69 % 3) % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 69 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * (69 % 3) % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 69 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 69 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
have : (108:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 69 % 3 = 0
this : 108 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 69 % 3 = 0
this : 108 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (108 % 3) % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 69 % 3 = 0
this : 108 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 69 % 3 = 0
this : 108 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
have : (90:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 69 % 3 = 0
this✝ : 108 % 3 = 0
this : 90 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 69 % 3 = 0
this✝ : 108 % 3 = 0
this : 90 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (90 % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 69 % 3 = 0
this✝ : 108 % 3 = 0
this : 90 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * 0 % 3) % 3 = 1

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 69 % 3 = 0
this✝ : 108 % 3 = 0
this : 90 % 3 = 0
⊢ (((-23 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * 0 % 3) % 3 = 1
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ 69 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 69 % 3 = 0
⊢ 108 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 69 % 3 = 0
this : 108 % 3 = 0
⊢ 90 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0 ∧ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0
Tactic:
constructor
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0

case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3 = 0
Tactic:
rw [Int.add_emod,Int.add_emod _ (c3*414),Int.sub_emod, Int.mul_emod _ 189,Int.mul_emod _ 414,Int.mul_emod _ 201]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (((-63 % 3 - c1 % 3 * (189 % 3) % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (((-63 % 3 - c1 % 3 * (189 % 3) % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
have : (189:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 189 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * (189 % 3) % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 189 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * (189 % 3) % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 189 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 189 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
have : (414:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 189 % 3 = 0
this : 414 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 189 % 3 = 0
this : 414 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * (414 % 3) % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 189 % 3 = 0
this : 414 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 189 % 3 = 0
this : 414 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
have : (201:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 189 % 3 = 0
this✝ : 414 % 3 = 0
this : 201 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 189 % 3 = 0
this✝ : 414 % 3 = 0
this : 201 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * (201 % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 189 % 3 = 0
this✝ : 414 % 3 = 0
this : 201 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * 0 % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 189 % 3 = 0
this✝ : 414 % 3 = 0
this : 201 % 3 = 0
⊢ (((-63 % 3 - c1 % 3 * 0 % 3) % 3 + c3 % 3 * 0 % 3) % 3 + c2 % 3 * 0 % 3) % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ 189 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 189 % 3 = 0
⊢ 414 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 189 % 3 = 0
this : 414 % 3 = 0
⊢ 201 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3 = 0
Tactic:
rw [Int.add_emod,Int.sub_emod,Int.sub_emod (c3*363), Int.mul_emod _ 363,Int.mul_emod _ 54,Int.mul_emod _ 45]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ ((-15 % 3 - c1 % 3 * (45 % 3) % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ ((-15 % 3 - c1 % 3 * (45 % 3) % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
have : (45:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 45 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * (45 % 3) % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 45 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * (45 % 3) % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 45 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 45 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
have : (363:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 45 % 3 = 0
this : 363 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 45 % 3 = 0
this : 363 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (363 % 3) % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 45 % 3 = 0
this : 363 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 45 % 3 = 0
this : 363 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
have : (54:ℤ) %3 = 0:=by norm_num
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 45 % 3 = 0
this✝ : 363 % 3 = 0
this : 54 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 45 % 3 = 0
this✝ : 363 % 3 = 0
this : 54 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (54 % 3) % 3) % 3) % 3 = 0
Tactic:
rw [this]
State after:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 45 % 3 = 0
this✝ : 363 % 3 = 0
this : 54 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * 0 % 3) % 3) % 3 = 0

State before:
case left.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝² : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝¹ : 45 % 3 = 0
this✝ : 363 % 3 = 0
this : 54 % 3 = 0
⊢ ((-15 % 3 - c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * 0 % 3) % 3) % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
⊢ 45 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this : 45 % 3 = 0
⊢ 363 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * ↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * ↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * ↑b))).h % 3 = 0
p : Nat.succ b = b + 1
t1 : (↑(unit ^ (3 * b))).f % 3 = 1
t2 : (↑(unit ^ (3 * b))).g % 3 = 0
t3 : (↑(unit ^ (3 * b))).h % 3 = 0
c1 : ℤ
hc1 : (↑(unit ^ (3 * b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * b))).h = 3 * c3
s : ↑(unit ^ (3 * b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
this✝¹ : 3 + b * 3 = 3 * (b + 1)
f1 : (↑(unit ^ (3 * (b + 1)))).f % 3 = (-23 - c1 * 69 + c3 * 108 + c2 * 90) % 3
f2 : (↑(unit ^ (3 * (b + 1)))).g % 3 = (-63 - c1 * 189 + c3 * 414 + c2 * 201) % 3
f3 : (↑(unit ^ (3 * (b + 1)))).h % 3 = (-15 - c1 * 45 + (c3 * 363 - c2 * 54)) % 3
this✝ : 45 % 3 = 0
this : 363 % 3 = 0
⊢ 54 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
case right
a b c : ℤθ
k : ℕ
⊢ (↑(unit ^ (3 * -↑k))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑k))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑k))).h % 3 = 0
Tactic:
induction' k with b hb
State after:
case right.zero
a b c : ℤθ
⊢ (↑(unit ^ (3 * -↑Nat.zero))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑Nat.zero))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑Nat.zero))).h % 3 = 0

case right.succ
a b✝ c : ℤθ
b : ℕ
hb : (↑(unit ^ (3 * -↑b))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0

State before:
case right.succ
a b✝ c : ℤθ
b : ℕ
hb : (↑(unit ^ (3 * -↑b))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0
Tactic:
cases' hb with h1 h23
State after:
case right.succ.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h23 : (↑(unit ^ (3 * -↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0

State before:
case right.succ.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h23 : (↑(unit ^ (3 * -↑b))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0
Tactic:
cases' h23 with h2 h3
State after:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0

State before:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0
Tactic:
have p : b.succ = b + 1 := by rfl
State after:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0

State before:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * -↑(Nat.succ b)))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑(Nat.succ b)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(Nat.succ b)))).h % 3 = 0
Tactic:
rw [p]
State after:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have w :
  ((unit ^ ((3 : ℤ) * -(b + 1 : ℤ)) : ℤθˣ) : ℤθ) =
    ((unit ^ (3 * -(b : ℤ)) : ℤθˣ) : ℤθ) * ((unit ^ (-3 : ℤ) : ℤθˣ) : ℤθ) :=
  by
  rw [neg_add, mul_add, mul_neg_one, zpow_add]
  norm_cast
State after:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have r1 := y_mod_three ((unit ^ ((3 : ℤ) * -(b : ℤ)) : ℤθˣ) : ℤθ).f 1 h1
State after:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
r1 : ∃ k, (↑(unit ^ (3 * -↑b))).f = 3 * k + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
r1 : ∃ k, (↑(unit ^ (3 * -↑b))).f = 3 * k + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
cases' r1 with c1 hc1
State after:
case right.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have r2 := y_mod_three ((unit ^ ((3 : ℤ) * -(b : ℤ)) : ℤθˣ) : ℤθ).g 0 h2
State after:
case right.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
r2 : ∃ k, (↑(unit ^ (3 * -↑b))).g = 3 * k + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
r2 : ∃ k, (↑(unit ^ (3 * -↑b))).g = 3 * k + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
cases' r2 with c2 hc2
State after:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2 + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2 + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [add_zero] at hc2
State after:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have r3 := y_mod_three ((unit ^ ((3 : ℤ) * -(b : ℤ)) : ℤθˣ) : ℤθ).h 0 h3
State after:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
r3 : ∃ k, (↑(unit ^ (3 * -↑b))).h = 3 * k + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
r3 : ∃ k, (↑(unit ^ (3 * -↑b))).h = 3 * k + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
cases' r3 with c3 hc3
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3 + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3 + 0
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [add_zero] at hc3
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have s : ((unit ^ ((3 : ℤ) * -(b : ℤ)) : ℤθˣ) : ℤθ) = ⟨3 * c1 + 1, 3 * c2, 3 * c3⟩ :=
  by
  ext <;> dsimp
  exact hc1; exact hc2; exact hc3
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [s] at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * -(↑b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * ↑(unit ^ (-3))
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * -(↑b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * ↑(unit ^ (-3))
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [unit_inv_cubed] at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * -(↑b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * { f := 10591, g := 5553, h := 2139 }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w : ↑(unit ^ (3 * -(↑b + 1))) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 } * { f := 10591, g := 5553, h := 2139 }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [hMul_mule_3] at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * -(↑b + 1))) =
    {
      f :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.f +
              6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g,
      g :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.g +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.f +
              16 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g,
      h :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.h +
                  { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.f +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.g +
              3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * -(↑b + 1))) =
    {
      f :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.f +
              6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          2 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g,
      g :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.g +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.f +
              16 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          6 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g,
      h :=
        { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.f * { f := 10591, g := 5553, h := 2139 }.h +
                  { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.f +
                { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.g +
              3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.h -
            3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.g * { f := 10591, g := 5553, h := 2139 }.h -
          3 * { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }.h * { f := 10591, g := 5553, h := 2139 }.g }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
dsimp at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * -(↑b + 1))) =
    { f := (3 * c1 + 1) * 10591 + 6 * (3 * c3) * 2139 - 2 * (3 * c2) * 2139 - 2 * (3 * c3) * 5553,
      g := (3 * c1 + 1) * 5553 + 3 * c2 * 10591 + 16 * (3 * c3) * 2139 - 6 * (3 * c2) * 2139 - 6 * (3 * c3) * 5553,
      h :=
        (3 * c1 + 1) * 2139 + 3 * c3 * 10591 + 3 * c2 * 5553 + 3 * (3 * c3) * 2139 - 3 * (3 * c2) * 2139 -
          3 * (3 * c3) * 5553 }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
w :
  ↑(unit ^ (3 * -(↑b + 1))) =
    { f := (3 * c1 + 1) * 10591 + 6 * (3 * c3) * 2139 - 2 * (3 * c2) * 2139 - 2 * (3 * c3) * 5553,
      g := (3 * c1 + 1) * 5553 + 3 * c2 * 10591 + 16 * (3 * c3) * 2139 - 6 * (3 * c2) * 2139 - 6 * (3 * c3) * 5553,
      h :=
        (3 * c1 + 1) * 2139 + 3 * c3 * 10591 + 3 * c2 * 5553 + 3 * (3 * c3) * 2139 - 3 * (3 * c2) * 2139 -
          3 * (3 * c3) * 5553 }
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
ring_nf at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  ↑(unit ^ (-3 - ↑b * 3)) =
    { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
      h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  ↑(unit ^ (-3 - ↑b * 3)) =
    { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
      h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [ℤθ.ext_iff] at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (-3 - ↑b * 3))).f =
      { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
          h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.f ∧
    (↑(unit ^ (-3 - ↑b * 3))).g =
        { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
            h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.g ∧
      (↑(unit ^ (-3 - ↑b * 3))).h =
        { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
            h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.h
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (-3 - ↑b * 3))).f =
      { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
          h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.f ∧
    (↑(unit ^ (-3 - ↑b * 3))).g =
        { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
            h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.g ∧
      (↑(unit ^ (-3 - ↑b * 3))).h =
        { f := 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834), g := 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729),
            h := 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) }.h
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
dsimp at w
State after:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834) ∧
    (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) ∧
      (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w :
  (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834) ∧
    (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) ∧
      (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
cases' w with w1 w23
State after:
case right.succ.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w23 :
  (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) ∧
    (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w23 :
  (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) ∧
    (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
cases' w23 with w2 w3
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have j2: -3 - (b : ℤ)*3 = 3*(-(b+1):ℤ):= by ring
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -(↑b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -(↑b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
have j1 : (b : ℤ) + 1 = ((b + 1 : ℕ) : ℤ) := by norm_cast
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -(↑b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -(↑b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [j1] at j2
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [j2] at w1
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [j2] at w2
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [j2] at w3
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (3 * -↑(b + 1)))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (3 * -↑(b + 1)))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (↑(unit ^ (3 * -↑(b + 1)))).f % 3 = 1 ∧ (↑(unit ^ (3 * -↑(b + 1)))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑(b + 1)))).h % 3 = 0
Tactic:
rw [w1, w2, w3]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (3 * -↑(b + 1)))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1 ∧
    (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (3 * -↑(b + 1)))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (3 * -↑(b + 1)))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (3 * -↑(b + 1)))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -↑(b + 1)
j1 : ↑b + 1 = ↑(b + 1)
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1 ∧
    (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0
Tactic:
clear h1 h2 h3 p hc1 hc2 hc3 w1 w2 w3 s j2 j1
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1 ∧
    (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1 ∧
    (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0
Tactic:
constructor
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1

case right.succ.intro.intro.intro.intro.intro.intro.intro.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0 ∧ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0
Tactic:
constructor
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0

case right.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0

State before:
case right.zero
a b c : ℤθ
⊢ (↑(unit ^ (3 * -↑Nat.zero))).f % 3 = 1 ∧
    (↑(unit ^ (3 * -↑Nat.zero))).g % 3 = 0 ∧ (↑(unit ^ (3 * -↑Nat.zero))).h % 3 = 0
Tactic:
rw [Int.ofNat_zero, neg_zero, MulZeroClass.mul_zero]
State after:
case right.zero
a b c : ℤθ
⊢ (↑(unit ^ 0)).f % 3 = 1 ∧ (↑(unit ^ 0)).g % 3 = 0 ∧ (↑(unit ^ 0)).h % 3 = 0

State before:
case right.zero
a b c : ℤθ
⊢ (↑(unit ^ 0)).f % 3 = 1 ∧ (↑(unit ^ 0)).g % 3 = 0 ∧ (↑(unit ^ 0)).h % 3 = 0
Tactic:
exact unit_pow_zero
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
⊢ Nat.succ b = b + 1
Tactic:
rfl
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
Tactic:
rw [neg_add, mul_add, mul_neg_one, zpow_add]
State after:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ ↑(unit ^ (3 * -↑b) * unit ^ (-3)) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
⊢ ↑(unit ^ (3 * -↑b) * unit ^ (-3)) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
Tactic:
norm_cast
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
Tactic:
ext <;> dsimp
State after:
case f
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1

case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3

State before:
case f
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1

case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3
Tactic:
exact hc1
State after:
case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3

State before:
case g
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).g = 3 * c2

case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3
Tactic:
exact hc2
State after:
case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3

State before:
case h
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
w : ↑(unit ^ (3 * -(↑b + 1))) = ↑(unit ^ (3 * -↑b)) * ↑(unit ^ (-3))
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
⊢ (↑(unit ^ (3 * -↑b))).h = 3 * c3
Tactic:
exact hc3
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
⊢ -3 - ↑b * 3 = 3 * -(↑b + 1)
Tactic:
ring
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
h1 : (↑(unit ^ (3 * -↑b))).f % 3 = 1
h2 : (↑(unit ^ (3 * -↑b))).g % 3 = 0
h3 : (↑(unit ^ (3 * -↑b))).h % 3 = 0
p : Nat.succ b = b + 1
c1 : ℤ
hc1 : (↑(unit ^ (3 * -↑b))).f = 3 * c1 + 1
c2 : ℤ
hc2 : (↑(unit ^ (3 * -↑b))).g = 3 * c2
c3 : ℤ
hc3 : (↑(unit ^ (3 * -↑b))).h = 3 * c3
s : ↑(unit ^ (3 * -↑b)) = { f := 3 * c1 + 1, g := 3 * c2, h := 3 * c3 }
w1 : (↑(unit ^ (-3 - ↑b * 3))).f = 10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)
w2 : (↑(unit ^ (-3 - ↑b * 3))).g = 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
w3 : (↑(unit ^ (-3 - ↑b * 3))).h = 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
j2 : -3 - ↑b * 3 = 3 * -(↑b + 1)
⊢ ↑b + 1 = ↑(b + 1)
Tactic:
norm_cast
State after:
no goals

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (10591 + c1 * 31773 + (c3 * 5184 - c2 * 12834)) % 3 = 1
Tactic:
rw [Int.add_emod ,Int.add_emod 10591, Int.sub_emod]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 * 31773 % 3) % 3 + (c3 * 5184 % 3 - c2 * 12834 % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 * 31773 % 3) % 3 + (c3 * 5184 % 3 - c2 * 12834 % 3) % 3) % 3 = 1
Tactic:
rw [Int.mul_emod c1]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 * 5184 % 3 - c2 * 12834 % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 * 5184 % 3 - c2 * 12834 % 3) % 3) % 3 = 1
Tactic:
rw [Int.mul_emod c3,Int.mul_emod c2]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
have : (10591:ℤ) %3 = 1 :=by norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this : 10591 % 3 = 1
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this : 10591 % 3 = 1
⊢ ((10591 % 3 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this : 10591 % 3 = 1
⊢ ((1 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this : 10591 % 3 = 1
⊢ ((1 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
have : (31773:ℤ) %3 =0 :=by norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝ : 10591 % 3 = 1
this : 31773 % 3 = 0
⊢ ((1 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝ : 10591 % 3 = 1
this : 31773 % 3 = 0
⊢ ((1 + c1 % 3 * (31773 % 3) % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝ : 10591 % 3 = 1
this : 31773 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝ : 10591 % 3 = 1
this : 31773 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
have : (5184:ℤ) %3 =0 :=by norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝¹ : 10591 % 3 = 1
this✝ : 31773 % 3 = 0
this : 5184 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝¹ : 10591 % 3 = 1
this✝ : 31773 % 3 = 0
this : 5184 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * (5184 % 3) % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝¹ : 10591 % 3 = 1
this✝ : 31773 % 3 = 0
this : 5184 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝¹ : 10591 % 3 = 1
this✝ : 31773 % 3 = 0
this : 5184 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
have : (12834:ℤ) %3 =0 :=by norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝² : 10591 % 3 = 1
this✝¹ : 31773 % 3 = 0
this✝ : 5184 % 3 = 0
this : 12834 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝² : 10591 % 3 = 1
this✝¹ : 31773 % 3 = 0
this✝ : 5184 % 3 = 0
this : 12834 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * (12834 % 3) % 3) % 3) % 3 = 1
Tactic:
rw [this]
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝² : 10591 % 3 = 1
this✝¹ : 31773 % 3 = 0
this✝ : 5184 % 3 = 0
this : 12834 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * 0 % 3) % 3) % 3 = 1

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝² : 10591 % 3 = 1
this✝¹ : 31773 % 3 = 0
this✝ : 5184 % 3 = 0
this : 12834 % 3 = 0
⊢ ((1 + c1 % 3 * 0 % 3) % 3 + (c3 % 3 * 0 % 3 - c2 % 3 * 0 % 3) % 3) % 3 = 1
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 10591 % 3 = 1
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this : 10591 % 3 = 1
⊢ 31773 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝ : 10591 % 3 = 1
this : 31773 % 3 = 0
⊢ 5184 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
this✝¹ : 10591 % 3 = 1
this✝ : 31773 % 3 = 0
this : 5184 % 3 = 0
⊢ 12834 % 3 = 0
Tactic:
norm_num
State after:
no goals

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)) % 3 = 0
Tactic:
norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 3 ∣ 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.left
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 3 ∣ 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729)
Tactic:
use 5553 * c1 + (906 * c3 + (-(2243 * c2) + 1851))
State after:
case h
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) = 3 * (5553 * c1 + (906 * c3 + (-(2243 * c2) + 1851)))

State before:
case h
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 5553 + c1 * 16659 + (c3 * 2718 - c2 * 6729) = 3 * (5553 * c1 + (906 * c3 + (-(2243 * c2) + 1851)))
Tactic:
ring_nf
State after:
no goals

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ (2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)) % 3 = 0
Tactic:
norm_num
State after:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 3 ∣ 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)

State before:
case right.succ.intro.intro.intro.intro.intro.intro.intro.right.right
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 3 ∣ 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592)
Tactic:
use 2139 * c1 + (349 * c3 + (-(864 * c2) + 713))
State after:
case h
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) = 3 * (2139 * c1 + (349 * c3 + (-(864 * c2) + 713)))

State before:
case h
a b✝ c : ℤθ
b : ℕ
c1 c2 c3 : ℤ
⊢ 2139 + c1 * 6417 + (c3 * 1047 - c2 * 2592) = 3 * (2139 * c1 + (349 * c3 + (-(864 * c2) + 713)))
Tactic:
ring_nf
State after:
no goals