Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Archive/Imo/Imo1988Q6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ theorem constant_descent_vieta_jumping (x y : ℕ) {claim : Prop} {H : ℕ →
suffices hc : c ≠ mx from lt_of_le_of_ne (mod_cast c_lt) hc
-- However, recall that B(m_x) ≠ m_x + m_y.
-- If c = m_x, we can prove B(m_x) = m_x + m_y.
contrapose! hm_B₂
contrapose hm_B₂
subst c
simp [hV₁]
-- Hence p' = (c, m_x) lies on the upper branch, and we are done.
Expand Down
6 changes: 3 additions & 3 deletions Archive/Imo/Imo2008Q2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ theorem imo2008_q2a (x y z : ℝ) (h : x * y * z = 1) (hx : x ≠ 1) (hy : y ≠
x ^ 2 / (x - 1) ^ 2 + y ^ 2 / (y - 1) ^ 2 + z ^ 2 / (z - 1) ^ 2 ≥ 1 := by
obtain ⟨a, b, c, ha, hb, hc, rfl, rfl, rfl⟩ := subst_abc h
obtain ⟨m, n, rfl, rfl⟩ : ∃ m n, b = c - m ∧ a = c - m - n := by use c - b, b - a; simp
have hm_ne_zero : m ≠ 0 := by contrapose! hy; simpa [field]
have hn_ne_zero : n ≠ 0 := by contrapose! hx; simpa [field]
have hmn_ne_zero : m + n ≠ 0 := by contrapose! hz; field_simp; linarith
have hm_ne_zero : m ≠ 0 := by contrapose hy; simpa [field]
have hn_ne_zero : n ≠ 0 := by contrapose hx; simpa [field]
have hmn_ne_zero : m + n ≠ 0 := by contrapose hz; field_simp; linarith
have hc_sub_sub : c - (c - m - n) = m + n := by abel
rw [ge_iff_le, ← sub_nonneg]
convert sq_nonneg ((c * (m ^ 2 + n ^ 2 + m * n) - m * (m + n) ^ 2) / (m * n * (m + n)))
Expand Down
6 changes: 3 additions & 3 deletions Archive/MiuLanguage/DecisionNec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ theorem goodm_of_rule2 (xs : Miustr) (_ : Derivable (M :: xs)) (h₂ : Goodm (M
constructor
· rfl
· obtain ⟨mhead, mtail⟩ := h₂
contrapose! mtail
contrapose mtail
rw [cons_append] at mtail
exact or_self_iff.mp (mem_append.mp mtail)

Expand All @@ -145,7 +145,7 @@ theorem goodm_of_rule3 (as bs : Miustr) (h₁ : Derivable (as ++ [I, I, I] ++ bs
· cases as
· contradiction
exact mhead
· contrapose! nmtail
· contrapose nmtail
rcases exists_cons_of_ne_nil k with ⟨x, xs, rfl⟩
simp_rw [cons_append] at nmtail ⊢
simpa using nmtail
Expand All @@ -163,7 +163,7 @@ theorem goodm_of_rule4 (as bs : Miustr) (h₁ : Derivable (as ++ [U, U] ++ bs))
· cases as
· contradiction
exact mhead
· contrapose! nmtail
· contrapose nmtail
rcases exists_cons_of_ne_nil k with ⟨x, xs, rfl⟩
simp_rw [cons_append] at nmtail ⊢
simpa using nmtail
Expand Down
2 changes: 1 addition & 1 deletion Archive/Sensitivity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ theorem adj_iff_proj_adj {p q : Q n.succ} (h₀ : p 0 = q 0) :
rw [← Fin.pred_inj (ha := (?ha : y ≠ 0)) (hb := (?hb : i.succ ≠ 0)),
Fin.pred_succ]
case ha =>
contrapose! hy
contrapose hy
rw [hy, h₀]
case hb =>
apply Fin.succ_ne_zero
Expand Down
4 changes: 2 additions & 2 deletions Archive/Wiedijk100Theorems/PerfectNumbers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ theorem eq_two_pow_mul_odd {n : ℕ} (hpos : 0 < n) : ∃ k m : ℕ, n = 2 ^ k *
refine ⟨hm, ?_⟩
rw [even_iff_two_dvd]
have hg := h.not_pow_dvd_of_multiplicity_lt (Nat.lt_succ_self _)
contrapose! hg
contrapose hg
rcases hg with ⟨k, rfl⟩
apply Dvd.intro k
rw [pow_succ, mul_assoc, ← hm]
Expand Down Expand Up @@ -105,7 +105,7 @@ theorem eq_two_pow_mul_prime_mersenne_of_even_perfect {n : ℕ} (ev : Even n) (p
apply ne_of_lt _ jcon2
rw [mersenne, ← Nat.pred_eq_sub_one, Nat.lt_pred_iff, ← pow_one (Nat.succ 1)]
apply pow_lt_pow_right₀ (Nat.lt_succ_self 1) (Nat.succ_lt_succ k.succ_pos)
contrapose! hm
contrapose hm
simp [hm]

/-- The Euclid-Euler theorem characterizing even perfect numbers -/
Expand Down
4 changes: 2 additions & 2 deletions Archive/Wiedijk100Theorems/SolutionOfCubicQuartic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ theorem cubic_depressed_eq_zero_iff (hω : IsPrimitiveRoot ω 3) (hp_nonzero : p
rw [h₁]
apply Eq.congr_left
have hs_nonzero : s ≠ 0 := by
contrapose! hp_nonzero with hs_nonzero
contrapose hp_nonzero with hs_nonzero
linear_combination -1 * ht + t * hs_nonzero
rw [← mul_left_inj' (pow_ne_zero 3 hs_nonzero)]
have H := cube_root_of_unity_sum hω
Expand Down Expand Up @@ -172,7 +172,7 @@ theorem quartic_depressed_eq_zero_iff
have hi2 : (2 : K) ≠ 0 := Invertible.ne_zero _
have h4 : (4 : K) = 2 ^ 2 := by norm_num
have hs_nonzero : s ≠ 0 := by
contrapose! hq_nonzero with hs0
contrapose hq_nonzero with hs0
linear_combination (exp := 2) -hu + (4 * r - u ^ 2) * hs + (u ^ 2 * s - 4 * r * s) * hs0
calc
_ ↔ 4 * (x ^ 4 + p * x ^ 2 + q * x + r) = 0 := by simp [h4, hi2]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Algebra/Spectrum/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ lemma spectrum.units_conjugate {a : A} {u : Aˣ} :
simp [mul_assoc]
intro a u μ hμ
rw [spectrum.mem_iff] at hμ ⊢
contrapose!
contrapose hμ
simpa [mul_sub, sub_mul, Algebra.right_comm] using u.isUnit.mul hμ |>.mul u⁻¹.isUnit

/-- Conjugation by a unit preserves the spectrum, inverse on left. -/
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/GCDMonoid/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ noncomputable def gcdMonoidOfGCD [DecidableEq α] (gcd : α → α → α)
· rfl
have h := (Classical.choose_spec ((gcd_dvd_left a 0).trans (Dvd.intro 0 rfl))).symm
have a0' : gcd a 0 ≠ 0 := by
contrapose! a0
contrapose a0
rw [← associated_zero_iff_eq_zero, ← a0]
exact associated_of_dvd_dvd (dvd_gcd (dvd_refl a) (dvd_zero a)) (gcd_dvd_left _ _)
apply Or.resolve_left (mul_eq_zero.1 _) a0'
Expand Down Expand Up @@ -1051,7 +1051,7 @@ noncomputable def normalizedGCDMonoidOfGCD [NormalizationMonoid α] [DecidableEq
· rw [hl, zero_mul]
have h1 : gcd a b ≠ 0 := by
have hab : a * b ≠ 0 := mul_ne_zero a0 hb
contrapose! hab
contrapose hab
rw [← normalize_eq_zero, ← this, hab, zero_mul]
have h2 : normalize (gcd a b * l) = gcd a b * l := by rw [this, normalize_idem]
rw [← normalize_gcd] at this
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Irreducible/Indecomposable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ lemma Submonoid.closure_image_isMulIndecomposable_baseOf [Finite ι]
have ⟨(hi₀ : 1 < f (v i)), (hi₁ : v i ∉ _)⟩ : i ∈ s := hi.prop
have hi₂ (k : ι) (hk₀ : 1 < f (v k)) (hk₁ : f (v k) < f (v i)) : v k ∈ closure (v '' t) := by
by_contra hk₂; exact not_le.mpr hk₁ <| hi.le_of_le ⟨hk₀, hk₂⟩ hk₁.le
have hi₃ : i ∉ t := by contrapose! hi₁; exact subset_closure <| mem_image_of_mem v hi₁
have hi₃ : i ∉ t := by contrapose hi₁; exact subset_closure <| mem_image_of_mem v hi₁
obtain ⟨j, k, hj, hk, hjk⟩ : ∃ (j k : ι) (hj : 1 < f (v j)) (hk : 1 < f (v k)),
v i = v j * v k := by
grind [IsMulIndecomposable]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/UniqueProds/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ theorem of_mulOpposite (h : TwoUniqueProds Gᵐᵒᵖ) : TwoUniqueProds G where
simp_rw [mem_product] at h1 h2 ⊢
refine ⟨(_, _), ⟨?_, ?_⟩, (_, _), ⟨?_, ?_⟩, ?_, hu1.of_mulOpposite, hu2.of_mulOpposite⟩
pick_goal 5
· contrapose! hne; rw [Prod.ext_iff] at hne ⊢
· contrapose hne; rw [Prod.ext_iff] at hne ⊢
exact ⟨unop_injective hne.2, unop_injective hne.1
all_goals apply (mem_map' f).mp
exacts [h1.2, h1.1, h2.2, h2.1]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/GroupWithZero/Associated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ theorem Associated.of_pow_associated_of_prime' [CommMonoidWithZero M] [IsCancelM
lemma Irreducible.isRelPrime_iff_not_dvd [Monoid M] {p n : M} (hp : Irreducible p) :
IsRelPrime p n ↔ ¬ p ∣ n := by
refine ⟨fun h contra ↦ hp.not_isUnit (h dvd_rfl contra), fun hpn d hdp hdn ↦ ?_⟩
contrapose! hpn
contrapose hpn
suffices Associated p d from this.dvd.trans hdn
exact (hp.dvd_iff.mp hdp).resolve_left hpn

Expand Down Expand Up @@ -669,7 +669,7 @@ theorem dvdNotUnit_of_lt {a b : Associates M} (hlt : a < b) : DvdNotUnit a b :=
apply dvd_zero
rcases hlt with ⟨⟨x, rfl⟩, ndvd⟩
refine ⟨x, ?_, rfl⟩
contrapose! ndvd
contrapose ndvd
rcases ndvd with ⟨u, rfl⟩
simp

Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Algebra/Lie/Semisimple/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ instance : LieModule.IsIrreducible R L L := by
suffices Nontrivial (LieIdeal R L) from ⟨IsSimple.eq_bot_or_eq_top⟩
rw [LieSubmodule.nontrivial_iff, ← not_subsingleton_iff_nontrivial]
have _i : ¬ IsLieAbelian L := IsSimple.non_abelian R
contrapose! _i
contrapose _i
infer_instance

protected lemma isAtom_top : IsAtom (⊤ : LieIdeal R L) := isAtom_top
Expand Down Expand Up @@ -185,7 +185,7 @@ lemma isSimple_of_isAtom (I : LieIdeal R L) (hI : IsAtom I) : IsSimple R I where
exact x.2
-- So we need to show `J ≠ I` as ideals of `L`.
-- This follows from our assumption that `J ≠ ⊤` as ideals of `I`.
contrapose! hJ
contrapose hJ
rw [eq_top_iff]
rintro ⟨x, hx⟩ -
rw [← hJ] at hx
Expand Down Expand Up @@ -260,7 +260,7 @@ lemma finitelyAtomistic : ∀ s : Finset (LieIdeal R L), ↑s ⊆ {I : LieIdeal
exact LieSubmodule.lie_mem_lie j.2 hx
-- Indeed `J ⊓ I = ⊥`, since `J` is an atom that is not contained in `I`.
apply ((hs hJs).le_iff.mp _).resolve_right
· contrapose! hJI
· contrapose hJI
rw [← hJI]
exact inf_le_right
exact inf_le_left
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Lie/Sl2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ lemma lie_lie_smul_f (t : IsSl2Triple h e f) : ⁅h, f⁆ = -((2 : R) • f) :=

lemma e_ne_zero (t : IsSl2Triple h e f) : e ≠ 0 := by
have := t.h_ne_zero
contrapose! this
contrapose this
simpa [this] using t.lie_e_f.symm

lemma f_ne_zero (t : IsSl2Triple h e f) : f ≠ 0 := by
have := t.h_ne_zero
contrapose! this
contrapose this
simpa [this] using t.lie_e_f.symm

variable {R}
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Lie/Weights/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def equivSetOf : Weight R L M ≃ {χ : L → R | genWeightSpace M χ ≠ ⊥} w
lemma genWeightSpaceOf_ne_bot (χ : Weight R L M) (x : L) :
genWeightSpaceOf M (χ x) x ≠ ⊥ := by
have : ⨅ x, genWeightSpaceOf M (χ x) x ≠ ⊥ := χ.genWeightSpace_ne_bot
contrapose! this
contrapose this
rw [eq_bot_iff]
exact le_of_le_of_eq (iInf_le _ _) this

Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Algebra/Lie/Weights/Killing.lean
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ lemma disjoint_ker_weight_corootSpace (α : Weight K H L) :

lemma root_apply_cartanEquivDual_symm_ne_zero {α : Weight K H L} (hα : α.IsNonZero) :
α ((cartanEquivDual H).symm α) ≠ 0 := by
contrapose!
contrapose hα
suffices (cartanEquivDual H).symm α ∈ α.ker ⊓ corootSpace α by
rw [(disjoint_ker_weight_corootSpace α).eq_bot] at this
simpa using this
Expand Down Expand Up @@ -540,7 +540,7 @@ lemma traceForm_eq_zero_of_mem_ker_of_mem_span_coroot {α : Weight K H L} {x y :
simp [hα.eq, hβ.eq]
else
have hβ : β.IsNonZero := by
contrapose!
contrapose hα
simp only [← coroot_eq_zero_iff] at hα ⊢
rwa [hyp]
have : α.ker = β.ker := by
Expand Down Expand Up @@ -600,7 +600,7 @@ lemma _root_.IsSl2Triple.h_eq_coroot {α : Weight K H L} (hα : α.IsNonZero)
use (2 • (α α')⁻¹) * (killingForm K L e f)⁻¹
have hef₀ : killingForm K L e f ≠ 0 := by
have := ht.h_ne_zero
contrapose! this
contrapose this
simpa [this] using h_eq
rw [h_eq, smul_smul, mul_assoc, inv_mul_cancel₀ hef₀, mul_one, smul_assoc, coroot]

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/Submodule/Union.lean
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ lemma Submodule.iUnion_ssubset_of_forall_ne_top_of_card_lt (s : Finset ι) (p :
· simpa using h₁ j
replace h₂ : s.card + 1 < ENat.card K := by simpa [Finset.card_insert_of_notMem hj] using h₂
specialize hj' (lt_trans ENat.natCast_lt_succ h₂)
contrapose! hj'
contrapose hj'
replace hj' : (p j : Set M) ∪ (⋃ i ∈ s, p i) = univ := by
simpa only [Finset.mem_insert, iUnion_iUnion_eq_or_left] using hj'
suffices (p j : Set M) ⊆ ⋃ i ∈ s, p i by rwa [union_eq_right.mpr this] at hj'
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/ZLattice/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ theorem ZLattice.rank [hs : IsZLattice K L] : finrank ℤ L = finrank K E := by
rwa [h_card, ← topEquiv.finrank_eq, ← h_spanE, ← ht_span, finrank_span_set_eq_card ht_lin]
-- Assume that `e ∪ {v}` is not `ℤ`-linear independent then we get the contradiction
suffices ¬ LinearIndepOn ℤ id (insert v (Set.range e)) by
contrapose! this
contrapose this
refine this.mono ?_
exact Set.insert_subset (Set.mem_of_mem_diff hv) (by simp [e, ht_inc])
-- We prove finally that `e ∪ {v}` is not ℤ-linear independent or, equivalently,
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/MvPolynomial/Eval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ theorem constantCoeff_comp_map (f : R →+* S₁) :
theorem support_map_subset (p : MvPolynomial σ R) : (map f p).support ⊆ p.support := by
simp only [Finset.subset_iff, mem_support_iff]
intro x hx
contrapose! hx
contrapose hx
rw [coeff_map, hx, map_zero]

theorem support_map_of_injective (p : MvPolynomial σ R) {f : R →+* S₁} (hf : Injective f) :
Expand All @@ -464,7 +464,7 @@ theorem support_map_of_injective (p : MvPolynomial σ R) {f : R →+* S₁} (hf
· exact MvPolynomial.support_map_subset _ _
simp only [Finset.subset_iff, mem_support_iff]
intro x hx
contrapose! hx
contrapose hx
rw [coeff_map, ← f.map_zero] at hx
exact hf hx

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/MvPolynomial/NoZeroDivisors.lean
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ theorem degreeOf_C_mul (j : σ) (c : R) (hc : c ∈ R⁰) : degreeOf j (C c * p)
exact hp (rename_injective _ (Equiv.injective _) (by simpa using h))
simp_rw [ne_eq, renameEquiv_apply, algHom_C, algebraMap_eq, optionEquivLeft_C,
Polynomial.leadingCoeff_C]
contrapose! hp'
contrapose hp'
ext m
apply hc.1
simpa using congr_arg (coeff m) hp'
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Order/Archimedean/Hom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ instance OrderRingHom.subsingleton [IsStrictOrderedRing β] [Archimedean β] :
Subsingleton (α →+*o β) :=
fun f g => by
ext x
by_contra! h' : f x ≠ g x
by_contra h' : f x ≠ g x
wlog h : f x < g x with h₂
· exact h₂ g f x (Ne.symm h') (h'.lt_or_gt.resolve_left h)
obtain ⟨q, hf, hg⟩ := exists_rat_btwn h
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Algebra/Order/Module/HahnEmbedding.lean
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ theorem eval_smul [IsOrderedAddMonoid R] [Archimedean R] (k : K) (x : M) :
exact Submodule.smul_mem _ _ hy
simp [f.evalCoeff_eq hy, f.evalCoeff_eq hy', LinearPMap.map_smul]
have h' : ¬∃ y : f.val.domain, y.val - k • x ∈ ball K c := by
contrapose! h
contrapose h
obtain ⟨y, hy⟩ := h
use k⁻¹ • y
have heq : (k⁻¹ • y).val - x = k⁻¹ • (y.val - k • x) := by
Expand Down Expand Up @@ -644,7 +644,7 @@ theorem archimedeanClassMk_le_of_eval_eq [IsOrderedAddMonoid R] [Archimedean R]

set_option backward.isDefEq.respectTransparency false in
theorem val_sub_ne_zero {x : M} (hx : x ∉ f.val.domain) (y : f.val.domain) : y.val - x ≠ 0 := by
contrapose! hx
contrapose hx
obtain rfl : x = y.val := (sub_eq_zero.mp hx).symm
simp

Expand Down Expand Up @@ -781,7 +781,7 @@ set_option backward.isDefEq.respectTransparency false in
theorem extendFun_strictMono [IsOrderedAddMonoid R] [Archimedean R] {x : M}
(hx : x ∉ f.val.domain) : StrictMono (f.extendFun hx) := by
have hx' {c : K} (hc : c ≠ 0) : -c • x ∉ f.val.domain := by
contrapose! hx
contrapose hx
rwa [neg_smul, neg_mem_iff, Submodule.smul_mem_iff _ hc] at hx
-- only need to prove `0 < f v` for `0 < v = z - y`
intro y z hyz
Expand Down Expand Up @@ -848,7 +848,7 @@ theorem truncLT_eval_mem_range_extendFun [IsOrderedAddMonoid R] [Archimedean R]
· rw [HahnSeries.coe_truncLTLinearMap, HahnSeries.coeff_truncLT_of_lt hdc]
rw [HahnSeries.coe_truncLTLinearMap, HahnSeries.coeff_truncLT_of_le hdc, eval, ofLex_toLex]
apply f.evalCoeff_eq_zero
contrapose! h
contrapose h
obtain ⟨y, hy⟩ := h
exact ⟨y, Set.mem_of_mem_of_subset hy (by simpa using (ball_strictAnti K).antitone hdc)⟩

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Polynomial/CancelLeads.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ theorem natDegree_cancelLeads_lt_of_natDegree_le_natDegree_of_comm
apply lt_of_le_of_ne
· compute_degree!
rwa [Nat.sub_add_cancel]
· contrapose! h0
· contrapose h0
rw [← leadingCoeff_eq_zero, leadingCoeff, h0, mul_assoc, X_pow_mul, ← tsub_add_cancel_of_le h,
add_comm _ p.natDegree]
simp only [coeff_mul_X_pow, coeff_neg, coeff_C_mul, add_tsub_cancel_left, coeff_add]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Polynomial/Coeff.lean
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ theorem support_smul [SMulZeroClass S R] (r : S) (p : R[X]) :
support (r • p) ⊆ support p := by
intro i hi
rw [mem_support_iff] at hi ⊢
contrapose! hi
contrapose hi
simp [hi]

open scoped Pointwise in
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Polynomial/Derivative.lean
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ theorem iterate_derivative_eq_zero_of_degree_lt {k : ℕ} {P : R[X]} (h : P.degr
case pos hP' => simp [hP']
case neg hP' =>
have hP'' : P.natDegree ≠ 0 := by
contrapose! hP'
contrapose hP'
exact derivative_of_natDegree_zero hP'
refine ind <| (natDegree_lt_iff_degree_lt hP').mp ?_
linarith [(natDegree_lt_iff_degree_lt hP).mpr h, natDegree_derivative_lt hP'']
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Polynomial/Div.lean
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ theorem natDegree_modByMonic_lt (p : R[X]) {q : R[X]} (hmq : Monic q) (hq : q
natDegree (p %ₘ q) < q.natDegree := by
by_cases hpq : p %ₘ q = 0
· rw [hpq, natDegree_zero, Nat.pos_iff_ne_zero]
contrapose! hq
contrapose hq
exact eq_one_of_monic_natDegree_zero hmq hq
· haveI := Nontrivial.of_polynomial_ne hpq
exact natDegree_lt_natDegree hpq (degree_modByMonic_lt p hmq)
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Polynomial/Eval/Coeff.lean
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ section Map
theorem support_map_subset [Semiring R] [Semiring S] (f : R →+* S) (p : R[X]) :
(map f p).support ⊆ p.support := by
intro x
contrapose!
contrapose
simp +contextual

theorem support_map_of_injective [Semiring R] [Semiring S] (p : R[X]) {f : R →+* S}
Expand Down
Loading
Loading