Skip to content

Instantly share code, notes, and snippets.

@FreeFull
Created April 10, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FreeFull/01d57489ac996db3ea2f8e31254d466c to your computer and use it in GitHub Desktop.
Save FreeFull/01d57489ac996db3ea2f8e31254d466c to your computer and use it in GitHub Desktop.
theorem mul_left_cancel (a b c : mynat) (ha : a ≠ 0) : a * b = a * c → b = c := begin
revert a b,
induction c,
intros a b ha h,
cases a,
exfalso,
exact ha (refl 0),
rw mul_zero at h,
rw succ_mul at h,
apply add_left_eq_zero h,
intros a e ha h,
cases e,
exfalso,
rw mul_zero at h,
rw mul_succ at h,
symmetry at h,
exact ha (add_left_eq_zero h),
rw mul_succ at h,
rw mul_succ at h,
have h := add_right_cancel _ a _ h,
apply succ_eq_succ_of_eq,
exact c_ih a e ha h,
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment