Theorem: nat_valuation_aux''_of_dvd_induction (ECTate/Algebra/ValuedRing.lean)

State before:
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
⊢ ∀ (M m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
intro M
State after:
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
⊢ ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1

State before:
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
⊢ ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
induction M with
| zero =>
  intro m mle0 hm n hmq
  rw [Nat.le_zero] at mle0
  exact ((ne_of_gt hm) mle0).elim
| succ M IH =>
  intro m m_le_sM hm n hmq
  cases LE.le.lt_or_eq m_le_sM with
  | inl mltsM =>
    exact IH m (Nat.le_of_lt_succ mltsM) hm n hmq
  | inr meqsM =>
    cases em ((m / q) % q == 0) with
    | inl h =>
      rw [nat_valuation_aux'', nat_valuation_aux'', dif_pos h]
      simp only [beq_iff_eq, Nat.cast_succ]
      rw [dif_pos hmq]
      simp only [meqsM]
      rw [meqsM] at hm h hmq
      exact IH (M.succ/q) (Nat.le_of_lt_succ (Nat.div_lt_self hm hq))
        (Nat.div_pos_of_mod hm hq hmq) (n+1) (by simpa using h)
    | inr h =>
      rw [nat_valuation_aux'', nat_valuation_aux'', dif_neg h, dif_pos, nat_valuation_aux'', dif_neg h]
      simp
      . simp only [hmq]
State after:
no goals

State before:
case zero
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
⊢ ∀ (m : ℕ),
    m ≤ Nat.zero →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
intro m mle0 hm n hmq
State after:
case zero
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
m : ℕ
mle0 : m ≤ Nat.zero
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1

State before:
case zero
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
m : ℕ
mle0 : m ≤ Nat.zero
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
rw [Nat.le_zero] at mle0
State after:
case zero
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
m : ℕ
mle0 : m = 0
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1

State before:
case zero
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
m : ℕ
mle0 : m = 0
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
exact ((ne_of_gt hm) mle0).elim
State after:
no goals

State before:
case succ
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
⊢ ∀ (m : ℕ),
    m ≤ Nat.succ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
intro m m_le_sM hm n hmq
State after:
case succ
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1

State before:
case succ
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
cases LE.le.lt_or_eq m_le_sM with
| inl mltsM =>
  exact IH m (Nat.le_of_lt_succ mltsM) hm n hmq
| inr meqsM =>
  cases em ((m / q) % q == 0) with
  | inl h =>
    rw [nat_valuation_aux'', nat_valuation_aux'', dif_pos h]
    simp only [beq_iff_eq, Nat.cast_succ]
    rw [dif_pos hmq]
    simp only [meqsM]
    rw [meqsM] at hm h hmq
    exact IH (M.succ/q) (Nat.le_of_lt_succ (Nat.div_lt_self hm hq))
      (Nat.div_pos_of_mod hm hq hmq) (n+1) (by simpa using h)
  | inr h =>
    rw [nat_valuation_aux'', nat_valuation_aux'', dif_neg h, dif_pos, nat_valuation_aux'', dif_neg h]
    simp
    . simp only [hmq]
State after:
no goals

State before:
case succ.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
mltsM : m < Nat.succ M
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
exact IH m (Nat.le_of_lt_succ mltsM) hm n hmq
State after:
no goals

State before:
case succ.inr
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
cases em ((m / q) % q == 0) with
| inl h =>
  rw [nat_valuation_aux'', nat_valuation_aux'', dif_pos h]
  simp only [beq_iff_eq, Nat.cast_succ]
  rw [dif_pos hmq]
  simp only [meqsM]
  rw [meqsM] at hm h hmq
  exact IH (M.succ/q) (Nat.le_of_lt_succ (Nat.div_lt_self hm hq))
    (Nat.div_pos_of_mod hm hq hmq) (n+1) (by simpa using h)
| inr h =>
  rw [nat_valuation_aux'', nat_valuation_aux'', dif_neg h, dif_pos, nat_valuation_aux'', dif_neg h]
  simp
  . simp only [hmq]
State after:
no goals

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
rw [nat_valuation_aux'', nat_valuation_aux'', dif_pos h]
State after:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ (if hmq : (m % q == 0) = true then nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) else n) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ (if hmq : (m % q == 0) = true then nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) else n) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1
Tactic:
simp only [beq_iff_eq, Nat.cast_succ]
State after:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ (if h : m % q = 0 then nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) else n) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ (if h : m % q = 0 then nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) else n) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1
Tactic:
rw [dif_pos hmq]
State after:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) (n + 1) =
    nat_valuation_aux'' q hq (m / q / q) (_ : 0 < m / q / q) (n + 1) + 1
