Zulip Chat Archive
Stream: mathlib4
Topic: request for help
Arien Malec (Dec 08 2022 at 19:49):
Could I ask someone to look at map_inv₀
in mathlib4#920?
if I get it to:
@[simp]
theorem map_inv₀ : f a⁻¹ = (f a)⁻¹ := by
by_cases h : a = 0 <;>
apply eq_inv_of_mul_eq_one_left <;>
rw [← map_mul, inv_mul_cancel, map_one]
. contradiction
. assumption
I get the very confusing error:
tactic 'contradiction' failed
case pos.h
f: F
ab: G₀
h: a = 0
⊢ a ≠ 0
so I'm probably missing something super basic.
Kevin Buzzard (Dec 08 2022 at 19:52):
The contradiction
tactic is not expected to prove that goal. The contradiction
tactic proves an arbitrary goal if there are two contradictory hypotheses. Is that what's confusing you?
Ruben Van de Velde (Dec 08 2022 at 20:07):
You got misdirected at some point - this works:
/-- A monoid homomorphism between groups with zeros sending `0` to `0` sends `a⁻¹` to `(f a)⁻¹`. -/
@[simp]
theorem map_inv₀ : f a⁻¹ = (f a)⁻¹ := by
by_cases h : a = 0
· simp [h, map_zero f]
· apply eq_inv_of_mul_eq_one_left
rw [← map_mul, inv_mul_cancel h, map_one]
#align map_inv₀ map_inv₀
Ruben Van de Velde (Dec 08 2022 at 20:09):
(I pushed that)
Arien Malec (Dec 08 2022 at 20:15):
I was both confused by contradiction
and by how I got into that state.
Arien Malec (Dec 08 2022 at 20:17):
So generally confused...
Ruben Van de Velde (Dec 08 2022 at 20:30):
In the a = 0
case, apply eq_inv_of_mul_eq_one_left
gives you an unprovable goal
Last updated: Dec 20 2023 at 11:08 UTC