Skip to content

Commit

Permalink
chore(data/polynomial/monic): remove useless lemma (#12364)
Browse files Browse the repository at this point in the history
There is a `nontrivial` version of this lemma (`ne_zero_of_monic`) which actually has uses in the library, unlike this deleted lemma. We also tidy the proof of the lemma below.
  • Loading branch information
ericrbg committed Mar 1, 2022
1 parent a4e936c commit 5a56e46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/data/polynomial/monic.lean
Expand Up @@ -35,12 +35,10 @@ begin
exact congr_arg C hp
end

lemma ne_zero_of_monic_of_zero_ne_one (hp : monic p) (h : (0 : R) ≠ 1) :
p ≠ 0 := mt (congr_arg leading_coeff) $ by rw [monic.def.1 hp, leading_coeff_zero]; cc

lemma ne_zero_of_ne_zero_of_monic (hp : p ≠ 0) (hq : monic q) : q ≠ 0 :=
begin
intro h, rw [h, monic.def, leading_coeff_zero] at hq,
rintro rfl,
rw [monic.def, leading_coeff_zero] at hq,
rw [← mul_one p, ← C_1, ← hq, C_0, mul_zero] at hp,
exact hp rfl
end
Expand Down

0 comments on commit 5a56e46

Please sign in to comment.