tasksource/leandojo huggingface dataset:
Theorem: ContinuousLinearEquiv.homothety_inverse
File: Mathlib/Analysis/NormedSpace/ContinuousLinearMap.lean

tactic: intro hf y
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
E : Type u_3
F : Type u_4
G : Type ?u.201826
inst✝⁷ : NormedField 𝕜
inst✝⁶ : NormedField 𝕜₂
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : SeminormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedSpace 𝕜₂ F
σ : 𝕜 →+* 𝕜₂
f✝ : E →ₛₗ[σ] F
σ₂₁ : 𝕜₂ →+* 𝕜
inst✝¹ : RingHomInvPair σ σ₂₁
inst✝ : RingHomInvPair σ₂₁ σ
a : ℝ
ha : 0 < a
f : E ≃ₛₗ[σ] F
⊢ (∀ (x : E), ‖↑f x‖ = a * ‖x‖) → ∀ (y : F), ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * ‖y‖

tactic: calc
  ‖f.symm y‖ = a⁻¹ * (a * ‖f.symm y‖) := by
    rw [← mul_assoc, inv_mul_cancel (ne_of_lt ha).symm, one_mul]
  _ = a⁻¹ * ‖f (f.symm y)‖ := by rw [hf]
  _ = a⁻¹ * ‖y‖ := by simp
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
E : Type u_3
F : Type u_4
G : Type ?u.201826
inst✝⁷ : NormedField 𝕜
inst✝⁶ : NormedField 𝕜₂
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : SeminormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedSpace 𝕜₂ F
σ : 𝕜 →+* 𝕜₂
f✝ : E →ₛₗ[σ] F
σ₂₁ : 𝕜₂ →+* 𝕜
inst✝¹ : RingHomInvPair σ σ₂₁
inst✝ : RingHomInvPair σ₂₁ σ
a : ℝ
ha : 0 < a
f : E ≃ₛₗ[σ] F
hf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖
y : F
⊢ ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * ‖y‖

tactic: rw [← mul_assoc, inv_mul_cancel (ne_of_lt ha).symm, one_mul]
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
E : Type u_3
F : Type u_4
G : Type ?u.201826
inst✝⁷ : NormedField 𝕜
inst✝⁶ : NormedField 𝕜₂
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : SeminormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedSpace 𝕜₂ F
σ : 𝕜 →+* 𝕜₂
f✝ : E →ₛₗ[σ] F
σ₂₁ : 𝕜₂ →+* 𝕜
inst✝¹ : RingHomInvPair σ σ₂₁
inst✝ : RingHomInvPair σ₂₁ σ
a : ℝ
ha : 0 < a
f : E ≃ₛₗ[σ] F
hf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖
y : F
⊢ ‖↑(LinearEquiv.symm f) y‖ = a⁻¹ * (a * ‖↑(LinearEquiv.symm f) y‖)

tactic: rw [hf]
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
E : Type u_3
F : Type u_4
G : Type ?u.201826
inst✝⁷ : NormedField 𝕜
inst✝⁶ : NormedField 𝕜₂
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : SeminormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedSpace 𝕜₂ F
σ : 𝕜 →+* 𝕜₂
f✝ : E →ₛₗ[σ] F
σ₂₁ : 𝕜₂ →+* 𝕜
inst✝¹ : RingHomInvPair σ σ₂₁
inst✝ : RingHomInvPair σ₂₁ σ
a : ℝ
ha : 0 < a
f : E ≃ₛₗ[σ] F
hf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖
y : F
⊢ a⁻¹ * (a * ‖↑(LinearEquiv.symm f) y‖) = a⁻¹ * ‖↑f (↑(LinearEquiv.symm f) y)‖

tactic: simp
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
E : Type u_3
F : Type u_4
G : Type ?u.201826
inst✝⁷ : NormedField 𝕜
inst✝⁶ : NormedField 𝕜₂
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : SeminormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 E
inst✝² : NormedSpace 𝕜₂ F
σ : 𝕜 →+* 𝕜₂
f✝ : E →ₛₗ[σ] F
σ₂₁ : 𝕜₂ →+* 𝕜
inst✝¹ : RingHomInvPair σ σ₂₁
inst✝ : RingHomInvPair σ₂₁ σ
a : ℝ
ha : 0 < a
f : E ≃ₛₗ[σ] F
hf : ∀ (x : E), ‖↑f x‖ = a * ‖x‖
y : F
⊢ a⁻¹ * ‖↑f (↑(LinearEquiv.symm f) y)‖ = a⁻¹ * ‖y‖
Theorem: CategoryTheory.transferNatTransSelf_counit
File: Mathlib/CategoryTheory/Adjunction/Mates.lean

tactic: dsimp [transferNatTransSelf]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
⊢ L₂.map ((↑(transferNatTransSelf adj₁ adj₂) f).app X) ≫ adj₂.counit.app X = f.app (R₁.obj X) ≫ adj₁.counit.app X

tactic: rw [id_comp, comp_id]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
⊢ L₂.map
        (𝟙 (R₁.obj X) ≫
          (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X ≫
            𝟙 (R₂.obj X)) ≫
      adj₂.counit.app X =
    f.app (R₁.obj X) ≫ adj₁.counit.app X

tactic: have := transferNatTrans_counit adj₁ adj₂ (L₂.leftUnitor.hom ≫ f ≫ L₁.rightUnitor.inv) X
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
⊢ L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app X =
    f.app (R₁.obj X) ≫ adj₁.counit.app X

tactic: dsimp at this
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
this :
  L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app ((𝟭 D).obj X) =
    ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv).app (R₁.obj X) ≫ (𝟭 D).map (adj₁.counit.app X)
⊢ L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app X =
    f.app (R₁.obj X) ≫ adj₁.counit.app X

tactic: rw [this]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
this :
  L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app X =
    (𝟙 (L₂.obj (R₁.obj X)) ≫ f.app (R₁.obj X) ≫ 𝟙 (L₁.obj (R₁.obj X))) ≫ adj₁.counit.app X
⊢ L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app X =
    f.app (R₁.obj X) ≫ adj₁.counit.app X

