-- Mathlib/RingTheory/ChainOfDivisors.lean
theorem coe_factor_orderIso_map_eq_one_iff {m u : Associates M} {n : Associates N} (hu' : u ≤ m)
    (d : Set.Iic m ≃o Set.Iic n) : (d ⟨u, hu'⟩ : Associates N) = 1 ↔ u = 1 :=
  ⟨fun hu => by
    rw [show u = (d.symm ⟨d ⟨u, hu'⟩, (d ⟨u, hu'⟩).prop⟩) by
        simp only [Subtype.coe_eta, OrderIso.symm_apply_apply, Subtype.coe_mk]]
    conv_rhs => rw [← factor_orderIso_map_one_eq_bot d.symm]
    congr, fun hu => by
    simp_rw [hu]
    conv_rhs => rw [← factor_orderIso_map_one_eq_bot d]
    rfl⟩

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ u = 1

Tactic:
rw [show u = (d.symm ⟨d ⟨u, hu'⟩, (d ⟨u, hu'⟩).prop⟩) by
    simp only [Subtype.coe_eta, OrderIso.symm_apply_apply, Subtype.coe_mk]]

Result:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ ↑(d.symm ⟨↑(d ⟨u, hu'⟩), ⋯⟩) = 1

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ ↑(d.symm ⟨↑(d ⟨u, hu'⟩), ⋯⟩) = ↑(d.symm ⟨1, ⋯⟩)

Tactic:
congr

Result:
no goals

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ u = ↑(d.symm ⟨↑(d ⟨u, hu'⟩), ⋯⟩)

Tactic:
simp only [Subtype.coe_eta, OrderIso.symm_apply_apply, Subtype.coe_mk]

Result:
no goals

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ ↑(d.symm ⟨↑(d ⟨u, hu'⟩), ⋯⟩) = 1

Tactic:
conv_rhs => rw [← factor_orderIso_map_one_eq_bot d.symm]

Result:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : ↑(d ⟨u, hu'⟩) = 1
⊢ ↑(d.symm ⟨↑(d ⟨u, hu'⟩), ⋯⟩) = ↑(d.symm ⟨1, ⋯⟩)

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : u = 1
⊢ ↑(d ⟨u, hu'⟩) = 1

Tactic:
simp_rw [hu]

Result:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : u = 1
⊢ ↑(d ⟨1, ⋯⟩) = 1

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : u = 1
⊢ ↑(d ⟨1, ⋯⟩) = ↑(d ⟨1, ⋯⟩)

Tactic:
rfl

Result:
no goals

Proof state:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : u = 1
⊢ ↑(d ⟨1, ⋯⟩) = 1

Tactic:
conv_rhs => rw [← factor_orderIso_map_one_eq_bot d]

Result:
M : Type u_1
inst✝¹ : CancelCommMonoidWithZero M
N : Type u_2
inst✝ : CancelCommMonoidWithZero N
m u : Associates M
n : Associates N
hu' : u ≤ m
d : ↑(Set.Iic m) ≃o ↑(Set.Iic n)
hu : u = 1
⊢ ↑(d ⟨1, ⋯⟩) = ↑(d ⟨1, ⋯⟩)