Tactic:
simp only [meqsM]
State after:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (Nat.succ M / q) (_ : 0 < Nat.succ M / q) (n + 1) =
    nat_valuation_aux'' q hq (Nat.succ M / q / q) (_ : 0 < Nat.succ M / q / q) (n + 1) + 1

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : (m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (Nat.succ M / q) (_ : 0 < Nat.succ M / q) (n + 1) =
    nat_valuation_aux'' q hq (Nat.succ M / q / q) (_ : 0 < Nat.succ M / q / q) (n + 1) + 1
Tactic:
rw [meqsM] at hm h hmq
State after:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm✝ : 0 < m
hm : 0 < Nat.succ M
n : ℕ
hmq✝ : m % q = 0
hmq : Nat.succ M % q = 0
meqsM : m = Nat.succ M
h✝ : (m / q % q == 0) = true
h : (Nat.succ M / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (Nat.succ M / q) (_ : 0 < Nat.succ M / q) (n + 1) =
    nat_valuation_aux'' q hq (Nat.succ M / q / q) (_ : 0 < Nat.succ M / q / q) (n + 1) + 1

State before:
case succ.inr.inl
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm✝ : 0 < m
hm : 0 < Nat.succ M
n : ℕ
hmq✝ : m % q = 0
hmq : Nat.succ M % q = 0
meqsM : m = Nat.succ M
h✝ : (m / q % q == 0) = true
h : (Nat.succ M / q % q == 0) = true
⊢ nat_valuation_aux'' q hq (Nat.succ M / q) (_ : 0 < Nat.succ M / q) (n + 1) =
    nat_valuation_aux'' q hq (Nat.succ M / q / q) (_ : 0 < Nat.succ M / q / q) (n + 1) + 1
Tactic:
exact IH (M.succ/q) (Nat.le_of_lt_succ (Nat.div_lt_self hm hq))
  (Nat.div_pos_of_mod hm hq hmq) (n+1) (by simpa using h)
State after:
no goals

State before:
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm✝ : 0 < m
hm : 0 < Nat.succ M
n : ℕ
hmq✝ : m % q = 0
hmq : Nat.succ M % q = 0
meqsM : m = Nat.succ M
h✝ : (m / q % q == 0) = true
h : (Nat.succ M / q % q == 0) = true
⊢ Nat.succ M / q % q = 0
Tactic:
simpa using h
State after:
no goals

State before:
case succ.inr.inr
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
Tactic:
rw [nat_valuation_aux'', nat_valuation_aux'', dif_neg h, dif_pos, nat_valuation_aux'', dif_neg h]
State after:
case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true

case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true

case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true

State before:
case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true

case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true

case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ (m % q == 0) = true
Tactic:
simp
State after:
case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ m % q = 0

State before:
case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ m % q = 0
Tactic:
. simp only [hmq]
State after:
no goals

State before:
case succ.inr.inr.hc
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
q : ℕ
hq : 1 < q
M : ℕ
IH :
  ∀ (m : ℕ),
    m ≤ M →
      ∀ (hm : 0 < m) (n : ℕ) (hmq : m % q = 0),
        nat_valuation_aux'' q hq m hm n = nat_valuation_aux'' q hq (m / q) (_ : 0 < m / q) n + 1
m : ℕ
m_le_sM : m ≤ Nat.succ M
hm : 0 < m
n : ℕ
hmq : m % q = 0
meqsM : m = Nat.succ M
h : ¬(m / q % q == 0) = true
⊢ m % q = 0
Tactic:
simp only [hmq]
State after:
no goals