Theorem: map_preNormEDS'
File: Mathlib/NumberTheory/EllipticDivisibilitySequence.lean

tactic: induction n using normEDSRec' with
| zero => rw [preNormEDS'_zero, map_zero, preNormEDS'_zero]
| one => rw [preNormEDS'_one, map_one, preNormEDS'_one]
| two => rw [preNormEDS'_two, map_one, preNormEDS'_two]
| three => rw [preNormEDS'_three, preNormEDS'_three]
| four => rw [preNormEDS'_four, preNormEDS'_four]
| _ _ ih =>
  simp only [preNormEDS'_odd, preNormEDS'_even, map_one, map_sub, map_mul, map_pow, apply_ite f]
  repeat rw [ih _ <| by linarith only]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
n : ℕ
⊢ f (preNormEDS' b c d n) = preNormEDS' (f b) (f c) (f d) n
state_after: no goals

tactic: rw [preNormEDS'_zero, map_zero, preNormEDS'_zero]
state_before: case zero
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ f (preNormEDS' b c d 0) = preNormEDS' (f b) (f c) (f d) 0
state_after: no goals

tactic: rw [preNormEDS'_one, map_one, preNormEDS'_one]
state_before: case one
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ f (preNormEDS' b c d 1) = preNormEDS' (f b) (f c) (f d) 1
state_after: no goals

tactic: rw [preNormEDS'_two, map_one, preNormEDS'_two]
state_before: case two
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ f (preNormEDS' b c d 2) = preNormEDS' (f b) (f c) (f d) 2
state_after: no goals

tactic: rw [preNormEDS'_three, preNormEDS'_three]
state_before: case three
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ f (preNormEDS' b c d 3) = preNormEDS' (f b) (f c) (f d) 3
state_after: no goals

tactic: rw [preNormEDS'_four, preNormEDS'_four]
state_before: case four
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ f (preNormEDS' b c d 4) = preNormEDS' (f b) (f c) (f d) 4
state_after: no goals

tactic: simp only [preNormEDS'_odd, preNormEDS'_even, map_one, map_sub, map_mul, map_pow, apply_ite f]
state_before: case odd
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 2) + 1, f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ f (preNormEDS' b c d (2 * (m✝ + 2) + 1)) = preNormEDS' (f b) (f c) (f d) (2 * (m✝ + 2) + 1)
state_after: case odd
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 2) + 1, f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ ((f (preNormEDS' b c d (m✝ + 4)) * f (preNormEDS' b c d (m✝ + 2)) ^ 3 * if Even m✝ then f b else 1) -
      f (preNormEDS' b c d (m✝ + 1)) * f (preNormEDS' b c d (m✝ + 3)) ^ 3 * if Even m✝ then 1 else f b) =
    (preNormEDS' (f b) (f c) (f d) (m✝ + 4) * preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 3 * if Even m✝ then f b else 1) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) ^ 3 * if Even m✝ then 1 else f b

tactic: repeat rw [ih _ <| by linarith only]
state_before: case odd
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 2) + 1, f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ ((f (preNormEDS' b c d (m✝ + 4)) * f (preNormEDS' b c d (m✝ + 2)) ^ 3 * if Even m✝ then f b else 1) -
      f (preNormEDS' b c d (m✝ + 1)) * f (preNormEDS' b c d (m✝ + 3)) ^ 3 * if Even m✝ then 1 else f b) =
    (preNormEDS' (f b) (f c) (f d) (m✝ + 4) * preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 3 * if Even m✝ then f b else 1) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) ^ 3 * if Even m✝ then 1 else f b
state_after: no goals

tactic: rw [ih _ <| by linarith only]
state_before: case odd
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 2) + 1, f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ ((preNormEDS' (f b) (f c) (f d) (m✝ + 4) * preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 3 * if Even m✝ then f b else 1) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * f (preNormEDS' b c d (m✝ + 3)) ^ 3 * if Even m✝ then 1 else f b) =
    (preNormEDS' (f b) (f c) (f d) (m✝ + 4) * preNormEDS' (f b) (f c) (f d) (m✝ + 2) ^ 3 * if Even m✝ then f b else 1) -
      preNormEDS' (f b) (f c) (f d) (m✝ + 1) * preNormEDS' (f b) (f c) (f d) (m✝ + 3) ^ 3 * if Even m✝ then 1 else f b
state_after: no goals

tactic: linarith only
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
m✝ : ℕ
ih : ∀ k < 2 * (m✝ + 2) + 1, f (preNormEDS' b c d k) = preNormEDS' (f b) (f c) (f d) k
⊢ m✝ + 3 < 2 * (m✝ + 2) + 1
state_after: no goals