tactic: simp
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : D
this :
  L₂.map ((↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app X) ≫
      adj₂.counit.app X =
    (𝟙 (L₂.obj (R₁.obj X)) ≫ f.app (R₁.obj X) ≫ 𝟙 (L₁.obj (R₁.obj X))) ≫ adj₁.counit.app X
⊢ (𝟙 (L₂.obj (R₁.obj X)) ≫ f.app (R₁.obj X) ≫ 𝟙 (L₁.obj (R₁.obj X))) ≫ adj₁.counit.app X =
    f.app (R₁.obj X) ≫ adj₁.counit.app X
Theorem: Dfinsupp.prod_add_index
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: simp (config := { contextual := true }) [mem_support_iff, h_zero]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
f g : Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
⊢ ∀ (x : ι), x ∈ support f ∪ support g → ¬x ∈ support f → h x (↑f x) = 1

tactic: simp (config := { contextual := true }) [mem_support_iff, h_zero]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
f g : Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
f_eq : ∏ i in support f ∪ support g, h i (↑f i) = prod f h
⊢ ∀ (x : ι), x ∈ support f ∪ support g → ¬x ∈ support g → h x (↑g x) = 1

tactic: simp (config := { contextual := true }) [mem_support_iff, h_zero]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
f g : Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
f_eq : ∏ i in support f ∪ support g, h i (↑f i) = prod f h
g_eq : ∏ i in support f ∪ support g, h i (↑g i) = prod g h
⊢ ∀ (x : ι), x ∈ support f ∪ support g → ¬x ∈ support (f + g) → h x (↑(f + g) x) = 1

tactic: rw [f_eq, g_eq]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
inst✝ : CommMonoid γ
f g : Π₀ (i : ι), β i
h : (i : ι) → β i → γ
h_zero : ∀ (i : ι), h i 0 = 1
h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂
f_eq : ∏ i in support f ∪ support g, h i (↑f i) = prod f h
g_eq : ∏ i in support f ∪ support g, h i (↑g i) = prod g h
⊢ (∏ i in support f ∪ support g, h i (↑f i)) * ∏ i in support f ∪ support g, h i (↑g i) = prod f h * prod g h
Theorem: Option.map_congr
File: Std/Data/Option/Lemmas.lean

tactic: cases x <;> simp only [map_none', map_some', h, mem_def]
state_before: α : Type u_1
α✝ : Type u_2
f g : α → α✝
x : Option α
h : ∀ (a : α), a ∈ x → f a = g a
⊢ Option.map f x = Option.map g x
Theorem: Localization.liftOn₂_mk'
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: rw [← mk_eq_monoidOf_mk', liftOn₂_mk]
state_before: M : Type u_2
inst✝² : CommMonoid M
S : Submonoid M
N : Type ?u.3268003
inst✝¹ : CommMonoid N
P : Type ?u.3268009
inst✝ : CommMonoid P
p : Sort u_1
f : M → { x // x ∈ S } → M → { x // x ∈ S } → p
H :
  ∀ {a a' : M} {b b' : { x // x ∈ S }} {c c' : M} {d d' : { x // x ∈ S }},
    ↑(r S) (a, b) (a', b') → ↑(r S) (c, d) (c', d') → f a b c d = f a' b' c' d'
a c : M
b d : { x // x ∈ S }
⊢ liftOn₂ (Submonoid.LocalizationMap.mk' (monoidOf S) a b) (Submonoid.LocalizationMap.mk' (monoidOf S) c d) f H =
    f a b c d
Theorem: CategoryTheory.comonadToFunctor_mapIso_comonad_iso_mk
File: Mathlib/CategoryTheory/Monad/Basic.lean

tactic: ext
state_before: C : Type u₁
inst✝ : Category C
T : Monad C
G M N : Comonad C
f : M.toFunctor ≅ N.toFunctor
f_ε : ∀ (X : C), f.hom.app X ≫ (Comonad.ε N).app X = (Comonad.ε M).app X
f_δ : ∀ (X : C), f.hom.app X ≫ (Comonad.δ N).app X = (Comonad.δ M).app X ≫ f.hom.app (M.obj X) ≫ N.map (f.hom.app X)
⊢ (comonadToFunctor C).mapIso (ComonadIso.mk f) = f

tactic: rfl
state_before: case w.w.h
C : Type u₁
inst✝ : Category C
T : Monad C
G M N : Comonad C
f : M.toFunctor ≅ N.toFunctor
f_ε : ∀ (X : C), f.hom.app X ≫ (Comonad.ε N).app X = (Comonad.ε M).app X
f_δ : ∀ (X : C), f.hom.app X ≫ (Comonad.δ N).app X = (Comonad.δ M).app X ≫ f.hom.app (M.obj X) ≫ N.map (f.hom.app X)
x✝ : C
⊢ ((comonadToFunctor C).mapIso (ComonadIso.mk f)).hom.app x✝ = f.hom.app x✝
Theorem: div_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.35705
G : Type ?u.35708
inst✝ : DivisionCommMonoid α
a b c d : α
⊢ a / b / c = a / (b * c)
Theorem: Polynomial.mirror_monomial
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: by_cases ha : a = 0
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
⊢ mirror (↑(monomial n) a) = ↑(monomial n) a

tactic: rw [ha, monomial_zero_right, mirror_zero]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
ha : a = 0
⊢ mirror (↑(monomial n) a) = ↑(monomial n) a

tactic: rw [mirror, reverse, natDegree_monomial n a, if_neg ha, natTrailingDegree_monomial ha, ←
  C_mul_X_pow_eq_monomial, reflect_C_mul_X_pow, revAt_le (le_refl n), tsub_self, pow_zero,
  mul_one]
state_before: case neg
R : Type u_1
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
ha : ¬a = 0
⊢ mirror (↑(monomial n) a) = ↑(monomial n) a
Theorem: Set.mem_dite_univ_right
File: Mathlib/Data/Set/Basic.lean

tactic: simp [mem_dite]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t✝ t₁ t₂ u : Set α
p : Prop
inst✝ : Decidable p
t : p → Set α
x : α
⊢ (x ∈ if h : p then t h else univ) ↔ ∀ (h : p), x ∈ t h
Theorem: CategoryTheory.Limits.ImageMap.map_uniq
File: Mathlib/CategoryTheory/Limits/Shapes/Images.lean

tactic: apply ImageMap.map_uniq_aux _ F.map_ι _ G.map_ι
state_before: C : Type u
inst✝⁴ : Category C
f✝ g✝ : Arrow C
inst✝³ : HasImage f✝.hom
inst✝² : HasImage g✝.hom
sq✝ : f✝ ⟶ g✝
f g : Arrow C
inst✝¹ : HasImage f.hom
inst✝ : HasImage g.hom
sq : f ⟶ g
F G : ImageMap sq
⊢ F.map = G.map
Theorem: CategoryTheory.Limits.map_π_preserves_coequalizer_inv_desc
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean

tactic: rw [← Category.assoc, map_π_preserves_coequalizer_inv, coequalizer.π_desc]
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
G : C ⥤ D
X Y Z : C
f g : X ⟶ Y
h : Y ⟶ Z
w : f ≫ h = g ≫ h
inst✝² : HasCoequalizer f g
inst✝¹ : HasCoequalizer (G.map f) (G.map g)
inst✝ : PreservesColimit (parallelPair f g) G
W : D
k : G.obj Y ⟶ W
wk : G.map f ≫ k = G.map g ≫ k
⊢ G.map (coequalizer.π f g) ≫ (PreservesCoequalizer.iso G f g).inv ≫ coequalizer.desc k wk = k
Theorem: LipschitzWith.mul_edist_le
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: rw [mul_comm, ← div_eq_mul_inv]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x✝ y✝ : α
r : ℝ≥0∞
h : LipschitzWith K f
x y : α
⊢ (↑K)⁻¹ * edist (f x) (f y) ≤ edist x y

tactic: exact ENNReal.div_le_of_le_mul' (h x y)
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x✝ y✝ : α
r : ℝ≥0∞
h : LipschitzWith K f
x y : α
⊢ edist (f x) (f y) / ↑K ≤ edist x y
Theorem: Submodule.mem_span_singleton_trans
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [← SetLike.mem_coe, ← singleton_subset_iff] at *
state_before: R : Type u_2
R₂ : Type ?u.160657
K : Type ?u.160660
M : Type u_1
M₂ : Type ?u.160666
V : Type ?u.160669
S : Type ?u.160672
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x y z : M
hxy : x ∈ span R {y}
hyz : y ∈ span R {z}
⊢ x ∈ span R {z}

tactic: exact Submodule.subset_span_trans hxy hyz
state_before: R : Type u_2
R₂ : Type ?u.160657
K : Type ?u.160660
M : Type u_1
M₂ : Type ?u.160666
V : Type ?u.160669
S : Type ?u.160672
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x y z : M
hxy : {x} ⊆ ↑(span R {y})
hyz : {y} ⊆ ↑(span R {z})
⊢ {x} ⊆ ↑(span R {z})
Theorem: Polynomial.prod_multiset_X_sub_C_dvd
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [← map_dvd_map _ (IsFractionRing.injective R <| FractionRing R) monic_prod_multiset_X_sub_C]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p)) ∣ p

tactic: rw [prod_multiset_root_eq_finset_root, Polynomial.map_prod]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ map (algebraMap R (FractionRing R)) (Multiset.prod (Multiset.map (fun a => X - ↑C a) (roots p))) ∣
    map (algebraMap R (FractionRing R)) p

tactic: refine' Finset.prod_dvd_of_coprime (fun a _ b _ h => _) fun a _ => _
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
⊢ (Finset.prod (Multiset.toFinset (roots p)) fun i =>
      map (algebraMap R (FractionRing R)) ((X - ↑C i) ^ rootMultiplicity i p)) ∣
    map (algebraMap R (FractionRing R)) p

tactic: simp_rw [Polynomial.map_pow, Polynomial.map_sub, map_C, map_X]
state_before: case refine'_1
R : Type u
S : Type v
T : Type w
a✝ b✝ : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
x✝¹ : a ∈ ↑(Multiset.toFinset (roots p))
b : R
x✝ : b ∈ ↑(Multiset.toFinset (roots p))
h : a ≠ b
⊢ (IsCoprime on fun i => map (algebraMap R (FractionRing R)) ((X - ↑C i) ^ rootMultiplicity i p)) a b

tactic: exact (pairwise_coprime_X_sub_C (IsFractionRing.injective R <| FractionRing R) h).pow
state_before: case refine'_1
R : Type u
S : Type v
T : Type w
a✝ b✝ : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
x✝¹ : a ∈ ↑(Multiset.toFinset (roots p))
b : R
x✝ : b ∈ ↑(Multiset.toFinset (roots p))
h : a ≠ b
⊢ (IsCoprime on fun i => (X - ↑C (↑(algebraMap R (FractionRing R)) i)) ^ rootMultiplicity i p) a b

tactic: exact Polynomial.map_dvd _ (pow_rootMultiplicity_dvd p a)
state_before: case refine'_2
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
x✝ : a ∈ Multiset.toFinset (roots p)
⊢ map (algebraMap R (FractionRing R)) ((X - ↑C a) ^ rootMultiplicity a p) ∣ map (algebraMap R (FractionRing R)) p
Theorem: Matrix.submatrix_updateColumn_equiv
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp_rw [Equiv.apply_symm_apply]
state_before: l : Type u_4
m : Type u_3
n : Type u_2
o : Type u_1
m' : o → Type ?u.1240817
n' : o → Type ?u.1240822
R : Type ?u.1240825
S : Type ?u.1240828
α : Type v
β : Type w
γ : Type ?u.1240835
M : Matrix m n α
i : m
j✝ : n
b : n → α
c✝ : m → α
inst✝¹ : DecidableEq o
inst✝ : DecidableEq n
A : Matrix m n α
j : n
c : m → α
e : l ≃ m
f : o ≃ n
⊢ submatrix (updateColumn A j c) ↑e ↑f = submatrix (updateColumn A (↑f (↑f.symm j)) fun i => c (↑e (↑e.symm i))) ↑e ↑f
Theorem: Filter.HasBasis.uniformity_of_nhds_one_inv_mul_swapped
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: rw [uniformity_eq_comap_inv_mul_nhds_one_swapped]
state_before: α : Type u_2
β : Type ?u.176584
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_1
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (𝓤 α) p fun i => {x | x.snd⁻¹ * x.fst ∈ U i}

tactic: exact h.comap _
state_before: α : Type u_2
β : Type ?u.176584
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_1
p : ι → Prop
U : ι → Set α
h : HasBasis (𝓝 1) p U
⊢ HasBasis (Filter.comap (fun x => x.snd⁻¹ * x.fst) (𝓝 1)) p fun i => {x | x.snd⁻¹ * x.fst ∈ U i}
Theorem: Cardinal.mk_subset_ge_of_subset_image
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [image_eq_range] at h
state_before: α β : Type u
f : α → β
s : Set α
t : Set β
h : t ⊆ f '' s
⊢ (#↑t) ≤ (#↑{x | x ∈ s ∧ f x ∈ t})

tactic: convert mk_preimage_of_subset_range _ _ h using 1
state_before: α β : Type u
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ (#↑t) ≤ (#↑{x | x ∈ s ∧ f x ∈ t})

tactic: rw [mk_sep]
state_before: case h.e'_4
α β : Type u
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ (#↑{x | x ∈ s ∧ f x ∈ t}) = (#↑((fun x => f ↑x) ⁻¹' t))

tactic: rfl
state_before: case h.e'_4
α β : Type u
f : α → β
s : Set α
t : Set β
h : t ⊆ range fun x => f ↑x
⊢ (#↑{x | f ↑x ∈ t}) = (#↑((fun x => f ↑x) ⁻¹' t))
Theorem: CategoryTheory.cokernel.π_op
File: Mathlib/CategoryTheory/Abelian/Opposite.lean

tactic: simp [cokernelOpUnop]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Abelian C
X Y : C
f : X ⟶ Y
A B : Cᵒᵖ
g : A ⟶ B
⊢ (cokernel.π f.op).unop = (cokernelOpUnop f).hom ≫ kernel.ι f ≫ eqToHom (_ : X = X.op.unop)
Theorem: Nat.fib_le_fib_succ
File: Mathlib/Data/Nat/Fib.lean

tactic: cases n <;> simp [fib_add_two]
state_before: n : ℕ
⊢ fib n ≤ fib (n + 1)
Theorem: Dfinsupp.filter_pos_add_filter_neg
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: simp only [add_apply, filter_apply]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
i : ι
⊢ ↑(filter p f + filter (fun i => ¬p i) f) i = ↑f i

tactic: split_ifs <;> simp only [add_zero, zero_add]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
i : ι
⊢ ((if p i then ↑f i else 0) + if ¬p i then ↑f i else 0) = ↑f i
Theorem: SimpleGraph.Walk.chain'_dartAdj_darts
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v✝¹ v v✝ : V
h : Adj G u v✝
p : Walk G v✝ v
⊢ { toProd := (u, v✝), is_adj := h }.toProd.snd = v✝
Theorem: WellFounded.monotone_chain_condition'
File: Mathlib/Order/OrderIsoNat.lean

tactic: refine' ⟨fun h a => _, fun h => _⟩
state_before: α : Type u_1
inst✝ : Preorder α
⊢ (WellFounded fun x x_1 => x > x_1) ↔ ∀ (a : ℕ →o α), ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m

tactic: have hne : (Set.range a).Nonempty := ⟨a 0, by simp⟩
state_before: case refine'_1
α : Type u_1
inst✝ : Preorder α
h : WellFounded fun x x_1 => x > x_1
a : ℕ →o α
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m

tactic: obtain ⟨x, ⟨n, rfl⟩, H⟩ := h.has_min _ hne
state_before: case refine'_1
α : Type u_1
inst✝ : Preorder α
h : WellFounded fun x x_1 => x > x_1
a : ℕ →o α
hne : Set.Nonempty (Set.range ↑a)
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m

tactic: exact ⟨n, fun m _ => H _ (Set.mem_range_self _)⟩
state_before: case refine'_1.intro.intro.intro
α : Type u_1
inst✝ : Preorder α
h : WellFounded fun x x_1 => x > x_1
a : ℕ →o α
hne : Set.Nonempty (Set.range ↑a)
n : ℕ
H : ∀ (x : α), x ∈ Set.range ↑a → ¬x > ↑a n
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m

tactic: simp
state_before: α : Type u_1
inst✝ : Preorder α
h : WellFounded fun x x_1 => x > x_1
a : ℕ →o α
⊢ ↑a 0 ∈ Set.range ↑a

tactic: refine' RelEmbedding.wellFounded_iff_no_descending_seq.2 ⟨fun a => _⟩
state_before: case refine'_2
α : Type u_1
inst✝ : Preorder α
h : ∀ (a : ℕ →o α), ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m
⊢ WellFounded fun x x_1 => x > x_1

tactic: exact hn n.succ n.lt_succ_self.le ((RelEmbedding.map_rel_iff _).2 n.lt_succ_self)
state_before: case refine'_2.intro
α : Type u_1
inst✝ : Preorder α
h : ∀ (a : ℕ →o α), ∃ n, ∀ (m : ℕ), n ≤ m → ¬↑a n < ↑a m
a : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1
n : ℕ
hn :
  ∀ (m : ℕ),
    n ≤ m →
      ¬↑(RelHom.toOrderHom (RelEmbedding.toRelHom (RelEmbedding.swap a))) n <
          ↑(RelHom.toOrderHom (RelEmbedding.toRelHom (RelEmbedding.swap a))) m
⊢ False
Theorem: LocalRing.surjective_units_map_of_local_ringHom
File: Mathlib/RingTheory/Ideal/LocalRing.lean

tactic: intro a
state_before: R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
⊢ Function.Surjective ↑(Units.map ↑f)

tactic: obtain ⟨b, hb⟩ := hf (a : S)
state_before: R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
⊢ ∃ a_1, ↑(Units.map ↑f) a_1 = a

tactic: use (isUnit_of_map_unit f b (by rw [hb]; exact Units.isUnit _)).unit
state_before: case intro
R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
b : R
hb : ↑f b = ↑a
⊢ ∃ a_1, ↑(Units.map ↑f) a_1 = a

tactic: ext
state_before: case intro
R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
b : R
hb : ↑f b = ↑a
⊢ ↑(Units.map ↑f) (IsUnit.unit (_ : IsUnit b)) = a

tactic: exact hb
state_before: case intro.a
R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
b : R
hb : ↑f b = ↑a
⊢ ↑(↑(Units.map ↑f) (IsUnit.unit (_ : IsUnit b))) = ↑a

tactic: rw [hb]
state_before: R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
b : R
hb : ↑f b = ↑a
⊢ IsUnit (↑f b)

tactic: exact Units.isUnit _
state_before: R : Type u
S : Type v
T : Type w
K : Type u'
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Function.Surjective ↑f
h : IsLocalRingHom f
a : Sˣ
b : R
hb : ↑f b = ↑a
⊢ IsUnit ↑a
Theorem: Finset.Icc_subset_Ici_self
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: simpa [← coe_subset] using Set.Icc_subset_Ici_self
state_before: ι : Type ?u.43325
α : Type u_1
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
inst✝ : LocallyFiniteOrderTop α
⊢ Icc a b ⊆ Ici a
Theorem: Cardinal.prod_eq_zero
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: lift f to ι → Type u using fun _ => trivial
state_before: α β : Type u
ι : Type u_1
f : ι → Cardinal
⊢ prod f = 0 ↔ ∃ i, f i = 0

tactic: simp only [mk_eq_zero_iff, ← mk_pi, isEmpty_pi]
state_before: case intro
α β : Type u
ι : Type u_1
f : ι → Type u
⊢ (prod fun i => #f i) = 0 ↔ ∃ i, (fun i => #f i) i = 0